diff --git a/cmake/cmake.options b/cmake/cmake.options index 2158157780..e3b5782d85 100644 --- a/cmake/cmake.options +++ b/cmake/cmake.options @@ -144,6 +144,12 @@ option( OFF ) +option( + BUILD_WITH_ANALYSIS + "If build with analysis" + ON +) + ENDIF () IF(NOT TD_ENTERPRISE) @@ -151,8 +157,15 @@ MESSAGE("switch s3 off with community version") set(BUILD_S3 OFF) set(BUILD_WITH_S3 OFF) set(BUILD_WITH_COS OFF) +set(BUILD_WITH_ANALYSIS OFF) ENDIF () +IF(${BUILD_WITH_ANALYSIS}) + message("build with analysis") + set(BUILD_S3 ON) + set(BUILD_WITH_S3 ON) +ENDIF() + IF(${BUILD_S3}) IF(${BUILD_WITH_S3}) diff --git a/include/common/systable.h b/include/common/systable.h index 65b3b36af8..0acafbfc30 100644 --- a/include/common/systable.h +++ b/include/common/systable.h @@ -29,6 +29,8 @@ extern "C" { #define TSDB_INS_TABLE_QNODES "ins_qnodes" #define TSDB_INS_TABLE_BNODES "ins_bnodes" // no longer used #define TSDB_INS_TABLE_SNODES "ins_snodes" +#define TSDB_INS_TABLE_ANODES "ins_anodes" +#define TSDB_INS_TABLE_ANODES_FULL "ins_anodes_full" #define TSDB_INS_TABLE_ARBGROUPS "ins_arbgroups" #define TSDB_INS_TABLE_CLUSTER "ins_cluster" #define TSDB_INS_TABLE_DATABASES "ins_databases" diff --git a/include/common/tanal.h b/include/common/tanal.h new file mode 100644 index 0000000000..59a28ddbe3 --- /dev/null +++ b/include/common/tanal.h @@ -0,0 +1,96 @@ +/* + * Copyright (c) 2019 TAOS Data, Inc. + * + * This program is free software: you can use, redistribute, and/or modify + * it under the terms of the GNU Affero General Public License, version 3 + * or later ("AGPL"), as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +#ifndef _TD_UTIL_ANAL_H_ +#define _TD_UTIL_ANAL_H_ + +#include "os.h" +#include "tdef.h" +#include "thash.h" +#include "tjson.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define ANAL_FORECAST_DEFAULT_PERIOD 10 +#define ANAL_FORECAST_DEFAULT_ROWS 10 +#define ANAL_FORECAST_DEFAULT_CONF 95 +#define ANAL_FORECAST_DEFAULT_ALPHA 0.05 +#define ANAL_FORECAST_DEFAULT_PARAM "diff" + +typedef struct { + EAnalAlgoType type; + int32_t anode; + int32_t urlLen; + char *url; +} SAnalUrl; + +typedef enum { + ANAL_BUF_TYPE_JSON = 0, + ANAL_BUF_TYPE_JSON_COL = 1, + ANAL_BUF_TYPE_OTHERS, +} EAnalBufType; + +typedef enum { + ANAL_HTTP_TYPE_GET = 0, + ANAL_HTTP_TYPE_POST, +} EAnalHttpType; + +typedef struct { + TdFilePtr filePtr; + char fileName[TSDB_FILENAME_LEN + 10]; + int64_t numOfRows; +} SAnalColBuf; + +typedef struct { + EAnalBufType bufType; + TdFilePtr filePtr; + char fileName[TSDB_FILENAME_LEN]; + int32_t numOfCols; + SAnalColBuf *pCols; +} SAnalBuf; + +int32_t taosAnalInit(); +void taosAnalCleanup(); +SJson *taosAnalSendReqRetJson(const char *url, EAnalHttpType type, SAnalBuf *pBuf); + +int32_t taosAnalGetAlgoUrl(const char *algoName, EAnalAlgoType type, char *url, int32_t urlLen); +bool taosAnalGetOptStr(const char *option, const char *optName, char *optValue, int32_t optMaxLen); +bool taosAnalGetOptInt(const char *option, const char *optName, int32_t *optValue); +int64_t taosAnalGetVersion(); +void taosAnalUpdate(int64_t newVer, SHashObj *pHash); + +int32_t tsosAnalBufOpen(SAnalBuf *pBuf, int32_t numOfCols); +int32_t taosAnalBufWriteOptStr(SAnalBuf *pBuf, const char *optName, const char *optVal); +int32_t taosAnalBufWriteOptInt(SAnalBuf *pBuf, const char *optName, int64_t optVal); +int32_t taosAnalBufWriteOptFloat(SAnalBuf *pBuf, const char *optName, float optVal); +int32_t taosAnalBufWriteColMeta(SAnalBuf *pBuf, int32_t colIndex, int32_t colType, const char *colName); +int32_t taosAnalBufWriteDataBegin(SAnalBuf *pBuf); +int32_t taosAnalBufWriteColBegin(SAnalBuf *pBuf, int32_t colIndex); +int32_t taosAnalBufWriteColData(SAnalBuf *pBuf, int32_t colIndex, int32_t colType, void *colValue); +int32_t taosAnalBufWriteColEnd(SAnalBuf *pBuf, int32_t colIndex); +int32_t taosAnalBufWriteDataEnd(SAnalBuf *pBuf); +int32_t taosAnalBufClose(SAnalBuf *pBuf); +void taosAnalBufDestroy(SAnalBuf *pBuf); + +const char *taosAnalAlgoStr(EAnalAlgoType algoType); +EAnalAlgoType taosAnalAlgoInt(const char *algoName); +const char *taosAnalAlgoUrlStr(EAnalAlgoType algoType); + +#ifdef __cplusplus +} +#endif +#endif /*_TD_UTIL_ANAL_H_*/ \ No newline at end of file diff --git a/include/common/tmsg.h b/include/common/tmsg.h index 1a10f02c96..ae9df866c5 100644 --- a/include/common/tmsg.h +++ b/include/common/tmsg.h @@ -159,6 +159,8 @@ typedef enum _mgmt_table { TSDB_MGMT_TABLE_ARBGROUP, TSDB_MGMT_TABLE_ENCRYPTIONS, TSDB_MGMT_TABLE_USER_FULL, + TSDB_MGMT_TABLE_ANODE, + TSDB_MGMT_TABLE_ANODE_FULL, TSDB_MGMT_TABLE_MAX, } EShowType; @@ -260,6 +262,7 @@ typedef enum ENodeType { QUERY_NODE_COUNT_WINDOW, QUERY_NODE_COLUMN_OPTIONS, QUERY_NODE_TSMA_OPTIONS, + QUERY_NODE_ANOMALY_WINDOW, // Statement nodes are used in parser and planner module. QUERY_NODE_SET_OPERATOR = 100, @@ -345,6 +348,9 @@ typedef enum ENodeType { QUERY_NODE_CREATE_VIEW_STMT, QUERY_NODE_DROP_VIEW_STMT, QUERY_NODE_CREATE_SUBTABLE_FROM_FILE_CLAUSE, + QUERY_NODE_CREATE_ANODE_STMT, + QUERY_NODE_DROP_ANODE_STMT, + QUERY_NODE_UPDATE_ANODE_STMT, // show statement nodes // see 'sysTableShowAdapter', 'SYSTABLE_SHOW_TYPE_OFFSET' @@ -386,6 +392,8 @@ typedef enum ENodeType { QUERY_NODE_SHOW_CLUSTER_MACHINES_STMT, QUERY_NODE_SHOW_ENCRYPTIONS_STMT, QUERY_NODE_SHOW_TSMAS_STMT, + QUERY_NODE_SHOW_ANODES_STMT, + QUERY_NODE_SHOW_ANODES_FULL_STMT, QUERY_NODE_CREATE_TSMA_STMT, QUERY_NODE_SHOW_CREATE_TSMA_STMT, QUERY_NODE_DROP_TSMA_STMT, @@ -408,6 +416,7 @@ typedef enum ENodeType { QUERY_NODE_LOGIC_PLAN, QUERY_NODE_LOGIC_PLAN_GROUP_CACHE, QUERY_NODE_LOGIC_PLAN_DYN_QUERY_CTRL, + QUERY_NODE_LOGIC_PLAN_FORECAST_FUNC, // physical plan node QUERY_NODE_PHYSICAL_PLAN_TAG_SCAN = 1100, @@ -458,6 +467,9 @@ typedef enum ENodeType { QUERY_NODE_PHYSICAL_PLAN_MERGE_COUNT, QUERY_NODE_PHYSICAL_PLAN_STREAM_COUNT, QUERY_NODE_PHYSICAL_PLAN_STREAM_MID_INTERVAL, + QUERY_NODE_PHYSICAL_PLAN_MERGE_ANOMALY, + QUERY_NODE_PHYSICAL_PLAN_STREAM_ANOMALY, + QUERY_NODE_PHYSICAL_PLAN_FORECAST_FUNC, } ENodeType; typedef struct { @@ -1092,6 +1104,22 @@ typedef struct { int32_t tSerializeRetrieveIpWhite(void* buf, int32_t bufLen, SRetrieveIpWhiteReq* pReq); int32_t tDeserializeRetrieveIpWhite(void* buf, int32_t bufLen, SRetrieveIpWhiteReq* pReq); +typedef struct { + int32_t dnodeId; + int64_t analVer; +} SRetrieveAnalAlgoReq; + +typedef struct { + int64_t ver; + SHashObj* hash; // algoname:algotype -> SAnalUrl +} SRetrieveAnalAlgoRsp; + +int32_t tSerializeRetrieveAnalAlgoReq(void* buf, int32_t bufLen, SRetrieveAnalAlgoReq* pReq); +int32_t tDeserializeRetrieveAnalAlgoReq(void* buf, int32_t bufLen, SRetrieveAnalAlgoReq* pReq); +int32_t tSerializeRetrieveAnalAlgoRsp(void* buf, int32_t bufLen, SRetrieveAnalAlgoRsp* pRsp); +int32_t tDeserializeRetrieveAnalAlgoRsp(void* buf, int32_t bufLen, SRetrieveAnalAlgoRsp* pRsp); +void tFreeRetrieveAnalAlgoRsp(SRetrieveAnalAlgoRsp* pRsp); + typedef struct { int8_t alterType; int8_t superUser; @@ -1766,6 +1794,7 @@ typedef struct { SArray* pVloads; // array of SVnodeLoad int32_t statusSeq; int64_t ipWhiteVer; + int64_t analVer; } SStatusReq; int32_t tSerializeSStatusReq(void* buf, int32_t bufLen, SStatusReq* pReq); @@ -1831,6 +1860,7 @@ typedef struct { SArray* pDnodeEps; // Array of SDnodeEp int32_t statusSeq; int64_t ipWhiteVer; + int64_t analVer; } SStatusRsp; int32_t tSerializeSStatusRsp(void* buf, int32_t bufLen, SStatusRsp* pRsp); @@ -2377,6 +2407,30 @@ typedef struct { int32_t tSerializeSDCreateMnodeReq(void* buf, int32_t bufLen, SDCreateMnodeReq* pReq); int32_t tDeserializeSDCreateMnodeReq(void* buf, int32_t bufLen, SDCreateMnodeReq* pReq); +typedef struct { + int32_t urlLen; + int32_t sqlLen; + char* url; + char* sql; +} SMCreateAnodeReq; + +int32_t tSerializeSMCreateAnodeReq(void* buf, int32_t bufLen, SMCreateAnodeReq* pReq); +int32_t tDeserializeSMCreateAnodeReq(void* buf, int32_t bufLen, SMCreateAnodeReq* pReq); +void tFreeSMCreateAnodeReq(SMCreateAnodeReq* pReq); + +typedef struct { + int32_t anodeId; + int32_t sqlLen; + char* sql; +} SMDropAnodeReq, SMUpdateAnodeReq; + +int32_t tSerializeSMDropAnodeReq(void* buf, int32_t bufLen, SMDropAnodeReq* pReq); +int32_t tDeserializeSMDropAnodeReq(void* buf, int32_t bufLen, SMDropAnodeReq* pReq); +void tFreeSMDropAnodeReq(SMDropAnodeReq* pReq); +int32_t tSerializeSMUpdateAnodeReq(void* buf, int32_t bufLen, SMUpdateAnodeReq* pReq); +int32_t tDeserializeSMUpdateAnodeReq(void* buf, int32_t bufLen, SMUpdateAnodeReq* pReq); +void tFreeSMUpdateAnodeReq(SMUpdateAnodeReq* pReq); + typedef struct { int32_t vgId; int32_t hbSeq; diff --git a/include/common/tmsgdef.h b/include/common/tmsgdef.h index 40464dc29a..6540e7b135 100644 --- a/include/common/tmsgdef.h +++ b/include/common/tmsgdef.h @@ -125,6 +125,11 @@ TD_DEF_MSG_TYPE(TDMT_DND_ALTER_VNODE_TYPE, "dnode-alter-vnode-type", NULL, NULL) TD_DEF_MSG_TYPE(TDMT_DND_CHECK_VNODE_LEARNER_CATCHUP, "dnode-check-vnode-learner-catchup", NULL, NULL) TD_DEF_MSG_TYPE(TDMT_DND_CREATE_ENCRYPT_KEY, "create-encrypt-key", NULL, NULL) + // mnode msg overload + TD_DEF_MSG_TYPE(TDMT_MND_CREATE_ANODE, "create-anode", NULL, NULL) + TD_DEF_MSG_TYPE(TDMT_MND_UPDATE_ANODE, "update-anode", NULL, NULL) + TD_DEF_MSG_TYPE(TDMT_MND_DROP_ANODE, "drop-anode", NULL, NULL) + TD_DEF_MSG_TYPE(TDMT_MND_RETRIEVE_ANAL_ALGO, "retrieve-anal-algo", NULL, NULL) TD_CLOSE_MSG_SEG(TDMT_DND_MSG) TD_NEW_MSG_SEG(TDMT_MND_MSG) // 1<<8 diff --git a/include/common/ttokendef.h b/include/common/ttokendef.h index 005a5c49b1..b86830869c 100644 --- a/include/common/ttokendef.h +++ b/include/common/ttokendef.h @@ -69,335 +69,341 @@ #define TK_NK_DOT 51 #define TK_WITH 52 #define TK_ENCRYPT_KEY 53 -#define TK_DNODE 54 -#define TK_PORT 55 -#define TK_DNODES 56 -#define TK_RESTORE 57 -#define TK_NK_IPTOKEN 58 -#define TK_FORCE 59 -#define TK_UNSAFE 60 -#define TK_CLUSTER 61 -#define TK_LOCAL 62 -#define TK_QNODE 63 -#define TK_BNODE 64 -#define TK_SNODE 65 -#define TK_MNODE 66 -#define TK_VNODE 67 -#define TK_DATABASE 68 -#define TK_USE 69 -#define TK_FLUSH 70 -#define TK_TRIM 71 -#define TK_S3MIGRATE 72 -#define TK_COMPACT 73 -#define TK_IF 74 -#define TK_NOT 75 -#define TK_EXISTS 76 -#define TK_BUFFER 77 -#define TK_CACHEMODEL 78 -#define TK_CACHESIZE 79 -#define TK_COMP 80 -#define TK_DURATION 81 -#define TK_NK_VARIABLE 82 -#define TK_MAXROWS 83 -#define TK_MINROWS 84 -#define TK_KEEP 85 -#define TK_PAGES 86 -#define TK_PAGESIZE 87 -#define TK_TSDB_PAGESIZE 88 -#define TK_PRECISION 89 -#define TK_REPLICA 90 -#define TK_VGROUPS 91 -#define TK_SINGLE_STABLE 92 -#define TK_RETENTIONS 93 -#define TK_SCHEMALESS 94 -#define TK_WAL_LEVEL 95 -#define TK_WAL_FSYNC_PERIOD 96 -#define TK_WAL_RETENTION_PERIOD 97 -#define TK_WAL_RETENTION_SIZE 98 -#define TK_WAL_ROLL_PERIOD 99 -#define TK_WAL_SEGMENT_SIZE 100 -#define TK_STT_TRIGGER 101 -#define TK_TABLE_PREFIX 102 -#define TK_TABLE_SUFFIX 103 -#define TK_S3_CHUNKSIZE 104 -#define TK_S3_KEEPLOCAL 105 -#define TK_S3_COMPACT 106 -#define TK_KEEP_TIME_OFFSET 107 -#define TK_ENCRYPT_ALGORITHM 108 -#define TK_NK_COLON 109 -#define TK_BWLIMIT 110 -#define TK_START 111 -#define TK_TIMESTAMP 112 -#define TK_END 113 -#define TK_TABLE 114 -#define TK_NK_LP 115 -#define TK_NK_RP 116 -#define TK_USING 117 -#define TK_FILE 118 -#define TK_STABLE 119 -#define TK_COLUMN 120 -#define TK_MODIFY 121 -#define TK_RENAME 122 -#define TK_TAG 123 -#define TK_SET 124 -#define TK_NK_EQ 125 -#define TK_TAGS 126 -#define TK_BOOL 127 -#define TK_TINYINT 128 -#define TK_SMALLINT 129 -#define TK_INT 130 -#define TK_INTEGER 131 -#define TK_BIGINT 132 -#define TK_FLOAT 133 -#define TK_DOUBLE 134 -#define TK_BINARY 135 -#define TK_NCHAR 136 -#define TK_UNSIGNED 137 -#define TK_JSON 138 -#define TK_VARCHAR 139 -#define TK_MEDIUMBLOB 140 -#define TK_BLOB 141 -#define TK_VARBINARY 142 -#define TK_GEOMETRY 143 -#define TK_DECIMAL 144 -#define TK_COMMENT 145 -#define TK_MAX_DELAY 146 -#define TK_WATERMARK 147 -#define TK_ROLLUP 148 -#define TK_TTL 149 -#define TK_SMA 150 -#define TK_DELETE_MARK 151 -#define TK_FIRST 152 -#define TK_LAST 153 -#define TK_SHOW 154 -#define TK_FULL 155 -#define TK_PRIVILEGES 156 -#define TK_DATABASES 157 -#define TK_TABLES 158 -#define TK_STABLES 159 -#define TK_MNODES 160 -#define TK_QNODES 161 -#define TK_ARBGROUPS 162 -#define TK_FUNCTIONS 163 -#define TK_INDEXES 164 -#define TK_ACCOUNTS 165 -#define TK_APPS 166 -#define TK_CONNECTIONS 167 -#define TK_LICENCES 168 -#define TK_GRANTS 169 -#define TK_LOGS 170 -#define TK_MACHINES 171 -#define TK_ENCRYPTIONS 172 -#define TK_QUERIES 173 -#define TK_SCORES 174 -#define TK_TOPICS 175 -#define TK_VARIABLES 176 -#define TK_BNODES 177 -#define TK_SNODES 178 -#define TK_TRANSACTIONS 179 -#define TK_DISTRIBUTED 180 -#define TK_CONSUMERS 181 -#define TK_SUBSCRIPTIONS 182 -#define TK_VNODES 183 -#define TK_ALIVE 184 -#define TK_VIEWS 185 -#define TK_VIEW 186 -#define TK_COMPACTS 187 -#define TK_NORMAL 188 -#define TK_CHILD 189 -#define TK_LIKE 190 -#define TK_TBNAME 191 -#define TK_QTAGS 192 -#define TK_AS 193 -#define TK_SYSTEM 194 -#define TK_TSMA 195 -#define TK_INTERVAL 196 -#define TK_RECURSIVE 197 -#define TK_TSMAS 198 -#define TK_FUNCTION 199 -#define TK_INDEX 200 -#define TK_COUNT 201 -#define TK_LAST_ROW 202 -#define TK_META 203 -#define TK_ONLY 204 -#define TK_TOPIC 205 -#define TK_CONSUMER 206 -#define TK_GROUP 207 -#define TK_DESC 208 -#define TK_DESCRIBE 209 -#define TK_RESET 210 -#define TK_QUERY 211 -#define TK_CACHE 212 -#define TK_EXPLAIN 213 -#define TK_ANALYZE 214 -#define TK_VERBOSE 215 -#define TK_NK_BOOL 216 -#define TK_RATIO 217 -#define TK_NK_FLOAT 218 -#define TK_OUTPUTTYPE 219 -#define TK_AGGREGATE 220 -#define TK_BUFSIZE 221 -#define TK_LANGUAGE 222 -#define TK_REPLACE 223 -#define TK_STREAM 224 -#define TK_INTO 225 -#define TK_PAUSE 226 -#define TK_RESUME 227 -#define TK_PRIMARY 228 -#define TK_KEY 229 -#define TK_TRIGGER 230 -#define TK_AT_ONCE 231 -#define TK_WINDOW_CLOSE 232 -#define TK_IGNORE 233 -#define TK_EXPIRED 234 -#define TK_FILL_HISTORY 235 -#define TK_UPDATE 236 -#define TK_SUBTABLE 237 -#define TK_UNTREATED 238 -#define TK_KILL 239 -#define TK_CONNECTION 240 -#define TK_TRANSACTION 241 -#define TK_BALANCE 242 -#define TK_VGROUP 243 -#define TK_LEADER 244 -#define TK_MERGE 245 -#define TK_REDISTRIBUTE 246 -#define TK_SPLIT 247 -#define TK_DELETE 248 -#define TK_INSERT 249 -#define TK_NK_BIN 250 -#define TK_NK_HEX 251 -#define TK_NULL 252 -#define TK_NK_QUESTION 253 -#define TK_NK_ALIAS 254 -#define TK_NK_ARROW 255 -#define TK_ROWTS 256 -#define TK_QSTART 257 -#define TK_QEND 258 -#define TK_QDURATION 259 -#define TK_WSTART 260 -#define TK_WEND 261 -#define TK_WDURATION 262 -#define TK_IROWTS 263 -#define TK_ISFILLED 264 -#define TK_CAST 265 -#define TK_POSITION 266 -#define TK_IN 267 -#define TK_FOR 268 -#define TK_NOW 269 -#define TK_TODAY 270 -#define TK_RAND 271 -#define TK_SUBSTR 272 -#define TK_SUBSTRING 273 -#define TK_BOTH 274 -#define TK_TRAILING 275 -#define TK_LEADING 276 -#define TK_TIMEZONE 277 -#define TK_CLIENT_VERSION 278 -#define TK_SERVER_VERSION 279 -#define TK_SERVER_STATUS 280 -#define TK_CURRENT_USER 281 -#define TK_PI 282 -#define TK_CASE 283 -#define TK_WHEN 284 -#define TK_THEN 285 -#define TK_ELSE 286 -#define TK_BETWEEN 287 -#define TK_IS 288 -#define TK_NK_LT 289 -#define TK_NK_GT 290 -#define TK_NK_LE 291 -#define TK_NK_GE 292 -#define TK_NK_NE 293 -#define TK_MATCH 294 -#define TK_NMATCH 295 -#define TK_CONTAINS 296 -#define TK_JOIN 297 -#define TK_INNER 298 -#define TK_LEFT 299 -#define TK_RIGHT 300 -#define TK_OUTER 301 -#define TK_SEMI 302 -#define TK_ANTI 303 -#define TK_ASOF 304 -#define TK_WINDOW 305 -#define TK_WINDOW_OFFSET 306 -#define TK_JLIMIT 307 -#define TK_SELECT 308 -#define TK_NK_HINT 309 -#define TK_DISTINCT 310 -#define TK_WHERE 311 -#define TK_PARTITION 312 -#define TK_BY 313 -#define TK_SESSION 314 -#define TK_STATE_WINDOW 315 -#define TK_EVENT_WINDOW 316 -#define TK_COUNT_WINDOW 317 -#define TK_SLIDING 318 -#define TK_FILL 319 -#define TK_VALUE 320 -#define TK_VALUE_F 321 -#define TK_NONE 322 -#define TK_PREV 323 -#define TK_NULL_F 324 -#define TK_LINEAR 325 -#define TK_NEXT 326 -#define TK_HAVING 327 -#define TK_RANGE 328 -#define TK_EVERY 329 -#define TK_ORDER 330 -#define TK_SLIMIT 331 -#define TK_SOFFSET 332 -#define TK_LIMIT 333 -#define TK_OFFSET 334 -#define TK_ASC 335 -#define TK_NULLS 336 -#define TK_ABORT 337 -#define TK_AFTER 338 -#define TK_ATTACH 339 -#define TK_BEFORE 340 -#define TK_BEGIN 341 -#define TK_BITAND 342 -#define TK_BITNOT 343 -#define TK_BITOR 344 -#define TK_BLOCKS 345 -#define TK_CHANGE 346 -#define TK_COMMA 347 -#define TK_CONCAT 348 -#define TK_CONFLICT 349 -#define TK_COPY 350 -#define TK_DEFERRED 351 -#define TK_DELIMITERS 352 -#define TK_DETACH 353 -#define TK_DIVIDE 354 -#define TK_DOT 355 -#define TK_EACH 356 -#define TK_FAIL 357 -#define TK_GLOB 358 -#define TK_ID 359 -#define TK_IMMEDIATE 360 -#define TK_IMPORT 361 -#define TK_INITIALLY 362 -#define TK_INSTEAD 363 -#define TK_ISNULL 364 -#define TK_MODULES 365 -#define TK_NK_BITNOT 366 -#define TK_NK_SEMI 367 -#define TK_NOTNULL 368 -#define TK_OF 369 -#define TK_PLUS 370 -#define TK_PRIVILEGE 371 -#define TK_RAISE 372 -#define TK_RESTRICT 373 -#define TK_ROW 374 -#define TK_STAR 375 -#define TK_STATEMENT 376 -#define TK_STRICT 377 -#define TK_STRING 378 -#define TK_TIMES 379 -#define TK_VALUES 380 -#define TK_VARIABLE 381 -#define TK_WAL 382 +#define TK_ANODE 54 +#define TK_UPDATE 55 +#define TK_ANODES 56 +#define TK_DNODE 57 +#define TK_PORT 58 +#define TK_DNODES 59 +#define TK_RESTORE 60 +#define TK_NK_IPTOKEN 61 +#define TK_FORCE 62 +#define TK_UNSAFE 63 +#define TK_CLUSTER 64 +#define TK_LOCAL 65 +#define TK_QNODE 66 +#define TK_BNODE 67 +#define TK_SNODE 68 +#define TK_MNODE 69 +#define TK_VNODE 70 +#define TK_DATABASE 71 +#define TK_USE 72 +#define TK_FLUSH 73 +#define TK_TRIM 74 +#define TK_S3MIGRATE 75 +#define TK_COMPACT 76 +#define TK_IF 77 +#define TK_NOT 78 +#define TK_EXISTS 79 +#define TK_BUFFER 80 +#define TK_CACHEMODEL 81 +#define TK_CACHESIZE 82 +#define TK_COMP 83 +#define TK_DURATION 84 +#define TK_NK_VARIABLE 85 +#define TK_MAXROWS 86 +#define TK_MINROWS 87 +#define TK_KEEP 88 +#define TK_PAGES 89 +#define TK_PAGESIZE 90 +#define TK_TSDB_PAGESIZE 91 +#define TK_PRECISION 92 +#define TK_REPLICA 93 +#define TK_VGROUPS 94 +#define TK_SINGLE_STABLE 95 +#define TK_RETENTIONS 96 +#define TK_SCHEMALESS 97 +#define TK_WAL_LEVEL 98 +#define TK_WAL_FSYNC_PERIOD 99 +#define TK_WAL_RETENTION_PERIOD 100 +#define TK_WAL_RETENTION_SIZE 101 +#define TK_WAL_ROLL_PERIOD 102 +#define TK_WAL_SEGMENT_SIZE 103 +#define TK_STT_TRIGGER 104 +#define TK_TABLE_PREFIX 105 +#define TK_TABLE_SUFFIX 106 +#define TK_S3_CHUNKSIZE 107 +#define TK_S3_KEEPLOCAL 108 +#define TK_S3_COMPACT 109 +#define TK_KEEP_TIME_OFFSET 110 +#define TK_ENCRYPT_ALGORITHM 111 +#define TK_NK_COLON 112 +#define TK_BWLIMIT 113 +#define TK_START 114 +#define TK_TIMESTAMP 115 +#define TK_END 116 +#define TK_TABLE 117 +#define TK_NK_LP 118 +#define TK_NK_RP 119 +#define TK_USING 120 +#define TK_FILE 121 +#define TK_STABLE 122 +#define TK_COLUMN 123 +#define TK_MODIFY 124 +#define TK_RENAME 125 +#define TK_TAG 126 +#define TK_SET 127 +#define TK_NK_EQ 128 +#define TK_TAGS 129 +#define TK_BOOL 130 +#define TK_TINYINT 131 +#define TK_SMALLINT 132 +#define TK_INT 133 +#define TK_INTEGER 134 +#define TK_BIGINT 135 +#define TK_FLOAT 136 +#define TK_DOUBLE 137 +#define TK_BINARY 138 +#define TK_NCHAR 139 +#define TK_UNSIGNED 140 +#define TK_JSON 141 +#define TK_VARCHAR 142 +#define TK_MEDIUMBLOB 143 +#define TK_BLOB 144 +#define TK_VARBINARY 145 +#define TK_GEOMETRY 146 +#define TK_DECIMAL 147 +#define TK_COMMENT 148 +#define TK_MAX_DELAY 149 +#define TK_WATERMARK 150 +#define TK_ROLLUP 151 +#define TK_TTL 152 +#define TK_SMA 153 +#define TK_DELETE_MARK 154 +#define TK_FIRST 155 +#define TK_LAST 156 +#define TK_SHOW 157 +#define TK_FULL 158 +#define TK_PRIVILEGES 159 +#define TK_DATABASES 160 +#define TK_TABLES 161 +#define TK_STABLES 162 +#define TK_MNODES 163 +#define TK_QNODES 164 +#define TK_ARBGROUPS 165 +#define TK_FUNCTIONS 166 +#define TK_INDEXES 167 +#define TK_ACCOUNTS 168 +#define TK_APPS 169 +#define TK_CONNECTIONS 170 +#define TK_LICENCES 171 +#define TK_GRANTS 172 +#define TK_LOGS 173 +#define TK_MACHINES 174 +#define TK_ENCRYPTIONS 175 +#define TK_QUERIES 176 +#define TK_SCORES 177 +#define TK_TOPICS 178 +#define TK_VARIABLES 179 +#define TK_BNODES 180 +#define TK_SNODES 181 +#define TK_TRANSACTIONS 182 +#define TK_DISTRIBUTED 183 +#define TK_CONSUMERS 184 +#define TK_SUBSCRIPTIONS 185 +#define TK_VNODES 186 +#define TK_ALIVE 187 +#define TK_VIEWS 188 +#define TK_VIEW 189 +#define TK_COMPACTS 190 +#define TK_NORMAL 191 +#define TK_CHILD 192 +#define TK_LIKE 193 +#define TK_TBNAME 194 +#define TK_QTAGS 195 +#define TK_AS 196 +#define TK_SYSTEM 197 +#define TK_TSMA 198 +#define TK_INTERVAL 199 +#define TK_RECURSIVE 200 +#define TK_TSMAS 201 +#define TK_FUNCTION 202 +#define TK_INDEX 203 +#define TK_COUNT 204 +#define TK_LAST_ROW 205 +#define TK_META 206 +#define TK_ONLY 207 +#define TK_TOPIC 208 +#define TK_CONSUMER 209 +#define TK_GROUP 210 +#define TK_DESC 211 +#define TK_DESCRIBE 212 +#define TK_RESET 213 +#define TK_QUERY 214 +#define TK_CACHE 215 +#define TK_EXPLAIN 216 +#define TK_ANALYZE 217 +#define TK_VERBOSE 218 +#define TK_NK_BOOL 219 +#define TK_RATIO 220 +#define TK_NK_FLOAT 221 +#define TK_OUTPUTTYPE 222 +#define TK_AGGREGATE 223 +#define TK_BUFSIZE 224 +#define TK_LANGUAGE 225 +#define TK_REPLACE 226 +#define TK_STREAM 227 +#define TK_INTO 228 +#define TK_PAUSE 229 +#define TK_RESUME 230 +#define TK_PRIMARY 231 +#define TK_KEY 232 +#define TK_TRIGGER 233 +#define TK_AT_ONCE 234 +#define TK_WINDOW_CLOSE 235 +#define TK_IGNORE 236 +#define TK_EXPIRED 237 +#define TK_FILL_HISTORY 238 +#define TK_SUBTABLE 239 +#define TK_UNTREATED 240 +#define TK_KILL 241 +#define TK_CONNECTION 242 +#define TK_TRANSACTION 243 +#define TK_BALANCE 244 +#define TK_VGROUP 245 +#define TK_LEADER 246 +#define TK_MERGE 247 +#define TK_REDISTRIBUTE 248 +#define TK_SPLIT 249 +#define TK_DELETE 250 +#define TK_INSERT 251 +#define TK_NK_BIN 252 +#define TK_NK_HEX 253 +#define TK_NULL 254 +#define TK_NK_QUESTION 255 +#define TK_NK_ALIAS 256 +#define TK_NK_ARROW 257 +#define TK_ROWTS 258 +#define TK_QSTART 259 +#define TK_QEND 260 +#define TK_QDURATION 261 +#define TK_WSTART 262 +#define TK_WEND 263 +#define TK_WDURATION 264 +#define TK_IROWTS 265 +#define TK_ISFILLED 266 +#define TK_FLOW 267 +#define TK_FHIGH 268 +#define TK_FROWTS 269 +#define TK_CAST 270 +#define TK_POSITION 271 +#define TK_IN 272 +#define TK_FOR 273 +#define TK_NOW 274 +#define TK_TODAY 275 +#define TK_RAND 276 +#define TK_SUBSTR 277 +#define TK_SUBSTRING 278 +#define TK_BOTH 279 +#define TK_TRAILING 280 +#define TK_LEADING 281 +#define TK_TIMEZONE 282 +#define TK_CLIENT_VERSION 283 +#define TK_SERVER_VERSION 284 +#define TK_SERVER_STATUS 285 +#define TK_CURRENT_USER 286 +#define TK_PI 287 +#define TK_CASE 288 +#define TK_WHEN 289 +#define TK_THEN 290 +#define TK_ELSE 291 +#define TK_BETWEEN 292 +#define TK_IS 293 +#define TK_NK_LT 294 +#define TK_NK_GT 295 +#define TK_NK_LE 296 +#define TK_NK_GE 297 +#define TK_NK_NE 298 +#define TK_MATCH 299 +#define TK_NMATCH 300 +#define TK_CONTAINS 301 +#define TK_JOIN 302 +#define TK_INNER 303 +#define TK_LEFT 304 +#define TK_RIGHT 305 +#define TK_OUTER 306 +#define TK_SEMI 307 +#define TK_ANTI 308 +#define TK_ASOF 309 +#define TK_WINDOW 310 +#define TK_WINDOW_OFFSET 311 +#define TK_JLIMIT 312 +#define TK_SELECT 313 +#define TK_NK_HINT 314 +#define TK_DISTINCT 315 +#define TK_WHERE 316 +#define TK_PARTITION 317 +#define TK_BY 318 +#define TK_SESSION 319 +#define TK_STATE_WINDOW 320 +#define TK_EVENT_WINDOW 321 +#define TK_COUNT_WINDOW 322 +#define TK_ANOMALY_WINDOW 323 +#define TK_SLIDING 324 +#define TK_FILL 325 +#define TK_VALUE 326 +#define TK_VALUE_F 327 +#define TK_NONE 328 +#define TK_PREV 329 +#define TK_NULL_F 330 +#define TK_LINEAR 331 +#define TK_NEXT 332 +#define TK_HAVING 333 +#define TK_RANGE 334 +#define TK_EVERY 335 +#define TK_ORDER 336 +#define TK_SLIMIT 337 +#define TK_SOFFSET 338 +#define TK_LIMIT 339 +#define TK_OFFSET 340 +#define TK_ASC 341 +#define TK_NULLS 342 +#define TK_ABORT 343 +#define TK_AFTER 344 +#define TK_ATTACH 345 +#define TK_BEFORE 346 +#define TK_BEGIN 347 +#define TK_BITAND 348 +#define TK_BITNOT 349 +#define TK_BITOR 350 +#define TK_BLOCKS 351 +#define TK_CHANGE 352 +#define TK_COMMA 353 +#define TK_CONCAT 354 +#define TK_CONFLICT 355 +#define TK_COPY 356 +#define TK_DEFERRED 357 +#define TK_DELIMITERS 358 +#define TK_DETACH 359 +#define TK_DIVIDE 360 +#define TK_DOT 361 +#define TK_EACH 362 +#define TK_FAIL 363 +#define TK_GLOB 364 +#define TK_ID 365 +#define TK_IMMEDIATE 366 +#define TK_IMPORT 367 +#define TK_INITIALLY 368 +#define TK_INSTEAD 369 +#define TK_ISNULL 370 +#define TK_MODULES 371 +#define TK_NK_BITNOT 372 +#define TK_NK_SEMI 373 +#define TK_NOTNULL 374 +#define TK_OF 375 +#define TK_PLUS 376 +#define TK_PRIVILEGE 377 +#define TK_RAISE 378 +#define TK_RESTRICT 379 +#define TK_ROW 380 +#define TK_STAR 381 +#define TK_STATEMENT 382 +#define TK_STRICT 383 +#define TK_STRING 384 +#define TK_TIMES 385 +#define TK_VALUES 386 +#define TK_VARIABLE 387 +#define TK_WAL 388 #define TK_NK_SPACE 600 #define TK_NK_COMMENT 601 diff --git a/include/libs/function/functionMgt.h b/include/libs/function/functionMgt.h index 519207377b..e5bacf85b2 100644 --- a/include/libs/function/functionMgt.h +++ b/include/libs/function/functionMgt.h @@ -62,6 +62,7 @@ typedef enum EFunctionType { FUNCTION_TYPE_UNIQUE, FUNCTION_TYPE_STATE_COUNT, FUNCTION_TYPE_STATE_DURATION, + FUNCTION_TYPE_FORECAST, // math function FUNCTION_TYPE_ABS = 1000, @@ -149,6 +150,9 @@ typedef enum EFunctionType { FUNCTION_TYPE_TBUID, FUNCTION_TYPE_VGID, FUNCTION_TYPE_VGVER, + FUNCTION_TYPE_FORECAST_LOW, + FUNCTION_TYPE_FORECAST_HIGH, + FUNCTION_TYPE_FORECAST_ROWTS, // internal function FUNCTION_TYPE_SELECT_VALUE = 3750, @@ -263,6 +267,7 @@ bool fmIsForbidSysTableFunc(int32_t funcId); bool fmIsIntervalInterpoFunc(int32_t funcId); bool fmIsInterpFunc(int32_t funcId); bool fmIsLastRowFunc(int32_t funcId); +bool fmIsForecastFunc(int32_t funcId); bool fmIsNotNullOutputFunc(int32_t funcId); bool fmIsSelectValueFunc(int32_t funcId); bool fmIsSystemInfoFunc(int32_t funcId); @@ -272,6 +277,7 @@ bool fmIsMultiRowsFunc(int32_t funcId); bool fmIsKeepOrderFunc(int32_t funcId); bool fmIsCumulativeFunc(int32_t funcId); bool fmIsInterpPseudoColumnFunc(int32_t funcId); +bool fmIsForecastPseudoColumnFunc(int32_t funcId); bool fmIsGroupKeyFunc(int32_t funcId); bool fmIsBlockDistFunc(int32_t funcId); bool fmIsIgnoreNullFunc(int32_t funcId); diff --git a/include/libs/nodes/cmdnodes.h b/include/libs/nodes/cmdnodes.h index 2a18e800b8..bbf2889289 100644 --- a/include/libs/nodes/cmdnodes.h +++ b/include/libs/nodes/cmdnodes.h @@ -318,6 +318,21 @@ typedef struct SAlterDnodeStmt { char value[TSDB_DNODE_VALUE_LEN]; } SAlterDnodeStmt; +typedef struct { + ENodeType type; + char url[TSDB_ANAL_ANODE_URL_LEN + 3]; +} SCreateAnodeStmt; + +typedef struct { + ENodeType type; + int32_t anodeId; +} SDropAnodeStmt; + +typedef struct { + ENodeType type; + int32_t anodeId; +} SUpdateAnodeStmt; + typedef struct SShowStmt { ENodeType type; SNode* pDbName; // SValueNode diff --git a/include/libs/nodes/plannodes.h b/include/libs/nodes/plannodes.h index bfe9e9555b..8e4a3ea32b 100644 --- a/include/libs/nodes/plannodes.h +++ b/include/libs/nodes/plannodes.h @@ -204,6 +204,11 @@ typedef struct SInterpFuncLogicNode { SNode* pTimeSeries; // SColumnNode } SInterpFuncLogicNode; +typedef struct SForecastFuncLogicNode { + SLogicNode node; + SNodeList* pFuncs; +} SForecastFuncLogicNode; + typedef struct SGroupCacheLogicNode { SLogicNode node; bool grpColsMayBeNull; @@ -275,6 +280,7 @@ typedef enum EWindowType { WINDOW_TYPE_STATE, WINDOW_TYPE_EVENT, WINDOW_TYPE_COUNT, + WINDOW_TYPE_ANOMALY } EWindowType; typedef enum EWindowAlgorithm { @@ -315,6 +321,8 @@ typedef struct SWindowLogicNode { int64_t windowCount; int64_t windowSliding; SNodeList* pTsmaSubplans; + SNode* pAnomalyExpr; + char anomalyOpt[TSDB_ANAL_ALGO_OPTION_LEN]; } SWindowLogicNode; typedef struct SFillLogicNode { @@ -507,6 +515,12 @@ typedef struct SInterpFuncPhysiNode { SNode* pTimeSeries; // SColumnNode } SInterpFuncPhysiNode; +typedef struct SForecastFuncPhysiNode { + SPhysiNode node; + SNodeList* pExprs; + SNodeList* pFuncs; +} SForecastFuncPhysiNode; + typedef struct SSortMergeJoinPhysiNode { SPhysiNode node; EJoinType joinType; @@ -704,6 +718,12 @@ typedef struct SCountWinodwPhysiNode { typedef SCountWinodwPhysiNode SStreamCountWinodwPhysiNode; +typedef struct SAnomalyWindowPhysiNode { + SWindowPhysiNode window; + SNode* pAnomalyKey; + char anomalyOpt[TSDB_ANAL_ALGO_OPTION_LEN]; +} SAnomalyWindowPhysiNode; + typedef struct SSortPhysiNode { SPhysiNode node; SNodeList* pExprs; // these are expression list of order_by_clause and parameter expression of aggregate function diff --git a/include/libs/nodes/querynodes.h b/include/libs/nodes/querynodes.h index f5567c735e..4763077ed9 100644 --- a/include/libs/nodes/querynodes.h +++ b/include/libs/nodes/querynodes.h @@ -347,6 +347,13 @@ typedef struct SCountWindowNode { int64_t windowSliding; } SCountWindowNode; +typedef struct SAnomalyWindowNode { + ENodeType type; // QUERY_NODE_ANOMALY_WINDOW + SNode* pCol; // timestamp primary key + SNode* pExpr; + char anomalyOpt[TSDB_ANAL_ALGO_OPTION_LEN]; +} SAnomalyWindowNode; + typedef enum EFillMode { FILL_MODE_NONE = 1, FILL_MODE_VALUE, @@ -442,6 +449,8 @@ typedef struct SSelectStmt { bool hasTailFunc; bool hasInterpFunc; bool hasInterpPseudoColFunc; + bool hasForecastFunc; + bool hasForecastPseudoColFunc; bool hasLastRowFunc; bool hasLastFunc; bool hasTimeLineFunc; diff --git a/include/libs/scalar/scalar.h b/include/libs/scalar/scalar.h index b06b7c74c7..fd936dd087 100644 --- a/include/libs/scalar/scalar.h +++ b/include/libs/scalar/scalar.h @@ -139,6 +139,7 @@ int32_t mavgScalarFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam int32_t hllScalarFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput); int32_t csumScalarFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput); int32_t diffScalarFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput); +int32_t forecastScalarFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput); int32_t stateCountScalarFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput); int32_t stateDurationScalarFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput); int32_t histogramScalarFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput); diff --git a/include/util/taoserror.h b/include/util/taoserror.h index 2b116514e6..2620342b22 100644 --- a/include/util/taoserror.h +++ b/include/util/taoserror.h @@ -476,6 +476,24 @@ int32_t taosGetErrSize(); #define TSDB_CODE_DNODE_INVALID_MONITOR_PARAS TAOS_DEF_ERROR_CODE(0, 0x0429) #define TSDB_CODE_MNODE_STOPPED TAOS_DEF_ERROR_CODE(0, 0x042A) +// anode +#define TSDB_CODE_MND_ANODE_ALREADY_EXIST TAOS_DEF_ERROR_CODE(0, 0x0430) +#define TSDB_CODE_MND_ANODE_NOT_EXIST TAOS_DEF_ERROR_CODE(0, 0x0431) +#define TSDB_CODE_MND_ANODE_TOO_LONG_URL TAOS_DEF_ERROR_CODE(0, 0x0432) +#define TSDB_CODE_MND_ANODE_INVALID_PROTOCOL TAOS_DEF_ERROR_CODE(0, 0x0433) +#define TSDB_CODE_MND_ANODE_INVALID_VERSION TAOS_DEF_ERROR_CODE(0, 0x0434) +#define TSDB_CODE_MND_ANODE_INVALID_ALGO_TYPE TAOS_DEF_ERROR_CODE(0, 0x0435) +#define TSDB_CODE_MND_ANODE_TOO_MANY_ALGO TAOS_DEF_ERROR_CODE(0, 0x0436) +#define TSDB_CODE_MND_ANODE_TOO_LONG_ALGO_NAME TAOS_DEF_ERROR_CODE(0, 0x0437) +#define TSDB_CODE_MND_ANODE_TOO_MANY_ALGO_TYPE TAOS_DEF_ERROR_CODE(0, 0x0438) + +// analysis +#define TSDB_CODE_ANAL_URL_RSP_IS_NULL TAOS_DEF_ERROR_CODE(0, 0x0440) +#define TSDB_CODE_ANAL_URL_CANT_ACCESS TAOS_DEF_ERROR_CODE(0, 0x0441) +#define TSDB_CODE_ANAL_ALGO_NOT_FOUND TAOS_DEF_ERROR_CODE(0, 0x0442) +#define TSDB_CODE_ANAL_ALGO_NOT_LOAD TAOS_DEF_ERROR_CODE(0, 0x0443) +#define TSDB_CODE_ANAL_BUF_INVALID_TYPE TAOS_DEF_ERROR_CODE(0, 0x0444) + // mnode-sma #define TSDB_CODE_MND_SMA_ALREADY_EXIST TAOS_DEF_ERROR_CODE(0, 0x0480) #define TSDB_CODE_MND_SMA_NOT_EXIST TAOS_DEF_ERROR_CODE(0, 0x0481) @@ -867,6 +885,10 @@ int32_t taosGetErrSize(); #define TSDB_CODE_PAR_TAG_NAME_DUPLICATED TAOS_DEF_ERROR_CODE(0, 0x267F) #define TSDB_CODE_PAR_NOT_ALLOWED_DIFFERENT_BY_ROW_FUNC TAOS_DEF_ERROR_CODE(0, 0x2680) #define TSDB_CODE_PAR_REGULAR_EXPRESSION_ERROR TAOS_DEF_ERROR_CODE(0, 0x2681) +#define TSDB_CODE_PAR_INVALID_ANOMALY_WIN_TYPE TAOS_DEF_ERROR_CODE(0, 0x2682) +#define TSDB_CODE_PAR_INVALID_ANOMALY_WIN_COL TAOS_DEF_ERROR_CODE(0, 0x2683) +#define TSDB_CODE_PAR_INVALID_ANOMALY_WIN_OPT TAOS_DEF_ERROR_CODE(0, 0x2684) +#define TSDB_CODE_PAR_INVALID_FORECAST_CLAUSE TAOS_DEF_ERROR_CODE(0, 0x2685) #define TSDB_CODE_PAR_INTERNAL_ERROR TAOS_DEF_ERROR_CODE(0, 0x26FF) //planner diff --git a/include/util/tdef.h b/include/util/tdef.h index a2bc77d819..b4cb1bdd1c 100644 --- a/include/util/tdef.h +++ b/include/util/tdef.h @@ -293,6 +293,12 @@ typedef enum ELogicConditionType { #define TSDB_SLOW_QUERY_SQL_LEN 512 #define TSDB_SHOW_SUBQUERY_LEN 1000 #define TSDB_LOG_VAR_LEN 32 +#define TSDB_ANAL_ANODE_URL_LEN 128 +#define TSDB_ANAL_ALGO_NAME_LEN 64 +#define TSDB_ANAL_ALGO_TYPE_LEN 24 +#define TSDB_ANAL_ALGO_KEY_LEN (TSDB_ANAL_ALGO_NAME_LEN + 9) +#define TSDB_ANAL_ALGO_URL_LEN (TSDB_ANAL_ANODE_URL_LEN + TSDB_ANAL_ALGO_TYPE_LEN + 1) +#define TSDB_ANAL_ALGO_OPTION_LEN 256 #define TSDB_MAX_EP_NUM 10 @@ -604,6 +610,12 @@ enum { RAND_ERR_MEMORY = 1, RAND_ERR_FILE = 2, RAND_ERR_NETWORK = 4 }; #define MONITOR_TAG_VALUE_LEN 300 #define MONITOR_METRIC_NAME_LEN 100 +typedef enum { + ANAL_ALGO_TYPE_ANOMALY_DETECT = 0, + ANAL_ALGO_TYPE_FORECAST = 1, + ANAL_ALGO_TYPE_END, +} EAnalAlgoType; + #ifdef __cplusplus } #endif diff --git a/include/util/tjson.h b/include/util/tjson.h index b9ea72b4bb..88c2a1efb7 100644 --- a/include/util/tjson.h +++ b/include/util/tjson.h @@ -68,7 +68,10 @@ int32_t tjsonAddItemToArray(SJson* pJson, SJson* pItem); SJson* tjsonGetObjectItem(const SJson* pJson, const char* pName); int32_t tjsonGetObjectName(const SJson* pJson, char** pName); int32_t tjsonGetObjectValueString(const SJson* pJson, char** pStringValue); +void tjsonGetObjectValueBigInt(const SJson* pJson, int64_t* pVal); +void tjsonGetObjectValueDouble(const SJson* pJson, double* pVal); int32_t tjsonGetStringValue(const SJson* pJson, const char* pName, char* pVal); +int32_t tjsonGetStringValue2(const SJson* pJson, const char* pName, char* pVal, int32_t maxLen); int32_t tjsonDupStringValue(const SJson* pJson, const char* pName, char** pVal); int32_t tjsonGetBigIntValue(const SJson* pJson, const char* pName, int64_t* pVal); int32_t tjsonGetIntValue(const SJson* pJson, const char* pName, int32_t* pVal); diff --git a/source/common/src/systable.c b/source/common/src/systable.c index 19df0f5a78..eef38bf18e 100644 --- a/source/common/src/systable.c +++ b/source/common/src/systable.c @@ -399,6 +399,20 @@ static const SSysDbTableSchema userCompactsDetailSchema[] = { {.name = "start_time", .bytes = 8, .type = TSDB_DATA_TYPE_TIMESTAMP, .sysInfo = false}, }; +static const SSysDbTableSchema anodesSchema[] = { + {.name = "id", .bytes = 4, .type = TSDB_DATA_TYPE_INT, .sysInfo = false}, + {.name = "url", .bytes = TSDB_ANAL_ANODE_URL_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, + {.name = "status", .bytes = 10 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, + {.name = "create_time", .bytes = 8, .type = TSDB_DATA_TYPE_TIMESTAMP, .sysInfo = true}, + {.name = "update_time", .bytes = 8, .type = TSDB_DATA_TYPE_TIMESTAMP, .sysInfo = true}, +}; + +static const SSysDbTableSchema anodesFullSchema[] = { + {.name = "id", .bytes = 4, .type = TSDB_DATA_TYPE_INT, .sysInfo = false}, + {.name = "type", .bytes = TSDB_ANAL_ALGO_TYPE_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, + {.name = "algo", .bytes = TSDB_ANAL_ALGO_NAME_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, +}; + static const SSysDbTableSchema tsmaSchema[] = { {.name = "tsma_name", .bytes = SYSTABLE_SCH_TABLE_NAME_LEN, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = false}, {.name = "db_name", .bytes = SYSTABLE_SCH_DB_NAME_LEN, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = false}, @@ -473,6 +487,8 @@ static const SSysTableMeta infosMeta[] = { {TSDB_INS_TABLE_ARBGROUPS, arbGroupsSchema, tListLen(arbGroupsSchema), true}, {TSDB_INS_TABLE_ENCRYPTIONS, encryptionsSchema, tListLen(encryptionsSchema), true}, {TSDB_INS_TABLE_TSMAS, tsmaSchema, tListLen(tsmaSchema), false}, + {TSDB_INS_TABLE_ANODES, anodesSchema, tListLen(anodesSchema), true}, + {TSDB_INS_TABLE_ANODES_FULL, anodesFullSchema, tListLen(anodesFullSchema), true}, }; static const SSysDbTableSchema connectionsSchema[] = { diff --git a/source/common/src/tmsg.c b/source/common/src/tmsg.c index 4c4b78278e..63fcf900bf 100644 --- a/source/common/src/tmsg.c +++ b/source/common/src/tmsg.c @@ -40,6 +40,7 @@ #define TD_MSG_RANGE_CODE_ #include "tmsgdef.h" +#include "tanal.h" #include "tcol.h" #include "tlog.h" @@ -1453,6 +1454,7 @@ int32_t tSerializeSStatusReq(void *buf, int32_t bufLen, SStatusReq *pReq) { } TAOS_CHECK_EXIT(tEncodeI64(&encoder, pReq->ipWhiteVer)); + TAOS_CHECK_EXIT(tEncodeI64(&encoder, pReq->analVer)); TAOS_CHECK_EXIT(tSerializeSMonitorParas(&encoder, &pReq->clusterCfg.monitorParas)); tEndEncode(&encoder); @@ -1576,6 +1578,10 @@ int32_t tDeserializeSStatusReq(void *buf, int32_t bufLen, SStatusReq *pReq) { TAOS_CHECK_EXIT(tDecodeI64(&decoder, &pReq->ipWhiteVer)); } + if (!tDecodeIsEnd(&decoder)) { + TAOS_CHECK_EXIT(tDecodeI64(&decoder, &pReq->analVer)); + } + if (!tDecodeIsEnd(&decoder)) { TAOS_CHECK_EXIT(tDeserializeSMonitorParas(&decoder, &pReq->clusterCfg.monitorParas)); } @@ -1652,6 +1658,7 @@ int32_t tSerializeSStatusRsp(void *buf, int32_t bufLen, SStatusRsp *pRsp) { TAOS_CHECK_EXIT(tEncodeI32(&encoder, pRsp->statusSeq)); TAOS_CHECK_EXIT(tEncodeI64(&encoder, pRsp->ipWhiteVer)); + TAOS_CHECK_EXIT(tEncodeI64(&encoder, pRsp->analVer)); tEndEncode(&encoder); _exit: @@ -1704,6 +1711,10 @@ int32_t tDeserializeSStatusRsp(void *buf, int32_t bufLen, SStatusRsp *pRsp) { TAOS_CHECK_EXIT(tDecodeI64(&decoder, &pRsp->ipWhiteVer)); } + if (!tDecodeIsEnd(&decoder)) { + TAOS_CHECK_EXIT(tDecodeI64(&decoder, &pRsp->analVer)); + } + tEndDecode(&decoder); _exit: tDecoderClear(&decoder); @@ -2045,6 +2056,156 @@ _exit: return code; } +int32_t tSerializeRetrieveAnalAlgoReq(void *buf, int32_t bufLen, SRetrieveAnalAlgoReq *pReq) { + SEncoder encoder = {0}; + int32_t code = 0; + int32_t lino; + int32_t tlen; + tEncoderInit(&encoder, buf, bufLen); + + TAOS_CHECK_EXIT(tStartEncode(&encoder)); + TAOS_CHECK_EXIT(tEncodeI32(&encoder, pReq->dnodeId)); + TAOS_CHECK_EXIT(tEncodeI64(&encoder, pReq->analVer)); + tEndEncode(&encoder); + +_exit: + if (code) { + tlen = code; + } else { + tlen = encoder.pos; + } + tEncoderClear(&encoder); + return tlen; +} + +int32_t tDeserializeRetrieveAnalAlgoReq(void *buf, int32_t bufLen, SRetrieveAnalAlgoReq *pReq) { + SDecoder decoder = {0}; + int32_t code = 0; + int32_t lino; + + tDecoderInit(&decoder, buf, bufLen); + + TAOS_CHECK_EXIT(tStartDecode(&decoder)); + TAOS_CHECK_EXIT(tDecodeI32(&decoder, &pReq->dnodeId)); + TAOS_CHECK_EXIT(tDecodeI64(&decoder, &pReq->analVer)); + tEndDecode(&decoder); + +_exit: + tDecoderClear(&decoder); + return code; +} + +int32_t tSerializeRetrieveAnalAlgoRsp(void *buf, int32_t bufLen, SRetrieveAnalAlgoRsp *pRsp) { + SEncoder encoder = {0}; + int32_t code = 0; + int32_t lino; + int32_t tlen; + tEncoderInit(&encoder, buf, bufLen); + + int32_t numOfAlgos = 0; + void *pIter = taosHashIterate(pRsp->hash, NULL); + while (pIter != NULL) { + SAnalUrl *pUrl = pIter; + size_t nameLen = 0; + const char *name = taosHashGetKey(pIter, &nameLen); + if (nameLen > 0 && nameLen <= TSDB_ANAL_ALGO_KEY_LEN && pUrl->urlLen > 0) { + numOfAlgos++; + } + pIter = taosHashIterate(pRsp->hash, pIter); + } + + TAOS_CHECK_EXIT(tStartEncode(&encoder)); + TAOS_CHECK_EXIT(tEncodeI64(&encoder, pRsp->ver)); + TAOS_CHECK_EXIT(tEncodeI32(&encoder, numOfAlgos)); + + pIter = taosHashIterate(pRsp->hash, NULL); + while (pIter != NULL) { + SAnalUrl *pUrl = pIter; + size_t nameLen = 0; + const char *name = taosHashGetKey(pIter, &nameLen); + if (nameLen > 0 && pUrl->urlLen > 0) { + TAOS_CHECK_EXIT(tEncodeI32(&encoder, nameLen)); + TAOS_CHECK_EXIT(tEncodeBinary(&encoder, (const uint8_t *)name, nameLen)); + TAOS_CHECK_EXIT(tEncodeI32(&encoder, pUrl->anode)); + TAOS_CHECK_EXIT(tEncodeI32(&encoder, pUrl->type)); + TAOS_CHECK_EXIT(tEncodeI32(&encoder, pUrl->urlLen)); + TAOS_CHECK_EXIT(tEncodeBinary(&encoder, (const uint8_t *)pUrl->url, pUrl->urlLen)); + } + pIter = taosHashIterate(pRsp->hash, pIter); + } + + tEndEncode(&encoder); + +_exit: + if (code) { + tlen = code; + } else { + tlen = encoder.pos; + } + tEncoderClear(&encoder); + return tlen; +} + +int32_t tDeserializeRetrieveAnalAlgoRsp(void *buf, int32_t bufLen, SRetrieveAnalAlgoRsp *pRsp) { + if (pRsp->hash == NULL) { + pRsp->hash = taosHashInit(64, MurmurHash3_32, true, HASH_ENTRY_LOCK); + if (pRsp->hash == NULL) { + terrno = TSDB_CODE_OUT_OF_BUFFER; + return terrno; + } + } + + SDecoder decoder = {0}; + int32_t code = 0; + int32_t lino; + tDecoderInit(&decoder, buf, bufLen); + + int32_t numOfAlgos = 0; + int32_t nameLen; + int32_t type; + char name[TSDB_ANAL_ALGO_KEY_LEN]; + SAnalUrl url = {0}; + + TAOS_CHECK_EXIT(tStartDecode(&decoder)); + TAOS_CHECK_EXIT(tDecodeI64(&decoder, &pRsp->ver)); + TAOS_CHECK_EXIT(tDecodeI32(&decoder, &numOfAlgos)); + + for (int32_t f = 0; f < numOfAlgos; ++f) { + TAOS_CHECK_EXIT(tDecodeI32(&decoder, &nameLen)); + if (nameLen > 0 && nameLen <= TSDB_ANAL_ALGO_NAME_LEN) { + TAOS_CHECK_EXIT(tDecodeCStrTo(&decoder, name)); + } + + TAOS_CHECK_EXIT(tDecodeI32(&decoder, &url.anode)); + TAOS_CHECK_EXIT(tDecodeI32(&decoder, &type)); + url.type = (EAnalAlgoType)type; + TAOS_CHECK_EXIT(tDecodeI32(&decoder, &url.urlLen)); + if (url.urlLen > 0) { + TAOS_CHECK_EXIT(tDecodeBinaryAlloc(&decoder, (void **)&url.url, NULL) < 0); + } + + TAOS_CHECK_EXIT(taosHashPut(pRsp->hash, name, nameLen, &url, sizeof(SAnalUrl))); + } + + tEndDecode(&decoder); + +_exit: + tDecoderClear(&decoder); + return code; +} + +void tFreeRetrieveAnalAlgoRsp(SRetrieveAnalAlgoRsp *pRsp) { + void *pIter = taosHashIterate(pRsp->hash, NULL); + while (pIter != NULL) { + SAnalUrl *pUrl = (SAnalUrl *)pIter; + taosMemoryFree(pUrl->url); + pIter = taosHashIterate(pRsp->hash, pIter); + } + taosHashCleanup(pRsp->hash); + + pRsp->hash = NULL; +} + void tFreeSCreateUserReq(SCreateUserReq *pReq) { FREESQL(); taosMemoryFreeClear(pReq->pIpRanges); @@ -2962,6 +3123,108 @@ _exit: return code; } +int32_t tSerializeSMCreateAnodeReq(void *buf, int32_t bufLen, SMCreateAnodeReq *pReq) { + SEncoder encoder = {0}; + int32_t code = 0; + int32_t lino; + int32_t tlen; + tEncoderInit(&encoder, buf, bufLen); + + TAOS_CHECK_EXIT(tStartEncode(&encoder)); + TAOS_CHECK_EXIT(tEncodeI32(&encoder, pReq->urlLen)); + if (pReq->urlLen > 0) { + TAOS_CHECK_EXIT(tEncodeBinary(&encoder, (const uint8_t *)pReq->url, pReq->urlLen)); + } + ENCODESQL(); + tEndEncode(&encoder); + +_exit: + if (code) { + tlen = code; + } else { + tlen = encoder.pos; + } + tEncoderClear(&encoder); + return tlen; +} + +int32_t tDeserializeSMCreateAnodeReq(void *buf, int32_t bufLen, SMCreateAnodeReq *pReq) { + SDecoder decoder = {0}; + int32_t code = 0; + int32_t lino; + + tDecoderInit(&decoder, buf, bufLen); + + TAOS_CHECK_EXIT(tStartDecode(&decoder)); + TAOS_CHECK_EXIT(tDecodeI32(&decoder, &pReq->urlLen)); + if (pReq->urlLen > 0) { + TAOS_CHECK_EXIT(tDecodeBinaryAlloc(&decoder, (void **)&pReq->url, NULL)); + } + + DECODESQL(); + tEndDecode(&decoder); + +_exit: + tDecoderClear(&decoder); + return code; +} + +void tFreeSMCreateAnodeReq(SMCreateAnodeReq *pReq) { + taosMemoryFreeClear(pReq->url); + FREESQL(); +} + +int32_t tSerializeSMDropAnodeReq(void *buf, int32_t bufLen, SMDropAnodeReq *pReq) { + SEncoder encoder = {0}; + int32_t code = 0; + int32_t lino; + int32_t tlen; + tEncoderInit(&encoder, buf, bufLen); + + TAOS_CHECK_EXIT(tStartEncode(&encoder)); + TAOS_CHECK_EXIT(tEncodeI32(&encoder, pReq->anodeId)); + ENCODESQL(); + tEndEncode(&encoder); + +_exit: + if (code) { + tlen = code; + } else { + tlen = encoder.pos; + } + tEncoderClear(&encoder); + return tlen; +} + +int32_t tDeserializeSMDropAnodeReq(void *buf, int32_t bufLen, SMDropAnodeReq *pReq) { + SDecoder decoder = {0}; + int32_t code = 0; + int32_t lino; + + tDecoderInit(&decoder, buf, bufLen); + + TAOS_CHECK_EXIT(tStartDecode(&decoder)); + TAOS_CHECK_EXIT(tDecodeI32(&decoder, &pReq->anodeId)); + DECODESQL(); + tEndDecode(&decoder); + +_exit: + tDecoderClear(&decoder); + return code; +} + +void tFreeSMDropAnodeReq(SMDropAnodeReq *pReq) { FREESQL(); } + +int32_t tSerializeSMUpdateAnodeReq(void *buf, int32_t bufLen, SMUpdateAnodeReq *pReq) { + return tSerializeSMDropAnodeReq(buf, bufLen, pReq); +} + +int32_t tDeserializeSMUpdateAnodeReq(void *buf, int32_t bufLen, SMUpdateAnodeReq *pReq) { + return tDeserializeSMDropAnodeReq(buf, bufLen, pReq); +} + +void tFreeSMUpdateAnodeReq(SMUpdateAnodeReq *pReq) { tFreeSMDropAnodeReq(pReq); } + int32_t tSerializeSCreateDnodeReq(void *buf, int32_t bufLen, SCreateDnodeReq *pReq) { SEncoder encoder = {0}; int32_t code = 0; diff --git a/source/dnode/mgmt/mgmt_dnode/src/dmHandle.c b/source/dnode/mgmt/mgmt_dnode/src/dmHandle.c index f1f3a3bee7..bc33fc43dc 100644 --- a/source/dnode/mgmt/mgmt_dnode/src/dmHandle.c +++ b/source/dnode/mgmt/mgmt_dnode/src/dmHandle.c @@ -18,6 +18,7 @@ #include "dmInt.h" #include "monitor.h" #include "systable.h" +#include "tanal.h" #include "tchecksum.h" extern SConfig *tsCfg; @@ -86,6 +87,46 @@ static void dmMayShouldUpdateIpWhiteList(SDnodeMgmt *pMgmt, int64_t ver) { } } +static void dmMayShouldUpdateAnalFunc(SDnodeMgmt *pMgmt, int64_t newVer) { + int32_t code = 0; + int64_t oldVer = taosAnalGetVersion(); + if (oldVer == newVer) return; + dDebug("analysis on dnode ver:%" PRId64 ", status ver:%" PRId64, oldVer, newVer); + + SRetrieveAnalAlgoReq req = {.dnodeId = pMgmt->pData->dnodeId, .analVer = oldVer}; + int32_t contLen = tSerializeRetrieveAnalAlgoReq(NULL, 0, &req); + if (contLen < 0) { + dError("failed to serialize analysis function ver request since %s", tstrerror(contLen)); + return; + } + + void *pHead = rpcMallocCont(contLen); + contLen = tSerializeRetrieveAnalAlgoReq(pHead, contLen, &req); + if (contLen < 0) { + rpcFreeCont(pHead); + dError("failed to serialize analysis function ver request since %s", tstrerror(contLen)); + return; + } + + SRpcMsg rpcMsg = { + .pCont = pHead, + .contLen = contLen, + .msgType = TDMT_MND_RETRIEVE_ANAL_ALGO, + .info.ahandle = (void *)0x9527, + .info.refId = 0, + .info.noResp = 0, + .info.handle = 0, + }; + SEpSet epset = {0}; + + (void)dmGetMnodeEpSet(pMgmt->pData, &epset); + + code = rpcSendRequest(pMgmt->msgCb.clientRpc, &epset, &rpcMsg, NULL); + if (code != 0) { + dError("failed to send retrieve analysis func ver request since %s", tstrerror(code)); + } +} + static void dmProcessStatusRsp(SDnodeMgmt *pMgmt, SRpcMsg *pRsp) { const STraceId *trace = &pRsp->info.traceId; dGTrace("status rsp received from mnode, statusSeq:%d code:0x%x", pMgmt->statusSeq, pRsp->code); @@ -113,6 +154,7 @@ static void dmProcessStatusRsp(SDnodeMgmt *pMgmt, SRpcMsg *pRsp) { dmUpdateEps(pMgmt->pData, statusRsp.pDnodeEps); } dmMayShouldUpdateIpWhiteList(pMgmt, statusRsp.ipWhiteVer); + dmMayShouldUpdateAnalFunc(pMgmt, statusRsp.analVer); } tFreeSStatusRsp(&statusRsp); } @@ -174,6 +216,7 @@ void dmSendStatusReq(SDnodeMgmt *pMgmt) { pMgmt->statusSeq++; req.statusSeq = pMgmt->statusSeq; req.ipWhiteVer = pMgmt->pData->ipWhiteVer; + req.analVer = taosAnalGetVersion(); int32_t contLen = tSerializeSStatusReq(NULL, 0, &req); if (contLen < 0) { diff --git a/source/dnode/mgmt/mgmt_dnode/src/dmInt.c b/source/dnode/mgmt/mgmt_dnode/src/dmInt.c index 22c2b2f5b2..74ef67ff1d 100644 --- a/source/dnode/mgmt/mgmt_dnode/src/dmInt.c +++ b/source/dnode/mgmt/mgmt_dnode/src/dmInt.c @@ -16,6 +16,7 @@ #define _DEFAULT_SOURCE #include "dmInt.h" #include "libs/function/tudf.h" +#include "tanal.h" static int32_t dmStartMgmt(SDnodeMgmt *pMgmt) { int32_t code = 0; @@ -80,6 +81,10 @@ static int32_t dmOpenMgmt(SMgmtInputOpt *pInput, SMgmtOutputOpt *pOutput) { dError("failed to start udfd since %s", tstrerror(code)); } + if ((code = taosAnalInit()) != 0) { + dError("failed to init analysis env since %s", tstrerror(code)); + } + pOutput->pMgmt = pMgmt; return 0; } diff --git a/source/dnode/mgmt/mgmt_mnode/src/mmHandle.c b/source/dnode/mgmt/mgmt_mnode/src/mmHandle.c index 7204cde8f7..d9aa4614b6 100644 --- a/source/dnode/mgmt/mgmt_mnode/src/mmHandle.c +++ b/source/dnode/mgmt/mgmt_mnode/src/mmHandle.c @@ -141,6 +141,9 @@ SArray *mmGetMsgHandles() { if (dmSetMgmtHandle(pArray, TDMT_MND_DNODE_LIST, mmPutMsgToReadQueue, 0) == NULL) goto _OVER; if (dmSetMgmtHandle(pArray, TDMT_MND_CREATE_SNODE, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER; if (dmSetMgmtHandle(pArray, TDMT_MND_DROP_SNODE, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER; + if (dmSetMgmtHandle(pArray, TDMT_MND_CREATE_ANODE, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER; + if (dmSetMgmtHandle(pArray, TDMT_MND_UPDATE_ANODE, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER; + if (dmSetMgmtHandle(pArray, TDMT_MND_DROP_ANODE, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER; if (dmSetMgmtHandle(pArray, TDMT_MND_CREATE_DB, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER; if (dmSetMgmtHandle(pArray, TDMT_MND_DROP_DB, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER; if (dmSetMgmtHandle(pArray, TDMT_MND_USE_DB, mmPutMsgToReadQueue, 0) == NULL) goto _OVER; @@ -180,6 +183,7 @@ SArray *mmGetMsgHandles() { if (dmSetMgmtHandle(pArray, TDMT_VND_FETCH_TTL_EXPIRED_TBS_RSP, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER; if (dmSetMgmtHandle(pArray, TDMT_VND_DROP_TABLE_RSP, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER; + if (dmSetMgmtHandle(pArray, TDMT_MND_RETRIEVE_ANAL_ALGO, mmPutMsgToReadQueue, 0) == NULL) goto _OVER; if (dmSetMgmtHandle(pArray, TDMT_MND_RETRIEVE_IP_WHITE, mmPutMsgToReadQueue, 0) == NULL) goto _OVER; if (dmSetMgmtHandle(pArray, TDMT_MND_GET_USER_WHITELIST, mmPutMsgToReadQueue, 0) == NULL) goto _OVER; if (dmSetMgmtHandle(pArray, TDMT_MND_GET_INDEX, mmPutMsgToReadQueue, 0) == NULL) goto _OVER; diff --git a/source/dnode/mgmt/node_mgmt/src/dmEnv.c b/source/dnode/mgmt/node_mgmt/src/dmEnv.c index 2d0ad70adf..0c2bd2bc0f 100644 --- a/source/dnode/mgmt/node_mgmt/src/dmEnv.c +++ b/source/dnode/mgmt/node_mgmt/src/dmEnv.c @@ -20,6 +20,7 @@ #include "libs/function/tudf.h" #include "tgrant.h" #include "tcompare.h" +#include "tanal.h" // clang-format on #define DM_INIT_AUDIT() \ @@ -214,6 +215,7 @@ void dmCleanup() { dError("failed to close udfc"); } udfStopUdfd(); + taosAnalCleanup(); taosStopCacheRefreshWorker(); (void)dmDiskClose(); DestroyRegexCache(); diff --git a/source/dnode/mgmt/node_mgmt/src/dmTransport.c b/source/dnode/mgmt/node_mgmt/src/dmTransport.c index 3090903805..e84d756e0a 100644 --- a/source/dnode/mgmt/node_mgmt/src/dmTransport.c +++ b/source/dnode/mgmt/node_mgmt/src/dmTransport.c @@ -17,6 +17,7 @@ #include "dmMgmt.h" #include "qworker.h" #include "tversion.h" +#include "tanal.h" static inline void dmSendRsp(SRpcMsg *pMsg) { if (rpcSendResponse(pMsg) != 0) { @@ -106,6 +107,16 @@ static bool dmIsForbiddenIp(int8_t forbidden, char *user, uint32_t clientIp) { } } +static void dmUpdateAnalFunc(SDnodeData *pData, void *pTrans, SRpcMsg *pRpc) { + SRetrieveAnalAlgoRsp rsp = {0}; + if (tDeserializeRetrieveAnalAlgoRsp(pRpc->pCont, pRpc->contLen, &rsp) == 0) { + taosAnalUpdate(rsp.ver, rsp.hash); + rsp.hash = NULL; + } + tFreeRetrieveAnalAlgoRsp(&rsp); + rpcFreeCont(pRpc->pCont); +} + static void dmProcessRpcMsg(SDnode *pDnode, SRpcMsg *pRpc, SEpSet *pEpSet) { SDnodeTrans *pTrans = &pDnode->trans; int32_t code = -1; @@ -154,6 +165,9 @@ static void dmProcessRpcMsg(SDnode *pDnode, SRpcMsg *pRpc, SEpSet *pEpSet) { case TDMT_MND_RETRIEVE_IP_WHITE_RSP: dmUpdateRpcIpWhite(&pDnode->data, pTrans->serverRpc, pRpc); return; + case TDMT_MND_RETRIEVE_ANAL_ALGO_RSP: + dmUpdateAnalFunc(&pDnode->data, pTrans->serverRpc, pRpc); + return; default: break; } diff --git a/source/dnode/mnode/impl/CMakeLists.txt b/source/dnode/mnode/impl/CMakeLists.txt index cb148c1949..1a74b6fa9f 100644 --- a/source/dnode/mnode/impl/CMakeLists.txt +++ b/source/dnode/mnode/impl/CMakeLists.txt @@ -15,6 +15,9 @@ IF (TD_ENTERPRISE) add_definitions(-DUSE_COS) ENDIF() + IF(${BUILD_WITH_ANALYSIS}) + add_definitions(-DUSE_ANAL) + ENDIF() ENDIF () add_library(mnode STATIC ${MNODE_SRC}) diff --git a/source/dnode/mnode/impl/inc/mndAnode.h b/source/dnode/mnode/impl/inc/mndAnode.h new file mode 100644 index 0000000000..63e8f9090e --- /dev/null +++ b/source/dnode/mnode/impl/inc/mndAnode.h @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2019 TAOS Data, Inc. + * + * This program is free software: you can use, redistribute, and/or modify + * it under the terms of the GNU Affero General Public License, version 3 + * or later ("AGPL"), as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +#ifndef _TD_MND_ANODE_H_ +#define _TD_MND_ANODE_H_ + +#include "mndInt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +int32_t mndInitAnode(SMnode *pMnode); +void mndCleanupAnode(SMnode *pMnode); + +#ifdef __cplusplus +} +#endif + +#endif /*_TD_MND_ANODE_H_*/ \ No newline at end of file diff --git a/source/dnode/mnode/impl/inc/mndDef.h b/source/dnode/mnode/impl/inc/mndDef.h index 60b732f817..742db8f450 100644 --- a/source/dnode/mnode/impl/inc/mndDef.h +++ b/source/dnode/mnode/impl/inc/mndDef.h @@ -78,6 +78,9 @@ typedef enum { MND_OPER_DROP_VIEW, MND_OPER_CONFIG_CLUSTER, MND_OPER_BALANCE_VGROUP_LEADER, + MND_OPER_CREATE_ANODE, + MND_OPER_UPDATE_ANODE, + MND_OPER_DROP_ANODE } EOperType; typedef enum { @@ -232,6 +235,24 @@ typedef struct { char machineId[TSDB_MACHINE_ID_LEN + 1]; } SDnodeObj; +typedef struct { + int32_t nameLen; + char* name; +} SAnodeAlgo; + +typedef struct { + int32_t id; + int64_t createdTime; + int64_t updateTime; + int32_t version; + int32_t urlLen; + int32_t numOfAlgos; + int32_t status; + SRWLatch lock; + char* url; + SArray** algos; +} SAnodeObj; + typedef struct { int32_t id; int64_t createdTime; diff --git a/source/dnode/mnode/impl/src/mndAnode.c b/source/dnode/mnode/impl/src/mndAnode.c new file mode 100644 index 0000000000..469e16c7ea --- /dev/null +++ b/source/dnode/mnode/impl/src/mndAnode.c @@ -0,0 +1,901 @@ +/* + * Copyright (c) 2019 TAOS Data, Inc. + * + * This program is free software: you can use, redistribute, and/or modify + * it under the terms of the GNU Affero General Public License, version 3 + * or later ("AGPL"), as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +#define _DEFAULT_SOURCE +#include "mndAnode.h" +#include "audit.h" +#include "mndDnode.h" +#include "mndPrivilege.h" +#include "mndShow.h" +#include "mndTrans.h" +#include "mndUser.h" +#include "tanal.h" +#include "tjson.h" + +#ifdef USE_ANAL + +#define TSDB_ANODE_VER_NUMBER 1 +#define TSDB_ANODE_RESERVE_SIZE 64 + +static SSdbRaw *mndAnodeActionEncode(SAnodeObj *pObj); +static SSdbRow *mndAnodeActionDecode(SSdbRaw *pRaw); +static int32_t mndAnodeActionInsert(SSdb *pSdb, SAnodeObj *pObj); +static int32_t mndAnodeActionUpdate(SSdb *pSdb, SAnodeObj *pOld, SAnodeObj *pNew); +static int32_t mndAnodeActionDelete(SSdb *pSdb, SAnodeObj *pObj); +static int32_t mndProcessCreateAnodeReq(SRpcMsg *pReq); +static int32_t mndProcessUpdateAnodeReq(SRpcMsg *pReq); +static int32_t mndProcessDropAnodeReq(SRpcMsg *pReq); +static int32_t mndProcessAnalAlgoReq(SRpcMsg *pReq); +static int32_t mndRetrieveAnodes(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBlock, int32_t rows); +static void mndCancelGetNextAnode(SMnode *pMnode, void *pIter); +static int32_t mndRetrieveAnodesFull(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBlock, int32_t rows); +static void mndCancelGetNextAnodeFull(SMnode *pMnode, void *pIter); +static int32_t mndGetAnodeAlgoList(const char *url, SAnodeObj *pObj); +static int32_t mndGetAnodeStatus(SAnodeObj *pObj, char *status, int32_t statusLen); + +int32_t mndInitAnode(SMnode *pMnode) { + SSdbTable table = { + .sdbType = SDB_ANODE, + .keyType = SDB_KEY_INT32, + .encodeFp = (SdbEncodeFp)mndAnodeActionEncode, + .decodeFp = (SdbDecodeFp)mndAnodeActionDecode, + .insertFp = (SdbInsertFp)mndAnodeActionInsert, + .updateFp = (SdbUpdateFp)mndAnodeActionUpdate, + .deleteFp = (SdbDeleteFp)mndAnodeActionDelete, + }; + + mndSetMsgHandle(pMnode, TDMT_MND_CREATE_ANODE, mndProcessCreateAnodeReq); + mndSetMsgHandle(pMnode, TDMT_MND_UPDATE_ANODE, mndProcessUpdateAnodeReq); + mndSetMsgHandle(pMnode, TDMT_MND_DROP_ANODE, mndProcessDropAnodeReq); + mndSetMsgHandle(pMnode, TDMT_MND_RETRIEVE_ANAL_ALGO, mndProcessAnalAlgoReq); + + mndAddShowRetrieveHandle(pMnode, TSDB_MGMT_TABLE_ANODE, mndRetrieveAnodes); + mndAddShowFreeIterHandle(pMnode, TSDB_MGMT_TABLE_ANODE, mndCancelGetNextAnode); + mndAddShowRetrieveHandle(pMnode, TSDB_MGMT_TABLE_ANODE_FULL, mndRetrieveAnodesFull); + mndAddShowFreeIterHandle(pMnode, TSDB_MGMT_TABLE_ANODE_FULL, mndCancelGetNextAnodeFull); + + return sdbSetTable(pMnode->pSdb, table); +} + +void mndCleanupAnode(SMnode *pMnode) {} + +SAnodeObj *mndAcquireAnode(SMnode *pMnode, int32_t anodeId) { + SAnodeObj *pObj = sdbAcquire(pMnode->pSdb, SDB_ANODE, &anodeId); + if (pObj == NULL && terrno == TSDB_CODE_SDB_OBJ_NOT_THERE) { + terrno = TSDB_CODE_MND_ANODE_NOT_EXIST; + } + return pObj; +} + +void mndReleaseAnode(SMnode *pMnode, SAnodeObj *pObj) { + SSdb *pSdb = pMnode->pSdb; + sdbRelease(pSdb, pObj); +} + +static SSdbRaw *mndAnodeActionEncode(SAnodeObj *pObj) { + int32_t code = 0; + int32_t lino = 0; + terrno = TSDB_CODE_OUT_OF_MEMORY; + + int32_t rawDataLen = sizeof(SAnodeObj) + TSDB_ANODE_RESERVE_SIZE + pObj->urlLen; + for (int32_t t = 0; t < pObj->numOfAlgos; ++t) { + SArray *algos = pObj->algos[t]; + for (int32_t a = 0; a < (int32_t)taosArrayGetSize(algos); ++a) { + SAnodeAlgo *algo = taosArrayGet(algos, a); + rawDataLen += (2 * sizeof(int32_t) + algo->nameLen); + } + rawDataLen += sizeof(int32_t); + } + + SSdbRaw *pRaw = sdbAllocRaw(SDB_ANODE, TSDB_ANODE_VER_NUMBER, rawDataLen); + if (pRaw == NULL) goto _OVER; + + int32_t dataPos = 0; + SDB_SET_INT32(pRaw, dataPos, pObj->id, _OVER) + SDB_SET_INT64(pRaw, dataPos, pObj->createdTime, _OVER) + SDB_SET_INT64(pRaw, dataPos, pObj->updateTime, _OVER) + SDB_SET_INT32(pRaw, dataPos, pObj->version, _OVER) + SDB_SET_INT32(pRaw, dataPos, pObj->urlLen, _OVER) + SDB_SET_BINARY(pRaw, dataPos, pObj->url, pObj->urlLen, _OVER) + SDB_SET_INT32(pRaw, dataPos, pObj->numOfAlgos, _OVER) + for (int32_t i = 0; i < pObj->numOfAlgos; ++i) { + SArray *algos = pObj->algos[i]; + SDB_SET_INT32(pRaw, dataPos, (int32_t)taosArrayGetSize(algos), _OVER) + for (int32_t j = 0; j < (int32_t)taosArrayGetSize(algos); ++j) { + SAnodeAlgo *algo = taosArrayGet(algos, j); + SDB_SET_INT32(pRaw, dataPos, algo->nameLen, _OVER) + SDB_SET_BINARY(pRaw, dataPos, algo->name, algo->nameLen, _OVER) + SDB_SET_INT32(pRaw, dataPos, 0, _OVER) // reserved + } + } + + SDB_SET_RESERVE(pRaw, dataPos, TSDB_ANODE_RESERVE_SIZE, _OVER) + + terrno = 0; + +_OVER: + if (terrno != 0) { + mError("anode:%d, failed to encode to raw:%p since %s", pObj->id, pRaw, terrstr()); + sdbFreeRaw(pRaw); + return NULL; + } + + mTrace("anode:%d, encode to raw:%p, row:%p", pObj->id, pRaw, pObj); + return pRaw; +} + +static SSdbRow *mndAnodeActionDecode(SSdbRaw *pRaw) { + int32_t code = 0; + int32_t lino = 0; + terrno = TSDB_CODE_OUT_OF_MEMORY; + SSdbRow *pRow = NULL; + SAnodeObj *pObj = NULL; + + int8_t sver = 0; + if (sdbGetRawSoftVer(pRaw, &sver) != 0) goto _OVER; + + if (sver != TSDB_ANODE_VER_NUMBER) { + terrno = TSDB_CODE_SDB_INVALID_DATA_VER; + goto _OVER; + } + + pRow = sdbAllocRow(sizeof(SAnodeObj)); + if (pRow == NULL) goto _OVER; + + pObj = sdbGetRowObj(pRow); + if (pObj == NULL) goto _OVER; + + int32_t dataPos = 0; + SDB_GET_INT32(pRaw, dataPos, &pObj->id, _OVER) + SDB_GET_INT64(pRaw, dataPos, &pObj->createdTime, _OVER) + SDB_GET_INT64(pRaw, dataPos, &pObj->updateTime, _OVER) + SDB_GET_INT32(pRaw, dataPos, &pObj->version, _OVER) + SDB_GET_INT32(pRaw, dataPos, &pObj->urlLen, _OVER) + + if (pObj->urlLen > 0) { + pObj->url = taosMemoryCalloc(pObj->urlLen, 1); + if (pObj->url == NULL) goto _OVER; + SDB_GET_BINARY(pRaw, dataPos, pObj->url, pObj->urlLen, _OVER) + } + + SDB_GET_INT32(pRaw, dataPos, &pObj->numOfAlgos, _OVER) + if (pObj->numOfAlgos > 0) { + pObj->algos = taosMemoryCalloc(pObj->numOfAlgos, sizeof(SArray *)); + if (pObj->algos == NULL) { + goto _OVER; + } + } + + for (int32_t i = 0; i < pObj->numOfAlgos; ++i) { + int32_t numOfAlgos = 0; + SDB_GET_INT32(pRaw, dataPos, &numOfAlgos, _OVER) + + pObj->algos[i] = taosArrayInit(2, sizeof(SAnodeAlgo)); + if (pObj->algos[i] == NULL) goto _OVER; + + for (int32_t j = 0; j < numOfAlgos; ++j) { + SAnodeAlgo algoObj = {0}; + int32_t reserved = 0; + + SDB_GET_INT32(pRaw, dataPos, &algoObj.nameLen, _OVER) + if (algoObj.nameLen > 0) { + algoObj.name = taosMemoryCalloc(algoObj.nameLen, 1); + if (algoObj.name == NULL) goto _OVER; + } + + SDB_GET_BINARY(pRaw, dataPos, algoObj.name, algoObj.nameLen, _OVER) + SDB_GET_INT32(pRaw, dataPos, &reserved, _OVER); + + if (taosArrayPush(pObj->algos[i], &algoObj) == NULL) goto _OVER; + } + } + + SDB_GET_RESERVE(pRaw, dataPos, TSDB_ANODE_RESERVE_SIZE, _OVER) + + terrno = 0; + +_OVER: + if (terrno != 0) { + mError("anode:%d, failed to decode from raw:%p since %s", pObj == NULL ? 0 : pObj->id, pRaw, terrstr()); + if (pObj != NULL) { + taosMemoryFreeClear(pObj->url); + } + taosMemoryFreeClear(pRow); + return NULL; + } + + mTrace("anode:%d, decode from raw:%p, row:%p", pObj->id, pRaw, pObj); + return pRow; +} + +static void mndFreeAnode(SAnodeObj *pObj) { + taosMemoryFreeClear(pObj->url); + for (int32_t i = 0; i < pObj->numOfAlgos; ++i) { + SArray *algos = pObj->algos[i]; + for (int32_t j = 0; j < (int32_t)taosArrayGetSize(algos); ++j) { + SAnodeAlgo *algo = taosArrayGet(algos, j); + taosMemoryFreeClear(algo->name); + } + taosArrayDestroy(algos); + } + taosMemoryFreeClear(pObj->algos); +} + +static int32_t mndAnodeActionInsert(SSdb *pSdb, SAnodeObj *pObj) { + mTrace("anode:%d, perform insert action, row:%p", pObj->id, pObj); + return 0; +} + +static int32_t mndAnodeActionDelete(SSdb *pSdb, SAnodeObj *pObj) { + mTrace("anode:%d, perform delete action, row:%p", pObj->id, pObj); + mndFreeAnode(pObj); + return 0; +} + +static int32_t mndAnodeActionUpdate(SSdb *pSdb, SAnodeObj *pOld, SAnodeObj *pNew) { + mTrace("anode:%d, perform update action, old row:%p new row:%p", pOld->id, pOld, pNew); + + taosWLockLatch(&pOld->lock); + int32_t numOfAlgos = pNew->numOfAlgos; + void *algos = pNew->algos; + pNew->numOfAlgos = pOld->numOfAlgos; + pNew->algos = pOld->algos; + pOld->numOfAlgos = numOfAlgos; + pOld->algos = algos; + pOld->updateTime = pNew->updateTime; + pOld->version = pNew->version; + taosWUnLockLatch(&pOld->lock); + return 0; +} + +static int32_t mndSetCreateAnodeRedoLogs(STrans *pTrans, SAnodeObj *pObj) { + int32_t code = 0; + SSdbRaw *pRedoRaw = mndAnodeActionEncode(pObj); + if (pRedoRaw == NULL) { + code = TSDB_CODE_MND_RETURN_VALUE_NULL; + if (terrno != 0) code = terrno; + TAOS_RETURN(code); + } + TAOS_CHECK_RETURN(mndTransAppendRedolog(pTrans, pRedoRaw)); + TAOS_CHECK_RETURN(sdbSetRawStatus(pRedoRaw, SDB_STATUS_CREATING)); + TAOS_RETURN(code); +} + +static int32_t mndSetCreateAnodeUndoLogs(STrans *pTrans, SAnodeObj *pObj) { + int32_t code = 0; + SSdbRaw *pUndoRaw = mndAnodeActionEncode(pObj); + if (pUndoRaw == NULL) { + code = TSDB_CODE_MND_RETURN_VALUE_NULL; + if (terrno != 0) code = terrno; + TAOS_RETURN(code); + } + TAOS_CHECK_RETURN(mndTransAppendUndolog(pTrans, pUndoRaw)); + TAOS_CHECK_RETURN(sdbSetRawStatus(pUndoRaw, SDB_STATUS_DROPPED)); + TAOS_RETURN(code); +} + +static int32_t mndSetCreateAnodeCommitLogs(STrans *pTrans, SAnodeObj *pObj) { + int32_t code = 0; + SSdbRaw *pCommitRaw = mndAnodeActionEncode(pObj); + if (pCommitRaw == NULL) { + code = TSDB_CODE_MND_RETURN_VALUE_NULL; + if (terrno != 0) code = terrno; + TAOS_RETURN(code); + } + TAOS_CHECK_RETURN(mndTransAppendCommitlog(pTrans, pCommitRaw)); + TAOS_CHECK_RETURN(sdbSetRawStatus(pCommitRaw, SDB_STATUS_READY)); + TAOS_RETURN(code); +} + +static int32_t mndCreateAnode(SMnode *pMnode, SRpcMsg *pReq, SMCreateAnodeReq *pCreate) { + int32_t code = -1; + STrans *pTrans = NULL; + + SAnodeObj anodeObj = {0}; + anodeObj.id = sdbGetMaxId(pMnode->pSdb, SDB_ANODE); + anodeObj.createdTime = taosGetTimestampMs(); + anodeObj.updateTime = anodeObj.createdTime; + anodeObj.version = 0; + anodeObj.urlLen = pCreate->urlLen; + if (anodeObj.urlLen > TSDB_ANAL_ANODE_URL_LEN) { + code = TSDB_CODE_MND_ANODE_TOO_LONG_URL; + goto _OVER; + } + + anodeObj.url = taosMemoryCalloc(1, pCreate->urlLen); + if (anodeObj.url == NULL) goto _OVER; + (void)memcpy(anodeObj.url, pCreate->url, pCreate->urlLen); + + code = mndGetAnodeAlgoList(anodeObj.url, &anodeObj); + if (code != 0) goto _OVER; + + pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_NOTHING, pReq, "create-anode"); + if (pTrans == NULL) { + code = TSDB_CODE_MND_RETURN_VALUE_NULL; + if (terrno != 0) code = terrno; + goto _OVER; + } + mndTransSetSerial(pTrans); + + mInfo("trans:%d, used to create anode:%s as anode:%d", pTrans->id, pCreate->url, anodeObj.id); + + TAOS_CHECK_GOTO(mndSetCreateAnodeRedoLogs(pTrans, &anodeObj), NULL, _OVER); + TAOS_CHECK_GOTO(mndSetCreateAnodeUndoLogs(pTrans, &anodeObj), NULL, _OVER); + TAOS_CHECK_GOTO(mndSetCreateAnodeCommitLogs(pTrans, &anodeObj), NULL, _OVER); + TAOS_CHECK_GOTO(mndTransPrepare(pMnode, pTrans), NULL, _OVER); + + code = 0; + +_OVER: + mndFreeAnode(&anodeObj); + mndTransDrop(pTrans); + TAOS_RETURN(code); +} + +static SAnodeObj *mndAcquireAnodeByURL(SMnode *pMnode, char *url) { + SSdb *pSdb = pMnode->pSdb; + + void *pIter = NULL; + while (1) { + SAnodeObj *pAnode = NULL; + pIter = sdbFetch(pSdb, SDB_ANODE, pIter, (void **)&pAnode); + if (pIter == NULL) break; + + if (strcasecmp(url, pAnode->url) == 0) { + sdbCancelFetch(pSdb, pIter); + return pAnode; + } + + sdbRelease(pSdb, pAnode); + } + + terrno = TSDB_CODE_MND_ANODE_NOT_EXIST; + return NULL; +} + +static int32_t mndProcessCreateAnodeReq(SRpcMsg *pReq) { + SMnode *pMnode = pReq->info.node; + int32_t code = -1; + SAnodeObj *pObj = NULL; + SMCreateAnodeReq createReq = {0}; + + TAOS_CHECK_GOTO(tDeserializeSMCreateAnodeReq(pReq->pCont, pReq->contLen, &createReq), NULL, _OVER); + + mInfo("anode:%s, start to create", createReq.url); + TAOS_CHECK_GOTO(mndCheckOperPrivilege(pMnode, pReq->info.conn.user, MND_OPER_CREATE_ANODE), NULL, _OVER); + + pObj = mndAcquireAnodeByURL(pMnode, createReq.url); + if (pObj != NULL) { + code = TSDB_CODE_MND_ANODE_ALREADY_EXIST; + goto _OVER; + } + + code = mndCreateAnode(pMnode, pReq, &createReq); + if (code == 0) code = TSDB_CODE_ACTION_IN_PROGRESS; + +_OVER: + if (code != 0 && code != TSDB_CODE_ACTION_IN_PROGRESS) { + mError("anode:%s, failed to create since %s", createReq.url, tstrerror(code)); + } + + mndReleaseAnode(pMnode, pObj); + tFreeSMCreateAnodeReq(&createReq); + TAOS_RETURN(code); +} + +static int32_t mndUpdateAnode(SMnode *pMnode, SAnodeObj *pAnode, SRpcMsg *pReq) { + mInfo("anode:%d, start to update", pAnode->id); + int32_t code = -1; + STrans *pTrans = NULL; + SAnodeObj anodeObj = {0}; + anodeObj.id = pAnode->id; + anodeObj.updateTime = taosGetTimestampMs(); + + code = mndGetAnodeAlgoList(pAnode->url, &anodeObj); + if (code != 0) goto _OVER; + + pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_NOTHING, pReq, "update-anode"); + if (pTrans == NULL) { + code = TSDB_CODE_MND_RETURN_VALUE_NULL; + if (terrno != 0) code = terrno; + goto _OVER; + } + mInfo("trans:%d, used to update anode:%d", pTrans->id, anodeObj.id); + + TAOS_CHECK_GOTO(mndSetCreateAnodeCommitLogs(pTrans, &anodeObj), NULL, _OVER); + TAOS_CHECK_GOTO(mndTransPrepare(pMnode, pTrans), NULL, _OVER); + code = 0; + +_OVER: + mndFreeAnode(&anodeObj); + mndTransDrop(pTrans); + TAOS_RETURN(code); +} + +static int32_t mndUpdateAllAnodes(SMnode *pMnode, SRpcMsg *pReq) { + mInfo("update all anodes"); + SSdb *pSdb = pMnode->pSdb; + int32_t code = 0; + int32_t rows = 0; + int32_t numOfRows = sdbGetSize(pSdb, SDB_ANODE); + + void *pIter = NULL; + while (1) { + SAnodeObj *pObj = NULL; + ESdbStatus objStatus = 0; + pIter = sdbFetchAll(pSdb, SDB_ANODE, pIter, (void **)&pObj, &objStatus, true); + if (pIter == NULL) break; + + rows++; + void *transReq = NULL; + if (rows == numOfRows) transReq = pReq; + code = mndUpdateAnode(pMnode, pObj, transReq); + sdbRelease(pSdb, pObj); + + if (code != 0) break; + } + + if (code == 0 && rows == numOfRows) { + code = TSDB_CODE_ACTION_IN_PROGRESS; + } + + return code; +} + +static int32_t mndProcessUpdateAnodeReq(SRpcMsg *pReq) { + SMnode *pMnode = pReq->info.node; + int32_t code = -1; + SAnodeObj *pObj = NULL; + SMUpdateAnodeReq updateReq = {0}; + + TAOS_CHECK_GOTO(tDeserializeSMUpdateAnodeReq(pReq->pCont, pReq->contLen, &updateReq), NULL, _OVER); + TAOS_CHECK_GOTO(mndCheckOperPrivilege(pMnode, pReq->info.conn.user, MND_OPER_UPDATE_ANODE), NULL, _OVER); + + if (updateReq.anodeId == -1) { + code = mndUpdateAllAnodes(pMnode, pReq); + } else { + pObj = mndAcquireAnode(pMnode, updateReq.anodeId); + if (pObj == NULL) { + code = TSDB_CODE_MND_ANODE_NOT_EXIST; + goto _OVER; + } + code = mndUpdateAnode(pMnode, pObj, pReq); + if (code == 0) code = TSDB_CODE_ACTION_IN_PROGRESS; + } + +_OVER: + if (code != 0 && code != TSDB_CODE_ACTION_IN_PROGRESS) { + if (updateReq.anodeId != -1) { + mError("anode:%d, failed to update since %s", updateReq.anodeId, tstrerror(code)); + } + } + + mndReleaseAnode(pMnode, pObj); + tFreeSMUpdateAnodeReq(&updateReq); + TAOS_RETURN(code); +} + +static int32_t mndSetDropAnodeRedoLogs(STrans *pTrans, SAnodeObj *pObj) { + int32_t code = 0; + SSdbRaw *pRedoRaw = mndAnodeActionEncode(pObj); + if (pRedoRaw == NULL) { + code = TSDB_CODE_MND_RETURN_VALUE_NULL; + if (terrno != 0) code = terrno; + TAOS_RETURN(code); + } + TAOS_CHECK_RETURN(mndTransAppendRedolog(pTrans, pRedoRaw)); + TAOS_CHECK_RETURN(sdbSetRawStatus(pRedoRaw, SDB_STATUS_DROPPING)); + TAOS_RETURN(code); +} + +static int32_t mndSetDropAnodeCommitLogs(STrans *pTrans, SAnodeObj *pObj) { + int32_t code = 0; + SSdbRaw *pCommitRaw = mndAnodeActionEncode(pObj); + if (pCommitRaw == NULL) { + code = TSDB_CODE_MND_RETURN_VALUE_NULL; + if (terrno != 0) code = terrno; + TAOS_RETURN(code); + } + TAOS_CHECK_RETURN(mndTransAppendCommitlog(pTrans, pCommitRaw)); + TAOS_CHECK_RETURN(sdbSetRawStatus(pCommitRaw, SDB_STATUS_DROPPED)); + TAOS_RETURN(code); +} + +static int32_t mndSetDropAnodeInfoToTrans(SMnode *pMnode, STrans *pTrans, SAnodeObj *pObj, bool force) { + if (pObj == NULL) return 0; + TAOS_CHECK_RETURN(mndSetDropAnodeRedoLogs(pTrans, pObj)); + TAOS_CHECK_RETURN(mndSetDropAnodeCommitLogs(pTrans, pObj)); + return 0; +} + +static int32_t mndDropAnode(SMnode *pMnode, SRpcMsg *pReq, SAnodeObj *pObj) { + int32_t code = -1; + + STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_NOTHING, pReq, "drop-anode"); + if (pTrans == NULL) { + code = TSDB_CODE_MND_RETURN_VALUE_NULL; + if (terrno != 0) code = terrno; + goto _OVER; + } + mndTransSetSerial(pTrans); + + mInfo("trans:%d, used to drop anode:%d", pTrans->id, pObj->id); + TAOS_CHECK_GOTO(mndSetDropAnodeInfoToTrans(pMnode, pTrans, pObj, false), NULL, _OVER); + TAOS_CHECK_GOTO(mndTransPrepare(pMnode, pTrans), NULL, _OVER); + + code = 0; + +_OVER: + mndTransDrop(pTrans); + TAOS_RETURN(code); +} + +static int32_t mndProcessDropAnodeReq(SRpcMsg *pReq) { + SMnode *pMnode = pReq->info.node; + int32_t code = -1; + SAnodeObj *pObj = NULL; + SMDropAnodeReq dropReq = {0}; + + TAOS_CHECK_GOTO(tDeserializeSMDropAnodeReq(pReq->pCont, pReq->contLen, &dropReq), NULL, _OVER); + + mInfo("anode:%d, start to drop", dropReq.anodeId); + TAOS_CHECK_GOTO(mndCheckOperPrivilege(pMnode, pReq->info.conn.user, MND_OPER_DROP_ANODE), NULL, _OVER); + + if (dropReq.anodeId <= 0) { + code = TSDB_CODE_INVALID_MSG; + goto _OVER; + } + + pObj = mndAcquireAnode(pMnode, dropReq.anodeId); + if (pObj == NULL) { + code = TSDB_CODE_MND_RETURN_VALUE_NULL; + if (terrno != 0) code = terrno; + goto _OVER; + } + + code = mndDropAnode(pMnode, pReq, pObj); + if (code == 0) code = TSDB_CODE_ACTION_IN_PROGRESS; + +_OVER: + if (code != 0 && code != TSDB_CODE_ACTION_IN_PROGRESS) { + mError("anode:%d, failed to drop since %s", dropReq.anodeId, tstrerror(code)); + } + + mndReleaseAnode(pMnode, pObj); + tFreeSMDropAnodeReq(&dropReq); + TAOS_RETURN(code); +} + +static int32_t mndRetrieveAnodes(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBlock, int32_t rows) { + SMnode *pMnode = pReq->info.node; + SSdb *pSdb = pMnode->pSdb; + int32_t numOfRows = 0; + int32_t cols = 0; + SAnodeObj *pObj = NULL; + char buf[TSDB_ANAL_ANODE_URL_LEN + VARSTR_HEADER_SIZE]; + char status[64]; + int32_t code = 0; + + while (numOfRows < rows) { + pShow->pIter = sdbFetch(pSdb, SDB_ANODE, pShow->pIter, (void **)&pObj); + if (pShow->pIter == NULL) break; + + cols = 0; + SColumnInfoData *pColInfo = taosArrayGet(pBlock->pDataBlock, cols++); + code = colDataSetVal(pColInfo, numOfRows, (const char *)&pObj->id, false); + if (code != 0) goto _end; + + STR_WITH_MAXSIZE_TO_VARSTR(buf, pObj->url, pShow->pMeta->pSchemas[cols].bytes); + pColInfo = taosArrayGet(pBlock->pDataBlock, cols++); + code = colDataSetVal(pColInfo, numOfRows, (const char *)buf, false); + if (code != 0) goto _end; + + status[0] = 0; + if (mndGetAnodeStatus(pObj, status, 64) == 0) { + STR_TO_VARSTR(buf, status); + } else { + STR_TO_VARSTR(buf, "offline"); + } + pColInfo = taosArrayGet(pBlock->pDataBlock, cols++); + code = colDataSetVal(pColInfo, numOfRows, buf, false); + if (code != 0) goto _end; + + pColInfo = taosArrayGet(pBlock->pDataBlock, cols++); + code = colDataSetVal(pColInfo, numOfRows, (const char *)&pObj->createdTime, false); + if (code != 0) goto _end; + + pColInfo = taosArrayGet(pBlock->pDataBlock, cols++); + code = colDataSetVal(pColInfo, numOfRows, (const char *)&pObj->updateTime, false); + if (code != 0) goto _end; + + numOfRows++; + sdbRelease(pSdb, pObj); + } + +_end: + if (code != 0) sdbRelease(pSdb, pObj); + + pShow->numOfRows += numOfRows; + return numOfRows; +} + +static void mndCancelGetNextAnode(SMnode *pMnode, void *pIter) { + SSdb *pSdb = pMnode->pSdb; + sdbCancelFetchByType(pSdb, pIter, SDB_ANODE); +} + +static int32_t mndRetrieveAnodesFull(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBlock, int32_t rows) { + SMnode *pMnode = pReq->info.node; + SSdb *pSdb = pMnode->pSdb; + int32_t numOfRows = 0; + int32_t cols = 0; + SAnodeObj *pObj = NULL; + char buf[TSDB_ANAL_ALGO_NAME_LEN + VARSTR_HEADER_SIZE]; + int32_t code = 0; + + while (numOfRows < rows) { + pShow->pIter = sdbFetch(pSdb, SDB_ANODE, pShow->pIter, (void **)&pObj); + if (pShow->pIter == NULL) break; + + for (int32_t t = 0; t < pObj->numOfAlgos; ++t) { + SArray *algos = pObj->algos[t]; + + for (int32_t a = 0; a < taosArrayGetSize(algos); ++a) { + SAnodeAlgo *algo = taosArrayGet(algos, a); + + cols = 0; + SColumnInfoData *pColInfo = taosArrayGet(pBlock->pDataBlock, cols++); + code = colDataSetVal(pColInfo, numOfRows, (const char *)&pObj->id, false); + if (code != 0) goto _end; + + STR_TO_VARSTR(buf, taosAnalAlgoStr(t)); + pColInfo = taosArrayGet(pBlock->pDataBlock, cols++); + code = colDataSetVal(pColInfo, numOfRows, buf, false); + if (code != 0) goto _end; + + STR_TO_VARSTR(buf, algo->name); + pColInfo = taosArrayGet(pBlock->pDataBlock, cols++); + code = colDataSetVal(pColInfo, numOfRows, buf, false); + if (code != 0) goto _end; + + numOfRows++; + } + } + + sdbRelease(pSdb, pObj); + } + +_end: + if (code != 0) sdbRelease(pSdb, pObj); + + pShow->numOfRows += numOfRows; + return numOfRows; +} + +static void mndCancelGetNextAnodeFull(SMnode *pMnode, void *pIter) { + SSdb *pSdb = pMnode->pSdb; + sdbCancelFetchByType(pSdb, pIter, SDB_ANODE); +} + +static int32_t mndDecodeAlgoList(SJson *pJson, SAnodeObj *pObj) { + int32_t code = 0; + int32_t protocol = 0; + double tmp = 0; + char buf[TSDB_ANAL_ALGO_NAME_LEN + 1] = {0}; + + code = tjsonGetDoubleValue(pJson, "protocol", &tmp); + if (code < 0) return TSDB_CODE_INVALID_JSON_FORMAT; + protocol = (int32_t)(tmp * 1000); + if (protocol != 100 && protocol != 1000) return TSDB_CODE_MND_ANODE_INVALID_PROTOCOL; + + code = tjsonGetDoubleValue(pJson, "version", &tmp); + pObj->version = (int32_t)(tmp * 1000); + if (code < 0) return TSDB_CODE_INVALID_JSON_FORMAT; + if (pObj->version <= 0) return TSDB_CODE_MND_ANODE_INVALID_VERSION; + + SJson *details = tjsonGetObjectItem(pJson, "details"); + if (details == NULL) return TSDB_CODE_INVALID_JSON_FORMAT; + int32_t numOfDetails = tjsonGetArraySize(details); + + pObj->algos = taosMemoryCalloc(ANAL_ALGO_TYPE_END, sizeof(SArray *)); + if (pObj->algos == NULL) return TSDB_CODE_OUT_OF_MEMORY; + + pObj->numOfAlgos = ANAL_ALGO_TYPE_END; + for (int32_t i = 0; i < ANAL_ALGO_TYPE_END; ++i) { + pObj->algos[i] = taosArrayInit(4, sizeof(SAnodeAlgo)); + if (pObj->algos[i] == NULL) return TSDB_CODE_OUT_OF_MEMORY; + } + + for (int32_t d = 0; d < numOfDetails; ++d) { + SJson *detail = tjsonGetArrayItem(details, d); + if (detail == NULL) return TSDB_CODE_INVALID_JSON_FORMAT; + + code = tjsonGetStringValue2(detail, "type", buf, sizeof(buf)); + if (code < 0) return TSDB_CODE_INVALID_JSON_FORMAT; + EAnalAlgoType type = taosAnalAlgoInt(buf); + if (type < 0 || type >= ANAL_ALGO_TYPE_END) return TSDB_CODE_MND_ANODE_INVALID_ALGO_TYPE; + + SJson *algos = tjsonGetObjectItem(detail, "algo"); + if (algos == NULL) return TSDB_CODE_INVALID_JSON_FORMAT; + int32_t numOfAlgos = tjsonGetArraySize(algos); + for (int32_t a = 0; a < numOfAlgos; ++a) { + SJson *algo = tjsonGetArrayItem(algos, a); + if (algo == NULL) return TSDB_CODE_INVALID_JSON_FORMAT; + + code = tjsonGetStringValue2(algo, "name", buf, sizeof(buf)); + if (code < 0) return TSDB_CODE_MND_ANODE_TOO_LONG_ALGO_NAME; + + SAnodeAlgo algoObj = {0}; + algoObj.nameLen = strlen(buf) + 1; + if (algoObj.nameLen <= 1) return TSDB_CODE_INVALID_JSON_FORMAT; + algoObj.name = taosMemoryCalloc(algoObj.nameLen, 1); + tstrncpy(algoObj.name, buf, algoObj.nameLen); + + if (taosArrayPush(pObj->algos[type], &algoObj) == NULL) return TSDB_CODE_OUT_OF_MEMORY; + } + } + + return 0; +} + +static int32_t mndGetAnodeAlgoList(const char *url, SAnodeObj *pObj) { + char anodeUrl[TSDB_ANAL_ANODE_URL_LEN + 1] = {0}; + snprintf(anodeUrl, TSDB_ANAL_ANODE_URL_LEN, "%s/%s", url, "list"); + + SJson *pJson = taosAnalSendReqRetJson(anodeUrl, ANAL_HTTP_TYPE_GET, NULL); + if (pJson == NULL) return terrno; + + int32_t code = mndDecodeAlgoList(pJson, pObj); + if (pJson != NULL) tjsonDelete(pJson); + + TAOS_RETURN(code); +} + +static int32_t mndGetAnodeStatus(SAnodeObj *pObj, char *status, int32_t statusLen) { + int32_t code = 0; + int32_t protocol = 0; + double tmp = 0; + char anodeUrl[TSDB_ANAL_ANODE_URL_LEN + 1] = {0}; + snprintf(anodeUrl, TSDB_ANAL_ANODE_URL_LEN, "%s/%s", pObj->url, "status"); + + SJson *pJson = taosAnalSendReqRetJson(anodeUrl, ANAL_HTTP_TYPE_GET, NULL); + if (pJson == NULL) return terrno; + + code = tjsonGetDoubleValue(pJson, "protocol", &tmp); + if (code < 0) { + code = TSDB_CODE_INVALID_JSON_FORMAT; + goto _OVER; + } + protocol = (int32_t)(tmp * 1000); + if (protocol != 100 && protocol != 1000) { + code = TSDB_CODE_MND_ANODE_INVALID_PROTOCOL; + goto _OVER; + } + + code = tjsonGetStringValue2(pJson, "status", status, statusLen); + if (code < 0) { + code = TSDB_CODE_INVALID_JSON_FORMAT; + goto _OVER; + } + if (strlen(status) == 0) { + code = TSDB_CODE_MND_ANODE_INVALID_PROTOCOL; + goto _OVER; + } + +_OVER: + if (pJson != NULL) tjsonDelete(pJson); + TAOS_RETURN(code); +} + +static int32_t mndProcessAnalAlgoReq(SRpcMsg *pReq) { + SMnode *pMnode = pReq->info.node; + SSdb *pSdb = pMnode->pSdb; + int32_t code = -1; + SAnodeObj *pObj = NULL; + SAnalUrl url; + int32_t nameLen; + char name[TSDB_ANAL_ALGO_KEY_LEN]; + SRetrieveAnalAlgoReq req = {0}; + SRetrieveAnalAlgoRsp rsp = {0}; + + TAOS_CHECK_GOTO(tDeserializeRetrieveAnalAlgoReq(pReq->pCont, pReq->contLen, &req), NULL, _OVER); + + rsp.ver = sdbGetTableVer(pSdb, SDB_ANODE); + if (req.analVer != rsp.ver) { + mInfo("dnode:%d, update analysis old ver:%" PRId64 " to new ver:%" PRId64, req.dnodeId, req.analVer, rsp.ver); + rsp.hash = taosHashInit(64, MurmurHash3_32, true, HASH_ENTRY_LOCK); + if (rsp.hash == NULL) { + terrno = TSDB_CODE_OUT_OF_MEMORY; + goto _OVER; + } + + void *pIter = NULL; + while (1) { + SAnodeObj *pAnode = NULL; + pIter = sdbFetch(pSdb, SDB_ANODE, pIter, (void **)&pAnode); + if (pIter == NULL) break; + + url.anode = pAnode->id; + for (int32_t t = 0; t < pAnode->numOfAlgos; ++t) { + SArray *algos = pAnode->algos[t]; + url.type = t; + + for (int32_t a = 0; a < taosArrayGetSize(algos); ++a) { + SAnodeAlgo *algo = taosArrayGet(algos, a); + nameLen = 1 + tsnprintf(name, sizeof(name) - 1, "%d:%s", url.type, algo->name); + + SAnalUrl *pOldUrl = taosHashAcquire(rsp.hash, name, nameLen); + if (pOldUrl == NULL || (pOldUrl != NULL && pOldUrl->anode < url.anode)) { + if (pOldUrl != NULL) { + taosMemoryFreeClear(pOldUrl->url); + if (taosHashRemove(rsp.hash, name, nameLen) != 0) { + sdbRelease(pSdb, pAnode); + goto _OVER; + } + } + url.url = taosMemoryMalloc(TSDB_ANAL_ANODE_URL_LEN + TSDB_ANAL_ALGO_TYPE_LEN + 1); + if (url.url == NULL) { + sdbRelease(pSdb, pAnode); + goto _OVER; + } + + url.urlLen = 1 + tsnprintf(url.url, TSDB_ANAL_ANODE_URL_LEN + TSDB_ANAL_ALGO_TYPE_LEN, "%s/%s", pAnode->url, + taosAnalAlgoUrlStr(url.type)); + if (taosHashPut(rsp.hash, name, nameLen, &url, sizeof(SAnalUrl)) != 0) { + taosMemoryFree(url.url); + sdbRelease(pSdb, pAnode); + goto _OVER; + } + } + } + + sdbRelease(pSdb, pAnode); + } + } + } + + int32_t contLen = tSerializeRetrieveAnalAlgoRsp(NULL, 0, &rsp); + void *pHead = rpcMallocCont(contLen); + (void)tSerializeRetrieveAnalAlgoRsp(pHead, contLen, &rsp); + + pReq->info.rspLen = contLen; + pReq->info.rsp = pHead; + +_OVER: + tFreeRetrieveAnalAlgoRsp(&rsp); + TAOS_RETURN(code); +} + +#else + +static int32_t mndProcessUnsupportReq(SRpcMsg *pReq) { return TSDB_CODE_OPS_NOT_SUPPORT; } +static int32_t mndRetrieveUnsupport(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBlock, int32_t rows) { + return TSDB_CODE_OPS_NOT_SUPPORT; +} + +int32_t mndInitAnode(SMnode *pMnode) { + mndSetMsgHandle(pMnode, TDMT_MND_CREATE_ANODE, mndProcessUnsupportReq); + mndSetMsgHandle(pMnode, TDMT_MND_UPDATE_ANODE, mndProcessUnsupportReq); + mndSetMsgHandle(pMnode, TDMT_MND_DROP_ANODE, mndProcessUnsupportReq); + mndSetMsgHandle(pMnode, TDMT_MND_RETRIEVE_ANAL_ALGO, mndProcessUnsupportReq); + + mndAddShowRetrieveHandle(pMnode, TSDB_MGMT_TABLE_ANODE, mndRetrieveUnsupport); + mndAddShowRetrieveHandle(pMnode, TSDB_MGMT_TABLE_ANODE_FULL, mndRetrieveUnsupport); + return 0; +} + +void mndCleanupAnode(SMnode *pMnode) {} + +#endif \ No newline at end of file diff --git a/source/dnode/mnode/impl/src/mndDnode.c b/source/dnode/mnode/impl/src/mndDnode.c index 04041646eb..5e10583a0a 100644 --- a/source/dnode/mnode/impl/src/mndDnode.c +++ b/source/dnode/mnode/impl/src/mndDnode.c @@ -730,6 +730,7 @@ static int32_t mndProcessStatusReq(SRpcMsg *pReq) { pMnode->ipWhiteVer = mndGetIpWhiteVer(pMnode); + int64_t analVer = sdbGetTableVer(pMnode->pSdb, SDB_ANODE); int64_t dnodeVer = sdbGetTableVer(pMnode->pSdb, SDB_DNODE) + sdbGetTableVer(pMnode->pSdb, SDB_MNODE); int64_t curMs = taosGetTimestampMs(); bool online = mndIsDnodeOnline(pDnode, curMs); @@ -738,7 +739,8 @@ static int32_t mndProcessStatusReq(SRpcMsg *pReq) { bool supportVnodesChanged = pDnode->numOfSupportVnodes != statusReq.numOfSupportVnodes; bool encryptKeyChanged = pDnode->encryptionKeyChksum != statusReq.clusterCfg.encryptionKeyChksum; bool enableWhiteListChanged = statusReq.clusterCfg.enableWhiteList != (tsEnableWhiteList ? 1 : 0); - bool needCheck = !online || dnodeChanged || reboot || supportVnodesChanged || + bool analVerChanged = (analVer != statusReq.analVer); + bool needCheck = !online || dnodeChanged || reboot || supportVnodesChanged || analVerChanged || pMnode->ipWhiteVer != statusReq.ipWhiteVer || encryptKeyChanged || enableWhiteListChanged; const STraceId *trace = &pReq->info.traceId; mGTrace("dnode:%d, status received, accessTimes:%d check:%d online:%d reboot:%d changed:%d statusSeq:%d", pDnode->id, @@ -862,6 +864,7 @@ static int32_t mndProcessStatusReq(SRpcMsg *pReq) { SStatusRsp statusRsp = {0}; statusRsp.statusSeq++; + statusRsp.analVer = analVer; statusRsp.dnodeVer = dnodeVer; statusRsp.dnodeCfg.dnodeId = pDnode->id; statusRsp.dnodeCfg.clusterId = pMnode->clusterId; diff --git a/source/dnode/mnode/impl/src/mndMain.c b/source/dnode/mnode/impl/src/mndMain.c index bee971b966..c80016e174 100644 --- a/source/dnode/mnode/impl/src/mndMain.c +++ b/source/dnode/mnode/impl/src/mndMain.c @@ -16,6 +16,7 @@ #define _DEFAULT_SOURCE #include "mndAcct.h" #include "mndArbGroup.h" +#include "mndAnode.h" #include "mndCluster.h" #include "mndCompact.h" #include "mndCompactDetail.h" @@ -607,6 +608,7 @@ static int32_t mndInitSteps(SMnode *pMnode) { TAOS_CHECK_RETURN(mndAllocStep(pMnode, "mnode-mnode", mndInitMnode, mndCleanupMnode)); TAOS_CHECK_RETURN(mndAllocStep(pMnode, "mnode-qnode", mndInitQnode, mndCleanupQnode)); TAOS_CHECK_RETURN(mndAllocStep(pMnode, "mnode-snode", mndInitSnode, mndCleanupSnode)); + TAOS_CHECK_RETURN(mndAllocStep(pMnode, "mnode-anode", mndInitAnode, mndCleanupAnode)); TAOS_CHECK_RETURN(mndAllocStep(pMnode, "mnode-arbgroup", mndInitArbGroup, mndCleanupArbGroup)); TAOS_CHECK_RETURN(mndAllocStep(pMnode, "mnode-dnode", mndInitDnode, mndCleanupDnode)); TAOS_CHECK_RETURN(mndAllocStep(pMnode, "mnode-user", mndInitUser, mndCleanupUser)); diff --git a/source/dnode/mnode/impl/src/mndShow.c b/source/dnode/mnode/impl/src/mndShow.c index 55687c00ba..264fea3476 100644 --- a/source/dnode/mnode/impl/src/mndShow.c +++ b/source/dnode/mnode/impl/src/mndShow.c @@ -68,6 +68,10 @@ static int32_t convertToRetrieveType(char *name, int32_t len) { type = TSDB_MGMT_TABLE_QNODE; } else if (strncasecmp(name, TSDB_INS_TABLE_SNODES, len) == 0) { type = TSDB_MGMT_TABLE_SNODE; + } else if (strncasecmp(name, TSDB_INS_TABLE_ANODES, len) == 0) { + type = TSDB_MGMT_TABLE_ANODE; + } else if (strncasecmp(name, TSDB_INS_TABLE_ANODES_FULL, len) == 0) { + type = TSDB_MGMT_TABLE_ANODE_FULL; } else if (strncasecmp(name, TSDB_INS_TABLE_ARBGROUPS, len) == 0) { type = TSDB_MGMT_TABLE_ARBGROUP; } else if (strncasecmp(name, TSDB_INS_TABLE_CLUSTER, len) == 0) { diff --git a/source/dnode/mnode/sdb/inc/sdb.h b/source/dnode/mnode/sdb/inc/sdb.h index c33b1d4366..f6d1587bb2 100644 --- a/source/dnode/mnode/sdb/inc/sdb.h +++ b/source/dnode/mnode/sdb/inc/sdb.h @@ -161,7 +161,8 @@ typedef enum { SDB_COMPACT_DETAIL = 25, SDB_GRANT = 26, // grant log SDB_ARBGROUP = 27, - SDB_MAX = 28 + SDB_ANODE = 28, + SDB_MAX = 29 } ESdbType; typedef struct SSdbRaw { diff --git a/source/dnode/mnode/sdb/src/sdbFile.c b/source/dnode/mnode/sdb/src/sdbFile.c index 0a6dc45d51..227ff15da9 100644 --- a/source/dnode/mnode/sdb/src/sdbFile.c +++ b/source/dnode/mnode/sdb/src/sdbFile.c @@ -25,6 +25,9 @@ #define SDB_RESERVE_SIZE 512 #define SDB_FILE_VER 1 +#define SDB_TABLE_SIZE_EXTRA SDB_MAX +#define SDB_RESERVE_SIZE_EXTRA (512 - (SDB_TABLE_SIZE_EXTRA - SDB_TABLE_SIZE) * 2 * sizeof(int64_t)) + static int32_t sdbDeployData(SSdb *pSdb) { int32_t code = 0; mInfo("start to deploy sdb"); @@ -154,7 +157,38 @@ static int32_t sdbReadFileHead(SSdb *pSdb, TdFilePtr pFile) { } } - char reserve[SDB_RESERVE_SIZE] = {0}; + // for sdb compatibility + for (int32_t i = SDB_TABLE_SIZE; i < SDB_TABLE_SIZE_EXTRA; ++i) { + int64_t maxId = 0; + ret = taosReadFile(pFile, &maxId, sizeof(int64_t)); + if (ret < 0) { + code = TAOS_SYSTEM_ERROR(errno); + TAOS_RETURN(code); + } + if (ret != sizeof(int64_t)) { + code = TSDB_CODE_FILE_CORRUPTED; + TAOS_RETURN(code); + } + if (i < SDB_MAX) { + pSdb->maxId[i] = maxId; + } + + int64_t ver = 0; + ret = taosReadFile(pFile, &ver, sizeof(int64_t)); + if (ret < 0) { + code = TAOS_SYSTEM_ERROR(errno); + TAOS_RETURN(code); + } + if (ret != sizeof(int64_t)) { + code = TSDB_CODE_FILE_CORRUPTED; + TAOS_RETURN(code); + } + if (i < SDB_MAX) { + pSdb->tableVer[i] = ver; + } + } + + char reserve[SDB_RESERVE_SIZE_EXTRA] = {0}; ret = taosReadFile(pFile, reserve, sizeof(reserve)); if (ret < 0) { return terrno; @@ -207,7 +241,26 @@ static int32_t sdbWriteFileHead(SSdb *pSdb, TdFilePtr pFile) { } } - char reserve[SDB_RESERVE_SIZE] = {0}; + // for sdb compatibility + for (int32_t i = SDB_TABLE_SIZE; i < SDB_TABLE_SIZE_EXTRA; ++i) { + int64_t maxId = 0; + if (i < SDB_MAX) { + maxId = pSdb->maxId[i]; + } + if (taosWriteFile(pFile, &maxId, sizeof(int64_t)) != sizeof(int64_t)) { + return terrno; + } + + int64_t ver = 0; + if (i < SDB_MAX) { + ver = pSdb->tableVer[i]; + } + if (taosWriteFile(pFile, &ver, sizeof(int64_t)) != sizeof(int64_t)) { + return terrno; + } + } + + char reserve[SDB_RESERVE_SIZE_EXTRA] = {0}; if (taosWriteFile(pFile, reserve, sizeof(reserve)) != sizeof(reserve)) { return terrno; } diff --git a/source/dnode/mnode/sdb/src/sdbHash.c b/source/dnode/mnode/sdb/src/sdbHash.c index ea44a7c549..3f85ccb087 100644 --- a/source/dnode/mnode/sdb/src/sdbHash.c +++ b/source/dnode/mnode/sdb/src/sdbHash.c @@ -74,6 +74,8 @@ const char *sdbTableName(ESdbType type) { return "grant"; case SDB_ARBGROUP: return "arb_group"; + case SDB_ANODE: + return "anode"; default: return "undefine"; } diff --git a/source/libs/executor/CMakeLists.txt b/source/libs/executor/CMakeLists.txt index 8ba5f9a866..af2c3986aa 100644 --- a/source/libs/executor/CMakeLists.txt +++ b/source/libs/executor/CMakeLists.txt @@ -5,6 +5,10 @@ if(${TD_DARWIN}) target_compile_options(executor PRIVATE -Wno-error=deprecated-non-prototype) endif(${TD_DARWIN}) +IF(${BUILD_WITH_ANALYSIS}) + add_definitions(-DUSE_ANAL) +ENDIF() + target_link_libraries(executor PRIVATE os util common function parser planner qcom scalar nodes index wal tdb geometry ) diff --git a/source/libs/executor/inc/operator.h b/source/libs/executor/inc/operator.h index fce0b05fde..7dfc7080d6 100644 --- a/source/libs/executor/inc/operator.h +++ b/source/libs/executor/inc/operator.h @@ -133,6 +133,8 @@ int32_t createStreamPartitionOperatorInfo(SOperatorInfo* downstream, SStreamPart int32_t createTimeSliceOperatorInfo(SOperatorInfo* downstream, SPhysiNode* pNode, SExecTaskInfo* pTaskInfo, SOperatorInfo** pInfo); +int32_t createForecastOperatorInfo(SOperatorInfo* downstream, SPhysiNode* pNode, SExecTaskInfo* pTaskInfo, SOperatorInfo** pInfo); + int32_t createMergeJoinOperatorInfo(SOperatorInfo** pDownstream, int32_t numOfDownstream, SSortMergeJoinPhysiNode* pJoinNode, SExecTaskInfo* pTaskInfo, SOperatorInfo** pInfo); int32_t createHashJoinOperatorInfo(SOperatorInfo** pDownstream, int32_t numOfDownstream, SHashJoinPhysiNode* pJoinNode, SExecTaskInfo* pTaskInfo, SOperatorInfo** pInfo); @@ -159,6 +161,8 @@ int32_t createCountwindowOperatorInfo(SOperatorInfo* downstream, SPhysiNode* phy int32_t createGroupCacheOperatorInfo(SOperatorInfo** pDownstream, int32_t numOfDownstream, SGroupCachePhysiNode* pPhyciNode, SExecTaskInfo* pTaskInfo, SOperatorInfo** pInfo); +int32_t createAnomalywindowOperatorInfo(SOperatorInfo* downstream, SPhysiNode* physiNode, SExecTaskInfo* pTaskInfo, SOperatorInfo** pInfo); + int32_t createDynQueryCtrlOperatorInfo(SOperatorInfo** pDownstream, int32_t numOfDownstream, SDynQueryCtrlPhysiNode* pPhyciNode, SExecTaskInfo* pTaskInfo, SOperatorInfo** pInfo); // clang-format on diff --git a/source/libs/executor/src/anomalywindowoperator.c b/source/libs/executor/src/anomalywindowoperator.c new file mode 100644 index 0000000000..7267bbbe09 --- /dev/null +++ b/source/libs/executor/src/anomalywindowoperator.c @@ -0,0 +1,609 @@ +/* + * Copyright (c) 2019 TAOS Data, Inc. + * + * This program is free software: you can use, redistribute, and/or modify + * it under the terms of the GNU Affero General Public License, version 3 + * or later ("AGPL"), as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +#include "executorInt.h" +#include "filter.h" +#include "function.h" +#include "functionMgt.h" +#include "operator.h" +#include "querytask.h" +#include "tanal.h" +#include "tcommon.h" +#include "tcompare.h" +#include "tdatablock.h" +#include "tjson.h" +#include "ttime.h" + +#ifdef USE_ANAL + +typedef struct { + SArray* blocks; // SSDataBlock* + SArray* windows; // STimeWindow + uint64_t groupId; + int64_t numOfRows; + int32_t curWinIndex; + STimeWindow curWin; + SResultRow* pResultRow; +} SAnomalyWindowSupp; + +typedef struct { + SOptrBasicInfo binfo; + SAggSupporter aggSup; + SExprSupp scalarSup; + int32_t tsSlotId; + STimeWindowAggSupp twAggSup; + char algoName[TSDB_ANAL_ALGO_NAME_LEN]; + char algoUrl[TSDB_ANAL_ALGO_URL_LEN]; + char anomalyOpt[TSDB_ANAL_ALGO_OPTION_LEN]; + SAnomalyWindowSupp anomalySup; + SWindowRowsSup anomalyWinRowSup; + SColumn anomalyCol; + SStateKeys anomalyKey; +} SAnomalyWindowOperatorInfo; + +static void anomalyDestroyOperatorInfo(void* param); +static int32_t anomalyAggregateNext(SOperatorInfo* pOperator, SSDataBlock** ppRes); +static void anomalyAggregateBlocks(SOperatorInfo* pOperator); +static int32_t anomalyCacheBlock(SAnomalyWindowOperatorInfo* pInfo, SSDataBlock* pBlock); + +int32_t createAnomalywindowOperatorInfo(SOperatorInfo* downstream, SPhysiNode* physiNode, SExecTaskInfo* pTaskInfo, + SOperatorInfo** pOptrInfo) { + QRY_PARAM_CHECK(pOptrInfo); + + int32_t code = TSDB_CODE_SUCCESS; + int32_t lino = 0; + SAnomalyWindowOperatorInfo* pInfo = taosMemoryCalloc(1, sizeof(SAnomalyWindowOperatorInfo)); + SOperatorInfo* pOperator = taosMemoryCalloc(1, sizeof(SOperatorInfo)); + SAnomalyWindowPhysiNode* pAnomalyNode = (SAnomalyWindowPhysiNode*)physiNode; + SColumnNode* pColNode = (SColumnNode*)(pAnomalyNode->pAnomalyKey); + if (pInfo == NULL || pOperator == NULL) { + code = terrno; + goto _error; + } + + if (!taosAnalGetOptStr(pAnomalyNode->anomalyOpt, "algo", pInfo->algoName, sizeof(pInfo->algoName))) { + qError("failed to get anomaly_window algorithm name from %s", pAnomalyNode->anomalyOpt); + code = TSDB_CODE_ANAL_ALGO_NOT_FOUND; + goto _error; + } + if (taosAnalGetAlgoUrl(pInfo->algoName, ANAL_ALGO_TYPE_ANOMALY_DETECT, pInfo->algoUrl, sizeof(pInfo->algoUrl)) != 0) { + qError("failed to get anomaly_window algorithm url from %s", pInfo->algoName); + code = TSDB_CODE_ANAL_ALGO_NOT_LOAD; + goto _error; + } + + pOperator->exprSupp.hasWindowOrGroup = true; + pInfo->tsSlotId = ((SColumnNode*)pAnomalyNode->window.pTspk)->slotId; + strncpy(pInfo->anomalyOpt, pAnomalyNode->anomalyOpt, sizeof(pInfo->anomalyOpt)); + + if (pAnomalyNode->window.pExprs != NULL) { + int32_t numOfScalarExpr = 0; + SExprInfo* pScalarExprInfo = NULL; + code = createExprInfo(pAnomalyNode->window.pExprs, NULL, &pScalarExprInfo, &numOfScalarExpr); + QUERY_CHECK_CODE(code, lino, _error); + code = initExprSupp(&pInfo->scalarSup, pScalarExprInfo, numOfScalarExpr, &pTaskInfo->storageAPI.functionStore); + QUERY_CHECK_CODE(code, lino, _error); + } + + size_t keyBufSize = 0; + int32_t num = 0; + SExprInfo* pExprInfo = NULL; + code = createExprInfo(pAnomalyNode->window.pFuncs, NULL, &pExprInfo, &num); + QUERY_CHECK_CODE(code, lino, _error); + + initResultSizeInfo(&pOperator->resultInfo, 4096); + + code = initAggSup(&pOperator->exprSupp, &pInfo->aggSup, pExprInfo, num, keyBufSize, pTaskInfo->id.str, + pTaskInfo->streamInfo.pState, &pTaskInfo->storageAPI.functionStore); + QUERY_CHECK_CODE(code, lino, _error); + + SSDataBlock* pResBlock = createDataBlockFromDescNode(pAnomalyNode->window.node.pOutputDataBlockDesc); + QUERY_CHECK_NULL(pResBlock, code, lino, _error, terrno); + initBasicInfo(&pInfo->binfo, pResBlock); + + code = blockDataEnsureCapacity(pResBlock, pOperator->resultInfo.capacity); + QUERY_CHECK_CODE(code, lino, _error); + + initResultRowInfo(&pInfo->binfo.resultRowInfo); + pInfo->binfo.inputTsOrder = pAnomalyNode->window.node.inputTsOrder; + pInfo->binfo.outputTsOrder = pAnomalyNode->window.node.outputTsOrder; + + pInfo->anomalyCol = extractColumnFromColumnNode(pColNode); + pInfo->anomalyKey.type = pInfo->anomalyCol.type; + pInfo->anomalyKey.bytes = pInfo->anomalyCol.bytes; + pInfo->anomalyKey.pData = taosMemoryCalloc(1, pInfo->anomalyCol.bytes); + if (pInfo->anomalyKey.pData == NULL) { + goto _error; + } + + int32_t itemSize = sizeof(int32_t) + pInfo->aggSup.resultRowSize + pInfo->anomalyKey.bytes; + pInfo->anomalySup.pResultRow = taosMemoryCalloc(1, itemSize); + pInfo->anomalySup.blocks = taosArrayInit(16, sizeof(SSDataBlock*)); + pInfo->anomalySup.windows = taosArrayInit(16, sizeof(STimeWindow)); + + if (pInfo->anomalySup.windows == NULL || pInfo->anomalySup.blocks == NULL || pInfo->anomalySup.pResultRow == NULL) { + code = TSDB_CODE_OUT_OF_MEMORY; + goto _error; + } + + code = filterInitFromNode((SNode*)pAnomalyNode->window.node.pConditions, &pOperator->exprSupp.pFilterInfo, 0); + QUERY_CHECK_CODE(code, lino, _error); + + code = initExecTimeWindowInfo(&pInfo->twAggSup.timeWindowData, &pTaskInfo->window); + QUERY_CHECK_CODE(code, lino, _error); + + setOperatorInfo(pOperator, "AnomalyWindowOperator", QUERY_NODE_PHYSICAL_PLAN_MERGE_ANOMALY, true, OP_NOT_OPENED, + pInfo, pTaskInfo); + pOperator->fpSet = createOperatorFpSet(optrDummyOpenFn, anomalyAggregateNext, NULL, anomalyDestroyOperatorInfo, + optrDefaultBufFn, NULL, optrDefaultGetNextExtFn, NULL); + + code = appendDownstream(pOperator, &downstream, 1); + QUERY_CHECK_CODE(code, lino, _error); + + *pOptrInfo = pOperator; + + qDebug("anomaly_window operator is created, algo:%s url:%s opt:%s", pInfo->algoName, pInfo->algoUrl, + pInfo->anomalyOpt); + return TSDB_CODE_SUCCESS; + +_error: + if (pInfo != NULL) { + anomalyDestroyOperatorInfo(pInfo); + } + + destroyOperatorAndDownstreams(pOperator, &downstream, 1); + pTaskInfo->code = code; + qError("failed to create anomaly_window operator, algo:%s code:0x%x", pInfo->algoName, code); + return code; +} + +static int32_t anomalyAggregateNext(SOperatorInfo* pOperator, SSDataBlock** ppRes) { + int32_t code = TSDB_CODE_SUCCESS; + int32_t lino = 0; + SAnomalyWindowOperatorInfo* pInfo = pOperator->info; + SExecTaskInfo* pTaskInfo = pOperator->pTaskInfo; + SOptrBasicInfo* pBInfo = &pInfo->binfo; + SAnomalyWindowSupp* pSupp = &pInfo->anomalySup; + SSDataBlock* pRes = pInfo->binfo.pRes; + int64_t st = taosGetTimestampUs(); + int32_t numOfBlocks = taosArrayGetSize(pSupp->blocks); + + blockDataCleanup(pRes); + + while (1) { + SSDataBlock* pBlock = getNextBlockFromDownstream(pOperator, 0); + if (pBlock == NULL) { + break; + } + + if (pSupp->groupId == 0 || pSupp->groupId == pBlock->info.id.groupId) { + pSupp->groupId = pBlock->info.id.groupId; + numOfBlocks++; + qDebug("group:%" PRId64 ", blocks:%d, cache block rows:%" PRId64, pSupp->groupId, numOfBlocks, pBlock->info.rows); + code = anomalyCacheBlock(pInfo, pBlock); + QUERY_CHECK_CODE(code, lino, _end); + } else { + qDebug("group:%" PRId64 ", read finish for new group coming, blocks:%d", pSupp->groupId, numOfBlocks); + anomalyAggregateBlocks(pOperator); + pSupp->groupId = pBlock->info.id.groupId; + numOfBlocks = 1; + qDebug("group:%" PRId64 ", new group, cache block rows:%" PRId64, pSupp->groupId, pBlock->info.rows); + code = anomalyCacheBlock(pInfo, pBlock); + QUERY_CHECK_CODE(code, lino, _end); + } + + if (pRes->info.rows > 0) { + (*ppRes) = pRes; + qDebug("group:%" PRId64 ", return to upstream, blocks:%d", pRes->info.id.groupId, numOfBlocks); + return code; + } + } + + if (numOfBlocks > 0) { + qDebug("group:%" PRId64 ", read finish, blocks:%d", pInfo->anomalySup.groupId, numOfBlocks); + anomalyAggregateBlocks(pOperator); + } + + int64_t cost = taosGetTimestampUs() - st; + qDebug("all groups finished, cost:%" PRId64 "us", cost); + +_end: + if (code != TSDB_CODE_SUCCESS) { + qError("%s failed at line %d since %s", __func__, lino, tstrerror(code)); + pTaskInfo->code = code; + T_LONG_JMP(pTaskInfo->env, code); + } + (*ppRes) = (pBInfo->pRes->info.rows == 0) ? NULL : pBInfo->pRes; + return code; +} + +static void anomalyDestroyOperatorInfo(void* param) { + SAnomalyWindowOperatorInfo* pInfo = (SAnomalyWindowOperatorInfo*)param; + if (pInfo == NULL) return; + + qDebug("anomaly_window operator is destroyed, algo:%s", pInfo->algoName); + + cleanupBasicInfo(&pInfo->binfo); + cleanupAggSup(&pInfo->aggSup); + cleanupExprSupp(&pInfo->scalarSup); + colDataDestroy(&pInfo->twAggSup.timeWindowData); + + for (int32_t i = 0; i < taosArrayGetSize(pInfo->anomalySup.blocks); ++i) { + SSDataBlock* pBlock = taosArrayGetP(pInfo->anomalySup.blocks, i); + blockDataDestroy(pBlock); + } + taosArrayDestroy(pInfo->anomalySup.blocks); + taosArrayDestroy(pInfo->anomalySup.windows); + taosMemoryFreeClear(pInfo->anomalySup.pResultRow); + taosMemoryFreeClear(pInfo->anomalyKey.pData); + + taosMemoryFreeClear(param); +} + +static int32_t anomalyCacheBlock(SAnomalyWindowOperatorInfo* pInfo, SSDataBlock* pSrc) { + SSDataBlock* pDst = NULL; + int32_t code = createOneDataBlock(pSrc, true, &pDst); + + if (code != 0) return code; + if (pDst == NULL) return TSDB_CODE_OUT_OF_MEMORY; + if (taosArrayPush(pInfo->anomalySup.blocks, &pDst) == NULL) return TSDB_CODE_OUT_OF_MEMORY; + + return 0; +} + +static int32_t anomalyFindWindow(SAnomalyWindowSupp* pSupp, TSKEY key) { + for (int32_t i = pSupp->curWinIndex; i < taosArrayGetSize(pSupp->windows); ++i) { + STimeWindow* pWindow = taosArrayGet(pSupp->windows, i); + if (key >= pWindow->skey && key < pWindow->ekey) { + pSupp->curWin = *pWindow; + pSupp->curWinIndex = i; + return 0; + } + } + return -1; +} + +static int32_t anomalyParseJson(SJson* pJson, SArray* pWindows) { + int32_t code = 0; + int32_t rows = 0; + STimeWindow win = {0}; + + taosArrayClear(pWindows); + + tjsonGetInt32ValueFromDouble(pJson, "rows", rows, code); + if (code < 0) return TSDB_CODE_INVALID_JSON_FORMAT; + if (rows <= 0) return 0; + + SJson* res = tjsonGetObjectItem(pJson, "res"); + if (res == NULL) return TSDB_CODE_INVALID_JSON_FORMAT; + + int32_t ressize = tjsonGetArraySize(res); + if (ressize != rows) return TSDB_CODE_INVALID_JSON_FORMAT; + + for (int32_t i = 0; i < rows; ++i) { + SJson* row = tjsonGetArrayItem(res, i); + if (row == NULL) return TSDB_CODE_INVALID_JSON_FORMAT; + + int32_t colsize = tjsonGetArraySize(row); + if (colsize != 2) return TSDB_CODE_INVALID_JSON_FORMAT; + + SJson* start = tjsonGetArrayItem(row, 0); + SJson* end = tjsonGetArrayItem(row, 1); + if (start == NULL || end == NULL) return TSDB_CODE_INVALID_JSON_FORMAT; + + tjsonGetObjectValueBigInt(start, &win.skey); + tjsonGetObjectValueBigInt(end, &win.ekey); + + if (win.skey >= win.ekey) { + win.ekey = win.skey + 1; + } + + if (taosArrayPush(pWindows, &win) == NULL) return TSDB_CODE_OUT_OF_BUFFER; + } + + int32_t numOfWins = taosArrayGetSize(pWindows); + qDebug("anomaly window recevied, total:%d", numOfWins); + for (int32_t i = 0; i < numOfWins; ++i) { + STimeWindow* pWindow = taosArrayGet(pWindows, i); + qDebug("anomaly win:%d [%" PRId64 ", %" PRId64 ")", i, pWindow->skey, pWindow->ekey); + } + + return 0; +} + +static int32_t anomalyAnalysisWindow(SOperatorInfo* pOperator) { + SAnomalyWindowOperatorInfo* pInfo = pOperator->info; + SAnomalyWindowSupp* pSupp = &pInfo->anomalySup; + SJson* pJson = NULL; + SAnalBuf analBuf = {.bufType = ANAL_BUF_TYPE_JSON}; + char dataBuf[64] = {0}; + int32_t code = 0; + + int64_t ts = 0; + // int64_t ts = taosGetTimestampMs(); + snprintf(analBuf.fileName, sizeof(analBuf.fileName), "%s/tdengine-anomaly-%" PRId64 "-%" PRId64, tsTempDir, ts, + pSupp->groupId); + code = tsosAnalBufOpen(&analBuf, 2); + if (code != 0) goto _OVER; + + const char* prec = TSDB_TIME_PRECISION_MILLI_STR; + if (pInfo->anomalyCol.precision == TSDB_TIME_PRECISION_MICRO) prec = TSDB_TIME_PRECISION_MICRO_STR; + if (pInfo->anomalyCol.precision == TSDB_TIME_PRECISION_NANO) prec = TSDB_TIME_PRECISION_NANO_STR; + + code = taosAnalBufWriteOptStr(&analBuf, "algo", pInfo->algoName); + if (code != 0) goto _OVER; + + code = taosAnalBufWriteOptStr(&analBuf, "prec", prec); + if (code != 0) goto _OVER; + + code = taosAnalBufWriteColMeta(&analBuf, 0, TSDB_DATA_TYPE_TIMESTAMP, "ts"); + if (code != 0) goto _OVER; + + code = taosAnalBufWriteColMeta(&analBuf, 1, pInfo->anomalyCol.type, "val"); + if (code != 0) goto _OVER; + + code = taosAnalBufWriteDataBegin(&analBuf); + if (code != 0) goto _OVER; + + int32_t numOfBlocks = (int32_t)taosArrayGetSize(pSupp->blocks); + + // timestamp + code = taosAnalBufWriteColBegin(&analBuf, 0); + if (code != 0) goto _OVER; + for (int32_t i = 0; i < numOfBlocks; ++i) { + SSDataBlock* pBlock = taosArrayGetP(pSupp->blocks, i); + if (pBlock == NULL) break; + SColumnInfoData* pTsCol = taosArrayGet(pBlock->pDataBlock, pInfo->tsSlotId); + if (pTsCol == NULL) break; + for (int32_t j = 0; j < pBlock->info.rows; ++j) { + code = taosAnalBufWriteColData(&analBuf, 0, TSDB_DATA_TYPE_TIMESTAMP, &((TSKEY*)pTsCol->pData)[j]); + if (code != 0) goto _OVER; + } + } + code = taosAnalBufWriteColEnd(&analBuf, 0); + if (code != 0) goto _OVER; + + // data + code = taosAnalBufWriteColBegin(&analBuf, 1); + if (code != 0) goto _OVER; + for (int32_t i = 0; i < numOfBlocks; ++i) { + SSDataBlock* pBlock = taosArrayGetP(pSupp->blocks, i); + if (pBlock == NULL) break; + SColumnInfoData* pValCol = taosArrayGet(pBlock->pDataBlock, pInfo->anomalyCol.slotId); + if (pValCol == NULL) break; + + for (int32_t j = 0; j < pBlock->info.rows; ++j) { + code = taosAnalBufWriteColData(&analBuf, 1, pValCol->info.type, colDataGetData(pValCol, j)); + if (code != 0) goto _OVER; + if (code != 0) goto _OVER; + } + } + code = taosAnalBufWriteColEnd(&analBuf, 1); + if (code != 0) goto _OVER; + + code = taosAnalBufWriteDataEnd(&analBuf); + if (code != 0) goto _OVER; + + code = taosAnalBufWriteOptStr(&analBuf, "option", pInfo->anomalyOpt); + if (code != 0) goto _OVER; + + code = taosAnalBufClose(&analBuf); + if (code != 0) goto _OVER; + + pJson = taosAnalSendReqRetJson(pInfo->algoUrl, ANAL_HTTP_TYPE_POST, &analBuf); + if (pJson == NULL) { + code = terrno; + goto _OVER; + } + + code = anomalyParseJson(pJson, pSupp->windows); + if (code != 0) goto _OVER; + +_OVER: + if (code != 0) { + qError("failed to analysis window since %s", tstrerror(code)); + } + taosAnalBufDestroy(&analBuf); + if (pJson != NULL) tjsonDelete(pJson); + return code; +} + +static void anomalyAggregateRows(SOperatorInfo* pOperator, SSDataBlock* pBlock) { + SAnomalyWindowOperatorInfo* pInfo = pOperator->info; + SExecTaskInfo* pTaskInfo = pOperator->pTaskInfo; + SExprSupp* pExprSup = &pOperator->exprSupp; + SAnomalyWindowSupp* pSupp = &pInfo->anomalySup; + SWindowRowsSup* pRowSup = &pInfo->anomalyWinRowSup; + SResultRow* pResRow = pSupp->pResultRow; + int32_t numOfOutput = pOperator->exprSupp.numOfExprs; + + if (setResultRowInitCtx(pResRow, pExprSup->pCtx, pExprSup->numOfExprs, pExprSup->rowEntryInfoOffset) == 0) { + updateTimeWindowInfo(&pInfo->twAggSup.timeWindowData, &pSupp->curWin, 0); + applyAggFunctionOnPartialTuples(pTaskInfo, pExprSup->pCtx, &pInfo->twAggSup.timeWindowData, pRowSup->startRowIndex, + pRowSup->numOfRows, pBlock->info.rows, numOfOutput); + } +} + +static void anomalyBuildResult(SOperatorInfo* pOperator) { + SAnomalyWindowOperatorInfo* pInfo = pOperator->info; + SExecTaskInfo* pTaskInfo = pOperator->pTaskInfo; + SExprSupp* pExprSup = &pOperator->exprSupp; + SSDataBlock* pRes = pInfo->binfo.pRes; + SResultRow* pResRow = pInfo->anomalySup.pResultRow; + + doUpdateNumOfRows(pExprSup->pCtx, pResRow, pExprSup->numOfExprs, pExprSup->rowEntryInfoOffset); + copyResultrowToDataBlock(pExprSup->pExprInfo, pExprSup->numOfExprs, pResRow, pExprSup->pCtx, pRes, + pExprSup->rowEntryInfoOffset, pTaskInfo); + pRes->info.rows += pResRow->numOfRows; + clearResultRowInitFlag(pExprSup->pCtx, pExprSup->numOfExprs); +} + +static void anomalyAggregateBlocks(SOperatorInfo* pOperator) { + int32_t code = TSDB_CODE_SUCCESS; + int32_t lino = 0; + SAnomalyWindowOperatorInfo* pInfo = pOperator->info; + SExecTaskInfo* pTaskInfo = pOperator->pTaskInfo; + SExprSupp* pExprSup = &pOperator->exprSupp; + SSDataBlock* pRes = pInfo->binfo.pRes; + SAnomalyWindowSupp* pSupp = &pInfo->anomalySup; + SWindowRowsSup* pRowSup = &pInfo->anomalyWinRowSup; + SResultRow* pResRow = pSupp->pResultRow; + int32_t numOfOutput = pOperator->exprSupp.numOfExprs; + int32_t rowsInWin = 0; + int32_t rowsInBlock = 0; + const int64_t gid = pSupp->groupId; + const int32_t order = pInfo->binfo.inputTsOrder; + + int32_t numOfBlocks = (int32_t)taosArrayGetSize(pSupp->blocks); + if (numOfBlocks == 0) goto _OVER; + + qDebug("group:%" PRId64 ", aggregate blocks, blocks:%d", pSupp->groupId, numOfBlocks); + pRes->info.id.groupId = pSupp->groupId; + + code = anomalyAnalysisWindow(pOperator); + QUERY_CHECK_CODE(code, lino, _OVER); + + int32_t numOfWins = taosArrayGetSize(pSupp->windows); + qDebug("group:%" PRId64 ", wins:%d, rows:%" PRId64, pSupp->groupId, numOfWins, pSupp->numOfRows); + for (int32_t w = 0; w < numOfWins; ++w) { + STimeWindow* pWindow = taosArrayGet(pSupp->windows, w); + if (w == 0) { + pSupp->curWin = *pWindow; + pRowSup->win.skey = pSupp->curWin.skey; + } + qDebug("group:%" PRId64 ", win:%d [%" PRId64 ", %" PRId64 ")", pSupp->groupId, w, pWindow->skey, pWindow->ekey); + } + + if (numOfWins <= 0) goto _OVER; + if (numOfWins > pRes->info.capacity) { + code = blockDataEnsureCapacity(pRes, numOfWins); + QUERY_CHECK_CODE(code, lino, _OVER); + } + + for (int32_t b = 0; b < numOfBlocks; ++b) { + SSDataBlock* pBlock = taosArrayGetP(pSupp->blocks, b); + if (pBlock == NULL) break; + + pRes->info.scanFlag = pBlock->info.scanFlag; + code = setInputDataBlock(pExprSup, pBlock, order, MAIN_SCAN, true); + if (code != 0) break; + + code = blockDataUpdateTsWindow(pBlock, pInfo->tsSlotId); + if (code != 0) break; + + // there is an scalar expression that needs to be calculated right before apply the group aggregation. + if (pInfo->scalarSup.pExprInfo != NULL) { + code = projectApplyFunctions(pInfo->scalarSup.pExprInfo, pBlock, pBlock, pInfo->scalarSup.pCtx, + pInfo->scalarSup.numOfExprs, NULL); + if (code != 0) break; + } + + SColumnInfoData* pValCol = taosArrayGet(pBlock->pDataBlock, pInfo->anomalyCol.slotId); + if (pValCol == NULL) break; + SColumnInfoData* pTsCol = taosArrayGet(pBlock->pDataBlock, pInfo->tsSlotId); + if (pTsCol == NULL) break; + TSKEY* tsList = (TSKEY*)pTsCol->pData; + bool lastBlock = (b == numOfBlocks - 1); + + qTrace("group:%" PRId64 ", block:%d win:%d, riwin:%d riblock:%d, rows:%" PRId64, pSupp->groupId, b, + pSupp->curWinIndex, rowsInWin, rowsInBlock, pBlock->info.rows); + + for (int32_t r = 0; r < pBlock->info.rows; ++r) { + TSKEY key = tsList[r]; + bool keyInWin = (key >= pSupp->curWin.skey && key < pSupp->curWin.ekey); + bool lastRow = (r == pBlock->info.rows - 1); + + if (keyInWin) { + if (r < 5) { + qTrace("group:%" PRId64 ", block:%d win:%d, row:%d ts:%" PRId64 ", riwin:%d riblock:%d", pSupp->groupId, b, + pSupp->curWinIndex, r, key, rowsInWin, rowsInBlock); + } + if (rowsInBlock == 0) { + doKeepNewWindowStartInfo(pRowSup, tsList, r, gid); + } + doKeepTuple(pRowSup, tsList[r], gid); + rowsInBlock++; + rowsInWin++; + } else { + if (rowsInBlock > 0) { + qTrace("group:%" PRId64 ", block:%d win:%d, row:%d ts:%" PRId64 ", riwin:%d riblock:%d, agg", pSupp->groupId, + b, pSupp->curWinIndex, r, key, rowsInWin, rowsInBlock); + anomalyAggregateRows(pOperator, pBlock); + rowsInBlock = 0; + } + if (rowsInWin > 0) { + qTrace("group:%" PRId64 ", block:%d win:%d, row:%d ts:%" PRId64 ", riwin:%d riblock:%d, build result", + pSupp->groupId, b, pSupp->curWinIndex, r, key, rowsInWin, rowsInBlock); + anomalyBuildResult(pOperator); + rowsInWin = 0; + } + if (anomalyFindWindow(pSupp, tsList[r]) == 0) { + qTrace("group:%" PRId64 ", block:%d win:%d, row:%d ts:%" PRId64 ", riwin:%d riblock:%d, new window detect", + pSupp->groupId, b, pSupp->curWinIndex, r, key, rowsInWin, rowsInBlock); + doKeepNewWindowStartInfo(pRowSup, tsList, r, gid); + doKeepTuple(pRowSup, tsList[r], gid); + rowsInBlock = 1; + rowsInWin = 1; + } else { + qTrace("group:%" PRId64 ", block:%d win:%d, row:%d ts:%" PRId64 ", riwin:%d riblock:%d, window not found", + pSupp->groupId, b, pSupp->curWinIndex, r, key, rowsInWin, rowsInBlock); + rowsInBlock = 0; + rowsInWin = 0; + } + } + + if (lastRow && rowsInBlock > 0) { + qTrace("group:%" PRId64 ", block:%d win:%d, row:%d ts:%" PRId64 ", riwin:%d riblock:%d, agg since lastrow", + pSupp->groupId, b, pSupp->curWinIndex, r, key, rowsInWin, rowsInBlock); + anomalyAggregateRows(pOperator, pBlock); + rowsInBlock = 0; + } + } + + if (lastBlock && rowsInWin > 0) { + qTrace("group:%" PRId64 ", block:%d win:%d, riwin:%d riblock:%d, build result since lastblock", pSupp->groupId, b, + pSupp->curWinIndex, rowsInWin, rowsInBlock); + anomalyBuildResult(pOperator); + rowsInWin = 0; + } + } + + code = doFilter(pRes, pOperator->exprSupp.pFilterInfo, NULL); + QUERY_CHECK_CODE(code, lino, _OVER); + +_OVER: + for (int32_t i = 0; i < numOfBlocks; ++i) { + SSDataBlock* pBlock = taosArrayGetP(pSupp->blocks, i); + qDebug("%s, clear block, pBlock:%p pBlock->pDataBlock:%p", __func__, pBlock, pBlock->pDataBlock); + blockDataDestroy(pBlock); + } + + taosArrayClear(pSupp->blocks); + taosArrayClear(pSupp->windows); + pSupp->numOfRows = 0; + pSupp->curWin.ekey = 0; + pSupp->curWin.skey = 0; + pSupp->curWinIndex = 0; +} + +#else + +int32_t createAnomalywindowOperatorInfo(SOperatorInfo* downstream, SPhysiNode* physiNode, SExecTaskInfo* pTaskInfo, + SOperatorInfo** pOptrInfo) { + return TSDB_CODE_OPS_NOT_SUPPORT; +} +void destroyForecastInfo(void* param) {} + +#endif \ No newline at end of file diff --git a/source/libs/executor/src/forecastoperator.c b/source/libs/executor/src/forecastoperator.c new file mode 100644 index 0000000000..599678106c --- /dev/null +++ b/source/libs/executor/src/forecastoperator.c @@ -0,0 +1,663 @@ +/* + * Copyright (c) 2019 TAOS Data, Inc. + * + * This program is free software: you can use, redistribute, and/or modify + * it under the terms of the GNU Affero General Public License, version 3 + * or later ("AGPL"), as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +#include "executorInt.h" +#include "filter.h" +#include "function.h" +#include "functionMgt.h" +#include "operator.h" +#include "querytask.h" +#include "storageapi.h" +#include "tanal.h" +#include "tcommon.h" +#include "tcompare.h" +#include "tdatablock.h" +#include "tfill.h" +#include "ttime.h" + +#ifdef USE_ANAL + +typedef struct { + char algoName[TSDB_ANAL_ALGO_NAME_LEN]; + char algoUrl[TSDB_ANAL_ALGO_URL_LEN]; + char algoOpt[TSDB_ANAL_ALGO_OPTION_LEN]; + int64_t maxTs; + int64_t minTs; + int64_t numOfRows; + uint64_t groupId; + int32_t numOfBlocks; + int32_t optRows; + int16_t resTsSlot; + int16_t resValSlot; + int16_t resLowSlot; + int16_t resHighSlot; + int16_t inputTsSlot; + int16_t inputValSlot; + int8_t inputValType; + int8_t inputPrecision; + SAnalBuf analBuf; +} SForecastSupp; + +typedef struct SForecastOperatorInfo { + SSDataBlock* pRes; + SExprSupp scalarSup; // scalar calculation + SForecastSupp forecastSupp; +} SForecastOperatorInfo; + +static void destroyForecastInfo(void* param); + +static FORCE_INLINE int32_t forecastEnsureBlockCapacity(SSDataBlock* pBlock, int32_t newRowsNum) { + if (pBlock->info.rows < pBlock->info.capacity) { + return TSDB_CODE_SUCCESS; + } + + int32_t code = blockDataEnsureCapacity(pBlock, newRowsNum); + if (code != TSDB_CODE_SUCCESS) { + qError("%s failed at line %d since %s", __func__, __LINE__, tstrerror(code)); + return code; + } + + return TSDB_CODE_SUCCESS; +} + +static int32_t forecastCacheBlock(SForecastSupp* pSupp, SSDataBlock* pBlock) { + int32_t code = TSDB_CODE_SUCCESS; + int32_t lino = 0; + SAnalBuf* pBuf = &pSupp->analBuf; + + qDebug("block:%d, %p rows:%" PRId64, pSupp->numOfBlocks, pBlock, pBlock->info.rows); + pSupp->numOfBlocks++; + + for (int32_t j = 0; j < pBlock->info.rows; ++j) { + SColumnInfoData* pValCol = taosArrayGet(pBlock->pDataBlock, pSupp->inputValSlot); + SColumnInfoData* pTsCol = taosArrayGet(pBlock->pDataBlock, pSupp->inputTsSlot); + if (pTsCol == NULL || pValCol == NULL) break; + + int64_t ts = ((TSKEY*)pTsCol->pData)[j]; + char* val = colDataGetData(pValCol, j); + int16_t valType = pValCol->info.type; + + pSupp->minTs = MIN(pSupp->minTs, ts); + pSupp->maxTs = MAX(pSupp->maxTs, ts); + pSupp->numOfRows++; + + code = taosAnalBufWriteColData(pBuf, 0, TSDB_DATA_TYPE_TIMESTAMP, &ts); + if (TSDB_CODE_SUCCESS != code) return code; + + code = taosAnalBufWriteColData(pBuf, 1, valType, val); + if (TSDB_CODE_SUCCESS != code) return code; + } + + return 0; +} + +static int32_t forecastCloseBuf(SForecastSupp* pSupp) { + SAnalBuf* pBuf = &pSupp->analBuf; + int32_t code = 0; + + for (int32_t i = 0; i < 2; ++i) { + code = taosAnalBufWriteColEnd(pBuf, i); + if (code != 0) return code; + } + + code = taosAnalBufWriteDataEnd(pBuf); + if (code != 0) return code; + + int32_t len = strlen(pSupp->algoOpt); + int64_t every = (pSupp->maxTs - pSupp->minTs) / (pSupp->numOfRows + 1); + int64_t start = pSupp->maxTs + every; + bool hasStart = taosAnalGetOptStr(pSupp->algoOpt, "start", NULL, 0); + if (!hasStart) { + qDebug("forecast start not found from %s, use %" PRId64, pSupp->algoOpt, start); + code = taosAnalBufWriteOptInt(pBuf, "start", start); + if (code != 0) return code; + } + + bool hasEvery = taosAnalGetOptStr(pSupp->algoOpt, "every", NULL, 0); + if (!hasEvery) { + qDebug("forecast every not found from %s, use %" PRId64, pSupp->algoOpt, every); + code = taosAnalBufWriteOptInt(pBuf, "every", every); + if (code != 0) return code; + } + + code = taosAnalBufWriteOptStr(pBuf, "option", pSupp->algoOpt); + if (code != 0) return code; + + code = taosAnalBufClose(pBuf); + return code; +} + +static int32_t forecastAnalysis(SForecastSupp* pSupp, SSDataBlock* pBlock) { + SAnalBuf* pBuf = &pSupp->analBuf; + int32_t resCurRow = pBlock->info.rows; + int8_t tmpI8; + int16_t tmpI16; + int32_t tmpI32; + int64_t tmpI64; + float tmpFloat; + double tmpDouble; + int32_t code = 0; + + SColumnInfoData* pResValCol = taosArrayGet(pBlock->pDataBlock, pSupp->resValSlot); + if (NULL == pResValCol) return TSDB_CODE_OUT_OF_RANGE; + + SColumnInfoData* pResTsCol = (pSupp->resTsSlot != -1 ? taosArrayGet(pBlock->pDataBlock, pSupp->resTsSlot) : NULL); + SColumnInfoData* pResLowCol = (pSupp->resLowSlot != -1 ? taosArrayGet(pBlock->pDataBlock, pSupp->resLowSlot) : NULL); + SColumnInfoData* pResHighCol = + (pSupp->resHighSlot != -1 ? taosArrayGet(pBlock->pDataBlock, pSupp->resHighSlot) : NULL); + + SJson* pJson = taosAnalSendReqRetJson(pSupp->algoUrl, ANAL_HTTP_TYPE_POST, pBuf); + if (pJson == NULL) return terrno; + + int32_t rows = 0; + tjsonGetInt32ValueFromDouble(pJson, "rows", rows, code); + if (code < 0) goto _OVER; + if (rows <= 0) goto _OVER; + + SJson* res = tjsonGetObjectItem(pJson, "res"); + if (res == NULL) goto _OVER; + int32_t ressize = tjsonGetArraySize(res); + bool returnConf = (pSupp->resHighSlot != -1 || pSupp->resLowSlot != -1); + if (returnConf) { + if (ressize != 4) goto _OVER; + } else if (ressize != 2) { + goto _OVER; + } + + if (pResTsCol != NULL) { + resCurRow = pBlock->info.rows; + SJson* tsJsonArray = tjsonGetArrayItem(res, 0); + if (tsJsonArray == NULL) goto _OVER; + int32_t tsSize = tjsonGetArraySize(tsJsonArray); + if (tsSize != rows) goto _OVER; + for (int32_t i = 0; i < tsSize; ++i) { + SJson* tsJson = tjsonGetArrayItem(tsJsonArray, i); + tjsonGetObjectValueBigInt(tsJson, &tmpI64); + colDataSetInt64(pResTsCol, resCurRow, &tmpI64); + resCurRow++; + } + } + + if (pResLowCol != NULL) { + resCurRow = pBlock->info.rows; + SJson* lowJsonArray = tjsonGetArrayItem(res, 2); + if (lowJsonArray == NULL) goto _OVER; + int32_t lowSize = tjsonGetArraySize(lowJsonArray); + if (lowSize != rows) goto _OVER; + for (int32_t i = 0; i < lowSize; ++i) { + SJson* lowJson = tjsonGetArrayItem(lowJsonArray, i); + tjsonGetObjectValueDouble(lowJson, &tmpDouble); + tmpFloat = (float)tmpDouble; + colDataSetFloat(pResLowCol, resCurRow, &tmpFloat); + resCurRow++; + } + } + + if (pResHighCol != NULL) { + resCurRow = pBlock->info.rows; + SJson* highJsonArray = tjsonGetArrayItem(res, 3); + if (highJsonArray == NULL) goto _OVER; + int32_t highSize = tjsonGetArraySize(highJsonArray); + if (highSize != rows) goto _OVER; + for (int32_t i = 0; i < highSize; ++i) { + SJson* highJson = tjsonGetArrayItem(highJsonArray, i); + tjsonGetObjectValueDouble(highJson, &tmpDouble); + tmpFloat = (float)tmpDouble; + colDataSetFloat(pResHighCol, resCurRow, &tmpFloat); + resCurRow++; + } + } + + resCurRow = pBlock->info.rows; + SJson* valJsonArray = tjsonGetArrayItem(res, 1); + if (valJsonArray == NULL) goto _OVER; + int32_t valSize = tjsonGetArraySize(valJsonArray); + if (valSize != rows) goto _OVER; + for (int32_t i = 0; i < valSize; ++i) { + SJson* valJson = tjsonGetArrayItem(valJsonArray, i); + tjsonGetObjectValueDouble(valJson, &tmpDouble); + + switch (pSupp->inputValType) { + case TSDB_DATA_TYPE_BOOL: + case TSDB_DATA_TYPE_UTINYINT: + case TSDB_DATA_TYPE_TINYINT: { + tmpI8 = (int8_t)tmpDouble; + colDataSetInt8(pResValCol, resCurRow, &tmpI8); + break; + } + case TSDB_DATA_TYPE_USMALLINT: + case TSDB_DATA_TYPE_SMALLINT: { + tmpI16 = (int16_t)tmpDouble; + colDataSetInt16(pResValCol, resCurRow, &tmpI16); + break; + } + case TSDB_DATA_TYPE_INT: + case TSDB_DATA_TYPE_UINT: { + tmpI32 = (int32_t)tmpDouble; + colDataSetInt32(pResValCol, resCurRow, &tmpI32); + break; + } + case TSDB_DATA_TYPE_TIMESTAMP: + case TSDB_DATA_TYPE_UBIGINT: + case TSDB_DATA_TYPE_BIGINT: { + tmpI64 = (int64_t)tmpDouble; + colDataSetInt64(pResValCol, resCurRow, &tmpI64); + break; + } + case TSDB_DATA_TYPE_FLOAT: { + tmpFloat = (float)tmpDouble; + colDataSetFloat(pResValCol, resCurRow, &tmpFloat); + break; + } + case TSDB_DATA_TYPE_DOUBLE: { + colDataSetDouble(pResValCol, resCurRow, &tmpDouble); + break; + } + default: + code = TSDB_CODE_FUNC_FUNTION_PARA_TYPE; + goto _OVER; + } + resCurRow++; + } + + // for (int32_t i = rows; i < pSupp->optRows; ++i) { + // colDataSetNNULL(pResValCol, rows, (pSupp->optRows - rows)); + // if (pResTsCol != NULL) { + // colDataSetNNULL(pResTsCol, rows, (pSupp->optRows - rows)); + // } + // if (pResLowCol != NULL) { + // colDataSetNNULL(pResLowCol, rows, (pSupp->optRows - rows)); + // } + // if (pResHighCol != NULL) { + // colDataSetNNULL(pResHighCol, rows, (pSupp->optRows - rows)); + // } + // } + + // if (rows == pSupp->optRows) { + // pResValCol->hasNull = false; + // } + + pBlock->info.rows += rows; + + if (pJson != NULL) tjsonDelete(pJson); + return 0; + +_OVER: + if (pJson != NULL) tjsonDelete(pJson); + if (code == 0) { + code = TSDB_CODE_INVALID_JSON_FORMAT; + } + qError("failed to perform forecast finalize since %s", tstrerror(code)); + return TSDB_CODE_INVALID_JSON_FORMAT; +} + +static int32_t forecastAggregateBlocks(SForecastSupp* pSupp, SSDataBlock* pResBlock) { + int32_t code = TSDB_CODE_SUCCESS; + int32_t lino = 0; + SAnalBuf* pBuf = &pSupp->analBuf; + + code = forecastCloseBuf(pSupp); + QUERY_CHECK_CODE(code, lino, _end); + + code = forecastEnsureBlockCapacity(pResBlock, 1); + QUERY_CHECK_CODE(code, lino, _end); + + code = forecastAnalysis(pSupp, pResBlock); + QUERY_CHECK_CODE(code, lino, _end); + + uInfo("block:%d, forecast finalize", pSupp->numOfBlocks); + +_end: + pSupp->numOfBlocks = 0; + taosAnalBufDestroy(&pSupp->analBuf); + return code; +} + +static int32_t forecastNext(SOperatorInfo* pOperator, SSDataBlock** ppRes) { + int32_t code = TSDB_CODE_SUCCESS; + int32_t lino = 0; + SExecTaskInfo* pTaskInfo = pOperator->pTaskInfo; + SForecastOperatorInfo* pInfo = pOperator->info; + SSDataBlock* pResBlock = pInfo->pRes; + SForecastSupp* pSupp = &pInfo->forecastSupp; + SAnalBuf* pBuf = &pSupp->analBuf; + int64_t st = taosGetTimestampUs(); + int32_t numOfBlocks = pSupp->numOfBlocks; + + blockDataCleanup(pResBlock); + + while (1) { + SSDataBlock* pBlock = getNextBlockFromDownstream(pOperator, 0); + if (pBlock == NULL) { + break; + } + + if (pSupp->groupId == 0 || pSupp->groupId == pBlock->info.id.groupId) { + pSupp->groupId = pBlock->info.id.groupId; + numOfBlocks++; + qDebug("group:%" PRId64 ", blocks:%d, cache block rows:%" PRId64, pSupp->groupId, numOfBlocks, pBlock->info.rows); + code = forecastCacheBlock(pSupp, pBlock); + QUERY_CHECK_CODE(code, lino, _end); + } else { + qDebug("group:%" PRId64 ", read finish for new group coming, blocks:%d", pSupp->groupId, numOfBlocks); + forecastAggregateBlocks(pSupp, pResBlock); + pSupp->groupId = pBlock->info.id.groupId; + numOfBlocks = 1; + qDebug("group:%" PRId64 ", new group, cache block rows:%" PRId64, pSupp->groupId, pBlock->info.rows); + code = forecastCacheBlock(pSupp, pBlock); + QUERY_CHECK_CODE(code, lino, _end); + } + + if (pResBlock->info.rows > 0) { + (*ppRes) = pResBlock; + qDebug("group:%" PRId64 ", return to upstream, blocks:%d", pResBlock->info.id.groupId, numOfBlocks); + return code; + } + } + + if (numOfBlocks > 0) { + qDebug("group:%" PRId64 ", read finish, blocks:%d", pSupp->groupId, numOfBlocks); + forecastAggregateBlocks(pSupp, pResBlock); + } + + int64_t cost = taosGetTimestampUs() - st; + qDebug("all groups finished, cost:%" PRId64 "us", cost); + +_end: + if (code != TSDB_CODE_SUCCESS) { + qError("%s failed at line %d since %s", __func__, lino, tstrerror(code)); + pTaskInfo->code = code; + T_LONG_JMP(pTaskInfo->env, code); + } + (*ppRes) = (pResBlock->info.rows == 0) ? NULL : pResBlock; + return code; +} + +static int32_t forecastParseOutput(SForecastSupp* pSupp, SExprSupp* pExprSup) { + pSupp->resLowSlot = -1; + pSupp->resHighSlot = -1; + pSupp->resTsSlot = -1; + pSupp->resValSlot = -1; + + for (int32_t j = 0; j < pExprSup->numOfExprs; ++j) { + SExprInfo* pExprInfo = &pExprSup->pExprInfo[j]; + int32_t dstSlot = pExprInfo->base.resSchema.slotId; + if (pExprInfo->pExpr->_function.functionType == FUNCTION_TYPE_FORECAST) { + pSupp->resValSlot = dstSlot; + } else if (pExprInfo->pExpr->_function.functionType == FUNCTION_TYPE_FORECAST_ROWTS) { + pSupp->resTsSlot = dstSlot; + } else if (pExprInfo->pExpr->_function.functionType == FUNCTION_TYPE_FORECAST_LOW) { + pSupp->resLowSlot = dstSlot; + } else if (pExprInfo->pExpr->_function.functionType == FUNCTION_TYPE_FORECAST_HIGH) { + pSupp->resHighSlot = dstSlot; + } else { + } + } + + return 0; +} + +static int32_t forecastParseInput(SForecastSupp* pSupp, SNodeList* pFuncs) { + SNode* pNode = NULL; + + pSupp->inputTsSlot = -1; + pSupp->inputValSlot = -1; + pSupp->inputValType = -1; + pSupp->inputPrecision = -1; + + FOREACH(pNode, pFuncs) { + if ((nodeType(pNode) == QUERY_NODE_TARGET) && (nodeType(((STargetNode*)pNode)->pExpr) == QUERY_NODE_FUNCTION)) { + SFunctionNode* pFunc = (SFunctionNode*)((STargetNode*)pNode)->pExpr; + int32_t numOfParam = LIST_LENGTH(pFunc->pParameterList); + + if (pFunc->funcType == FUNCTION_TYPE_FORECAST) { + if (numOfParam == 3) { + SNode* p1 = nodesListGetNode(pFunc->pParameterList, 0); + SNode* p2 = nodesListGetNode(pFunc->pParameterList, 1); + SNode* p3 = nodesListGetNode(pFunc->pParameterList, 2); + if (p1 == NULL || p2 == NULL || p3 == NULL) return TSDB_CODE_PLAN_INTERNAL_ERROR; + if (p1->type != QUERY_NODE_COLUMN) return TSDB_CODE_PLAN_INTERNAL_ERROR; + if (p2->type != QUERY_NODE_VALUE) return TSDB_CODE_PLAN_INTERNAL_ERROR; + if (p3->type != QUERY_NODE_COLUMN) return TSDB_CODE_PLAN_INTERNAL_ERROR; + SColumnNode* pValNode = (SColumnNode*)p1; + SValueNode* pOptNode = (SValueNode*)p2; + SColumnNode* pTsNode = (SColumnNode*)p3; + pSupp->inputTsSlot = pTsNode->slotId; + pSupp->inputPrecision = pTsNode->node.resType.precision; + pSupp->inputValSlot = pValNode->slotId; + pSupp->inputValType = pValNode->node.resType.type; + tstrncpy(pSupp->algoOpt, pOptNode->literal, sizeof(pSupp->algoOpt)); + } else if (numOfParam == 2) { + SNode* p1 = nodesListGetNode(pFunc->pParameterList, 0); + SNode* p2 = nodesListGetNode(pFunc->pParameterList, 1); + if (p1 == NULL || p2 == NULL) return TSDB_CODE_PLAN_INTERNAL_ERROR; + if (p1->type != QUERY_NODE_COLUMN) return TSDB_CODE_PLAN_INTERNAL_ERROR; + if (p2->type != QUERY_NODE_COLUMN) return TSDB_CODE_PLAN_INTERNAL_ERROR; + SColumnNode* pValNode = (SColumnNode*)p1; + SColumnNode* pTsNode = (SColumnNode*)p2; + pSupp->inputTsSlot = pTsNode->slotId; + pSupp->inputPrecision = pTsNode->node.resType.precision; + pSupp->inputValSlot = pValNode->slotId; + pSupp->inputValType = pValNode->node.resType.type; + tstrncpy(pSupp->algoOpt, "algo=arima", TSDB_ANAL_ALGO_OPTION_LEN); + } else { + return TSDB_CODE_PLAN_INTERNAL_ERROR; + } + } + } + } + + return 0; +} + +static int32_t forecastParseAlgo(SForecastSupp* pSupp) { + pSupp->maxTs = 0; + pSupp->minTs = INT64_MAX; + pSupp->numOfRows = 0; + + if (!taosAnalGetOptStr(pSupp->algoOpt, "algo", pSupp->algoName, sizeof(pSupp->algoName))) { + qError("failed to get forecast algorithm name from %s", pSupp->algoOpt); + return TSDB_CODE_ANAL_ALGO_NOT_FOUND; + } + + if (taosAnalGetAlgoUrl(pSupp->algoName, ANAL_ALGO_TYPE_FORECAST, pSupp->algoUrl, sizeof(pSupp->algoUrl)) != 0) { + qError("failed to get forecast algorithm url from %s", pSupp->algoName); + return TSDB_CODE_ANAL_ALGO_NOT_LOAD; + } + + return 0; +} + +static int32_t forecastCreateBuf(SForecastSupp* pSupp) { + SAnalBuf* pBuf = &pSupp->analBuf; + int64_t ts = 0; // taosGetTimestampMs(); + + pBuf->bufType = ANAL_BUF_TYPE_JSON_COL; + snprintf(pBuf->fileName, sizeof(pBuf->fileName), "%s/tdengine-forecast-%" PRId64, tsTempDir, ts); + int32_t code = tsosAnalBufOpen(pBuf, 2); + if (code != 0) goto _OVER; + + code = taosAnalBufWriteOptStr(pBuf, "algo", pSupp->algoName); + if (code != 0) goto _OVER; + + bool returnConf = (pSupp->resHighSlot == -1 || pSupp->resLowSlot == -1); + code = taosAnalBufWriteOptStr(pBuf, "return_conf", returnConf ? "true" : "false"); + if (code != 0) goto _OVER; + + bool hasAlpha = taosAnalGetOptStr(pSupp->algoOpt, "alpha", NULL, 0); + if (!hasAlpha) { + qDebug("forecast alpha not found from %s, use default:%f", pSupp->algoOpt, ANAL_FORECAST_DEFAULT_ALPHA); + code = taosAnalBufWriteOptFloat(pBuf, "alpha", ANAL_FORECAST_DEFAULT_ALPHA); + if (code != 0) goto _OVER; + } + + char tmpOpt[32] = {0}; + bool hasParam = taosAnalGetOptStr(pSupp->algoOpt, "param", tmpOpt, sizeof(tmpOpt)); + if (!hasParam) { + qDebug("forecast param not found from %s, use default:%s", pSupp->algoOpt, ANAL_FORECAST_DEFAULT_PARAM); + code = taosAnalBufWriteOptStr(pBuf, "param", ANAL_FORECAST_DEFAULT_PARAM); + if (code != 0) goto _OVER; + } + + bool hasPeriod = taosAnalGetOptInt(pSupp->algoOpt, "period", NULL); + if (!hasPeriod) { + qDebug("forecast period not found from %s, use default:%d", pSupp->algoOpt, ANAL_FORECAST_DEFAULT_PERIOD); + code = taosAnalBufWriteOptInt(pBuf, "period", ANAL_FORECAST_DEFAULT_PERIOD); + if (code != 0) goto _OVER; + } + + bool hasRows = taosAnalGetOptInt(pSupp->algoOpt, "rows", &pSupp->optRows); + if (!hasRows) { + pSupp->optRows = ANAL_FORECAST_DEFAULT_ROWS; + qDebug("forecast rows not found from %s, use default:%d", pSupp->algoOpt, pSupp->optRows); + code = taosAnalBufWriteOptInt(pBuf, "forecast_rows", pSupp->optRows); + if (code != 0) goto _OVER; + } + + const char* prec = TSDB_TIME_PRECISION_MILLI_STR; + if (pSupp->inputPrecision == TSDB_TIME_PRECISION_MICRO) prec = TSDB_TIME_PRECISION_MICRO_STR; + if (pSupp->inputPrecision == TSDB_TIME_PRECISION_NANO) prec = TSDB_TIME_PRECISION_NANO_STR; + code = taosAnalBufWriteOptStr(pBuf, "prec", prec); + if (code != 0) goto _OVER; + + if (returnConf) { + bool hasConf = taosAnalGetOptStr(pSupp->algoOpt, "conf", NULL, 0); + if (!hasConf) { + qDebug("forecast conf not found from %s, use default:%d", pSupp->algoOpt, ANAL_FORECAST_DEFAULT_CONF); + code = taosAnalBufWriteOptInt(pBuf, "conf", ANAL_FORECAST_DEFAULT_CONF); + if (code != 0) goto _OVER; + } + } + + code = taosAnalBufWriteColMeta(pBuf, 0, TSDB_DATA_TYPE_TIMESTAMP, "ts"); + if (code != 0) goto _OVER; + + code = taosAnalBufWriteColMeta(pBuf, 1, pSupp->inputValType, "val"); + if (code != 0) goto _OVER; + + code = taosAnalBufWriteDataBegin(pBuf); + if (code != 0) goto _OVER; + + for (int32_t i = 0; i < 2; ++i) { + code = taosAnalBufWriteColBegin(pBuf, i); + if (code != 0) goto _OVER; + } + +_OVER: + if (code != 0) { + taosAnalBufClose(pBuf); + taosAnalBufDestroy(pBuf); + } + return code; +} + +int32_t createForecastOperatorInfo(SOperatorInfo* downstream, SPhysiNode* pPhyNode, SExecTaskInfo* pTaskInfo, + SOperatorInfo** pOptrInfo) { + QRY_PARAM_CHECK(pOptrInfo); + + int32_t code = 0; + int32_t lino = 0; + SForecastOperatorInfo* pInfo = taosMemoryCalloc(1, sizeof(SForecastOperatorInfo)); + SOperatorInfo* pOperator = taosMemoryCalloc(1, sizeof(SOperatorInfo)); + if (pOperator == NULL || pInfo == NULL) { + code = terrno; + goto _error; + } + + SForecastSupp* pSupp = &pInfo->forecastSupp; + SForecastFuncPhysiNode* pForecastPhyNode = (SForecastFuncPhysiNode*)pPhyNode; + SExprSupp* pExprSup = &pOperator->exprSupp; + int32_t numOfExprs = 0; + SExprInfo* pExprInfo = NULL; + + code = createExprInfo(pForecastPhyNode->pFuncs, NULL, &pExprInfo, &numOfExprs); + QUERY_CHECK_CODE(code, lino, _error); + + code = initExprSupp(pExprSup, pExprInfo, numOfExprs, &pTaskInfo->storageAPI.functionStore); + QUERY_CHECK_CODE(code, lino, _error); + + if (pForecastPhyNode->pExprs != NULL) { + int32_t num = 0; + SExprInfo* pScalarExprInfo = NULL; + code = createExprInfo(pForecastPhyNode->pExprs, NULL, &pScalarExprInfo, &num); + QUERY_CHECK_CODE(code, lino, _error); + + code = initExprSupp(&pInfo->scalarSup, pScalarExprInfo, num, &pTaskInfo->storageAPI.functionStore); + QUERY_CHECK_CODE(code, lino, _error); + } + + code = filterInitFromNode((SNode*)pForecastPhyNode->node.pConditions, &pOperator->exprSupp.pFilterInfo, 0); + QUERY_CHECK_CODE(code, lino, _error); + + code = forecastParseInput(pSupp, pForecastPhyNode->pFuncs); + QUERY_CHECK_CODE(code, lino, _error); + + code = forecastParseOutput(pSupp, pExprSup); + QUERY_CHECK_CODE(code, lino, _error); + + code = forecastParseAlgo(pSupp); + QUERY_CHECK_CODE(code, lino, _error); + + code = forecastCreateBuf(pSupp); + QUERY_CHECK_CODE(code, lino, _error); + + initResultSizeInfo(&pOperator->resultInfo, 4096); + + pInfo->pRes = createDataBlockFromDescNode(pPhyNode->pOutputDataBlockDesc); + QUERY_CHECK_NULL(pInfo->pRes, code, lino, _error, terrno); + + setOperatorInfo(pOperator, "ForecastOperator", QUERY_NODE_PHYSICAL_PLAN_FORECAST_FUNC, false, OP_NOT_OPENED, pInfo, + pTaskInfo); + pOperator->fpSet = createOperatorFpSet(optrDummyOpenFn, forecastNext, NULL, destroyForecastInfo, optrDefaultBufFn, + NULL, optrDefaultGetNextExtFn, NULL); + + code = blockDataEnsureCapacity(pInfo->pRes, pOperator->resultInfo.capacity); + QUERY_CHECK_CODE(code, lino, _error); + + code = appendDownstream(pOperator, &downstream, 1); + QUERY_CHECK_CODE(code, lino, _error); + + *pOptrInfo = pOperator; + + qDebug("forecast env is initialized, option:%s", pSupp->algoOpt); + return TSDB_CODE_SUCCESS; + +_error: + if (code != TSDB_CODE_SUCCESS) { + qError("%s failed at line %d since %s", __func__, lino, tstrerror(code)); + } + if (pInfo != NULL) destroyForecastInfo(pInfo); + destroyOperatorAndDownstreams(pOperator, &downstream, 1); + pTaskInfo->code = code; + return code; +} + +static void destroyForecastInfo(void* param) { + SForecastOperatorInfo* pInfo = (SForecastOperatorInfo*)param; + + blockDataDestroy(pInfo->pRes); + pInfo->pRes = NULL; + cleanupExprSupp(&pInfo->scalarSup); + taosAnalBufDestroy(&pInfo->forecastSupp.analBuf); + taosMemoryFreeClear(param); +} + +#else + +int32_t createForecastOperatorInfo(SOperatorInfo* downstream, SPhysiNode* pPhyNode, SExecTaskInfo* pTaskInfo, + SOperatorInfo** pOptrInfo) { + return TSDB_CODE_OPS_NOT_SUPPORT; +} + +#endif diff --git a/source/libs/executor/src/operator.c b/source/libs/executor/src/operator.c index 8daf4695db..7914f9f320 100644 --- a/source/libs/executor/src/operator.c +++ b/source/libs/executor/src/operator.c @@ -619,6 +619,8 @@ int32_t createOperator(SPhysiNode* pPhyNode, SExecTaskInfo* pTaskInfo, SReadHand code = createIndefinitOutputOperatorInfo(ops[0], pPhyNode, pTaskInfo, &pOptr); } else if (QUERY_NODE_PHYSICAL_PLAN_INTERP_FUNC == type) { code = createTimeSliceOperatorInfo(ops[0], pPhyNode, pTaskInfo, &pOptr); + } else if (QUERY_NODE_PHYSICAL_PLAN_FORECAST_FUNC == type) { + code = createForecastOperatorInfo(ops[0], pPhyNode, pTaskInfo, &pOptr); } else if (QUERY_NODE_PHYSICAL_PLAN_MERGE_EVENT == type) { code = createEventwindowOperatorInfo(ops[0], pPhyNode, pTaskInfo, &pOptr); } else if (QUERY_NODE_PHYSICAL_PLAN_GROUP_CACHE == type) { @@ -629,6 +631,8 @@ int32_t createOperator(SPhysiNode* pPhyNode, SExecTaskInfo* pTaskInfo, SReadHand code = createStreamCountAggOperatorInfo(ops[0], pPhyNode, pTaskInfo, pHandle, &pOptr); } else if (QUERY_NODE_PHYSICAL_PLAN_MERGE_COUNT == type) { code = createCountwindowOperatorInfo(ops[0], pPhyNode, pTaskInfo, &pOptr); + } else if (QUERY_NODE_PHYSICAL_PLAN_MERGE_ANOMALY == type) { + code = createAnomalywindowOperatorInfo(ops[0], pPhyNode, pTaskInfo, &pOptr); } else { code = TSDB_CODE_INVALID_PARA; pTaskInfo->code = code; diff --git a/source/libs/function/inc/builtinsimpl.h b/source/libs/function/inc/builtinsimpl.h index 970bdc6305..36e53d0a80 100644 --- a/source/libs/function/inc/builtinsimpl.h +++ b/source/libs/function/inc/builtinsimpl.h @@ -116,6 +116,8 @@ int32_t diffFunctionSetup(SqlFunctionCtx* pCtx, SResultRowEntryInfo* pResInfo); int32_t diffFunction(SqlFunctionCtx* pCtx); int32_t diffFunctionByRow(SArray* pCtx); +bool getForecastConfEnv(SFunctionNode* UNUSED_PARAM(pFunc), SFuncExecEnv* pEnv); + bool getDerivativeFuncEnv(struct SFunctionNode* pFunc, SFuncExecEnv* pEnv); int32_t derivativeFuncSetup(SqlFunctionCtx* pCtx, SResultRowEntryInfo* pResInfo); int32_t derivativeFunction(SqlFunctionCtx* pCtx); diff --git a/source/libs/function/inc/functionMgtInt.h b/source/libs/function/inc/functionMgtInt.h index a50562d78d..3112245de9 100644 --- a/source/libs/function/inc/functionMgtInt.h +++ b/source/libs/function/inc/functionMgtInt.h @@ -58,6 +58,7 @@ extern "C" { #define FUNC_MGT_TSMA_FUNC FUNC_MGT_FUNC_CLASSIFICATION_MASK(29) #define FUNC_MGT_COUNT_LIKE_FUNC FUNC_MGT_FUNC_CLASSIFICATION_MASK(30) // funcs that should also return 0 when no rows found #define FUNC_MGT_PROCESS_BY_ROW FUNC_MGT_FUNC_CLASSIFICATION_MASK(31) +#define FUNC_MGT_FORECAST_PC_FUNC FUNC_MGT_FUNC_CLASSIFICATION_MASK(32) #define FUNC_MGT_TEST_MASK(val, mask) (((val) & (mask)) != 0) diff --git a/source/libs/function/src/builtins.c b/source/libs/function/src/builtins.c index 48b8f0d9c8..1fd99125a0 100644 --- a/source/libs/function/src/builtins.c +++ b/source/libs/function/src/builtins.c @@ -19,6 +19,7 @@ #include "geomFunc.h" #include "querynodes.h" #include "scalar.h" +#include "tanal.h" #include "taoserror.h" #include "ttime.h" @@ -2078,6 +2079,47 @@ static int32_t translateMode(SFunctionNode* pFunc, char* pErrBuf, int32_t len) { return translateUniqueMode(pFunc, pErrBuf, len, false); } +static int32_t translateForecast(SFunctionNode* pFunc, char* pErrBuf, int32_t len) { + int32_t numOfParams = LIST_LENGTH(pFunc->pParameterList); + if (2 != numOfParams && 1 != numOfParams) { + return invaildFuncParaNumErrMsg(pErrBuf, len, "FORECAST require 1 or 2 parameters"); + } + + uint8_t valType = getSDataTypeFromNode(nodesListGetNode(pFunc->pParameterList, 0))->type; + if (!IS_MATHABLE_TYPE(valType)) { + return invaildFuncParaTypeErrMsg(pErrBuf, len, "FORECAST only support mathable column"); + } + + if (numOfParams == 2) { + uint8_t optionType = getSDataTypeFromNode(nodesListGetNode(pFunc->pParameterList, 1))->type; + if (TSDB_DATA_TYPE_BINARY != optionType) { + return invaildFuncParaTypeErrMsg(pErrBuf, len, "FORECAST option should be varchar"); + } + + SNode* pOption = nodesListGetNode(pFunc->pParameterList, 1); + if (QUERY_NODE_VALUE != nodeType(pOption)) { + return invaildFuncParaTypeErrMsg(pErrBuf, len, "FORECAST option should be value"); + } + + SValueNode* pValue = (SValueNode*)pOption; + if (!taosAnalGetOptStr(pValue->literal, "algo", NULL, 0) != 0) { + return invaildFuncParaValueErrMsg(pErrBuf, len, "FORECAST option should include algo field"); + } + + pValue->notReserved = true; + } + + pFunc->node.resType = (SDataType){.bytes = tDataTypes[valType].bytes, .type = valType}; + return TSDB_CODE_SUCCESS; +} + +static int32_t translateForecastConf(SFunctionNode* pFunc, char* pErrBuf, int32_t len) { + pFunc->node.resType = (SDataType){.bytes = tDataTypes[TSDB_DATA_TYPE_FLOAT].bytes, .type = TSDB_DATA_TYPE_FLOAT}; + return TSDB_CODE_SUCCESS; +} + +static EFuncReturnRows forecastEstReturnRows(SFunctionNode* pFunc) { return FUNC_RETURN_ROWS_N; } + static int32_t translateDiff(SFunctionNode* pFunc, char* pErrBuf, int32_t len) { int32_t numOfParams = LIST_LENGTH(pFunc->pParameterList); if (numOfParams > 2) { @@ -4797,6 +4839,48 @@ const SBuiltinFuncDefinition funcMgtBuiltins[] = { .sprocessFunc = randFunction, .finalizeFunc = NULL }, + { + .name = "forecast", + .type = FUNCTION_TYPE_FORECAST, + .classification = FUNC_MGT_TIMELINE_FUNC | FUNC_MGT_IMPLICIT_TS_FUNC | + FUNC_MGT_FORBID_STREAM_FUNC | FUNC_MGT_FORBID_SYSTABLE_FUNC | FUNC_MGT_KEEP_ORDER_FUNC | FUNC_MGT_PRIMARY_KEY_FUNC, + .translateFunc = translateForecast, + .getEnvFunc = getSelectivityFuncEnv, + .initFunc = functionSetup, + .processFunc = NULL, + .finalizeFunc = NULL, + .estimateReturnRowsFunc = forecastEstReturnRows, + }, + { + .name = "_frowts", + .type = FUNCTION_TYPE_FORECAST_ROWTS, + .classification = FUNC_MGT_PSEUDO_COLUMN_FUNC | FUNC_MGT_FORECAST_PC_FUNC | FUNC_MGT_KEEP_ORDER_FUNC, + .translateFunc = translateTimePseudoColumn, + .getEnvFunc = getTimePseudoFuncEnv, + .initFunc = NULL, + .sprocessFunc = NULL, + .finalizeFunc = NULL + }, + { + .name = "_flow", + .type = FUNCTION_TYPE_FORECAST_LOW, + .classification = FUNC_MGT_PSEUDO_COLUMN_FUNC | FUNC_MGT_FORECAST_PC_FUNC | FUNC_MGT_KEEP_ORDER_FUNC, + .translateFunc = translateForecastConf, + .getEnvFunc = getForecastConfEnv, + .initFunc = NULL, + .sprocessFunc = NULL, + .finalizeFunc = NULL + }, + { + .name = "_fhigh", + .type = FUNCTION_TYPE_FORECAST_HIGH, + .classification = FUNC_MGT_PSEUDO_COLUMN_FUNC | FUNC_MGT_FORECAST_PC_FUNC | FUNC_MGT_KEEP_ORDER_FUNC, + .translateFunc = translateForecastConf, + .getEnvFunc = getForecastConfEnv, + .initFunc = NULL, + .sprocessFunc = NULL, + .finalizeFunc = NULL + }, }; // clang-format on diff --git a/source/libs/function/src/builtinsimpl.c b/source/libs/function/src/builtinsimpl.c index 9f50e705ca..af023f5dba 100644 --- a/source/libs/function/src/builtinsimpl.c +++ b/source/libs/function/src/builtinsimpl.c @@ -19,6 +19,7 @@ #include "functionResInfoInt.h" #include "query.h" #include "querynodes.h" +#include "tanal.h" #include "tcompare.h" #include "tdatablock.h" #include "tdigest.h" @@ -3342,6 +3343,11 @@ bool funcInputGetNextRowIndex(SInputColumnInfoData* pInput, int32_t from, bool f } } +bool getForecastConfEnv(SFunctionNode* UNUSED_PARAM(pFunc), SFuncExecEnv* pEnv) { + pEnv->calcMemSize = sizeof(float); + return true; +} + int32_t diffResultIsNull(SqlFunctionCtx* pCtx, SFuncInputRow* pRow){ SResultRowEntryInfo* pResInfo = GET_RES_INFO(pCtx); SDiffInfo* pDiffInfo = GET_ROWCELL_INTERBUF(pResInfo); diff --git a/source/libs/function/src/functionMgt.c b/source/libs/function/src/functionMgt.c index 6c67a888a2..aaa66441ee 100644 --- a/source/libs/function/src/functionMgt.c +++ b/source/libs/function/src/functionMgt.c @@ -232,6 +232,15 @@ bool fmIsInterpFunc(int32_t funcId) { bool fmIsInterpPseudoColumnFunc(int32_t funcId) { return isSpecificClassifyFunc(funcId, FUNC_MGT_INTERP_PC_FUNC); } +bool fmIsForecastFunc(int32_t funcId) { + if (funcId < 0 || funcId >= funcMgtBuiltinsNum) { + return false; + } + return FUNCTION_TYPE_FORECAST == funcMgtBuiltins[funcId].type; +} + +bool fmIsForecastPseudoColumnFunc(int32_t funcId) { return isSpecificClassifyFunc(funcId, FUNC_MGT_FORECAST_PC_FUNC); } + bool fmIsLastRowFunc(int32_t funcId) { if (funcId < 0 || funcId >= funcMgtBuiltinsNum) { return false; diff --git a/source/libs/nodes/src/nodesCloneFuncs.c b/source/libs/nodes/src/nodesCloneFuncs.c index 5db8863311..b77ffb8d2c 100644 --- a/source/libs/nodes/src/nodesCloneFuncs.c +++ b/source/libs/nodes/src/nodesCloneFuncs.c @@ -368,6 +368,13 @@ static int32_t countWindowNodeCopy(const SCountWindowNode* pSrc, SCountWindowNod return TSDB_CODE_SUCCESS; } +static int32_t anomalyWindowNodeCopy(const SAnomalyWindowNode* pSrc, SAnomalyWindowNode* pDst) { + CLONE_NODE_FIELD(pCol); + CLONE_NODE_FIELD(pExpr); + COPY_CHAR_ARRAY_FIELD(anomalyOpt); + return TSDB_CODE_SUCCESS; +} + static int32_t sessionWindowNodeCopy(const SSessionWindowNode* pSrc, SSessionWindowNode* pDst) { CLONE_NODE_FIELD_EX(pCol, SColumnNode*); CLONE_NODE_FIELD_EX(pGap, SValueNode*); @@ -622,6 +629,8 @@ static int32_t logicWindowCopy(const SWindowLogicNode* pSrc, SWindowLogicNode* p COPY_SCALAR_FIELD(windowAlgo); COPY_SCALAR_FIELD(windowCount); COPY_SCALAR_FIELD(windowSliding); + CLONE_NODE_FIELD(pAnomalyExpr); + COPY_CHAR_ARRAY_FIELD(anomalyOpt); return TSDB_CODE_SUCCESS; } @@ -674,6 +683,12 @@ static int32_t logicInterpFuncCopy(const SInterpFuncLogicNode* pSrc, SInterpFunc return TSDB_CODE_SUCCESS; } +static int32_t logicForecastFuncCopy(const SForecastFuncLogicNode* pSrc, SForecastFuncLogicNode* pDst) { + COPY_BASE_OBJECT_FIELD(node, logicNodeCopy); + CLONE_NODE_LIST_FIELD(pFuncs); + return TSDB_CODE_SUCCESS; +} + static int32_t logicGroupCacheCopy(const SGroupCacheLogicNode* pSrc, SGroupCacheLogicNode* pDst) { COPY_BASE_OBJECT_FIELD(node, logicNodeCopy); COPY_SCALAR_FIELD(grpColsMayBeNull); @@ -937,6 +952,9 @@ int32_t nodesCloneNode(const SNode* pNode, SNode** ppNode) { case QUERY_NODE_COUNT_WINDOW: code = countWindowNodeCopy((const SCountWindowNode*)pNode, (SCountWindowNode*)pDst); break; + case QUERY_NODE_ANOMALY_WINDOW: + code = anomalyWindowNodeCopy((const SAnomalyWindowNode*)pNode, (SAnomalyWindowNode*)pDst); + break; case QUERY_NODE_SESSION_WINDOW: code = sessionWindowNodeCopy((const SSessionWindowNode*)pNode, (SSessionWindowNode*)pDst); break; @@ -1021,6 +1039,9 @@ int32_t nodesCloneNode(const SNode* pNode, SNode** ppNode) { case QUERY_NODE_LOGIC_PLAN_INTERP_FUNC: code = logicInterpFuncCopy((const SInterpFuncLogicNode*)pNode, (SInterpFuncLogicNode*)pDst); break; + case QUERY_NODE_LOGIC_PLAN_FORECAST_FUNC: + code = logicForecastFuncCopy((const SForecastFuncLogicNode*)pNode, (SForecastFuncLogicNode*)pDst); + break; case QUERY_NODE_LOGIC_PLAN_GROUP_CACHE: code = logicGroupCacheCopy((const SGroupCacheLogicNode*)pNode, (SGroupCacheLogicNode*)pDst); break; diff --git a/source/libs/nodes/src/nodesCodeFuncs.c b/source/libs/nodes/src/nodesCodeFuncs.c index 4b3ca97bbf..0f67493094 100644 --- a/source/libs/nodes/src/nodesCodeFuncs.c +++ b/source/libs/nodes/src/nodesCodeFuncs.c @@ -97,6 +97,8 @@ const char* nodesNodeName(ENodeType type) { return "WindowOffset"; case QUERY_NODE_COUNT_WINDOW: return "CountWindow"; + case QUERY_NODE_ANOMALY_WINDOW: + return "AnomalyWindow"; case QUERY_NODE_SET_OPERATOR: return "SetOperator"; case QUERY_NODE_SELECT_STMT: @@ -153,6 +155,12 @@ const char* nodesNodeName(ENodeType type) { return "CreateQnodeStmt"; case QUERY_NODE_DROP_QNODE_STMT: return "DropQnodeStmt"; + case QUERY_NODE_CREATE_ANODE_STMT: + return "CreateAnodeStmt"; + case QUERY_NODE_DROP_ANODE_STMT: + return "DropAnodeStmt"; + case QUERY_NODE_UPDATE_ANODE_STMT: + return "UpdateAnodeStmt"; case QUERY_NODE_CREATE_SNODE_STMT: return "CreateSnodeStmt"; case QUERY_NODE_DROP_SNODE_STMT: @@ -213,6 +221,10 @@ const char* nodesNodeName(ENodeType type) { return "ShowModulesStmt"; case QUERY_NODE_SHOW_QNODES_STMT: return "ShowQnodesStmt"; + case QUERY_NODE_SHOW_ANODES_STMT: + return "ShowAnodesStmt"; + case QUERY_NODE_SHOW_ANODES_FULL_STMT: + return "ShowAnodesFullStmt"; case QUERY_NODE_SHOW_SNODES_STMT: return "ShowSnodesStmt"; case QUERY_NODE_SHOW_BNODES_STMT: @@ -328,6 +340,8 @@ const char* nodesNodeName(ENodeType type) { return "LogicIndefRowsFunc"; case QUERY_NODE_LOGIC_PLAN_INTERP_FUNC: return "LogicInterpFunc"; + case QUERY_NODE_LOGIC_PLAN_FORECAST_FUNC: + return "LogicForecastFunc"; case QUERY_NODE_LOGIC_PLAN_GROUP_CACHE: return "LogicGroupCache"; case QUERY_NODE_LOGIC_PLAN_DYN_QUERY_CTRL: @@ -362,6 +376,10 @@ const char* nodesNodeName(ENodeType type) { return "PhysiMergeCountWindow"; case QUERY_NODE_PHYSICAL_PLAN_STREAM_COUNT: return "PhysiStreamCountWindow"; + case QUERY_NODE_PHYSICAL_PLAN_MERGE_ANOMALY: + return "PhysiMergeAnomalyWindow"; + case QUERY_NODE_PHYSICAL_PLAN_STREAM_ANOMALY: + return "PhysiStreamAnomalyWindow"; case QUERY_NODE_PHYSICAL_PLAN_PROJECT: return "PhysiProject"; case QUERY_NODE_PHYSICAL_PLAN_MERGE_JOIN: @@ -413,6 +431,8 @@ const char* nodesNodeName(ENodeType type) { return "PhysiIndefRowsFunc"; case QUERY_NODE_PHYSICAL_PLAN_INTERP_FUNC: return "PhysiInterpFunc"; + case QUERY_NODE_PHYSICAL_PLAN_FORECAST_FUNC: + return "PhysiForecastFunc"; case QUERY_NODE_PHYSICAL_PLAN_DISPATCH: return "PhysiDispatch"; case QUERY_NODE_PHYSICAL_PLAN_INSERT: @@ -1260,6 +1280,30 @@ static int32_t jsonToLogicInterpFuncNode(const SJson* pJson, void* pObj) { return code; } +static const char* jkForecastFuncLogicPlanFuncs = "Funcs"; + +static int32_t logicForecastFuncNodeToJson(const void* pObj, SJson* pJson) { + const SForecastFuncLogicNode* pNode = (const SForecastFuncLogicNode*)pObj; + + int32_t code = logicPlanNodeToJson(pObj, pJson); + if (TSDB_CODE_SUCCESS == code) { + code = nodeListToJson(pJson, jkForecastFuncLogicPlanFuncs, pNode->pFuncs); + } + + return code; +} + +static int32_t jsonToLogicForecastFuncNode(const SJson* pJson, void* pObj) { + SForecastFuncLogicNode* pNode = (SForecastFuncLogicNode*)pObj; + + int32_t code = jsonToLogicPlanNode(pJson, pObj); + if (TSDB_CODE_SUCCESS == code) { + code = jsonToNodeList(pJson, jkForecastFuncLogicPlanFuncs, &pNode->pFuncs); + } + + return code; +} + static const char* jkGroupCacheLogicPlanGrpColsMayBeNull = "GroupColsMayBeNull"; static const char* jkGroupCacheLogicPlanGroupByUid = "GroupByUid"; static const char* jkGroupCacheLogicPlanGlobalGroup = "GlobalGroup"; @@ -3011,6 +3055,36 @@ static int32_t jsonToPhysiCountWindowNode(const SJson* pJson, void* pObj) { return code; } +static const char* jkAnomalyWindowPhysiPlanAnomalyKey = "AnomalyKey"; +static const char* jkAnomalyWindowPhysiPlanAnomalyOption = "AnomalyOpt"; + +static int32_t physiAnomalyWindowNodeToJson(const void* pObj, SJson* pJson) { + const SAnomalyWindowPhysiNode* pNode = (const SAnomalyWindowPhysiNode*)pObj; + + int32_t code = physiWindowNodeToJson(pObj, pJson); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddObject(pJson, jkAnomalyWindowPhysiPlanAnomalyKey, nodeToJson, pNode->pAnomalyKey); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddStringToObject(pJson, jkAnomalyWindowPhysiPlanAnomalyOption, pNode->anomalyOpt); + } + return code; +} + +static int32_t jsonToPhysiAnomalyWindowNode(const SJson* pJson, void* pObj) { + SAnomalyWindowPhysiNode* pNode = (SAnomalyWindowPhysiNode*)pObj; + + int32_t code = jsonToPhysiWindowNode(pJson, pObj); + if (TSDB_CODE_SUCCESS == code) { + code = jsonToNodeObject(pJson, jkAnomalyWindowPhysiPlanAnomalyKey, &pNode->pAnomalyKey); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetStringValue(pJson, jkAnomalyWindowPhysiPlanAnomalyOption, pNode->anomalyOpt); + } + + return code; +} + static const char* jkPartitionPhysiPlanExprs = "Exprs"; static const char* jkPartitionPhysiPlanPartitionKeys = "PartitionKeys"; static const char* jkPartitionPhysiPlanTargets = "Targets"; @@ -3198,6 +3272,37 @@ static int32_t jsonToPhysiInterpFuncNode(const SJson* pJson, void* pObj) { return code; } +static const char* jkForecastFuncPhysiPlanExprs = "Exprs"; +static const char* jkForecastFuncPhysiPlanFuncs = "Funcs"; + +static int32_t physiForecastFuncNodeToJson(const void* pObj, SJson* pJson) { + const SForecastFuncPhysiNode* pNode = (const SForecastFuncPhysiNode*)pObj; + + int32_t code = physicPlanNodeToJson(pObj, pJson); + if (TSDB_CODE_SUCCESS == code) { + code = nodeListToJson(pJson, jkForecastFuncPhysiPlanExprs, pNode->pExprs); + } + if (TSDB_CODE_SUCCESS == code) { + code = nodeListToJson(pJson, jkForecastFuncPhysiPlanFuncs, pNode->pFuncs); + } + + return code; +} + +static int32_t jsonToPhysiForecastFuncNode(const SJson* pJson, void* pObj) { + SForecastFuncPhysiNode* pNode = (SForecastFuncPhysiNode*)pObj; + + int32_t code = jsonToPhysicPlanNode(pJson, pObj); + if (TSDB_CODE_SUCCESS == code) { + code = jsonToNodeList(pJson, jkForecastFuncPhysiPlanExprs, &pNode->pExprs); + } + if (TSDB_CODE_SUCCESS == code) { + code = jsonToNodeList(pJson, jkForecastFuncPhysiPlanFuncs, &pNode->pFuncs); + } + + return code; +} + static const char* jkDataSinkInputDataBlockDesc = "InputDataBlockDesc"; static int32_t physicDataSinkNodeToJson(const void* pObj, SJson* pJson) { @@ -4765,6 +4870,36 @@ static int32_t jsonToCountWindowNode(const SJson* pJson, void* pObj) { return code; } +static const char* jkAnomalyWindowTsPrimaryKey = "AnomalyTsPrimaryKey"; +static const char* jkAnomalyWindowExpr = "AnomalyWindowExpr"; +static const char* jkAnomalyWindowOption = "AnomalyWindowOpt"; + +static int32_t anomalyWindowNodeToJson(const void* pObj, SJson* pJson) { + const SAnomalyWindowNode* pNode = (const SAnomalyWindowNode*)pObj; + + int32_t code = tjsonAddObject(pJson, jkAnomalyWindowTsPrimaryKey, nodeToJson, pNode->pCol); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddObject(pJson, jkAnomalyWindowExpr, nodeToJson, pNode->pExpr); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddStringToObject(pJson, jkAnomalyWindowOption, pNode->anomalyOpt); + } + return code; +} + +static int32_t jsonToAnomalyWindowNode(const SJson* pJson, void* pObj) { + SAnomalyWindowNode* pNode = (SAnomalyWindowNode*)pObj; + + int32_t code = jsonToNodeObject(pJson, jkAnomalyWindowTsPrimaryKey, &pNode->pCol); + if (TSDB_CODE_SUCCESS == code) { + code = jsonToNodeObject(pJson, jkAnomalyWindowExpr, (SNode**)&pNode->pExpr); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetStringValue(pJson, jkAnomalyWindowOption, pNode->anomalyOpt); + } + return code; +} + static const char* jkIntervalWindowInterval = "Interval"; static const char* jkIntervalWindowOffset = "Offset"; static const char* jkIntervalWindowSliding = "Sliding"; @@ -6451,6 +6586,39 @@ static int32_t dropQnodeStmtToJson(const void* pObj, SJson* pJson) { return drop static int32_t jsonToDropQnodeStmt(const SJson* pJson, void* pObj) { return jsonToDropComponentNodeStmt(pJson, pObj); } +static const char* jkCreateAnodeStmtUrl = "Url"; +static const char* jkUpdateDropANodeStmtId = "AnodeId"; + +static int32_t createAnodeStmtToJson(const void* pObj, SJson* pJson) { + const SCreateAnodeStmt* pNode = (const SCreateAnodeStmt*)pObj; + return tjsonAddStringToObject(pJson, jkCreateAnodeStmtUrl, pNode->url); +} + +static int32_t jsonToCreateAnodeStmt(const SJson* pJson, void* pObj) { + SCreateAnodeStmt* pNode = (SCreateAnodeStmt*)pObj; + return tjsonGetStringValue(pJson, jkCreateAnodeStmtUrl, pNode->url); +} + +static int32_t updateAnodeStmtToJson(const void* pObj, SJson* pJson) { + const SUpdateAnodeStmt* pNode = (const SUpdateAnodeStmt*)pObj; + return tjsonAddIntegerToObject(pJson, jkUpdateDropANodeStmtId, pNode->anodeId); +} + +static int32_t jsonToUpdateAnodeStmt(const SJson* pJson, void* pObj) { + SUpdateAnodeStmt* pNode = (SUpdateAnodeStmt*)pObj; + return tjsonGetIntValue(pJson, jkUpdateDropANodeStmtId, &pNode->anodeId); +} + +static int32_t dropAnodeStmtToJson(const void* pObj, SJson* pJson) { + const SDropAnodeStmt* pNode = (const SDropAnodeStmt*)pObj; + return tjsonAddIntegerToObject(pJson, jkUpdateDropANodeStmtId, pNode->anodeId); +} + +static int32_t jsonToDropAnodeStmt(const SJson* pJson, void* pObj) { + SDropAnodeStmt* pNode = (SDropAnodeStmt*)pObj; + return tjsonGetIntValue(pJson, jkUpdateDropANodeStmtId, &pNode->anodeId); +} + static int32_t createSnodeStmtToJson(const void* pObj, SJson* pJson) { return createComponentNodeStmtToJson(pObj, pJson); } @@ -7016,6 +7184,14 @@ static int32_t showQnodesStmtToJson(const void* pObj, SJson* pJson) { return sho static int32_t jsonToShowQnodesStmt(const SJson* pJson, void* pObj) { return jsonToShowStmt(pJson, pObj); } +static int32_t showAnodesStmtToJson(const void* pObj, SJson* pJson) { return showStmtToJson(pObj, pJson); } + +static int32_t jsonToShowAnodesStmt(const SJson* pJson, void* pObj) { return jsonToShowStmt(pJson, pObj); } + +static int32_t showAnodesFullStmtToJson(const void* pObj, SJson* pJson) { return showStmtToJson(pObj, pJson); } + +static int32_t jsonToShowAnodesFullStmt(const SJson* pJson, void* pObj) { return jsonToShowStmt(pJson, pObj); } + static int32_t showArbGroupsStmtToJson(const void* pObj, SJson* pJson) { return showStmtToJson(pObj, pJson); } static int32_t jsonToShowArbGroupsStmt(const SJson* pJson, void* pObj) { return jsonToShowStmt(pJson, pObj); } @@ -7552,6 +7728,8 @@ static int32_t specificNodeToJson(const void* pObj, SJson* pJson) { return windowOffsetNodeToJson(pObj, pJson); case QUERY_NODE_COUNT_WINDOW: return countWindowNodeToJson(pObj, pJson); + case QUERY_NODE_ANOMALY_WINDOW: + return anomalyWindowNodeToJson(pObj, pJson); case QUERY_NODE_SET_OPERATOR: return setOperatorToJson(pObj, pJson); case QUERY_NODE_SELECT_STMT: @@ -7604,6 +7782,12 @@ static int32_t specificNodeToJson(const void* pObj, SJson* pJson) { return createQnodeStmtToJson(pObj, pJson); case QUERY_NODE_DROP_QNODE_STMT: return dropQnodeStmtToJson(pObj, pJson); + case QUERY_NODE_CREATE_ANODE_STMT: + return createAnodeStmtToJson(pObj, pJson); + case QUERY_NODE_DROP_ANODE_STMT: + return dropAnodeStmtToJson(pObj, pJson); + case QUERY_NODE_UPDATE_ANODE_STMT: + return updateAnodeStmtToJson(pObj, pJson); case QUERY_NODE_CREATE_SNODE_STMT: return createSnodeStmtToJson(pObj, pJson); case QUERY_NODE_DROP_SNODE_STMT: @@ -7654,6 +7838,10 @@ static int32_t specificNodeToJson(const void* pObj, SJson* pJson) { return showMnodesStmtToJson(pObj, pJson); case QUERY_NODE_SHOW_QNODES_STMT: return showQnodesStmtToJson(pObj, pJson); + case QUERY_NODE_SHOW_ANODES_STMT: + return showAnodesStmtToJson(pObj, pJson); + case QUERY_NODE_SHOW_ANODES_FULL_STMT: + return showAnodesFullStmtToJson(pObj, pJson); case QUERY_NODE_SHOW_ARBGROUPS_STMT: return showArbGroupsStmtToJson(pObj, pJson); case QUERY_NODE_SHOW_CLUSTER_STMT: @@ -7743,6 +7931,8 @@ static int32_t specificNodeToJson(const void* pObj, SJson* pJson) { return logicIndefRowsFuncNodeToJson(pObj, pJson); case QUERY_NODE_LOGIC_PLAN_INTERP_FUNC: return logicInterpFuncNodeToJson(pObj, pJson); + case QUERY_NODE_LOGIC_PLAN_FORECAST_FUNC: + return logicForecastFuncNodeToJson(pObj, pJson); case QUERY_NODE_LOGIC_PLAN_GROUP_CACHE: return logicGroupCacheNodeToJson(pObj, pJson); case QUERY_NODE_LOGIC_PLAN_DYN_QUERY_CTRL: @@ -7803,6 +7993,8 @@ static int32_t specificNodeToJson(const void* pObj, SJson* pJson) { case QUERY_NODE_PHYSICAL_PLAN_MERGE_COUNT: case QUERY_NODE_PHYSICAL_PLAN_STREAM_COUNT: return physiCountWindowNodeToJson(pObj, pJson); + case QUERY_NODE_PHYSICAL_PLAN_MERGE_ANOMALY: + return physiAnomalyWindowNodeToJson(pObj, pJson); case QUERY_NODE_PHYSICAL_PLAN_PARTITION: return physiPartitionNodeToJson(pObj, pJson); case QUERY_NODE_PHYSICAL_PLAN_STREAM_PARTITION: @@ -7811,6 +8003,8 @@ static int32_t specificNodeToJson(const void* pObj, SJson* pJson) { return physiIndefRowsFuncNodeToJson(pObj, pJson); case QUERY_NODE_PHYSICAL_PLAN_INTERP_FUNC: return physiInterpFuncNodeToJson(pObj, pJson); + case QUERY_NODE_PHYSICAL_PLAN_FORECAST_FUNC: + return physiForecastFuncNodeToJson(pObj, pJson); case QUERY_NODE_PHYSICAL_PLAN_DISPATCH: return physiDispatchNodeToJson(pObj, pJson); case QUERY_NODE_PHYSICAL_PLAN_INSERT: @@ -7902,6 +8096,8 @@ static int32_t jsonToSpecificNode(const SJson* pJson, void* pObj) { return jsonToWindowOffsetNode(pJson, pObj); case QUERY_NODE_COUNT_WINDOW: return jsonToCountWindowNode(pJson, pObj); + case QUERY_NODE_ANOMALY_WINDOW: + return jsonToAnomalyWindowNode(pJson, pObj); case QUERY_NODE_SET_OPERATOR: return jsonToSetOperator(pJson, pObj); case QUERY_NODE_SELECT_STMT: @@ -8004,6 +8200,10 @@ static int32_t jsonToSpecificNode(const SJson* pJson, void* pObj) { return jsonToShowMnodesStmt(pJson, pObj); case QUERY_NODE_SHOW_QNODES_STMT: return jsonToShowQnodesStmt(pJson, pObj); + case QUERY_NODE_SHOW_ANODES_STMT: + return jsonToShowAnodesStmt(pJson, pObj); + case QUERY_NODE_SHOW_ANODES_FULL_STMT: + return jsonToShowAnodesFullStmt(pJson, pObj); case QUERY_NODE_SHOW_ARBGROUPS_STMT: return jsonToShowArbGroupsStmt(pJson, pObj); case QUERY_NODE_SHOW_CLUSTER_STMT: @@ -8101,6 +8301,8 @@ static int32_t jsonToSpecificNode(const SJson* pJson, void* pObj) { return jsonToLogicIndefRowsFuncNode(pJson, pObj); case QUERY_NODE_LOGIC_PLAN_INTERP_FUNC: return jsonToLogicInterpFuncNode(pJson, pObj); + case QUERY_NODE_LOGIC_PLAN_FORECAST_FUNC: + return jsonToLogicForecastFuncNode(pJson, pObj); case QUERY_NODE_LOGIC_PLAN_GROUP_CACHE: return jsonToLogicGroupCacheNode(pJson, pObj); case QUERY_NODE_LOGIC_PLAN_DYN_QUERY_CTRL: @@ -8161,6 +8363,8 @@ static int32_t jsonToSpecificNode(const SJson* pJson, void* pObj) { case QUERY_NODE_PHYSICAL_PLAN_MERGE_COUNT: case QUERY_NODE_PHYSICAL_PLAN_STREAM_COUNT: return jsonToPhysiCountWindowNode(pJson, pObj); + case QUERY_NODE_PHYSICAL_PLAN_MERGE_ANOMALY: + return jsonToPhysiAnomalyWindowNode(pJson, pObj); case QUERY_NODE_PHYSICAL_PLAN_PARTITION: return jsonToPhysiPartitionNode(pJson, pObj); case QUERY_NODE_PHYSICAL_PLAN_STREAM_PARTITION: @@ -8169,6 +8373,8 @@ static int32_t jsonToSpecificNode(const SJson* pJson, void* pObj) { return jsonToPhysiIndefRowsFuncNode(pJson, pObj); case QUERY_NODE_PHYSICAL_PLAN_INTERP_FUNC: return jsonToPhysiInterpFuncNode(pJson, pObj); + case QUERY_NODE_PHYSICAL_PLAN_FORECAST_FUNC: + return jsonToPhysiForecastFuncNode(pJson, pObj); case QUERY_NODE_PHYSICAL_PLAN_DISPATCH: return jsonToPhysiDispatchNode(pJson, pObj); case QUERY_NODE_PHYSICAL_PLAN_QUERY_INSERT: diff --git a/source/libs/nodes/src/nodesMsgFuncs.c b/source/libs/nodes/src/nodesMsgFuncs.c index 581c6222d2..3d8a57363b 100644 --- a/source/libs/nodes/src/nodesMsgFuncs.c +++ b/source/libs/nodes/src/nodesMsgFuncs.c @@ -3539,6 +3539,46 @@ static int32_t msgToPhysiCountWindowNode(STlvDecoder* pDecoder, void* pObj) { return code; } +enum { PHY_ANOMALY_CODE_WINDOW = 1, PHY_ANOMALY_CODE_KEY, PHY_ANOMALY_CODE_WINDOW_OPTION }; + +static int32_t physiAnomalyWindowNodeToMsg(const void* pObj, STlvEncoder* pEncoder) { + const SAnomalyWindowPhysiNode* pNode = (const SAnomalyWindowPhysiNode*)pObj; + + int32_t code = tlvEncodeObj(pEncoder, PHY_ANOMALY_CODE_WINDOW, physiWindowNodeToMsg, &pNode->window); + if (TSDB_CODE_SUCCESS == code) { + code = tlvEncodeObj(pEncoder, PHY_ANOMALY_CODE_KEY, nodeToMsg, pNode->pAnomalyKey); + } + if (TSDB_CODE_SUCCESS == code) { + code = tlvEncodeCStr(pEncoder, PHY_ANOMALY_CODE_WINDOW_OPTION, pNode->anomalyOpt); + } + + return code; +} + +static int32_t msgToPhysiAnomalyWindowNode(STlvDecoder* pDecoder, void* pObj) { + SAnomalyWindowPhysiNode* pNode = (SAnomalyWindowPhysiNode*)pObj; + + int32_t code = TSDB_CODE_SUCCESS; + STlv* pTlv = NULL; + tlvForEach(pDecoder, pTlv, code) { + switch (pTlv->type) { + case PHY_ANOMALY_CODE_WINDOW: + code = tlvDecodeObjFromTlv(pTlv, msgToPhysiWindowNode, &pNode->window); + break; + case PHY_ANOMALY_CODE_KEY: + code = msgToNodeFromTlv(pTlv, (void**)&pNode->pAnomalyKey); + break; + case PHY_ANOMALY_CODE_WINDOW_OPTION: + code = tlvDecodeCStr(pTlv, pNode->anomalyOpt, sizeof(pNode->anomalyOpt)); + break; + default: + break; + } + } + + return code; +} + enum { PHY_PARTITION_CODE_BASE_NODE = 1, PHY_PARTITION_CODE_EXPR, @@ -3770,6 +3810,50 @@ static int32_t msgToPhysiInterpFuncNode(STlvDecoder* pDecoder, void* pObj) { return code; } +enum { + PHY_FORECAST_FUNC_CODE_BASE_NODE = 1, + PHY_FORECAST_FUNC_CODE_EXPR, + PHY_FORECAST_FUNC_CODE_FUNCS, +}; + +static int32_t physiForecastFuncNodeToMsg(const void* pObj, STlvEncoder* pEncoder) { + const SForecastFuncPhysiNode* pNode = (const SForecastFuncPhysiNode*)pObj; + + int32_t code = tlvEncodeObj(pEncoder, PHY_FORECAST_FUNC_CODE_BASE_NODE, physiNodeToMsg, &pNode->node); + if (TSDB_CODE_SUCCESS == code) { + code = tlvEncodeObj(pEncoder, PHY_FORECAST_FUNC_CODE_EXPR, nodeListToMsg, pNode->pExprs); + } + if (TSDB_CODE_SUCCESS == code) { + code = tlvEncodeObj(pEncoder, PHY_FORECAST_FUNC_CODE_FUNCS, nodeListToMsg, pNode->pFuncs); + } + + return code; +} + +static int32_t msgToPhysiForecastFuncNode(STlvDecoder* pDecoder, void* pObj) { + SForecastFuncPhysiNode* pNode = (SForecastFuncPhysiNode*)pObj; + + int32_t code = TSDB_CODE_SUCCESS; + STlv* pTlv = NULL; + tlvForEach(pDecoder, pTlv, code) { + switch (pTlv->type) { + case PHY_FORECAST_FUNC_CODE_BASE_NODE: + code = tlvDecodeObjFromTlv(pTlv, msgToPhysiNode, &pNode->node); + break; + case PHY_FORECAST_FUNC_CODE_EXPR: + code = msgToNodeListFromTlv(pTlv, (void**)&pNode->pExprs); + break; + case PHY_FORECAST_FUNC_CODE_FUNCS: + code = msgToNodeListFromTlv(pTlv, (void**)&pNode->pFuncs); + break; + default: + break; + } + } + + return code; +} + enum { PHY_DATA_SINK_CODE_INPUT_DESC = 1 }; static int32_t physicDataSinkNodeToMsg(const void* pObj, STlvEncoder* pEncoder) { @@ -4536,6 +4620,9 @@ static int32_t specificNodeToMsg(const void* pObj, STlvEncoder* pEncoder) { case QUERY_NODE_PHYSICAL_PLAN_STREAM_COUNT: code = physiCountWindowNodeToMsg(pObj, pEncoder); break; + case QUERY_NODE_PHYSICAL_PLAN_MERGE_ANOMALY: + code = physiAnomalyWindowNodeToMsg(pObj, pEncoder); + break; case QUERY_NODE_PHYSICAL_PLAN_PARTITION: code = physiPartitionNodeToMsg(pObj, pEncoder); break; @@ -4548,6 +4635,9 @@ static int32_t specificNodeToMsg(const void* pObj, STlvEncoder* pEncoder) { case QUERY_NODE_PHYSICAL_PLAN_INTERP_FUNC: code = physiInterpFuncNodeToMsg(pObj, pEncoder); break; + case QUERY_NODE_PHYSICAL_PLAN_FORECAST_FUNC: + code = physiForecastFuncNodeToMsg(pObj, pEncoder); + break; case QUERY_NODE_PHYSICAL_PLAN_DISPATCH: code = physiDispatchNodeToMsg(pObj, pEncoder); break; @@ -4698,6 +4788,9 @@ static int32_t msgToSpecificNode(STlvDecoder* pDecoder, void* pObj) { case QUERY_NODE_PHYSICAL_PLAN_STREAM_COUNT: code = msgToPhysiCountWindowNode(pDecoder, pObj); break; + case QUERY_NODE_PHYSICAL_PLAN_MERGE_ANOMALY: + code = msgToPhysiAnomalyWindowNode(pDecoder, pObj); + break; case QUERY_NODE_PHYSICAL_PLAN_PARTITION: code = msgToPhysiPartitionNode(pDecoder, pObj); break; @@ -4710,6 +4803,9 @@ static int32_t msgToSpecificNode(STlvDecoder* pDecoder, void* pObj) { case QUERY_NODE_PHYSICAL_PLAN_INTERP_FUNC: code = msgToPhysiInterpFuncNode(pDecoder, pObj); break; + case QUERY_NODE_PHYSICAL_PLAN_FORECAST_FUNC: + code = msgToPhysiForecastFuncNode(pDecoder, pObj); + break; case QUERY_NODE_PHYSICAL_PLAN_DISPATCH: code = msgToPhysiDispatchNode(pDecoder, pObj); break; diff --git a/source/libs/nodes/src/nodesTraverseFuncs.c b/source/libs/nodes/src/nodesTraverseFuncs.c index 4f30cb12b7..f3f7395a37 100644 --- a/source/libs/nodes/src/nodesTraverseFuncs.c +++ b/source/libs/nodes/src/nodesTraverseFuncs.c @@ -181,6 +181,14 @@ static EDealRes dispatchExpr(SNode* pNode, ETraversalOrder order, FNodeWalker wa res = walkExpr(pEvent->pCol, order, walker, pContext); break; } + case QUERY_NODE_ANOMALY_WINDOW: { + SAnomalyWindowNode* pAnomaly = (SAnomalyWindowNode*)pNode; + res = walkExpr(pAnomaly->pExpr, order, walker, pContext); + if (DEAL_RES_ERROR != res && DEAL_RES_END != res) { + res = walkExpr(pAnomaly->pCol, order, walker, pContext); + } + break; + } default: break; } @@ -392,6 +400,14 @@ static EDealRes rewriteExpr(SNode** pRawNode, ETraversalOrder order, FNodeRewrit res = rewriteExpr(&pEvent->pCol, order, rewriter, pContext); break; } + case QUERY_NODE_ANOMALY_WINDOW: { + SAnomalyWindowNode* pAnomaly = (SAnomalyWindowNode*)pNode; + res = rewriteExpr(&pAnomaly->pExpr, order, rewriter, pContext); + if (DEAL_RES_ERROR != res && DEAL_RES_END != res) { + res = rewriteExpr(&pAnomaly->pCol, order, rewriter, pContext); + } + break; + } default: break; } diff --git a/source/libs/nodes/src/nodesUtilFuncs.c b/source/libs/nodes/src/nodesUtilFuncs.c index c7d21d6fde..31568149c9 100644 --- a/source/libs/nodes/src/nodesUtilFuncs.c +++ b/source/libs/nodes/src/nodesUtilFuncs.c @@ -419,6 +419,8 @@ int32_t nodesMakeNode(ENodeType type, SNode** ppNodeOut) { code = makeNode(type, sizeof(SEventWindowNode), &pNode); break; case QUERY_NODE_COUNT_WINDOW: code = makeNode(type, sizeof(SCountWindowNode), &pNode); break; + case QUERY_NODE_ANOMALY_WINDOW: + code = makeNode(type, sizeof(SAnomalyWindowNode), &pNode); break; case QUERY_NODE_HINT: code = makeNode(type, sizeof(SHintNode), &pNode); break; case QUERY_NODE_VIEW: @@ -474,6 +476,12 @@ int32_t nodesMakeNode(ENodeType type, SNode** ppNodeOut) { code = makeNode(type, sizeof(SDropDnodeStmt), &pNode); break; case QUERY_NODE_ALTER_DNODE_STMT: code = makeNode(type, sizeof(SAlterDnodeStmt), &pNode); break; + case QUERY_NODE_CREATE_ANODE_STMT: + code = makeNode(type, sizeof(SCreateAnodeStmt), &pNode); break; + case QUERY_NODE_DROP_ANODE_STMT: + code = makeNode(type, sizeof(SDropAnodeStmt), &pNode); break; + case QUERY_NODE_UPDATE_ANODE_STMT: + code = makeNode(type, sizeof(SUpdateAnodeStmt), &pNode); break; case QUERY_NODE_CREATE_INDEX_STMT: code = makeNode(type, sizeof(SCreateIndexStmt), &pNode); break; case QUERY_NODE_DROP_INDEX_STMT: @@ -540,6 +548,8 @@ int32_t nodesMakeNode(ENodeType type, SNode** ppNodeOut) { case QUERY_NODE_SHOW_MNODES_STMT: case QUERY_NODE_SHOW_MODULES_STMT: case QUERY_NODE_SHOW_QNODES_STMT: + case QUERY_NODE_SHOW_ANODES_STMT: + case QUERY_NODE_SHOW_ANODES_FULL_STMT: case QUERY_NODE_SHOW_SNODES_STMT: case QUERY_NODE_SHOW_BNODES_STMT: case QUERY_NODE_SHOW_ARBGROUPS_STMT: @@ -647,6 +657,8 @@ int32_t nodesMakeNode(ENodeType type, SNode** ppNodeOut) { code = makeNode(type, sizeof(SIndefRowsFuncLogicNode), &pNode); break; case QUERY_NODE_LOGIC_PLAN_INTERP_FUNC: code = makeNode(type, sizeof(SInterpFuncLogicNode), &pNode); break; + case QUERY_NODE_LOGIC_PLAN_FORECAST_FUNC: + code = makeNode(type, sizeof(SForecastFuncLogicNode), &pNode); break; case QUERY_NODE_LOGIC_PLAN_GROUP_CACHE: code = makeNode(type, sizeof(SGroupCacheLogicNode), &pNode); break; case QUERY_NODE_LOGIC_PLAN_DYN_QUERY_CTRL: @@ -722,6 +734,8 @@ int32_t nodesMakeNode(ENodeType type, SNode** ppNodeOut) { code = makeNode(type, sizeof(SStreamEventWinodwPhysiNode), &pNode); break; case QUERY_NODE_PHYSICAL_PLAN_MERGE_COUNT: code = makeNode(type, sizeof(SCountWinodwPhysiNode), &pNode); break; + case QUERY_NODE_PHYSICAL_PLAN_MERGE_ANOMALY: + code = makeNode(type, sizeof(SAnomalyWindowPhysiNode), &pNode); break; case QUERY_NODE_PHYSICAL_PLAN_STREAM_COUNT: code = makeNode(type, sizeof(SStreamCountWinodwPhysiNode), &pNode); break; case QUERY_NODE_PHYSICAL_PLAN_PARTITION: @@ -732,6 +746,8 @@ int32_t nodesMakeNode(ENodeType type, SNode** ppNodeOut) { code = makeNode(type, sizeof(SIndefRowsFuncPhysiNode), &pNode); break; case QUERY_NODE_PHYSICAL_PLAN_INTERP_FUNC: code = makeNode(type, sizeof(SInterpFuncLogicNode), &pNode); break; + case QUERY_NODE_PHYSICAL_PLAN_FORECAST_FUNC: + code = makeNode(type, sizeof(SForecastFuncLogicNode), &pNode); break; case QUERY_NODE_PHYSICAL_PLAN_DISPATCH: code = makeNode(type, sizeof(SDataDispatcherNode), &pNode); break; case QUERY_NODE_PHYSICAL_PLAN_INSERT: @@ -1019,6 +1035,11 @@ void nodesDestroyNode(SNode* pNode) { nodesDestroyNode(pEvent->pCol); break; } + case QUERY_NODE_ANOMALY_WINDOW: { + SAnomalyWindowNode* pAnomaly = (SAnomalyWindowNode*)pNode; + nodesDestroyNode(pAnomaly->pCol); + break; + } case QUERY_NODE_HINT: { SHintNode* pHint = (SHintNode*)pNode; destroyHintValue(pHint->option, pHint->value); @@ -1167,6 +1188,9 @@ void nodesDestroyNode(SNode* pNode) { case QUERY_NODE_CREATE_DNODE_STMT: // no pointer field case QUERY_NODE_DROP_DNODE_STMT: // no pointer field case QUERY_NODE_ALTER_DNODE_STMT: // no pointer field + case QUERY_NODE_CREATE_ANODE_STMT: // no pointer field + case QUERY_NODE_UPDATE_ANODE_STMT: // no pointer field + case QUERY_NODE_DROP_ANODE_STMT: // no pointer field break; case QUERY_NODE_CREATE_INDEX_STMT: { SCreateIndexStmt* pStmt = (SCreateIndexStmt*)pNode; @@ -1252,6 +1276,8 @@ void nodesDestroyNode(SNode* pNode) { case QUERY_NODE_SHOW_MNODES_STMT: case QUERY_NODE_SHOW_MODULES_STMT: case QUERY_NODE_SHOW_QNODES_STMT: + case QUERY_NODE_SHOW_ANODES_STMT: + case QUERY_NODE_SHOW_ANODES_FULL_STMT: case QUERY_NODE_SHOW_SNODES_STMT: case QUERY_NODE_SHOW_BNODES_STMT: case QUERY_NODE_SHOW_ARBGROUPS_STMT: @@ -1500,6 +1526,12 @@ void nodesDestroyNode(SNode* pNode) { nodesDestroyNode(pLogicNode->pTimeSeries); break; } + case QUERY_NODE_LOGIC_PLAN_FORECAST_FUNC: { + SForecastFuncLogicNode* pLogicNode = (SForecastFuncLogicNode*)pNode; + destroyLogicNode((SLogicNode*)pLogicNode); + nodesDestroyList(pLogicNode->pFuncs); + break; + } case QUERY_NODE_LOGIC_PLAN_GROUP_CACHE: { SGroupCacheLogicNode* pLogicNode = (SGroupCacheLogicNode*)pNode; destroyLogicNode((SLogicNode*)pLogicNode); @@ -1663,6 +1695,11 @@ void nodesDestroyNode(SNode* pNode) { destroyWinodwPhysiNode((SWindowPhysiNode*)pPhyNode); break; } + case QUERY_NODE_PHYSICAL_PLAN_MERGE_ANOMALY: { + SAnomalyWindowPhysiNode* pPhyNode = (SAnomalyWindowPhysiNode*)pNode; + destroyWinodwPhysiNode((SWindowPhysiNode*)pPhyNode); + break; + } case QUERY_NODE_PHYSICAL_PLAN_PARTITION: { destroyPartitionPhysiNode((SPartitionPhysiNode*)pNode); break; @@ -1690,6 +1727,13 @@ void nodesDestroyNode(SNode* pNode) { nodesDestroyNode(pPhyNode->pTimeSeries); break; } + case QUERY_NODE_PHYSICAL_PLAN_FORECAST_FUNC: { + SForecastFuncPhysiNode* pPhyNode = (SForecastFuncPhysiNode*)pNode; + destroyPhysiNode((SPhysiNode*)pPhyNode); + nodesDestroyList(pPhyNode->pExprs); + nodesDestroyList(pPhyNode->pFuncs); + break; + } case QUERY_NODE_PHYSICAL_PLAN_DISPATCH: destroyDataSinkNode((SDataSinkNode*)pNode); break; diff --git a/source/libs/parser/inc/parAst.h b/source/libs/parser/inc/parAst.h index a2aec77c2e..28e867965f 100644 --- a/source/libs/parser/inc/parAst.h +++ b/source/libs/parser/inc/parAst.h @@ -154,6 +154,7 @@ SNode* createSessionWindowNode(SAstCreateContext* pCxt, SNode* pCol, SNode* SNode* createStateWindowNode(SAstCreateContext* pCxt, SNode* pExpr); SNode* createEventWindowNode(SAstCreateContext* pCxt, SNode* pStartCond, SNode* pEndCond); SNode* createCountWindowNode(SAstCreateContext* pCxt, const SToken* pCountToken, const SToken* pSlidingToken); +SNode* createAnomalyWindowNode(SAstCreateContext* pCxt, SNode* pExpr, const SToken* pFuncOpt); SNode* createIntervalWindowNode(SAstCreateContext* pCxt, SNode* pInterval, SNode* pOffset, SNode* pSliding, SNode* pFill); SNode* createWindowOffsetNode(SAstCreateContext* pCxt, SNode* pStartOffset, SNode* pEndOffset); @@ -251,6 +252,9 @@ SNode* createDropUserStmt(SAstCreateContext* pCxt, SToken* pUserName); SNode* createCreateDnodeStmt(SAstCreateContext* pCxt, const SToken* pFqdn, const SToken* pPort); SNode* createDropDnodeStmt(SAstCreateContext* pCxt, const SToken* pDnode, bool force, bool unsafe); SNode* createAlterDnodeStmt(SAstCreateContext* pCxt, const SToken* pDnode, const SToken* pConfig, const SToken* pValue); +SNode* createCreateAnodeStmt(SAstCreateContext* pCxt, const SToken* pUrl); +SNode* createDropAnodeStmt(SAstCreateContext* pCxt, const SToken* pAnode); +SNode* createUpdateAnodeStmt(SAstCreateContext* pCxt, const SToken* pAnode, bool updateAll); SNode* createEncryptKeyStmt(SAstCreateContext* pCxt, const SToken* pValue); SNode* createRealTableNodeForIndexName(SAstCreateContext* pCxt, SToken* pDbName, SToken* pIndexName); SNode* createCreateIndexStmt(SAstCreateContext* pCxt, EIndexType type, bool ignoreExists, SNode* pIndexName, diff --git a/source/libs/parser/inc/sql.y b/source/libs/parser/inc/sql.y index ae908f0826..99f301445a 100644 --- a/source/libs/parser/inc/sql.y +++ b/source/libs/parser/inc/sql.y @@ -157,6 +157,12 @@ with_clause_opt(A) ::= WITH search_condition(B). /************************************************ create encrypt_key *********************************************/ cmd ::= CREATE ENCRYPT_KEY NK_STRING(A). { pCxt->pRootNode = createEncryptKeyStmt(pCxt, &A); } +/************************************************ create drop update anode ***************************************/ +cmd ::= CREATE ANODE NK_STRING(A). { pCxt->pRootNode = createCreateAnodeStmt(pCxt, &A); } +cmd ::= UPDATE ANODE NK_INTEGER(A). { pCxt->pRootNode = createUpdateAnodeStmt(pCxt, &A, false); } +cmd ::= UPDATE ALL ANODES. { pCxt->pRootNode = createUpdateAnodeStmt(pCxt, NULL, true); } +cmd ::= DROP ANODE NK_INTEGER(A). { pCxt->pRootNode = createDropAnodeStmt(pCxt, &A); } + /************************************************ create/drop/alter/restore dnode *********************************************/ cmd ::= CREATE DNODE dnode_endpoint(A). { pCxt->pRootNode = createCreateDnodeStmt(pCxt, &A, NULL); } cmd ::= CREATE DNODE dnode_endpoint(A) PORT NK_INTEGER(B). { pCxt->pRootNode = createCreateDnodeStmt(pCxt, &A, &B); } @@ -524,6 +530,8 @@ cmd ::= SHOW db_name_cond_opt(A) VGROUPS. cmd ::= SHOW MNODES. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MNODES_STMT); } //cmd ::= SHOW MODULES. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MODULES_STMT); } cmd ::= SHOW QNODES. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QNODES_STMT); } +cmd ::= SHOW ANODES. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_ANODES_STMT); } +cmd ::= SHOW ANODES FULL. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_ANODES_FULL_STMT); } cmd ::= SHOW ARBGROUPS. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_ARBGROUPS_STMT); } cmd ::= SHOW FUNCTIONS. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_FUNCTIONS_STMT); } cmd ::= SHOW INDEXES FROM table_name_cond(A) from_db_opt(B). { pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, B, A, OP_TYPE_EQUAL); } @@ -1187,6 +1195,9 @@ pseudo_column(A) ::= WDURATION(B). pseudo_column(A) ::= IROWTS(B). { A = createRawExprNode(pCxt, &B, createFunctionNode(pCxt, &B, NULL)); } pseudo_column(A) ::= ISFILLED(B). { A = createRawExprNode(pCxt, &B, createFunctionNode(pCxt, &B, NULL)); } pseudo_column(A) ::= QTAGS(B). { A = createRawExprNode(pCxt, &B, createFunctionNode(pCxt, &B, NULL)); } +pseudo_column(A) ::= FLOW(B). { A = createRawExprNode(pCxt, &B, createFunctionNode(pCxt, &B, NULL)); } +pseudo_column(A) ::= FHIGH(B). { A = createRawExprNode(pCxt, &B, createFunctionNode(pCxt, &B, NULL)); } +pseudo_column(A) ::= FROWTS(B). { A = createRawExprNode(pCxt, &B, createFunctionNode(pCxt, &B, NULL)); } function_expression(A) ::= function_name(B) NK_LP expression_list(C) NK_RP(D). { A = createRawExprNodeExt(pCxt, &B, &D, createFunctionNode(pCxt, &B, C)); } function_expression(A) ::= star_func(B) NK_LP star_func_para_list(C) NK_RP(D). { A = createRawExprNodeExt(pCxt, &B, &D, createFunctionNode(pCxt, &B, C)); } @@ -1505,6 +1516,10 @@ twindow_clause_opt(A) ::= COUNT_WINDOW NK_LP NK_INTEGER(B) NK_RP. { A = createCountWindowNode(pCxt, &B, &B); } twindow_clause_opt(A) ::= COUNT_WINDOW NK_LP NK_INTEGER(B) NK_COMMA NK_INTEGER(C) NK_RP. { A = createCountWindowNode(pCxt, &B, &C); } +twindow_clause_opt(A) ::= + ANOMALY_WINDOW NK_LP expr_or_subquery(B) NK_RP. { A = createAnomalyWindowNode(pCxt, releaseRawExprNode(pCxt, B), NULL); } +twindow_clause_opt(A) ::= + ANOMALY_WINDOW NK_LP expr_or_subquery(B) NK_COMMA NK_STRING(C) NK_RP. { A = createAnomalyWindowNode(pCxt, releaseRawExprNode(pCxt, B), &C); } sliding_opt(A) ::= . { A = NULL; } sliding_opt(A) ::= SLIDING NK_LP interval_sliding_duration_literal(B) NK_RP. { A = releaseRawExprNode(pCxt, B); } diff --git a/source/libs/parser/src/parAstCreater.c b/source/libs/parser/src/parAstCreater.c index 5db7e18fc5..8ede53b0a4 100644 --- a/source/libs/parser/src/parAstCreater.c +++ b/source/libs/parser/src/parAstCreater.c @@ -1367,6 +1367,25 @@ _err: return NULL; } +SNode* createAnomalyWindowNode(SAstCreateContext* pCxt, SNode* pExpr, const SToken* pFuncOpt) { + SAnomalyWindowNode* pAnomaly = NULL; + CHECK_PARSER_STATUS(pCxt); + pCxt->errCode = nodesMakeNode(QUERY_NODE_ANOMALY_WINDOW, (SNode**)&pAnomaly); + CHECK_MAKE_NODE(pAnomaly); + pAnomaly->pCol = createPrimaryKeyCol(pCxt, NULL); + CHECK_MAKE_NODE(pAnomaly->pCol); + pAnomaly->pExpr = pExpr; + if (pFuncOpt == NULL) { + tstrncpy(pAnomaly->anomalyOpt, "algo=iqr", TSDB_ANAL_ALGO_OPTION_LEN); + } else { + (void)trimString(pFuncOpt->z, pFuncOpt->n, pAnomaly->anomalyOpt, sizeof(pAnomaly->anomalyOpt)); + } + return (SNode*)pAnomaly; +_err: + nodesDestroyNode((SNode*)pAnomaly); + return NULL; +} + SNode* createIntervalWindowNode(SAstCreateContext* pCxt, SNode* pInterval, SNode* pOffset, SNode* pSliding, SNode* pFill) { SIntervalWindowNode* interval = NULL; @@ -2997,6 +3016,47 @@ _err: return NULL; } +SNode* createCreateAnodeStmt(SAstCreateContext* pCxt, const SToken* pUrl) { + CHECK_PARSER_STATUS(pCxt); + SCreateAnodeStmt* pStmt = NULL; + pCxt->errCode = nodesMakeNode(QUERY_NODE_CREATE_ANODE_STMT, (SNode**)&pStmt); + CHECK_MAKE_NODE(pStmt); + (void)trimString(pUrl->z, pUrl->n, pStmt->url, sizeof(pStmt->url)); + return (SNode*)pStmt; +_err: + return NULL; +} + +SNode* createDropAnodeStmt(SAstCreateContext* pCxt, const SToken* pAnode) { + CHECK_PARSER_STATUS(pCxt); + SUpdateAnodeStmt* pStmt = NULL; + pCxt->errCode = nodesMakeNode(QUERY_NODE_DROP_ANODE_STMT, (SNode**)&pStmt); + CHECK_MAKE_NODE(pStmt); + if (NULL != pAnode) { + pStmt->anodeId = taosStr2Int32(pAnode->z, NULL, 10); + } else { + pStmt->anodeId = -1; + } + return (SNode*)pStmt; +_err: + return NULL; +} + +SNode* createUpdateAnodeStmt(SAstCreateContext* pCxt, const SToken* pAnode, bool updateAll) { + CHECK_PARSER_STATUS(pCxt); + SUpdateAnodeStmt* pStmt = NULL; + pCxt->errCode = nodesMakeNode(QUERY_NODE_UPDATE_ANODE_STMT, (SNode**)&pStmt); + CHECK_MAKE_NODE(pStmt); + if (NULL != pAnode) { + pStmt->anodeId = taosStr2Int32(pAnode->z, NULL, 10); + } else { + pStmt->anodeId = -1; + } + return (SNode*)pStmt; +_err: + return NULL; +} + SNode* createEncryptKeyStmt(SAstCreateContext* pCxt, const SToken* pValue) { SToken config; config.type = TK_NK_STRING; diff --git a/source/libs/parser/src/parAstParser.c b/source/libs/parser/src/parAstParser.c index 10d9b19e7f..eecc04658b 100644 --- a/source/libs/parser/src/parAstParser.c +++ b/source/libs/parser/src/parAstParser.c @@ -555,6 +555,22 @@ static int32_t collectMetaKeyFromShowSnodes(SCollectMetaKeyCxt* pCxt, SShowStmt* return TSDB_CODE_SUCCESS; } +static int32_t collectMetaKeyFromShowAnodes(SCollectMetaKeyCxt* pCxt, SShowStmt* pStmt) { + if (pCxt->pParseCxt->enableSysInfo) { + return reserveTableMetaInCache(pCxt->pParseCxt->acctId, TSDB_INFORMATION_SCHEMA_DB, TSDB_INS_TABLE_ANODES, + pCxt->pMetaCache); + } + return TSDB_CODE_SUCCESS; +} + +static int32_t collectMetaKeyFromShowAnodesFull(SCollectMetaKeyCxt* pCxt, SShowStmt* pStmt) { + if (pCxt->pParseCxt->enableSysInfo) { + return reserveTableMetaInCache(pCxt->pParseCxt->acctId, TSDB_INFORMATION_SCHEMA_DB, TSDB_INS_TABLE_ANODES_FULL, + pCxt->pMetaCache); + } + return TSDB_CODE_SUCCESS; +} + static int32_t collectMetaKeyFromShowBnodes(SCollectMetaKeyCxt* pCxt, SShowStmt* pStmt) { if (pCxt->pParseCxt->enableSysInfo) { return reserveTableMetaInCache(pCxt->pParseCxt->acctId, TSDB_INFORMATION_SCHEMA_DB, TSDB_INS_TABLE_BNODES, @@ -983,6 +999,10 @@ static int32_t collectMetaKeyFromQuery(SCollectMetaKeyCxt* pCxt, SNode* pStmt) { return collectMetaKeyFromShowQnodes(pCxt, (SShowStmt*)pStmt); case QUERY_NODE_SHOW_SNODES_STMT: return collectMetaKeyFromShowSnodes(pCxt, (SShowStmt*)pStmt); + case QUERY_NODE_SHOW_ANODES_STMT: + return collectMetaKeyFromShowAnodes(pCxt, (SShowStmt*)pStmt); + case QUERY_NODE_SHOW_ANODES_FULL_STMT: + return collectMetaKeyFromShowAnodesFull(pCxt, (SShowStmt*)pStmt); case QUERY_NODE_SHOW_BNODES_STMT: return collectMetaKeyFromShowBnodes(pCxt, (SShowStmt*)pStmt); case QUERY_NODE_SHOW_ARBGROUPS_STMT: diff --git a/source/libs/parser/src/parAuthenticator.c b/source/libs/parser/src/parAuthenticator.c index 0eb07d8143..5ae17a7647 100644 --- a/source/libs/parser/src/parAuthenticator.c +++ b/source/libs/parser/src/parAuthenticator.c @@ -358,6 +358,8 @@ static int32_t authQuery(SAuthCxt* pCxt, SNode* pStmt) { case QUERY_NODE_SHOW_MNODES_STMT: case QUERY_NODE_SHOW_MODULES_STMT: case QUERY_NODE_SHOW_QNODES_STMT: + case QUERY_NODE_SHOW_ANODES_STMT: + case QUERY_NODE_SHOW_ANODES_FULL_STMT: case QUERY_NODE_SHOW_SNODES_STMT: case QUERY_NODE_SHOW_BNODES_STMT: case QUERY_NODE_SHOW_CLUSTER_STMT: diff --git a/source/libs/parser/src/parTokenizer.c b/source/libs/parser/src/parTokenizer.c index 5857093cec..63121ec044 100644 --- a/source/libs/parser/src/parTokenizer.c +++ b/source/libs/parser/src/parTokenizer.c @@ -38,6 +38,9 @@ static SKeyword keywordTable[] = { {"ANALYZE", TK_ANALYZE}, {"AND", TK_AND}, {"ANTI", TK_ANTI}, + {"ANODE", TK_ANODE}, + {"ANODES", TK_ANODES}, + {"ANOMALY_WINDOW", TK_ANOMALY_WINDOW}, // {"ANY", TK_ANY}, {"APPS", TK_APPS}, {"AS", TK_AS}, @@ -332,6 +335,9 @@ static SKeyword keywordTable[] = { {"_WDURATION", TK_WDURATION}, {"_WEND", TK_WEND}, {"_WSTART", TK_WSTART}, + {"_FLOW", TK_FLOW}, + {"_FHIGH", TK_FHIGH}, + {"_FROWTS", TK_FROWTS}, {"ALIVE", TK_ALIVE}, {"VARBINARY", TK_VARBINARY}, {"S3_CHUNKSIZE", TK_S3_CHUNKSIZE}, diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index 5c6f619397..fc9ca7418c 100755 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -24,6 +24,7 @@ #include "parUtil.h" #include "scalar.h" #include "systable.h" +#include "tanal.h" #include "tcol.h" #include "tglobal.h" #include "ttime.h" @@ -348,6 +349,20 @@ static const SSysTableShowAdapter sysTableShowAdapter[] = { .numOfShowCols = 1, .pShowCols = {"*"} }, + { + .showType = QUERY_NODE_SHOW_ANODES_STMT, + .pDbName = TSDB_INFORMATION_SCHEMA_DB, + .pTableName = TSDB_INS_TABLE_ANODES, + .numOfShowCols = 1, + .pShowCols = {"*"} + }, + { + .showType = QUERY_NODE_SHOW_ANODES_FULL_STMT, + .pDbName = TSDB_INFORMATION_SCHEMA_DB, + .pTableName = TSDB_INS_TABLE_ANODES_FULL, + .numOfShowCols = 1, + .pShowCols = {"*"} + }, }; // clang-format on @@ -1035,6 +1050,14 @@ static bool isInterpPseudoColumnFunc(const SNode* pNode) { return (QUERY_NODE_FUNCTION == nodeType(pNode) && fmIsInterpPseudoColumnFunc(((SFunctionNode*)pNode)->funcId)); } +static bool isForecastFunc(const SNode* pNode) { + return (QUERY_NODE_FUNCTION == nodeType(pNode) && fmIsForecastFunc(((SFunctionNode*)pNode)->funcId)); +} + +static bool isForecastPseudoColumnFunc(const SNode* pNode) { + return (QUERY_NODE_FUNCTION == nodeType(pNode) && fmIsForecastPseudoColumnFunc(((SFunctionNode*)pNode)->funcId)); +} + #ifdef BUILD_NO_CALL static bool isTimelineFunc(const SNode* pNode) { return (QUERY_NODE_FUNCTION == nodeType(pNode) && fmIsTimelineFunc(((SFunctionNode*)pNode)->funcId)); @@ -1237,7 +1260,7 @@ bool isPrimaryKeyImpl(SNode* pExpr) { FUNCTION_TYPE_LAST_ROW == pFunc->funcType || FUNCTION_TYPE_TIMETRUNCATE == pFunc->funcType) { return isPrimaryKeyImpl(nodesListGetNode(pFunc->pParameterList, 0)); } else if (FUNCTION_TYPE_WSTART == pFunc->funcType || FUNCTION_TYPE_WEND == pFunc->funcType || - FUNCTION_TYPE_IROWTS == pFunc->funcType) { + FUNCTION_TYPE_IROWTS == pFunc->funcType || FUNCTION_TYPE_FORECAST_ROWTS == pFunc->funcType) { return true; } } else if (QUERY_NODE_OPERATOR == nodeType(pExpr)) { @@ -2250,7 +2273,7 @@ static EDealRes translateOperator(STranslateContext* pCxt, SOperatorNode* pOp) { static EDealRes haveVectorFunction(SNode* pNode, void* pContext) { if (isAggFunc(pNode) || isIndefiniteRowsFunc(pNode) || isWindowPseudoColumnFunc(pNode) || - isInterpPseudoColumnFunc(pNode)) { + isInterpPseudoColumnFunc(pNode) || isForecastPseudoColumnFunc(pNode)) { *((bool*)pContext) = true; return DEAL_RES_END; } @@ -2553,6 +2576,72 @@ static int32_t translateInterpPseudoColumnFunc(STranslateContext* pCxt, SNode** return TSDB_CODE_SUCCESS; } +static int32_t translateForecastFunc(STranslateContext* pCxt, SFunctionNode* pFunc) { + if (!fmIsForecastFunc(pFunc->funcId)) { + return TSDB_CODE_SUCCESS; + } + if (!isSelectStmt(pCxt->pCurrStmt) || SQL_CLAUSE_SELECT != pCxt->currClause) { + return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_NOT_ALLOWED_FUNC); + } + SSelectStmt* pSelect = (SSelectStmt*)pCxt->pCurrStmt; + SNode* pTable = pSelect->pFromTable; + + if (pSelect->hasAggFuncs || pSelect->hasMultiRowsFunc || pSelect->hasIndefiniteRowsFunc) { + return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_NOT_ALLOWED_FUNC); + } + + if (pSelect->hasForecastFunc && + (FUNC_RETURN_ROWS_INDEFINITE == pSelect->returnRows || pSelect->returnRows != fmGetFuncReturnRows(pFunc))) { + return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_NOT_ALLOWED_FUNC, + "%s ignoring null value options cannot be used when applying to multiple columns", + pFunc->functionName); + } + + if (NULL != pSelect->pWindow || NULL != pSelect->pGroupByList) { + return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_NOT_ALLOWED_FUNC, + "%s function is not supported in window query or group query", pFunc->functionName); + } + if (hasInvalidFuncNesting(pFunc->pParameterList)) { + return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_AGG_FUNC_NESTING); + } + return TSDB_CODE_SUCCESS; +} + +static int32_t translateForecastPseudoColumnFunc(STranslateContext* pCxt, SNode** ppNode, bool* pRewriteToColumn) { + SFunctionNode* pFunc = (SFunctionNode*)(*ppNode); + if (!fmIsForecastPseudoColumnFunc(pFunc->funcId)) { + return TSDB_CODE_SUCCESS; + } + if (!isSelectStmt(pCxt->pCurrStmt)) { + return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_NOT_ALLOWED_FUNC, + "%s must be used in select statements", pFunc->functionName); + } + if (pCxt->currClause == SQL_CLAUSE_WHERE) { + return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_INTERP_CLAUSE, + "%s is not allowed in where clause", pFunc->functionName); + } + + SSelectStmt* pSelect = (SSelectStmt*)pCxt->pCurrStmt; + SNode* pNode = NULL; + bool bFound = false; + FOREACH(pNode, pSelect->pProjectionList) { + if (nodeType(pNode) == QUERY_NODE_FUNCTION && strcasecmp(((SFunctionNode*)pNode)->functionName, "forecast") == 0) { + bFound = true; + break; + } + } + if (!bFound) { + *pRewriteToColumn = true; + int32_t code = replacePsedudoColumnFuncWithColumn(pCxt, ppNode); + if (code != TSDB_CODE_SUCCESS) { + return code; + } + (void)translateColumn(pCxt, (SColumnNode**)ppNode); + return pCxt->errCode; + } + return TSDB_CODE_SUCCESS; +} + static int32_t translateTimelineFunc(STranslateContext* pCxt, SFunctionNode* pFunc) { if (!fmIsTimelineFunc(pFunc->funcId)) { return TSDB_CODE_SUCCESS; @@ -2738,7 +2827,9 @@ static void setFuncClassification(STranslateContext* pCxt, SFunctionNode* pFunc) pSelect->returnRows = fmGetFuncReturnRows(pFunc); } else if (fmIsInterpFunc(pFunc->funcId)) { pSelect->returnRows = fmGetFuncReturnRows(pFunc); - } + } else if (fmIsForecastFunc(pFunc->funcId)) { + pSelect->returnRows = fmGetFuncReturnRows(pFunc); + } if (fmIsProcessByRowFunc(pFunc->funcId)) { pSelect->lastProcessByRowFuncId = pFunc->funcId; } @@ -2755,6 +2846,9 @@ static void setFuncClassification(STranslateContext* pCxt, SFunctionNode* pFunc) pSelect->hasInterpFunc = pSelect->hasInterpFunc ? true : (FUNCTION_TYPE_INTERP == pFunc->funcType); pSelect->hasInterpPseudoColFunc = pSelect->hasInterpPseudoColFunc ? true : fmIsInterpPseudoColumnFunc(pFunc->funcId); + pSelect->hasForecastFunc = pSelect->hasForecastFunc ? true : (FUNCTION_TYPE_FORECAST == pFunc->funcType); + pSelect->hasForecastPseudoColFunc = + pSelect->hasForecastPseudoColFunc ? true : fmIsForecastPseudoColumnFunc(pFunc->funcId); pSelect->hasLastRowFunc = pSelect->hasLastRowFunc ? true : (FUNCTION_TYPE_LAST_ROW == pFunc->funcType); pSelect->hasLastFunc = pSelect->hasLastFunc ? true : (FUNCTION_TYPE_LAST == pFunc->funcType); pSelect->hasTimeLineFunc = pSelect->hasTimeLineFunc ? true : fmIsTimelineFunc(pFunc->funcId); @@ -2946,6 +3040,9 @@ static int32_t translateScanPseudoColumnFunc(STranslateContext* pCxt, SNode** pp return TSDB_CODE_SUCCESS; } if (0 == LIST_LENGTH(pFunc->pParameterList)) { + if (pFunc->funcType == FUNCTION_TYPE_FORECAST_LOW || pFunc->funcType == FUNCTION_TYPE_FORECAST_HIGH) { + return TSDB_CODE_SUCCESS; + } if (!isSelectStmt(pCxt->pCurrStmt) || NULL == ((SSelectStmt*)pCxt->pCurrStmt)->pFromTable) { return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_TBNAME); } @@ -3016,6 +3113,16 @@ static int32_t translateNormalFunction(STranslateContext* pCxt, SNode** ppNode) return code; } } + if (TSDB_CODE_SUCCESS == code) { + code = translateForecastFunc(pCxt, pFunc); + } + if (TSDB_CODE_SUCCESS == code) { + bool bRewriteToColumn = false; + code = translateForecastPseudoColumnFunc(pCxt, ppNode, &bRewriteToColumn); + if (bRewriteToColumn) { + return code; + } + } if (TSDB_CODE_SUCCESS == code) { code = translateTimelineFunc(pCxt, pFunc); } @@ -3759,7 +3866,8 @@ static int32_t resetSelectFuncNumWithoutDup(SSelectStmt* pSelect) { static int32_t checkAggColCoexist(STranslateContext* pCxt, SSelectStmt* pSelect) { if (NULL != pSelect->pGroupByList || NULL != pSelect->pWindow || isWindowJoinStmt(pSelect) || - (!pSelect->hasAggFuncs && !pSelect->hasIndefiniteRowsFunc && !pSelect->hasInterpFunc)) { + (!pSelect->hasAggFuncs && !pSelect->hasIndefiniteRowsFunc && !pSelect->hasInterpFunc && + !pSelect->hasForecastFunc)) { return TSDB_CODE_SUCCESS; } if (!pSelect->onlyHasKeepOrderFunc) { @@ -3782,7 +3890,7 @@ static int32_t checkAggColCoexist(STranslateContext* pCxt, SSelectStmt* pSelect) static int32_t checkWinJoinAggColCoexist(STranslateContext* pCxt, SSelectStmt* pSelect) { if (!isWindowJoinStmt(pSelect) || (!pSelect->hasAggFuncs && !pSelect->hasIndefiniteRowsFunc && - !pSelect->hasInterpFunc)) { + !pSelect->hasInterpFunc && !pSelect->hasForecastFunc)) { return TSDB_CODE_SUCCESS; } if (!pSelect->onlyHasKeepOrderFunc) { @@ -5795,6 +5903,40 @@ static int32_t translateCountWindow(STranslateContext* pCxt, SSelectStmt* pSelec return TSDB_CODE_SUCCESS; } +static int32_t checkAnomalyExpr(STranslateContext* pCxt, SNode* pNode) { + int32_t type = ((SExprNode*)pNode)->resType.type; + if (!IS_MATHABLE_TYPE(type)) { + return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_ANOMALY_WIN_TYPE, + "ANOMALY_WINDOW only support mathable column"); + } + + if (QUERY_NODE_COLUMN == nodeType(pNode) && COLUMN_TYPE_TAG == ((SColumnNode*)pNode)->colType) { + return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_ANOMALY_WIN_COL, + "ANOMALY_WINDOW not support on tag column"); + } + + return TSDB_CODE_SUCCESS; +} + +static int32_t translateAnomalyWindow(STranslateContext* pCxt, SSelectStmt* pSelect) { + if (QUERY_NODE_TEMP_TABLE == nodeType(pSelect->pFromTable) && + !isGlobalTimeLineQuery(((STempTableNode*)pSelect->pFromTable)->pSubquery)) { + return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_TIMELINE_QUERY, + "ANOMALY_WINDOW requires valid time series input"); + } + + SAnomalyWindowNode* pAnomaly = (SAnomalyWindowNode*)pSelect->pWindow; + int32_t code = checkAnomalyExpr(pCxt, pAnomaly->pExpr); + if (TSDB_CODE_SUCCESS == code) { + if (!taosAnalGetOptStr(pAnomaly->anomalyOpt, "algo", NULL, 0) != 0) { + return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_ANOMALY_WIN_OPT, + "ANOMALY_WINDOW option should include algo field"); + } + } + + return code; +} + static int32_t translateSpecificWindow(STranslateContext* pCxt, SSelectStmt* pSelect) { switch (nodeType(pSelect->pWindow)) { case QUERY_NODE_STATE_WINDOW: @@ -5807,6 +5949,8 @@ static int32_t translateSpecificWindow(STranslateContext* pCxt, SSelectStmt* pSe return translateEventWindow(pCxt, pSelect); case QUERY_NODE_COUNT_WINDOW: return translateCountWindow(pCxt, pSelect); + case QUERY_NODE_ANOMALY_WINDOW: + return translateAnomalyWindow(pCxt, pSelect); default: break; } @@ -6043,6 +6187,26 @@ static int32_t translateInterp(STranslateContext* pCxt, SSelectStmt* pSelect) { return code; } +static int32_t translateForecast(STranslateContext* pCxt, SSelectStmt* pSelect) { + if (!pSelect->hasForecastFunc) { + if (pSelect->hasForecastPseudoColFunc) { + return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_NOT_ALLOWED_FUNC, + "Has Forecast pseudo column(s) but missing forcast function"); + } + return TSDB_CODE_SUCCESS; + } + + if ((NULL != pSelect->pFromTable) && (QUERY_NODE_JOIN_TABLE == nodeType(pSelect->pFromTable))) { + SJoinTableNode* pJoinTable = (SJoinTableNode*)pSelect->pFromTable; + if (IS_WINDOW_JOIN(pJoinTable->subType)) { + return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_FORECAST_CLAUSE, + "Forecast not supported to be used in WINDOW join"); + } + } + + return 0; +} + static int32_t removeConstantValueFromList(SNodeList** pList) { SNode* pNode = NULL; WHERE_EACH(pNode, *pList) { @@ -6884,6 +7048,9 @@ static int32_t translateSelectFrom(STranslateContext* pCxt, SSelectStmt* pSelect if (TSDB_CODE_SUCCESS == code) { code = translateInterp(pCxt, pSelect); } + if (TSDB_CODE_SUCCESS == code) { + code = translateForecast(pCxt, pSelect); + } if (TSDB_CODE_SUCCESS == code) { code = appendTsForImplicitTsFunc(pCxt, pSelect); } @@ -7895,6 +8062,19 @@ static int32_t fillCmdSql(STranslateContext* pCxt, int16_t msgType, void* pReq) break; } + case TDMT_MND_CREATE_ANODE: { + FILL_CMD_SQL(sql, sqlLen, pCmdReq, SMCreateAnodeReq, pReq); + break; + } + case TDMT_MND_DROP_ANODE: { + FILL_CMD_SQL(sql, sqlLen, pCmdReq, SMDropAnodeReq, pReq); + break; + } + case TDMT_MND_UPDATE_ANODE: { + FILL_CMD_SQL(sql, sqlLen, pCmdReq, SMUpdateAnodeReq, pReq); + break; + } + case TDMT_MND_CREATE_MNODE: { FILL_CMD_SQL(sql, sqlLen, pCmdReq, SMCreateMnodeReq, pReq); break; @@ -9398,6 +9578,43 @@ static int32_t translateDropUser(STranslateContext* pCxt, SDropUserStmt* pStmt) return code; } +static int32_t translateCreateAnode(STranslateContext* pCxt, SCreateAnodeStmt* pStmt) { + SMCreateAnodeReq createReq = {0}; + createReq.urlLen = strlen(pStmt->url) + 1; + if (createReq.urlLen > TSDB_ANAL_ANODE_URL_LEN) { + return TSDB_CODE_MND_ANODE_TOO_LONG_URL; + } + + createReq.url = taosMemoryCalloc(createReq.urlLen, 1); + if (createReq.url == NULL) { + return TSDB_CODE_OUT_OF_MEMORY; + } + + tstrncpy(createReq.url, pStmt->url, createReq.urlLen); + + int32_t code = buildCmdMsg(pCxt, TDMT_MND_CREATE_ANODE, (FSerializeFunc)tSerializeSMCreateAnodeReq, &createReq); + tFreeSMCreateAnodeReq(&createReq); + return code; +} + +static int32_t translateDropAnode(STranslateContext* pCxt, SDropAnodeStmt* pStmt) { + SMDropAnodeReq dropReq = {0}; + dropReq.anodeId = pStmt->anodeId; + + int32_t code = buildCmdMsg(pCxt, TDMT_MND_DROP_ANODE, (FSerializeFunc)tSerializeSMDropAnodeReq, &dropReq); + tFreeSMDropAnodeReq(&dropReq); + return code; +} + +static int32_t translateUpdateAnode(STranslateContext* pCxt, SUpdateAnodeStmt* pStmt) { + SMUpdateAnodeReq updateReq = {0}; + updateReq.anodeId = pStmt->anodeId; + + int32_t code = buildCmdMsg(pCxt, TDMT_MND_UPDATE_ANODE, (FSerializeFunc)tSerializeSMUpdateAnodeReq, &updateReq); + tFreeSMUpdateAnodeReq(&updateReq); + return code; +} + static int32_t translateCreateDnode(STranslateContext* pCxt, SCreateDnodeStmt* pStmt) { SCreateDnodeReq createReq = {0}; strcpy(createReq.fqdn, pStmt->fqdn); @@ -9820,7 +10037,7 @@ static int32_t translateDropComponentNode(STranslateContext* pCxt, SDropComponen } static int32_t checkTopicQuery(STranslateContext* pCxt, SSelectStmt* pSelect) { - if (pSelect->hasAggFuncs || pSelect->hasInterpFunc || pSelect->hasIndefiniteRowsFunc) { + if (pSelect->hasAggFuncs || pSelect->hasForecastFunc || pSelect->hasInterpFunc || pSelect->hasIndefiniteRowsFunc) { return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_TOPIC_QUERY); } return TSDB_CODE_SUCCESS; @@ -10186,7 +10403,7 @@ static int32_t translateKillTransaction(STranslateContext* pCxt, SKillStmt* pStm static bool crossTableWithoutAggOper(SSelectStmt* pSelect) { return NULL == pSelect->pWindow && !pSelect->hasAggFuncs && !pSelect->hasIndefiniteRowsFunc && - !pSelect->hasInterpFunc && + !pSelect->hasInterpFunc && !pSelect->hasForecastFunc && TSDB_SUPER_TABLE == ((SRealTableNode*)pSelect->pFromTable)->pMeta->tableType && !hasTbnameFunction(pSelect->pPartitionByList); } @@ -12395,6 +12612,15 @@ static int32_t translateQuery(STranslateContext* pCxt, SNode* pNode) { case QUERY_NODE_ALTER_DNODE_STMT: code = translateAlterDnode(pCxt, (SAlterDnodeStmt*)pNode); break; + case QUERY_NODE_CREATE_ANODE_STMT: + code = translateCreateAnode(pCxt, (SCreateAnodeStmt*)pNode); + break; + case QUERY_NODE_DROP_ANODE_STMT: + code = translateDropAnode(pCxt, (SDropAnodeStmt*)pNode); + break; + case QUERY_NODE_UPDATE_ANODE_STMT: + code = translateUpdateAnode(pCxt, (SUpdateAnodeStmt*)pNode); + break; case QUERY_NODE_CREATE_INDEX_STMT: code = translateCreateIndex(pCxt, (SCreateIndexStmt*)pNode); break; @@ -15755,6 +15981,8 @@ static int32_t rewriteQuery(STranslateContext* pCxt, SQuery* pQuery) { case QUERY_NODE_SHOW_MNODES_STMT: case QUERY_NODE_SHOW_MODULES_STMT: case QUERY_NODE_SHOW_QNODES_STMT: + case QUERY_NODE_SHOW_ANODES_STMT: + case QUERY_NODE_SHOW_ANODES_FULL_STMT: case QUERY_NODE_SHOW_FUNCTIONS_STMT: case QUERY_NODE_SHOW_INDEXES_STMT: case QUERY_NODE_SHOW_STREAMS_STMT: diff --git a/source/libs/parser/src/parUtil.c b/source/libs/parser/src/parUtil.c index 98676160cb..5f3eb1c427 100644 --- a/source/libs/parser/src/parUtil.c +++ b/source/libs/parser/src/parUtil.c @@ -185,6 +185,8 @@ static char* getSyntaxErrFormat(int32_t errCode) { return "%s is not supported in system table query"; case TSDB_CODE_PAR_INVALID_INTERP_CLAUSE: return "Invalid usage of RANGE clause, EVERY clause or FILL clause"; + case TSDB_CODE_PAR_INVALID_FORECAST_CLAUSE: + return "Invalid usage of forecast clause"; case TSDB_CODE_PAR_NO_VALID_FUNC_IN_WIN: return "No valid function in window query"; case TSDB_CODE_PAR_INVALID_OPTR_USAGE: diff --git a/source/libs/parser/src/sql.c b/source/libs/parser/src/sql.c index 2c7f473d9a..5849977a3a 100644 --- a/source/libs/parser/src/sql.c +++ b/source/libs/parser/src/sql.c @@ -104,31 +104,31 @@ #endif /************* Begin control #defines *****************************************/ #define YYCODETYPE unsigned short int -#define YYNOCODE 567 +#define YYNOCODE 573 #define YYACTIONTYPE unsigned short int #define ParseTOKENTYPE SToken typedef union { int yyinit; ParseTOKENTYPE yy0; - EFillMode yy18; - EJoinType yy36; - ENullOrder yy109; - bool yy173; - SNodeList* yy334; - SAlterOption yy389; - STokenPair yy399; - EOperatorType yy506; - SToken yy533; - EShowKind yy537; - SNode* yy560; - int64_t yy585; - EJoinSubType yy648; - ETrimType yy672; - SShowTablesOption yy709; - int8_t yy719; - int32_t yy802; - SDataType yy952; - EOrder yy974; + EFillMode yy102; + EOperatorType yy140; + ETrimType yy300; + ENullOrder yy307; + EOrder yy410; + SDataType yy424; + int64_t yy483; + SToken yy557; + bool yy569; + SShowTablesOption yy595; + SAlterOption yy683; + STokenPair yy723; + EShowKind yy741; + EJoinSubType yy744; + EJoinType yy792; + int8_t yy815; + int32_t yy904; + SNodeList* yy946; + SNode* yy974; } YYMINORTYPE; #ifndef YYSTACKDEPTH #define YYSTACKDEPTH 100 @@ -144,18 +144,18 @@ typedef union { #define ParseCTX_FETCH #define ParseCTX_STORE #define YYFALLBACK 1 -#define YYNSTATE 1009 -#define YYNRULE 773 -#define YYNRULE_WITH_ACTION 773 -#define YYNTOKEN 383 -#define YY_MAX_SHIFT 1008 -#define YY_MIN_SHIFTREDUCE 1495 -#define YY_MAX_SHIFTREDUCE 2267 -#define YY_ERROR_ACTION 2268 -#define YY_ACCEPT_ACTION 2269 -#define YY_NO_ACTION 2270 -#define YY_MIN_REDUCE 2271 -#define YY_MAX_REDUCE 3043 +#define YYNSTATE 1025 +#define YYNRULE 784 +#define YYNRULE_WITH_ACTION 784 +#define YYNTOKEN 389 +#define YY_MAX_SHIFT 1024 +#define YY_MIN_SHIFTREDUCE 1516 +#define YY_MAX_SHIFTREDUCE 2299 +#define YY_ERROR_ACTION 2300 +#define YY_ACCEPT_ACTION 2301 +#define YY_NO_ACTION 2302 +#define YY_MIN_REDUCE 2303 +#define YY_MAX_REDUCE 3086 /************* End control #defines *******************************************/ #define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0]))) @@ -222,1181 +222,1204 @@ typedef union { ** yy_default[] Default action for each state. ** *********** Begin parsing tables **********************************************/ -#define YY_ACTTAB_COUNT (4386) +#define YY_ACTTAB_COUNT (4475) static const YYACTIONTYPE yy_action[] = { - /* 0 */ 44, 354, 464, 2712, 570, 586, 2605, 2269, 219, 569, - /* 10 */ 2689, 506, 59, 57, 136, 674, 2721, 219, 675, 2319, - /* 20 */ 502, 2272, 1989, 522, 2483, 52, 51, 2014, 679, 58, - /* 30 */ 56, 55, 54, 53, 676, 2609, 1987, 2578, 2094, 2363, - /* 40 */ 2803, 2331, 150, 873, 2609, 149, 148, 147, 146, 145, - /* 50 */ 144, 143, 142, 141, 872, 840, 2636, 542, 52, 51, - /* 60 */ 246, 791, 58, 56, 55, 54, 53, 78, 2089, 3011, - /* 70 */ 494, 870, 307, 791, 483, 2683, 2633, 887, 196, 837, - /* 80 */ 169, 3011, 1995, 34, 1670, 2821, 2412, 3017, 230, 529, - /* 90 */ 528, 682, 3012, 826, 675, 2319, 994, 535, 1669, 3017, - /* 100 */ 230, 2768, 534, 882, 3012, 826, 2761, 473, 471, 519, - /* 110 */ 2722, 900, 1005, 1996, 815, 60, 976, 975, 974, 973, - /* 120 */ 532, 2928, 972, 971, 174, 966, 965, 964, 963, 962, - /* 130 */ 961, 960, 173, 954, 953, 952, 531, 530, 949, 948, - /* 140 */ 947, 210, 209, 946, 527, 945, 944, 943, 2802, 814, - /* 150 */ 2925, 2850, 2097, 2098, 791, 133, 2804, 886, 2806, 2807, - /* 160 */ 881, 125, 3011, 869, 2851, 905, 2231, 791, 223, 508, - /* 170 */ 212, 774, 2913, 250, 644, 3011, 496, 2909, 74, 2821, - /* 180 */ 3017, 230, 2803, 905, 2528, 3012, 826, 470, 468, 2472, - /* 190 */ 722, 2050, 2060, 3017, 230, 2541, 231, 840, 3012, 826, - /* 200 */ 9, 2096, 2099, 492, 2960, 206, 2921, 836, 614, 161, - /* 210 */ 835, 724, 2015, 613, 2539, 723, 1990, 3011, 1988, 106, - /* 220 */ 900, 612, 96, 868, 105, 52, 51, 2821, 761, 58, - /* 230 */ 56, 55, 54, 53, 402, 824, 230, 2018, 2518, 172, - /* 240 */ 3012, 826, 775, 2768, 755, 882, 759, 757, 302, 301, - /* 250 */ 2471, 813, 1993, 1994, 2047, 2183, 2049, 2052, 2053, 2054, - /* 260 */ 2055, 2056, 2057, 2058, 2059, 878, 871, 901, 2481, 903, - /* 270 */ 902, 867, 2081, 2082, 2083, 2084, 2085, 2088, 2090, 2091, - /* 280 */ 2092, 2093, 2095, 2, 59, 57, 2186, 160, 2803, 900, - /* 290 */ 2802, 104, 502, 2850, 1989, 1999, 720, 133, 2804, 886, - /* 300 */ 2806, 2807, 881, 880, 1658, 869, 2851, 905, 1987, 2636, - /* 310 */ 2094, 2161, 212, 2485, 2913, 62, 52, 51, 496, 2909, - /* 320 */ 58, 56, 55, 54, 53, 684, 2675, 2803, 577, 2634, - /* 330 */ 887, 52, 51, 2821, 74, 58, 56, 55, 54, 53, - /* 340 */ 2089, 690, 883, 870, 1761, 1762, 2961, 19, 2047, 2768, - /* 350 */ 1660, 882, 837, 169, 1995, 150, 901, 2481, 149, 148, - /* 360 */ 147, 146, 145, 144, 143, 142, 141, 59, 57, 693, - /* 370 */ 3016, 338, 2821, 2161, 771, 502, 526, 1989, 3011, 639, - /* 380 */ 637, 2541, 439, 456, 1005, 244, 126, 15, 2768, 507, - /* 390 */ 882, 1987, 2126, 2094, 2463, 469, 2802, 3015, 2014, 2850, - /* 400 */ 2539, 3012, 3014, 434, 2804, 886, 2806, 2807, 881, 879, - /* 410 */ 226, 869, 2851, 905, 860, 2878, 940, 186, 185, 937, - /* 420 */ 936, 935, 183, 2089, 2097, 2098, 870, 1567, 2470, 1566, - /* 430 */ 19, 592, 2605, 2124, 568, 2802, 567, 1995, 2850, 2071, - /* 440 */ 2535, 2536, 198, 2804, 886, 2806, 2807, 881, 514, 2161, - /* 450 */ 869, 2851, 905, 2933, 2158, 2159, 2160, 2933, 2933, 2933, - /* 460 */ 2933, 2933, 74, 2050, 2060, 1568, 2453, 1005, 566, 2131, - /* 470 */ 15, 2019, 549, 2096, 2099, 2190, 697, 839, 199, 2921, - /* 480 */ 2922, 2014, 167, 2926, 901, 2481, 248, 517, 1990, 41, - /* 490 */ 1988, 508, 792, 2971, 2219, 868, 237, 671, 2125, 2163, - /* 500 */ 2164, 2165, 2166, 2167, 160, 905, 669, 2097, 2098, 665, - /* 510 */ 661, 2015, 204, 725, 331, 2933, 2158, 2159, 2160, 2933, - /* 520 */ 2933, 2933, 2933, 2933, 1993, 1994, 2047, 338, 2049, 2052, - /* 530 */ 2053, 2054, 2055, 2056, 2057, 2058, 2059, 878, 871, 810, - /* 540 */ 942, 903, 902, 867, 2081, 2082, 2050, 2060, 942, 2088, - /* 550 */ 2090, 2091, 2092, 2093, 2095, 2, 2096, 2099, 2271, 900, - /* 560 */ 2636, 2182, 807, 806, 2217, 2218, 2220, 2221, 2222, 1835, - /* 570 */ 1836, 1990, 63, 1988, 504, 2130, 1570, 1571, 868, 219, - /* 580 */ 2633, 887, 159, 158, 157, 156, 155, 154, 153, 152, - /* 590 */ 151, 45, 2158, 2159, 2160, 43, 498, 2119, 2120, 2121, - /* 600 */ 2122, 2123, 2127, 2128, 2129, 3016, 2610, 1993, 1994, 2047, - /* 610 */ 772, 2049, 2052, 2053, 2054, 2055, 2056, 2057, 2058, 2059, - /* 620 */ 878, 871, 2017, 2017, 903, 902, 867, 2081, 2082, 1567, - /* 630 */ 1958, 1566, 2088, 2090, 2091, 2092, 2093, 2095, 2, 12, - /* 640 */ 59, 57, 724, 1862, 1863, 165, 723, 691, 502, 554, - /* 650 */ 1989, 12, 2051, 2803, 62, 338, 1722, 816, 811, 804, - /* 660 */ 800, 2778, 513, 512, 1987, 2014, 2094, 1568, 883, 1957, - /* 670 */ 2329, 1713, 932, 931, 930, 1717, 929, 1719, 1720, 928, - /* 680 */ 925, 2541, 1728, 922, 1730, 1731, 919, 916, 913, 2803, - /* 690 */ 1995, 2782, 1861, 1864, 2014, 197, 2089, 2283, 2821, 870, - /* 700 */ 844, 516, 515, 19, 883, 58, 56, 55, 54, 53, - /* 710 */ 1995, 2541, 692, 2629, 2768, 2048, 882, 388, 2254, 462, - /* 720 */ 12, 2778, 10, 59, 57, 2100, 694, 825, 901, 2481, - /* 730 */ 2539, 502, 266, 1989, 2821, 3011, 677, 2541, 2327, 2105, - /* 740 */ 1005, 2784, 2787, 15, 861, 2014, 2885, 1987, 235, 2094, - /* 750 */ 2768, 2782, 882, 824, 230, 905, 852, 933, 3012, 826, - /* 760 */ 74, 2802, 305, 193, 2850, 338, 304, 3016, 133, 2804, - /* 770 */ 886, 2806, 2807, 881, 2487, 3011, 869, 2851, 905, 2089, - /* 780 */ 2097, 2098, 870, 3031, 829, 2913, 2623, 558, 695, 496, - /* 790 */ 2909, 901, 2481, 1995, 3015, 336, 336, 2802, 3012, 3013, - /* 800 */ 2850, 2784, 2786, 497, 201, 2804, 886, 2806, 2807, 881, - /* 810 */ 825, 67, 869, 2851, 905, 905, 560, 556, 3011, 2050, - /* 820 */ 2060, 524, 2456, 1005, 2534, 2536, 60, 52, 51, 2096, - /* 830 */ 2099, 58, 56, 55, 54, 53, 824, 230, 345, 346, - /* 840 */ 115, 3012, 826, 344, 1990, 451, 1988, 338, 481, 775, - /* 850 */ 763, 868, 505, 52, 51, 175, 2294, 58, 56, 55, - /* 860 */ 54, 53, 193, 2097, 2098, 2051, 827, 3032, 2762, 1674, - /* 870 */ 52, 51, 790, 2486, 58, 56, 55, 54, 53, 2468, - /* 880 */ 1993, 1994, 2047, 1673, 2049, 2052, 2053, 2054, 2055, 2056, - /* 890 */ 2057, 2058, 2059, 878, 871, 901, 2481, 903, 902, 867, - /* 900 */ 2081, 2082, 2050, 2060, 2466, 2088, 2090, 2091, 2092, 2093, - /* 910 */ 2095, 2, 2096, 2099, 2588, 574, 2051, 2768, 52, 51, - /* 920 */ 1722, 2018, 58, 56, 55, 54, 53, 1990, 2048, 1988, - /* 930 */ 306, 508, 777, 2675, 868, 1713, 932, 931, 930, 1717, - /* 940 */ 929, 1719, 1720, 877, 876, 905, 1728, 875, 1730, 1731, - /* 950 */ 874, 916, 913, 338, 837, 169, 268, 47, 584, 646, - /* 960 */ 677, 2230, 2327, 1993, 1994, 2047, 1540, 2049, 2052, 2053, - /* 970 */ 2054, 2055, 2056, 2057, 2058, 2059, 878, 871, 2202, 2048, - /* 980 */ 903, 902, 867, 2081, 2082, 1547, 901, 2481, 2088, 2090, - /* 990 */ 2091, 2092, 2093, 2095, 2, 59, 57, 863, 633, 2885, - /* 1000 */ 1989, 395, 2293, 502, 317, 1989, 575, 1547, 2803, 2292, - /* 1010 */ 1542, 1545, 1546, 72, 1987, 1916, 1917, 623, 2605, 1987, - /* 1020 */ 394, 2094, 194, 883, 788, 2968, 2066, 2261, 741, 740, - /* 1030 */ 739, 522, 2483, 1545, 1546, 731, 166, 735, 55, 54, - /* 1040 */ 53, 734, 2455, 3015, 901, 2481, 733, 738, 476, 475, - /* 1050 */ 2291, 2089, 732, 2821, 870, 117, 474, 728, 727, 726, - /* 1060 */ 1995, 482, 2683, 2768, 594, 1995, 255, 901, 2481, 2768, - /* 1070 */ 2768, 882, 253, 901, 2481, 313, 901, 2481, 59, 57, - /* 1080 */ 139, 2921, 2922, 830, 167, 2926, 502, 608, 1989, 112, - /* 1090 */ 1005, 632, 254, 609, 225, 1005, 610, 395, 60, 2079, - /* 1100 */ 901, 2481, 1987, 2211, 2094, 630, 2290, 748, 467, 901, - /* 1110 */ 2481, 2768, 2289, 38, 956, 224, 2802, 2212, 2474, 2850, - /* 1120 */ 696, 2288, 762, 133, 2804, 886, 2806, 2807, 881, 2476, - /* 1130 */ 401, 869, 2851, 905, 2089, 2097, 2098, 870, 3031, 2018, - /* 1140 */ 2913, 303, 901, 2481, 496, 2909, 901, 2481, 1995, 901, - /* 1150 */ 2481, 2561, 901, 2481, 2260, 2019, 2485, 751, 2684, 901, - /* 1160 */ 2481, 2708, 308, 2210, 745, 743, 316, 2768, 2287, 843, - /* 1170 */ 194, 300, 349, 2768, 2050, 2060, 525, 2286, 1005, 857, - /* 1180 */ 2484, 60, 2768, 958, 2096, 2099, 193, 940, 186, 185, - /* 1190 */ 937, 936, 935, 183, 1990, 959, 1988, 2486, 2438, 1990, - /* 1200 */ 729, 1988, 2366, 52, 51, 2018, 868, 58, 56, 55, - /* 1210 */ 54, 53, 901, 2481, 901, 2481, 2543, 84, 2097, 2098, - /* 1220 */ 52, 51, 83, 1651, 58, 56, 55, 54, 53, 2768, - /* 1230 */ 1993, 1994, 356, 2413, 894, 1993, 1994, 2047, 2768, 2049, - /* 1240 */ 2052, 2053, 2054, 2055, 2056, 2057, 2058, 2059, 878, 871, - /* 1250 */ 14, 13, 903, 902, 867, 2081, 2082, 2050, 2060, 39, - /* 1260 */ 2088, 2090, 2091, 2092, 2093, 2095, 2, 2096, 2099, 52, - /* 1270 */ 51, 901, 2481, 58, 56, 55, 54, 53, 2284, 741, - /* 1280 */ 740, 739, 1990, 2014, 1988, 112, 731, 166, 735, 868, - /* 1290 */ 3, 895, 734, 901, 2481, 901, 2481, 733, 738, 476, - /* 1300 */ 475, 716, 715, 732, 65, 2285, 616, 474, 728, 727, - /* 1310 */ 726, 2067, 233, 899, 2475, 384, 718, 717, 1993, 1994, - /* 1320 */ 2047, 615, 2049, 2052, 2053, 2054, 2055, 2056, 2057, 2058, - /* 1330 */ 2059, 878, 871, 2541, 2974, 903, 902, 867, 2081, 2082, - /* 1340 */ 2928, 523, 2282, 2088, 2090, 2091, 2092, 2093, 2095, 2, - /* 1350 */ 59, 57, 2539, 737, 736, 970, 968, 116, 502, 288, - /* 1360 */ 1989, 934, 204, 2803, 2532, 2138, 2768, 2281, 2928, 2924, - /* 1370 */ 828, 642, 768, 2019, 1987, 205, 2094, 2069, 883, 170, - /* 1380 */ 2981, 2280, 2884, 2279, 714, 710, 706, 702, 40, 287, - /* 1390 */ 2278, 1890, 1653, 2277, 52, 51, 819, 2923, 58, 56, - /* 1400 */ 55, 54, 53, 2768, 42, 221, 2089, 162, 2821, 870, - /* 1410 */ 52, 51, 2276, 2541, 58, 56, 55, 54, 53, 1549, - /* 1420 */ 1995, 102, 837, 169, 2768, 2013, 882, 908, 2768, 791, - /* 1430 */ 2299, 998, 2540, 59, 57, 285, 2275, 3011, 1654, 2019, - /* 1440 */ 284, 502, 2768, 1989, 2768, 2274, 938, 332, 184, 2532, - /* 1450 */ 1005, 2768, 832, 60, 2768, 3017, 230, 1987, 776, 2094, - /* 1460 */ 3012, 826, 52, 51, 866, 2172, 58, 56, 55, 54, - /* 1470 */ 53, 2802, 939, 2768, 2850, 2532, 176, 176, 133, 2804, - /* 1480 */ 886, 2806, 2807, 881, 90, 798, 869, 2851, 905, 2089, - /* 1490 */ 2097, 2098, 870, 3031, 765, 2913, 764, 2768, 293, 496, - /* 1500 */ 2909, 291, 730, 1995, 52, 51, 2768, 271, 58, 56, - /* 1510 */ 55, 54, 53, 2263, 2264, 791, 282, 2048, 1631, 295, - /* 1520 */ 273, 280, 294, 3011, 808, 1649, 278, 688, 164, 2050, - /* 1530 */ 2060, 66, 297, 1005, 299, 296, 15, 298, 103, 2096, - /* 1540 */ 2099, 3017, 230, 46, 2350, 270, 3012, 826, 200, 2921, - /* 1550 */ 2922, 61, 167, 2926, 1990, 61, 1988, 213, 950, 1906, - /* 1560 */ 1914, 868, 14, 13, 1632, 184, 742, 2348, 2206, 838, - /* 1570 */ 2072, 2822, 343, 2097, 2098, 89, 61, 1998, 2789, 52, - /* 1580 */ 51, 1623, 76, 58, 56, 55, 54, 53, 2452, 744, - /* 1590 */ 1993, 1994, 2047, 61, 2049, 2052, 2053, 2054, 2055, 2056, - /* 1600 */ 2057, 2058, 2059, 878, 871, 2339, 61, 903, 902, 867, - /* 1610 */ 2081, 2082, 2050, 2060, 2337, 2088, 2090, 2091, 2092, 2093, - /* 1620 */ 2095, 2, 2096, 2099, 52, 51, 1997, 746, 58, 56, - /* 1630 */ 55, 54, 53, 61, 2216, 909, 749, 1990, 2215, 1988, - /* 1640 */ 322, 2116, 2791, 61, 868, 89, 52, 51, 842, 324, - /* 1650 */ 58, 56, 55, 54, 53, 347, 52, 51, 849, 2070, - /* 1660 */ 58, 56, 55, 54, 53, 2132, 363, 362, 2405, 181, - /* 1670 */ 365, 364, 162, 1993, 1994, 2047, 2080, 2049, 2052, 2053, - /* 1680 */ 2054, 2055, 2056, 2057, 2058, 2059, 878, 871, 184, 2073, - /* 1690 */ 903, 902, 867, 2081, 2082, 367, 366, 951, 2088, 2090, - /* 1700 */ 2091, 2092, 2093, 2095, 2, 443, 2803, 2012, 369, 368, - /* 1710 */ 86, 371, 370, 911, 621, 841, 2061, 466, 373, 372, - /* 1720 */ 1621, 883, 195, 182, 184, 641, 1859, 408, 1849, 375, - /* 1730 */ 374, 2404, 2068, 940, 186, 185, 937, 936, 935, 183, - /* 1740 */ 131, 600, 128, 643, 163, 181, 406, 88, 444, 602, - /* 1750 */ 87, 2821, 359, 833, 2065, 898, 377, 376, 2320, 2001, - /* 1760 */ 580, 445, 379, 378, 137, 381, 380, 2768, 2964, 882, - /* 1770 */ 1604, 1704, 791, 264, 656, 654, 651, 649, 383, 382, - /* 1780 */ 3011, 805, 488, 812, 484, 846, 2614, 551, 533, 2326, - /* 1790 */ 2529, 784, 2965, 400, 2975, 820, 1735, 334, 3017, 230, - /* 1800 */ 329, 465, 821, 3012, 826, 2615, 1743, 1750, 2000, 337, - /* 1810 */ 2439, 5, 541, 588, 2802, 536, 1605, 2850, 460, 74, - /* 1820 */ 2012, 133, 2804, 886, 2806, 2807, 881, 1748, 187, 869, - /* 1830 */ 2851, 905, 550, 2022, 171, 562, 180, 2884, 2913, 561, - /* 1840 */ 239, 238, 496, 2909, 2616, 2595, 241, 629, 628, 627, - /* 1850 */ 626, 625, 620, 619, 618, 617, 448, 564, 75, 607, - /* 1860 */ 606, 605, 604, 603, 597, 596, 595, 1883, 590, 589, - /* 1870 */ 463, 393, 578, 2803, 581, 1823, 1824, 2013, 585, 252, - /* 1880 */ 587, 1842, 591, 593, 635, 611, 598, 622, 883, 647, - /* 1890 */ 802, 2607, 624, 631, 634, 636, 648, 645, 258, 650, - /* 1900 */ 257, 652, 261, 653, 655, 657, 2020, 672, 4, 673, - /* 1910 */ 680, 683, 100, 99, 573, 48, 681, 243, 2821, 269, - /* 1920 */ 108, 2015, 685, 2021, 272, 686, 2023, 689, 687, 275, - /* 1930 */ 565, 563, 2024, 2630, 2768, 277, 882, 109, 2025, 2624, - /* 1940 */ 110, 2803, 111, 442, 1702, 286, 552, 698, 283, 548, - /* 1950 */ 544, 540, 537, 566, 752, 719, 883, 113, 3004, 138, - /* 1960 */ 721, 753, 437, 2698, 767, 2469, 290, 769, 2465, 292, - /* 1970 */ 114, 189, 2016, 309, 779, 396, 778, 135, 2676, 2803, - /* 1980 */ 177, 2802, 2467, 2462, 2850, 190, 2821, 191, 133, 2804, - /* 1990 */ 886, 2806, 2807, 881, 883, 2695, 869, 2851, 905, 314, - /* 2000 */ 2694, 786, 2768, 3031, 882, 2913, 2803, 783, 809, 496, - /* 2010 */ 2909, 795, 338, 847, 2980, 2979, 818, 793, 323, 8, - /* 2020 */ 2952, 883, 203, 2945, 2821, 325, 796, 327, 794, 823, - /* 2030 */ 822, 3034, 780, 2932, 489, 319, 330, 785, 312, 326, - /* 2040 */ 2768, 321, 882, 834, 328, 831, 168, 2017, 2180, 2802, - /* 2050 */ 1, 2821, 2850, 216, 2178, 845, 133, 2804, 886, 2806, - /* 2060 */ 2807, 881, 529, 528, 869, 2851, 905, 2768, 3010, 882, - /* 2070 */ 339, 3031, 2003, 2913, 2803, 178, 2929, 496, 2909, 2644, - /* 2080 */ 397, 2643, 2642, 850, 398, 851, 1996, 2802, 2094, 883, - /* 2090 */ 2850, 493, 179, 855, 133, 2804, 886, 2806, 2807, 881, - /* 2100 */ 858, 73, 869, 2851, 905, 2894, 890, 888, 352, 2888, - /* 2110 */ 892, 2913, 2803, 2760, 2802, 496, 2909, 2850, 2089, 2821, - /* 2120 */ 232, 133, 2804, 886, 2806, 2807, 881, 883, 357, 869, - /* 2130 */ 2851, 905, 1995, 893, 333, 2768, 3031, 882, 2913, 447, - /* 2140 */ 446, 399, 496, 2909, 124, 127, 1519, 2482, 403, 509, - /* 2150 */ 2759, 1000, 907, 1001, 2755, 2754, 2803, 2821, 386, 188, - /* 2160 */ 2746, 389, 865, 518, 1004, 2094, 2745, 2737, 1002, 997, - /* 2170 */ 2736, 883, 2752, 2768, 390, 882, 2751, 2743, 2742, 2731, - /* 2180 */ 2730, 405, 2802, 2749, 2720, 2850, 2748, 2740, 2739, 133, - /* 2190 */ 2804, 886, 2806, 2807, 881, 2089, 2728, 869, 2851, 905, - /* 2200 */ 472, 2821, 771, 2727, 2886, 64, 2913, 2725, 2724, 2533, - /* 2210 */ 496, 2909, 425, 436, 520, 452, 426, 2768, 407, 882, - /* 2220 */ 2802, 438, 453, 2850, 2719, 2718, 97, 133, 2804, 886, - /* 2230 */ 2806, 2807, 881, 2713, 538, 869, 2851, 905, 2803, 539, - /* 2240 */ 1940, 1941, 862, 236, 2913, 543, 2711, 545, 496, 2909, - /* 2250 */ 546, 547, 1939, 883, 2710, 2709, 461, 2707, 553, 2706, - /* 2260 */ 2705, 557, 555, 2704, 2802, 559, 2004, 2850, 1999, 1927, - /* 2270 */ 2680, 134, 2804, 886, 2806, 2807, 881, 240, 2679, 869, - /* 2280 */ 2851, 905, 242, 2821, 98, 1886, 1885, 2657, 2913, 571, - /* 2290 */ 572, 2654, 2912, 2909, 2656, 2655, 2653, 2597, 576, 2768, - /* 2300 */ 1822, 882, 2007, 2009, 2594, 579, 2593, 2587, 582, 2584, - /* 2310 */ 583, 2583, 245, 101, 2582, 2581, 2586, 2585, 247, 903, - /* 2320 */ 902, 2803, 2580, 2579, 2577, 2576, 2575, 2088, 2090, 2091, - /* 2330 */ 2092, 2093, 2095, 249, 599, 2574, 883, 601, 2572, 2571, - /* 2340 */ 2570, 2569, 2568, 1980, 2592, 1956, 2802, 2567, 2566, 2850, - /* 2350 */ 2565, 2590, 2573, 134, 2804, 886, 2806, 2807, 881, 2564, - /* 2360 */ 2563, 869, 2851, 905, 2562, 2560, 2821, 2559, 2558, 2557, - /* 2370 */ 2913, 2556, 2555, 2554, 864, 2909, 2553, 511, 510, 1981, - /* 2380 */ 251, 107, 2768, 2552, 882, 2551, 2550, 2622, 2591, 2589, - /* 2390 */ 2549, 2548, 1828, 2547, 256, 2546, 903, 902, 638, 2545, - /* 2400 */ 640, 2544, 2542, 1671, 2088, 2090, 2091, 2092, 2093, 2095, - /* 2410 */ 2803, 2370, 2369, 449, 1675, 450, 1667, 259, 2368, 2367, - /* 2420 */ 2365, 260, 2362, 262, 263, 883, 660, 2361, 659, 884, - /* 2430 */ 658, 773, 2850, 662, 2354, 2341, 134, 2804, 886, 2806, - /* 2440 */ 2807, 881, 664, 666, 869, 2851, 905, 2803, 668, 1008, - /* 2450 */ 663, 670, 2315, 2913, 667, 2821, 265, 455, 2909, 211, - /* 2460 */ 93, 2788, 883, 1548, 222, 678, 2314, 94, 392, 267, - /* 2470 */ 2678, 2768, 2674, 882, 2664, 2803, 2652, 274, 276, 2651, - /* 2480 */ 279, 2628, 281, 996, 220, 2621, 2457, 2364, 2360, 699, - /* 2490 */ 883, 700, 2821, 992, 988, 984, 980, 1597, 387, 701, - /* 2500 */ 2358, 703, 704, 705, 2356, 707, 709, 2353, 2768, 711, - /* 2510 */ 882, 708, 712, 2336, 2334, 713, 2335, 2333, 2802, 2311, - /* 2520 */ 2821, 2850, 2459, 2458, 1754, 134, 2804, 886, 2806, 2807, - /* 2530 */ 881, 85, 1657, 869, 2851, 905, 2768, 1755, 882, 1656, - /* 2540 */ 289, 1655, 2913, 2351, 132, 1652, 2349, 2910, 1650, 360, - /* 2550 */ 1639, 1648, 477, 478, 1647, 2802, 1646, 967, 2850, 969, - /* 2560 */ 499, 1645, 411, 2804, 886, 2806, 2807, 881, 1644, 32, - /* 2570 */ 869, 2851, 905, 1641, 1640, 1638, 2340, 479, 2338, 480, - /* 2580 */ 853, 2803, 2310, 2802, 750, 747, 2850, 2309, 2308, 754, - /* 2590 */ 435, 2804, 886, 2806, 2807, 881, 883, 2307, 869, 2851, - /* 2600 */ 905, 756, 2306, 758, 2305, 760, 2803, 1921, 1923, 140, - /* 2610 */ 1920, 1925, 33, 2677, 79, 311, 2673, 1892, 68, 2663, - /* 2620 */ 1894, 883, 781, 2650, 2649, 358, 2821, 859, 3016, 69, - /* 2630 */ 341, 1896, 1911, 770, 782, 340, 1871, 315, 1870, 22, - /* 2640 */ 17, 797, 2768, 787, 882, 789, 485, 192, 35, 25, - /* 2650 */ 2233, 2821, 2207, 6, 310, 318, 799, 801, 803, 7, - /* 2660 */ 23, 320, 24, 215, 37, 2214, 202, 2768, 2201, 882, - /* 2670 */ 2171, 214, 227, 36, 95, 2803, 2173, 2789, 228, 2175, - /* 2680 */ 77, 229, 26, 2248, 2253, 2254, 2247, 490, 2252, 2802, - /* 2690 */ 883, 486, 2850, 2251, 491, 2155, 198, 2804, 886, 2806, - /* 2700 */ 2807, 881, 2154, 71, 869, 2851, 905, 335, 2648, 2627, - /* 2710 */ 207, 118, 119, 2626, 2802, 342, 120, 2850, 2803, 2209, - /* 2720 */ 2821, 435, 2804, 886, 2806, 2807, 881, 217, 2620, 869, - /* 2730 */ 2851, 905, 348, 883, 854, 81, 2768, 351, 882, 121, - /* 2740 */ 2803, 70, 350, 27, 13, 18, 848, 2972, 2107, 11, - /* 2750 */ 2106, 2005, 2064, 21, 28, 883, 856, 353, 2117, 29, - /* 2760 */ 487, 2803, 2063, 2821, 2062, 208, 218, 2040, 20, 49, - /* 2770 */ 2619, 891, 2454, 896, 122, 918, 880, 921, 924, 2768, - /* 2780 */ 927, 882, 50, 2802, 16, 2821, 2850, 2032, 30, 31, - /* 2790 */ 435, 2804, 886, 2806, 2807, 881, 82, 355, 869, 2851, - /* 2800 */ 905, 2768, 889, 882, 123, 128, 2821, 91, 897, 361, - /* 2810 */ 2076, 2863, 2862, 904, 80, 2267, 885, 906, 1736, 2266, - /* 2820 */ 910, 521, 2768, 1733, 882, 914, 2802, 912, 917, 2850, - /* 2830 */ 920, 915, 923, 428, 2804, 886, 2806, 2807, 881, 1732, - /* 2840 */ 1729, 869, 2851, 905, 926, 385, 1749, 1723, 2802, 1721, - /* 2850 */ 129, 2850, 130, 92, 1727, 201, 2804, 886, 2806, 2807, - /* 2860 */ 881, 1745, 1726, 869, 2851, 905, 1595, 1635, 1634, 2802, - /* 2870 */ 941, 1725, 2850, 1724, 1633, 955, 434, 2804, 886, 2806, - /* 2880 */ 2807, 881, 2803, 1630, 869, 2851, 905, 817, 2879, 1627, - /* 2890 */ 1626, 1625, 1624, 1622, 1620, 1619, 1618, 883, 1665, 1664, - /* 2900 */ 957, 234, 1616, 1615, 1613, 1614, 1612, 2803, 1611, 1661, - /* 2910 */ 1610, 1659, 1607, 1606, 1603, 1602, 1601, 1600, 3033, 2359, - /* 2920 */ 977, 2357, 883, 981, 979, 978, 2355, 2821, 985, 983, - /* 2930 */ 2352, 989, 987, 991, 2332, 993, 2330, 982, 995, 1537, - /* 2940 */ 986, 2304, 1520, 2768, 990, 882, 999, 1525, 1527, 2803, - /* 2950 */ 391, 1991, 2821, 1003, 2270, 404, 1006, 1007, 2270, 2270, - /* 2960 */ 2270, 2270, 2270, 2270, 883, 2270, 2270, 500, 2768, 2270, - /* 2970 */ 882, 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, - /* 2980 */ 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, - /* 2990 */ 2802, 2270, 495, 2850, 2821, 2270, 2270, 435, 2804, 886, - /* 3000 */ 2806, 2807, 881, 2270, 2270, 869, 2851, 905, 2270, 2270, - /* 3010 */ 2768, 2270, 882, 2270, 2803, 2802, 2270, 2270, 2850, 2270, - /* 3020 */ 2270, 2270, 420, 2804, 886, 2806, 2807, 881, 2270, 883, - /* 3030 */ 869, 2851, 905, 2270, 501, 2270, 2270, 2270, 2270, 2270, - /* 3040 */ 2270, 2803, 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, - /* 3050 */ 2270, 2270, 2270, 2270, 2270, 2270, 883, 2802, 2270, 2821, - /* 3060 */ 2850, 2270, 2270, 2270, 435, 2804, 886, 2806, 2807, 881, - /* 3070 */ 2270, 2270, 869, 2851, 905, 2768, 2270, 882, 2270, 2803, - /* 3080 */ 2270, 2270, 2270, 2270, 2270, 2270, 2821, 2270, 2270, 2270, - /* 3090 */ 2270, 2270, 2270, 2270, 883, 2270, 2270, 2270, 2270, 503, - /* 3100 */ 2270, 2270, 2768, 2270, 882, 2270, 2270, 2270, 2803, 2270, - /* 3110 */ 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, - /* 3120 */ 2270, 2270, 2802, 883, 2821, 2850, 2270, 2270, 2270, 435, - /* 3130 */ 2804, 886, 2806, 2807, 881, 2270, 2270, 869, 2851, 905, - /* 3140 */ 2768, 2270, 882, 2270, 2270, 2270, 2270, 2803, 2270, 2802, - /* 3150 */ 2270, 2270, 2850, 2821, 2270, 2270, 416, 2804, 886, 2806, - /* 3160 */ 2807, 881, 883, 2270, 869, 2851, 905, 2270, 2270, 2768, - /* 3170 */ 2270, 882, 2270, 2803, 2270, 2270, 2270, 2270, 2270, 2270, - /* 3180 */ 2270, 2270, 2270, 2270, 2270, 2270, 2270, 766, 883, 2270, - /* 3190 */ 2850, 2270, 2821, 2270, 430, 2804, 886, 2806, 2807, 881, - /* 3200 */ 2270, 2270, 869, 2851, 905, 2270, 2270, 2270, 2768, 2270, - /* 3210 */ 882, 2270, 2270, 2270, 2270, 2270, 2802, 2270, 2821, 2850, - /* 3220 */ 2270, 2270, 2270, 412, 2804, 886, 2806, 2807, 881, 2270, - /* 3230 */ 2270, 869, 2851, 905, 2768, 2270, 882, 2270, 2803, 2270, - /* 3240 */ 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, - /* 3250 */ 2270, 2270, 2270, 883, 2270, 2802, 2270, 2270, 2850, 2803, - /* 3260 */ 2270, 2270, 409, 2804, 886, 2806, 2807, 881, 2270, 2270, - /* 3270 */ 869, 2851, 905, 2270, 883, 2270, 2270, 2270, 2270, 2270, - /* 3280 */ 2270, 2802, 2270, 2821, 2850, 2270, 2270, 2270, 413, 2804, - /* 3290 */ 886, 2806, 2807, 881, 2270, 2270, 869, 2851, 905, 2768, - /* 3300 */ 2270, 882, 2270, 2270, 2821, 2270, 2270, 2270, 2270, 2270, - /* 3310 */ 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, - /* 3320 */ 2768, 2270, 882, 2270, 2270, 2270, 2270, 2270, 2270, 2270, - /* 3330 */ 2270, 2270, 2270, 2270, 2270, 2270, 2803, 2270, 2270, 2270, - /* 3340 */ 2270, 2270, 2270, 2270, 2270, 2270, 2802, 2270, 2270, 2850, - /* 3350 */ 2270, 883, 2270, 427, 2804, 886, 2806, 2807, 881, 2270, - /* 3360 */ 2270, 869, 2851, 905, 2270, 2270, 2270, 2802, 2270, 2270, - /* 3370 */ 2850, 2270, 2270, 2270, 414, 2804, 886, 2806, 2807, 881, - /* 3380 */ 2803, 2821, 869, 2851, 905, 2270, 2270, 2270, 2270, 2270, - /* 3390 */ 2270, 2270, 2270, 2270, 2270, 883, 2270, 2768, 2270, 882, - /* 3400 */ 2270, 2803, 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, - /* 3410 */ 2270, 2270, 2270, 2270, 2270, 2270, 883, 2270, 2270, 2270, - /* 3420 */ 2270, 2803, 2270, 2270, 2270, 2821, 2270, 2270, 2270, 2270, - /* 3430 */ 2270, 2270, 2270, 2270, 2270, 2270, 883, 2270, 2270, 2270, - /* 3440 */ 2270, 2768, 2270, 882, 2802, 2270, 2821, 2850, 2270, 2270, - /* 3450 */ 2270, 415, 2804, 886, 2806, 2807, 881, 2270, 2270, 869, - /* 3460 */ 2851, 905, 2768, 2270, 882, 2270, 2821, 2270, 2270, 2270, - /* 3470 */ 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, - /* 3480 */ 2270, 2270, 2768, 2270, 882, 2270, 2803, 2270, 2802, 2270, - /* 3490 */ 2270, 2850, 2270, 2270, 2270, 431, 2804, 886, 2806, 2807, - /* 3500 */ 881, 883, 2270, 869, 2851, 905, 2270, 2270, 2270, 2802, - /* 3510 */ 2270, 2270, 2850, 2270, 2270, 2270, 417, 2804, 886, 2806, - /* 3520 */ 2807, 881, 2270, 2270, 869, 2851, 905, 2803, 2270, 2802, - /* 3530 */ 2270, 2821, 2850, 2270, 2270, 2270, 432, 2804, 886, 2806, - /* 3540 */ 2807, 881, 883, 2270, 869, 2851, 905, 2768, 2270, 882, - /* 3550 */ 2270, 2803, 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, - /* 3560 */ 2270, 2270, 2270, 2270, 2270, 2270, 883, 2270, 2270, 2270, - /* 3570 */ 2270, 2270, 2821, 2270, 2270, 2270, 2270, 2270, 2270, 2270, - /* 3580 */ 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2768, 2270, - /* 3590 */ 882, 2270, 2270, 2270, 2802, 2270, 2821, 2850, 2270, 2270, - /* 3600 */ 2270, 418, 2804, 886, 2806, 2807, 881, 2270, 2270, 869, - /* 3610 */ 2851, 905, 2768, 2270, 882, 2270, 2270, 2270, 2803, 2270, - /* 3620 */ 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, - /* 3630 */ 2270, 2270, 2270, 883, 2270, 2802, 2270, 2270, 2850, 2270, - /* 3640 */ 2803, 2270, 433, 2804, 886, 2806, 2807, 881, 2270, 2270, - /* 3650 */ 869, 2851, 905, 2270, 2270, 883, 2270, 2270, 2270, 2802, - /* 3660 */ 2270, 2270, 2850, 2821, 2270, 2270, 419, 2804, 886, 2806, - /* 3670 */ 2807, 881, 2270, 2270, 869, 2851, 905, 2270, 2270, 2768, - /* 3680 */ 2270, 882, 2270, 2803, 2270, 2821, 2270, 2270, 2270, 2270, - /* 3690 */ 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, 883, 2270, - /* 3700 */ 2270, 2768, 2270, 882, 2270, 2270, 2270, 2803, 2270, 2270, - /* 3710 */ 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, - /* 3720 */ 2270, 2270, 883, 2270, 2270, 2270, 2802, 2270, 2821, 2850, - /* 3730 */ 2270, 2270, 2270, 410, 2804, 886, 2806, 2807, 881, 2270, - /* 3740 */ 2270, 869, 2851, 905, 2768, 2270, 882, 2270, 2802, 2270, - /* 3750 */ 2270, 2850, 2821, 2270, 2270, 421, 2804, 886, 2806, 2807, - /* 3760 */ 881, 2270, 2270, 869, 2851, 905, 2270, 2270, 2768, 2270, - /* 3770 */ 882, 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, - /* 3780 */ 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, - /* 3790 */ 2270, 2802, 2270, 2270, 2850, 2270, 2270, 2270, 422, 2804, - /* 3800 */ 886, 2806, 2807, 881, 2270, 2270, 869, 2851, 905, 2270, - /* 3810 */ 2270, 2270, 2270, 2270, 2270, 2802, 2270, 2270, 2850, 2270, - /* 3820 */ 2270, 2270, 423, 2804, 886, 2806, 2807, 881, 2803, 2270, - /* 3830 */ 869, 2851, 905, 2270, 2270, 2270, 2270, 2270, 2270, 2270, - /* 3840 */ 2270, 2270, 2270, 883, 2270, 2270, 2270, 2803, 2270, 2270, - /* 3850 */ 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, - /* 3860 */ 2270, 2270, 883, 2270, 2270, 2270, 2270, 2270, 2270, 2803, - /* 3870 */ 2270, 2270, 2270, 2821, 2270, 2270, 2270, 2270, 2270, 2270, - /* 3880 */ 2270, 2270, 2270, 2270, 883, 2270, 2270, 2270, 2270, 2768, - /* 3890 */ 2270, 882, 2821, 2270, 2270, 2270, 2803, 2270, 2270, 2270, - /* 3900 */ 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2768, 2270, - /* 3910 */ 882, 883, 2270, 2270, 2821, 2270, 2270, 2270, 2270, 2270, - /* 3920 */ 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, - /* 3930 */ 2768, 2270, 882, 2270, 2803, 2270, 2802, 2270, 2270, 2850, - /* 3940 */ 2270, 2821, 2270, 424, 2804, 886, 2806, 2807, 881, 883, - /* 3950 */ 2270, 869, 2851, 905, 2270, 2802, 2270, 2768, 2850, 882, - /* 3960 */ 2270, 2270, 440, 2804, 886, 2806, 2807, 881, 2270, 2270, - /* 3970 */ 869, 2851, 905, 2270, 2270, 2270, 2270, 2802, 2270, 2821, - /* 3980 */ 2850, 2270, 2270, 2803, 441, 2804, 886, 2806, 2807, 881, - /* 3990 */ 2270, 2270, 869, 2851, 905, 2768, 2270, 882, 883, 2270, - /* 4000 */ 2270, 2270, 2270, 2270, 2802, 2270, 2270, 2850, 2270, 2270, - /* 4010 */ 2270, 2815, 2804, 886, 2806, 2807, 881, 2270, 2270, 869, - /* 4020 */ 2851, 905, 2803, 2270, 2270, 2270, 2270, 2270, 2821, 2270, - /* 4030 */ 2270, 2270, 2270, 2270, 2270, 2270, 2270, 883, 2270, 2270, - /* 4040 */ 2270, 2270, 2802, 2270, 2768, 2850, 882, 2270, 2270, 2814, - /* 4050 */ 2804, 886, 2806, 2807, 881, 2270, 2270, 869, 2851, 905, - /* 4060 */ 2270, 2270, 2270, 2270, 2270, 2270, 2803, 2821, 2270, 2270, - /* 4070 */ 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, - /* 4080 */ 2270, 883, 2270, 2768, 2270, 882, 2270, 2270, 2270, 2270, - /* 4090 */ 2803, 2802, 2270, 2270, 2850, 2270, 2270, 2270, 2813, 2804, - /* 4100 */ 886, 2806, 2807, 881, 2270, 883, 869, 2851, 905, 2803, - /* 4110 */ 2270, 2821, 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, - /* 4120 */ 2270, 2270, 2270, 2270, 883, 2270, 2270, 2768, 2270, 882, - /* 4130 */ 2802, 2270, 2270, 2850, 2270, 2821, 2270, 457, 2804, 886, - /* 4140 */ 2806, 2807, 881, 2270, 2270, 869, 2851, 905, 2270, 2270, - /* 4150 */ 2270, 2768, 2270, 882, 2821, 2270, 2270, 2270, 2270, 2270, - /* 4160 */ 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, - /* 4170 */ 2768, 2270, 882, 2270, 2802, 2270, 2270, 2850, 2803, 2270, - /* 4180 */ 2270, 458, 2804, 886, 2806, 2807, 881, 2270, 2270, 869, - /* 4190 */ 2851, 905, 2270, 883, 2270, 2270, 2270, 2270, 2802, 2270, - /* 4200 */ 2270, 2850, 2270, 2270, 2270, 454, 2804, 886, 2806, 2807, - /* 4210 */ 881, 2270, 2270, 869, 2851, 905, 2270, 2802, 2270, 2270, - /* 4220 */ 2850, 2270, 2270, 2821, 459, 2804, 886, 2806, 2807, 881, - /* 4230 */ 2270, 2270, 869, 2851, 905, 2270, 2270, 2270, 2270, 2768, - /* 4240 */ 2270, 882, 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, - /* 4250 */ 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, - /* 4260 */ 2803, 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, - /* 4270 */ 2270, 2270, 2270, 2270, 2270, 883, 2270, 2270, 2270, 2270, - /* 4280 */ 2270, 2270, 2270, 2270, 2270, 2270, 884, 2270, 2270, 2850, - /* 4290 */ 2270, 2270, 2270, 430, 2804, 886, 2806, 2807, 881, 2270, - /* 4300 */ 2270, 869, 2851, 905, 2270, 2821, 2270, 2270, 2270, 2270, - /* 4310 */ 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, - /* 4320 */ 2270, 2768, 2270, 882, 2270, 2270, 2270, 2270, 2270, 2270, - /* 4330 */ 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, - /* 4340 */ 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, - /* 4350 */ 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, - /* 4360 */ 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2270, 2802, 2270, - /* 4370 */ 2270, 2850, 2270, 2270, 2270, 429, 2804, 886, 2806, 2807, - /* 4380 */ 881, 2270, 2270, 869, 2851, 905, + /* 0 */ 839, 683, 3059, 691, 684, 2351, 684, 2351, 3054, 2577, + /* 10 */ 3054, 2816, 60, 58, 678, 59, 57, 56, 55, 54, + /* 20 */ 506, 2304, 2016, 2521, 915, 2517, 838, 231, 858, 3058, + /* 30 */ 2816, 3055, 840, 3055, 3057, 205, 2014, 332, 2124, 2399, + /* 40 */ 2041, 2820, 151, 2841, 530, 150, 149, 148, 147, 146, + /* 50 */ 145, 144, 143, 142, 914, 851, 170, 466, 854, 389, + /* 60 */ 2820, 53, 52, 220, 680, 59, 57, 56, 55, 54, + /* 70 */ 2303, 2119, 151, 2045, 884, 150, 149, 148, 147, 146, + /* 80 */ 145, 144, 143, 142, 782, 2022, 2041, 2674, 2859, 829, + /* 90 */ 2647, 2822, 2824, 501, 160, 159, 158, 157, 156, 155, + /* 100 */ 154, 153, 152, 688, 2806, 919, 896, 2672, 901, 685, + /* 110 */ 2822, 2825, 1592, 2759, 1591, 1021, 851, 170, 61, 990, + /* 120 */ 989, 988, 987, 536, 919, 986, 985, 175, 980, 979, + /* 130 */ 978, 977, 976, 975, 974, 174, 968, 967, 966, 535, + /* 140 */ 534, 963, 962, 961, 211, 210, 960, 531, 959, 958, + /* 150 */ 957, 2840, 63, 1593, 2891, 2127, 2128, 197, 134, 2842, + /* 160 */ 900, 2844, 2845, 895, 75, 2448, 883, 2892, 919, 2041, + /* 170 */ 802, 772, 1592, 213, 1591, 2954, 2042, 251, 3054, 500, + /* 180 */ 2950, 207, 2962, 850, 75, 162, 849, 766, 166, 770, + /* 190 */ 768, 303, 302, 3054, 2077, 2087, 3060, 231, 198, 232, + /* 200 */ 2315, 3055, 840, 3059, 2126, 2129, 528, 3001, 509, 2570, + /* 210 */ 2572, 838, 231, 1593, 1862, 1863, 3055, 840, 195, 2017, + /* 220 */ 2044, 2015, 824, 107, 914, 9, 882, 2220, 106, 2522, + /* 230 */ 53, 52, 914, 2041, 59, 57, 56, 55, 54, 676, + /* 240 */ 64, 853, 200, 2962, 2963, 2213, 168, 2967, 674, 227, + /* 250 */ 318, 670, 666, 581, 2020, 2021, 2074, 2841, 2076, 2079, + /* 260 */ 2080, 2081, 2082, 2083, 2084, 2085, 2086, 2088, 2089, 2090, + /* 270 */ 892, 885, 894, 914, 917, 916, 881, 2111, 2112, 2113, + /* 280 */ 2114, 2115, 2118, 2120, 2121, 2122, 2123, 2125, 2, 60, + /* 290 */ 58, 2216, 700, 2841, 445, 105, 2039, 506, 75, 2016, + /* 300 */ 458, 118, 2859, 625, 644, 642, 469, 441, 897, 2046, + /* 310 */ 245, 1889, 1890, 2014, 646, 2124, 915, 2517, 2806, 2286, + /* 320 */ 896, 2616, 53, 52, 127, 2074, 59, 57, 56, 55, + /* 330 */ 54, 510, 468, 604, 2599, 648, 236, 220, 2859, 2191, + /* 340 */ 446, 606, 830, 825, 818, 814, 810, 339, 2119, 2674, + /* 350 */ 2154, 884, 584, 785, 2806, 19, 896, 701, 2667, 339, + /* 360 */ 1888, 1891, 2022, 498, 2647, 2840, 2042, 2326, 2891, 2671, + /* 370 */ 901, 63, 436, 2842, 900, 2844, 2845, 895, 893, 339, + /* 380 */ 883, 2892, 919, 874, 2919, 954, 187, 186, 951, 950, + /* 390 */ 949, 184, 1021, 467, 973, 15, 337, 2474, 572, 2044, + /* 400 */ 571, 2840, 2251, 887, 2891, 592, 2674, 2078, 134, 2842, + /* 410 */ 900, 2844, 2845, 895, 886, 2155, 883, 2892, 919, 922, + /* 420 */ 508, 172, 224, 181, 2925, 2954, 2671, 901, 2806, 500, + /* 430 */ 2950, 570, 2127, 2128, 801, 339, 2654, 2633, 2564, 634, + /* 440 */ 633, 631, 630, 629, 624, 623, 622, 621, 450, 590, + /* 450 */ 2643, 611, 610, 609, 608, 607, 601, 600, 599, 267, + /* 460 */ 594, 593, 465, 686, 699, 2359, 585, 1850, 1851, 2075, + /* 470 */ 220, 2077, 2087, 1869, 821, 820, 2249, 2250, 2252, 2253, + /* 480 */ 2254, 2126, 2129, 2974, 2188, 2189, 2190, 2974, 2974, 2974, + /* 490 */ 2974, 2974, 620, 339, 2160, 618, 2017, 2648, 2015, 41, + /* 500 */ 617, 1786, 1787, 882, 247, 53, 52, 619, 616, 59, + /* 510 */ 57, 56, 55, 54, 44, 502, 2149, 2150, 2151, 2152, + /* 520 */ 2153, 2157, 2158, 2159, 79, 2293, 2193, 2194, 2195, 2196, + /* 530 */ 2197, 2020, 2021, 2074, 2841, 2076, 2079, 2080, 2081, 2082, + /* 540 */ 2083, 2084, 2085, 2086, 2088, 2089, 2090, 892, 885, 854, + /* 550 */ 3059, 917, 916, 881, 2111, 2112, 2212, 786, 3054, 2118, + /* 560 */ 2120, 2121, 2122, 2123, 2125, 2, 60, 58, 2841, 2191, + /* 570 */ 2016, 828, 533, 532, 506, 337, 2016, 3058, 73, 2859, + /* 580 */ 2577, 3055, 3056, 897, 2014, 2135, 45, 355, 1747, 799, + /* 590 */ 2014, 2041, 2124, 702, 269, 2806, 2023, 896, 686, 866, + /* 600 */ 2359, 2859, 1561, 1738, 946, 945, 944, 1742, 943, 1744, + /* 610 */ 1745, 942, 939, 2859, 1753, 936, 1755, 1756, 933, 930, + /* 620 */ 927, 1568, 2499, 473, 786, 2119, 195, 2969, 884, 2806, + /* 630 */ 923, 896, 19, 2022, 137, 596, 2643, 2523, 75, 2022, + /* 640 */ 693, 2713, 2840, 526, 2519, 2891, 1563, 1566, 1567, 134, + /* 650 */ 2842, 900, 2844, 2845, 895, 2292, 2966, 883, 2892, 919, + /* 660 */ 915, 2517, 706, 1021, 213, 196, 2954, 725, 724, 1021, + /* 670 */ 500, 2950, 15, 827, 526, 2519, 2840, 915, 2517, 2891, + /* 680 */ 161, 2841, 2045, 135, 2842, 900, 2844, 2845, 895, 731, + /* 690 */ 249, 883, 2892, 919, 487, 2721, 897, 161, 3002, 2489, + /* 700 */ 2954, 56, 55, 54, 2953, 2950, 736, 788, 2713, 2127, + /* 710 */ 2128, 627, 2643, 2974, 2188, 2189, 2190, 2974, 2974, 2974, + /* 720 */ 2974, 2974, 518, 53, 52, 956, 2859, 59, 57, 56, + /* 730 */ 55, 54, 752, 751, 750, 851, 170, 14, 13, 742, + /* 740 */ 167, 746, 2806, 783, 896, 745, 1683, 521, 2077, 2087, + /* 750 */ 744, 749, 480, 479, 2191, 12, 743, 558, 2126, 2129, + /* 760 */ 478, 739, 738, 737, 2969, 2078, 254, 2017, 2022, 2015, + /* 770 */ 2571, 2572, 43, 2017, 1695, 2015, 956, 2045, 53, 52, + /* 780 */ 882, 2026, 59, 57, 56, 55, 54, 2799, 1694, 2840, + /* 790 */ 523, 703, 2891, 2965, 2041, 1685, 199, 2842, 900, 2844, + /* 800 */ 2845, 895, 2020, 2021, 883, 2892, 919, 2301, 2020, 2021, + /* 810 */ 2074, 2841, 2076, 2079, 2080, 2081, 2082, 2083, 2084, 2085, + /* 820 */ 2086, 2088, 2089, 2090, 892, 885, 897, 2075, 917, 916, + /* 830 */ 881, 2111, 2112, 339, 2262, 2325, 2118, 2120, 2121, 2122, + /* 840 */ 2123, 2125, 2, 12, 60, 58, 803, 3012, 851, 170, + /* 850 */ 512, 2661, 506, 704, 2016, 2168, 2859, 947, 226, 1699, + /* 860 */ 1747, 140, 2962, 2963, 919, 168, 2967, 649, 2014, 2969, + /* 870 */ 2124, 117, 2806, 1698, 896, 1738, 946, 945, 944, 1742, + /* 880 */ 943, 1744, 1745, 891, 890, 2577, 1753, 889, 1755, 1756, + /* 890 */ 888, 930, 927, 464, 2324, 562, 2806, 539, 2964, 2188, + /* 900 */ 2189, 2190, 538, 2119, 2575, 1917, 884, 1985, 113, 396, + /* 910 */ 19, 1595, 1596, 915, 2517, 1568, 307, 2022, 2046, 2840, + /* 920 */ 2506, 126, 2891, 564, 560, 638, 135, 2842, 900, 2844, + /* 930 */ 2845, 895, 1984, 68, 883, 2892, 919, 2511, 517, 516, + /* 940 */ 553, 1566, 1567, 2954, 2841, 915, 2517, 1021, 2951, 2508, + /* 950 */ 15, 2800, 651, 234, 802, 2806, 225, 915, 2517, 897, + /* 960 */ 2760, 2361, 3054, 520, 519, 578, 190, 238, 2078, 486, + /* 970 */ 2721, 409, 533, 532, 201, 2962, 2963, 579, 168, 2967, + /* 980 */ 3060, 231, 2030, 512, 839, 3055, 840, 2127, 2128, 2859, + /* 990 */ 407, 89, 3054, 256, 88, 2323, 2023, 919, 2124, 727, + /* 1000 */ 726, 1943, 1944, 470, 2491, 2806, 2504, 896, 447, 2322, + /* 1010 */ 838, 231, 2502, 2046, 512, 3055, 840, 802, 637, 255, + /* 1020 */ 265, 661, 659, 656, 654, 3054, 2077, 2087, 919, 97, + /* 1030 */ 2075, 2119, 635, 3, 53, 52, 2126, 2129, 59, 57, + /* 1040 */ 56, 55, 54, 3060, 231, 2022, 173, 66, 3055, 840, + /* 1050 */ 2321, 2017, 2840, 2015, 113, 2891, 2806, 2507, 882, 134, + /* 1060 */ 2842, 900, 2844, 2845, 895, 2243, 75, 883, 2892, 919, + /* 1070 */ 2806, 748, 747, 471, 3074, 879, 2954, 346, 347, 2244, + /* 1080 */ 500, 2950, 345, 2510, 574, 3058, 2020, 2021, 2074, 573, + /* 1090 */ 2076, 2079, 2080, 2081, 2082, 2083, 2084, 2085, 2086, 2088, + /* 1100 */ 2089, 2090, 892, 885, 970, 76, 917, 916, 881, 2111, + /* 1110 */ 2112, 2806, 984, 982, 2118, 2120, 2121, 2122, 2123, 2125, + /* 1120 */ 2, 60, 58, 2130, 915, 2517, 2320, 2319, 2242, 506, + /* 1130 */ 2318, 2016, 53, 52, 2331, 1014, 59, 57, 56, 55, + /* 1140 */ 54, 802, 306, 2577, 598, 2014, 305, 2124, 2449, 3054, + /* 1150 */ 759, 496, 954, 187, 186, 951, 950, 949, 184, 101, + /* 1160 */ 100, 577, 2575, 846, 244, 773, 2577, 3060, 231, 2488, + /* 1170 */ 2317, 40, 3055, 840, 511, 395, 972, 569, 567, 2031, + /* 1180 */ 2119, 2026, 403, 884, 304, 2575, 2554, 2806, 2806, 444, + /* 1190 */ 2402, 2806, 556, 314, 2022, 552, 548, 544, 541, 570, + /* 1200 */ 2727, 53, 52, 762, 402, 59, 57, 56, 55, 54, + /* 1210 */ 756, 754, 915, 2517, 2034, 2036, 12, 301, 10, 2314, + /* 1220 */ 116, 2841, 2521, 196, 1021, 453, 34, 61, 485, 2577, + /* 1230 */ 774, 2806, 612, 2520, 917, 916, 897, 527, 3009, 185, + /* 1240 */ 915, 2517, 2118, 2120, 2121, 2122, 2123, 2125, 2575, 915, + /* 1250 */ 2517, 53, 52, 915, 2517, 59, 57, 56, 55, 54, + /* 1260 */ 613, 339, 308, 85, 2127, 2128, 2859, 2045, 84, 614, + /* 1270 */ 752, 751, 750, 705, 2041, 2746, 809, 742, 167, 746, + /* 1280 */ 2806, 396, 2806, 745, 896, 915, 2517, 2313, 744, 749, + /* 1290 */ 480, 479, 333, 2312, 743, 915, 2517, 2577, 478, 739, + /* 1300 */ 738, 737, 2386, 2077, 2087, 2512, 915, 2517, 875, 877, + /* 1310 */ 2926, 2926, 2263, 2126, 2129, 309, 2576, 954, 187, 186, + /* 1320 */ 951, 950, 949, 184, 753, 67, 317, 2311, 2017, 2840, + /* 1330 */ 2015, 2156, 2891, 833, 843, 882, 134, 2842, 900, 2844, + /* 1340 */ 2845, 895, 2722, 2316, 883, 2892, 919, 948, 2806, 952, + /* 1350 */ 2568, 3074, 2568, 2954, 2806, 2310, 735, 500, 2950, 2309, + /* 1360 */ 734, 205, 2238, 2020, 2021, 2074, 2841, 2076, 2079, 2080, + /* 1370 */ 2081, 2082, 2083, 2084, 2085, 2086, 2088, 2089, 2090, 892, + /* 1380 */ 885, 897, 2626, 917, 916, 881, 2111, 2112, 2806, 915, + /* 1390 */ 2517, 2118, 2120, 2121, 2122, 2123, 2125, 2, 60, 58, + /* 1400 */ 2841, 915, 2517, 915, 2517, 2202, 506, 2750, 2016, 857, + /* 1410 */ 2161, 2859, 915, 2517, 2308, 897, 2806, 3022, 842, 2307, + /* 1420 */ 2806, 350, 2014, 871, 2124, 171, 588, 2806, 2925, 896, + /* 1430 */ 42, 2306, 357, 53, 52, 915, 2517, 59, 57, 56, + /* 1440 */ 55, 54, 53, 52, 529, 2859, 59, 57, 56, 55, + /* 1450 */ 54, 775, 915, 2517, 195, 908, 1570, 2119, 915, 2517, + /* 1460 */ 884, 2806, 2040, 896, 546, 2522, 953, 915, 2517, 2568, + /* 1470 */ 847, 2022, 909, 2588, 2840, 2806, 3015, 2891, 913, 163, + /* 1480 */ 2806, 413, 2842, 900, 2844, 2845, 895, 385, 32, 883, + /* 1490 */ 2892, 919, 2806, 103, 91, 2492, 294, 296, 2841, 292, + /* 1500 */ 295, 1021, 177, 2046, 61, 2109, 2295, 2296, 2840, 2579, + /* 1510 */ 2075, 2891, 740, 897, 1678, 134, 2842, 900, 2844, 2845, + /* 1520 */ 895, 222, 177, 883, 2892, 919, 298, 2384, 176, 297, + /* 1530 */ 3074, 300, 2954, 812, 299, 1676, 500, 2950, 2375, 741, + /* 1540 */ 185, 2127, 2128, 2859, 2101, 2373, 62, 822, 104, 755, + /* 1550 */ 53, 52, 62, 2232, 59, 57, 56, 55, 54, 2806, + /* 1560 */ 757, 896, 1674, 1679, 14, 13, 880, 760, 53, 52, + /* 1570 */ 364, 363, 59, 57, 56, 55, 54, 2025, 53, 52, + /* 1580 */ 2077, 2087, 59, 57, 56, 55, 54, 325, 1933, 47, + /* 1590 */ 2126, 2129, 53, 52, 214, 344, 59, 57, 56, 55, + /* 1600 */ 54, 90, 62, 366, 365, 2017, 2840, 2015, 1941, 2891, + /* 1610 */ 77, 852, 882, 134, 2842, 900, 2844, 2845, 895, 2236, + /* 1620 */ 62, 883, 2892, 919, 2827, 2024, 856, 165, 2929, 2860, + /* 1630 */ 2954, 632, 2248, 776, 500, 2950, 368, 367, 2247, 844, + /* 1640 */ 2020, 2021, 2074, 62, 2076, 2079, 2080, 2081, 2082, 2083, + /* 1650 */ 2084, 2085, 2086, 2088, 2089, 2090, 892, 885, 62, 2441, + /* 1660 */ 917, 916, 881, 2111, 2112, 62, 90, 647, 2118, 2120, + /* 1670 */ 2121, 2122, 2123, 2125, 2, 60, 58, 2841, 182, 2097, + /* 1680 */ 323, 348, 779, 506, 2440, 2016, 163, 863, 2100, 2099, + /* 1690 */ 185, 2829, 897, 132, 816, 129, 2162, 2352, 46, 2014, + /* 1700 */ 87, 2124, 2367, 2102, 370, 369, 2110, 53, 52, 3005, + /* 1710 */ 39, 59, 57, 56, 55, 54, 372, 371, 1656, 53, + /* 1720 */ 52, 819, 2859, 59, 57, 56, 55, 54, 2841, 2103, + /* 1730 */ 374, 373, 376, 375, 2119, 378, 377, 884, 2806, 802, + /* 1740 */ 896, 925, 2146, 897, 1886, 380, 379, 3054, 2022, 382, + /* 1750 */ 381, 2091, 1876, 384, 383, 1629, 964, 965, 48, 492, + /* 1760 */ 1008, 826, 2028, 183, 360, 3060, 231, 1657, 185, 164, + /* 1770 */ 3055, 840, 912, 2859, 488, 182, 1729, 860, 1021, 1648, + /* 1780 */ 1646, 61, 2652, 555, 2565, 2840, 401, 537, 2891, 2806, + /* 1790 */ 2358, 896, 134, 2842, 900, 2844, 2845, 895, 795, 3006, + /* 1800 */ 883, 2892, 919, 3016, 1630, 834, 835, 3074, 330, 2954, + /* 1810 */ 2027, 338, 335, 500, 2950, 2653, 53, 52, 2127, 2128, + /* 1820 */ 59, 57, 56, 55, 54, 2475, 5, 1760, 540, 545, + /* 1830 */ 2096, 462, 2039, 554, 2049, 566, 2840, 565, 239, 2891, + /* 1840 */ 568, 240, 394, 135, 2842, 900, 2844, 2845, 895, 1768, + /* 1850 */ 242, 883, 2892, 919, 1775, 1773, 1910, 2077, 2087, 582, + /* 1860 */ 2954, 188, 2040, 589, 878, 2950, 253, 2126, 2129, 53, + /* 1870 */ 52, 591, 595, 59, 57, 56, 55, 54, 597, 640, + /* 1880 */ 602, 615, 2017, 626, 2015, 2645, 53, 52, 636, 882, + /* 1890 */ 59, 57, 56, 55, 54, 628, 639, 641, 652, 477, + /* 1900 */ 475, 653, 650, 259, 258, 657, 2047, 655, 658, 262, + /* 1910 */ 660, 662, 4, 681, 682, 689, 2042, 2020, 2021, 2074, + /* 1920 */ 690, 2076, 2079, 2080, 2081, 2082, 2083, 2084, 2085, 2086, + /* 1930 */ 2088, 2089, 2090, 892, 885, 692, 270, 917, 916, 881, + /* 1940 */ 2111, 2112, 694, 787, 109, 2118, 2120, 2121, 2122, 2123, + /* 1950 */ 2125, 2, 60, 58, 273, 2048, 695, 2050, 696, 276, + /* 1960 */ 506, 698, 2016, 2051, 855, 278, 2668, 110, 2052, 111, + /* 1970 */ 112, 49, 2662, 1727, 2841, 730, 2014, 707, 2124, 284, + /* 1980 */ 2098, 287, 474, 472, 114, 733, 732, 763, 764, 897, + /* 1990 */ 2736, 3047, 139, 2505, 291, 439, 2501, 2095, 778, 115, + /* 2000 */ 802, 293, 191, 780, 138, 2841, 735, 310, 3054, 136, + /* 2010 */ 734, 2119, 2043, 178, 884, 2503, 2498, 192, 193, 2859, + /* 2020 */ 897, 802, 397, 2714, 790, 2022, 3060, 231, 791, 3054, + /* 2030 */ 789, 3055, 840, 315, 313, 2806, 2733, 896, 2732, 823, + /* 2040 */ 797, 861, 3021, 794, 3020, 8, 832, 3060, 231, 326, + /* 2050 */ 2859, 806, 3055, 840, 796, 1021, 2841, 2993, 61, 807, + /* 2060 */ 805, 837, 804, 320, 204, 2973, 2806, 328, 896, 324, + /* 2070 */ 322, 897, 327, 2986, 836, 329, 331, 845, 848, 169, + /* 2080 */ 493, 2044, 2840, 2210, 2208, 2891, 217, 340, 179, 134, + /* 2090 */ 2842, 900, 2844, 2845, 895, 2127, 2128, 883, 2892, 919, + /* 2100 */ 3077, 2859, 3053, 398, 3074, 2970, 2954, 859, 334, 2682, + /* 2110 */ 500, 2950, 2681, 898, 1, 2680, 2891, 2806, 497, 896, + /* 2120 */ 135, 2842, 900, 2844, 2845, 895, 864, 872, 883, 2892, + /* 2130 */ 919, 399, 869, 74, 2077, 2087, 865, 2954, 180, 2935, + /* 2140 */ 353, 457, 2950, 904, 2126, 2129, 902, 233, 906, 907, + /* 2150 */ 2798, 2797, 128, 400, 2793, 2518, 2792, 404, 2784, 2017, + /* 2160 */ 358, 2015, 2783, 125, 2840, 387, 882, 2891, 2775, 2774, + /* 2170 */ 921, 134, 2842, 900, 2844, 2845, 895, 1540, 1016, 883, + /* 2180 */ 2892, 919, 2790, 1017, 2789, 2781, 3074, 2780, 2954, 1018, + /* 2190 */ 189, 1013, 500, 2950, 2020, 2021, 2074, 391, 2076, 2079, + /* 2200 */ 2080, 2081, 2082, 2083, 2084, 2085, 2086, 2088, 2089, 2090, + /* 2210 */ 892, 885, 1020, 2769, 917, 916, 881, 2111, 2112, 2768, + /* 2220 */ 2787, 2786, 2118, 2120, 2121, 2122, 2123, 2125, 2, 60, + /* 2230 */ 58, 2778, 2777, 2766, 2765, 390, 2763, 506, 2762, 2016, + /* 2240 */ 2569, 65, 476, 454, 427, 782, 440, 455, 524, 438, + /* 2250 */ 428, 2841, 406, 2014, 408, 2124, 2758, 2757, 2756, 98, + /* 2260 */ 2751, 542, 543, 1967, 1968, 547, 897, 237, 2749, 549, + /* 2270 */ 550, 551, 1966, 2748, 2747, 463, 2745, 557, 2744, 559, + /* 2280 */ 2743, 561, 2742, 563, 1954, 2718, 241, 2717, 2119, 243, + /* 2290 */ 1913, 884, 99, 1912, 2695, 2694, 2859, 2693, 575, 576, + /* 2300 */ 2692, 2691, 2022, 2635, 580, 1849, 2632, 583, 2631, 2625, + /* 2310 */ 2622, 586, 2806, 246, 896, 248, 102, 2620, 587, 2621, + /* 2320 */ 2619, 2624, 2623, 2618, 2617, 2615, 2614, 449, 448, 2613, + /* 2330 */ 2612, 2610, 1021, 2841, 603, 15, 250, 513, 605, 2609, + /* 2340 */ 2608, 2607, 2606, 2630, 2605, 2604, 2603, 2628, 897, 2611, + /* 2350 */ 2602, 522, 2601, 2124, 2600, 2598, 2597, 2596, 2595, 2840, + /* 2360 */ 2594, 2593, 2891, 252, 2592, 108, 134, 2842, 900, 2844, + /* 2370 */ 2845, 895, 2127, 2128, 883, 2892, 919, 2591, 2859, 257, + /* 2380 */ 2582, 2927, 2590, 2954, 2589, 2587, 2119, 500, 2950, 2586, + /* 2390 */ 2660, 2629, 2627, 2585, 2806, 2584, 896, 1855, 2583, 643, + /* 2400 */ 2581, 645, 2580, 2578, 2406, 1696, 260, 2405, 1700, 261, + /* 2410 */ 1692, 2077, 2087, 2404, 451, 452, 2403, 2401, 2398, 263, + /* 2420 */ 665, 2126, 2129, 663, 264, 664, 2397, 668, 2390, 672, + /* 2430 */ 667, 2377, 669, 671, 2365, 675, 2017, 677, 2015, 2364, + /* 2440 */ 673, 2840, 679, 882, 2891, 2347, 1569, 212, 134, 2842, + /* 2450 */ 900, 2844, 2845, 895, 94, 266, 883, 2892, 919, 2346, + /* 2460 */ 2826, 2716, 223, 876, 268, 2954, 687, 95, 2712, 500, + /* 2470 */ 2950, 2020, 2021, 2074, 2702, 2076, 2079, 2080, 2081, 2082, + /* 2480 */ 2083, 2084, 2085, 2086, 2088, 2089, 2090, 892, 885, 784, + /* 2490 */ 2690, 917, 916, 881, 2111, 2112, 275, 2689, 277, 2118, + /* 2500 */ 2120, 2121, 2122, 2123, 2125, 2, 280, 1024, 2666, 282, + /* 2510 */ 2659, 2493, 1622, 2400, 2396, 2841, 708, 709, 2394, 710, + /* 2520 */ 712, 713, 714, 2392, 717, 716, 393, 718, 2389, 720, + /* 2530 */ 897, 722, 2372, 721, 2007, 2370, 1983, 2371, 2369, 2366, + /* 2540 */ 728, 1012, 1010, 2343, 2495, 221, 1779, 290, 86, 2494, + /* 2550 */ 2387, 1780, 1682, 1681, 1006, 1002, 998, 994, 1680, 388, + /* 2560 */ 2859, 1677, 1675, 1673, 981, 1672, 983, 515, 514, 2008, + /* 2570 */ 1671, 2385, 1670, 481, 1664, 482, 2806, 1669, 896, 2376, + /* 2580 */ 483, 1666, 1665, 1663, 2374, 484, 2342, 2341, 2340, 917, + /* 2590 */ 916, 761, 765, 2339, 2338, 767, 769, 2118, 2120, 2121, + /* 2600 */ 2122, 2123, 2125, 2337, 771, 133, 1948, 758, 1950, 141, + /* 2610 */ 361, 1947, 2715, 1952, 33, 312, 80, 2711, 69, 1919, + /* 2620 */ 1921, 2841, 2701, 2840, 792, 70, 2891, 1923, 2688, 316, + /* 2630 */ 202, 2842, 900, 2844, 2845, 895, 897, 1938, 883, 2892, + /* 2640 */ 919, 867, 793, 2687, 2841, 1898, 798, 194, 800, 1897, + /* 2650 */ 3059, 22, 17, 808, 25, 781, 811, 489, 35, 897, + /* 2660 */ 6, 2265, 7, 23, 228, 24, 2859, 216, 38, 229, + /* 2670 */ 2827, 78, 319, 2205, 26, 2280, 2239, 18, 2279, 36, + /* 2680 */ 817, 2237, 2806, 813, 896, 815, 359, 494, 873, 2859, + /* 2690 */ 2203, 342, 841, 3075, 2284, 321, 341, 2246, 203, 215, + /* 2700 */ 2283, 495, 72, 37, 336, 2806, 503, 896, 208, 2231, + /* 2710 */ 96, 2686, 2665, 2664, 2201, 311, 2285, 230, 120, 2286, + /* 2720 */ 2841, 121, 351, 2185, 2658, 2184, 343, 119, 122, 2840, + /* 2730 */ 2241, 27, 2891, 218, 349, 897, 437, 2842, 900, 2844, + /* 2740 */ 2845, 895, 82, 71, 883, 2892, 919, 11, 868, 13, + /* 2750 */ 2032, 209, 2840, 2147, 219, 2891, 352, 2067, 21, 199, + /* 2760 */ 2842, 900, 2844, 2845, 895, 2859, 862, 883, 2892, 919, + /* 2770 */ 2137, 2841, 870, 28, 29, 354, 2657, 2136, 2094, 2490, + /* 2780 */ 20, 2806, 2093, 896, 50, 932, 897, 123, 935, 938, + /* 2790 */ 941, 51, 910, 362, 2092, 2059, 16, 30, 31, 83, + /* 2800 */ 905, 903, 2106, 356, 2841, 490, 124, 129, 2299, 92, + /* 2810 */ 3013, 911, 2904, 2903, 918, 81, 2859, 924, 920, 897, + /* 2820 */ 1761, 525, 926, 386, 1758, 928, 929, 931, 2840, 1757, + /* 2830 */ 934, 2891, 2806, 1754, 896, 437, 2842, 900, 2844, 2845, + /* 2840 */ 895, 1748, 937, 883, 2892, 919, 2298, 940, 899, 2859, + /* 2850 */ 1746, 130, 131, 1774, 93, 1752, 491, 1751, 1750, 1749, + /* 2860 */ 1770, 1620, 955, 1660, 1659, 2806, 1658, 896, 1655, 2841, + /* 2870 */ 1652, 1651, 1650, 1649, 969, 1647, 1645, 1690, 1644, 2840, + /* 2880 */ 1643, 1689, 2891, 971, 897, 235, 437, 2842, 900, 2844, + /* 2890 */ 2845, 895, 2841, 1641, 883, 2892, 919, 1640, 1639, 1638, + /* 2900 */ 1637, 1636, 1635, 1686, 1684, 1632, 1631, 894, 1628, 1627, + /* 2910 */ 1626, 1625, 2840, 992, 2859, 2891, 2395, 991, 993, 430, + /* 2920 */ 2842, 900, 2844, 2845, 895, 2393, 995, 883, 2892, 919, + /* 2930 */ 2806, 997, 896, 996, 2391, 999, 1000, 2859, 1001, 2388, + /* 2940 */ 1003, 1004, 1005, 2368, 1007, 2363, 1009, 2362, 1011, 2336, + /* 2950 */ 1558, 1541, 1015, 2806, 1546, 896, 1548, 392, 1019, 1022, + /* 2960 */ 2841, 2302, 2018, 405, 1023, 2302, 2302, 2302, 2302, 2302, + /* 2970 */ 2302, 2302, 2302, 831, 2302, 897, 2302, 2840, 2302, 2302, + /* 2980 */ 2891, 2302, 2302, 2302, 202, 2842, 900, 2844, 2845, 895, + /* 2990 */ 2302, 2302, 883, 2892, 919, 2302, 2302, 2302, 2302, 2302, + /* 3000 */ 2840, 2302, 2302, 2891, 2302, 2859, 2302, 436, 2842, 900, + /* 3010 */ 2844, 2845, 895, 2302, 2302, 883, 2892, 919, 2302, 2920, + /* 3020 */ 2302, 2806, 2302, 896, 2302, 2841, 2302, 289, 2302, 2302, + /* 3030 */ 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, + /* 3040 */ 897, 2302, 2302, 729, 2302, 504, 206, 3076, 2302, 2302, + /* 3050 */ 2302, 2302, 2841, 2302, 2302, 723, 719, 715, 711, 2302, + /* 3060 */ 288, 2302, 2302, 2302, 2302, 2302, 2302, 897, 2840, 2302, + /* 3070 */ 2859, 2891, 2302, 2302, 2302, 437, 2842, 900, 2844, 2845, + /* 3080 */ 895, 2302, 2302, 883, 2892, 919, 2806, 2302, 896, 2302, + /* 3090 */ 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2859, 2302, 2302, + /* 3100 */ 2302, 2302, 2302, 2302, 2302, 2302, 286, 2302, 2302, 2302, + /* 3110 */ 499, 285, 2302, 2806, 2302, 896, 2302, 2302, 2302, 2302, + /* 3120 */ 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, + /* 3130 */ 2302, 2302, 2302, 2840, 2302, 2302, 2891, 505, 2841, 2302, + /* 3140 */ 422, 2842, 900, 2844, 2845, 895, 2302, 2302, 883, 2892, + /* 3150 */ 919, 2302, 2302, 897, 2302, 2302, 2302, 2302, 2841, 2302, + /* 3160 */ 2840, 2302, 2302, 2891, 2302, 2302, 2302, 437, 2842, 900, + /* 3170 */ 2844, 2845, 895, 897, 2302, 883, 2892, 919, 272, 2841, + /* 3180 */ 2302, 2302, 2302, 2859, 2302, 2302, 2302, 283, 2302, 2302, + /* 3190 */ 2302, 274, 281, 2302, 897, 2302, 2302, 279, 697, 2806, + /* 3200 */ 2302, 896, 2302, 2859, 2302, 2302, 2302, 2302, 2302, 2302, + /* 3210 */ 2302, 2302, 2302, 2302, 2302, 2302, 271, 2302, 2302, 2806, + /* 3220 */ 2302, 896, 2302, 507, 2859, 2302, 2302, 2302, 2302, 2302, + /* 3230 */ 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, + /* 3240 */ 2806, 2302, 896, 2302, 2302, 2302, 2840, 2302, 2302, 2891, + /* 3250 */ 2302, 2302, 2302, 437, 2842, 900, 2844, 2845, 895, 2302, + /* 3260 */ 2302, 883, 2892, 919, 2302, 2302, 2840, 2302, 2302, 2891, + /* 3270 */ 2302, 2302, 2302, 418, 2842, 900, 2844, 2845, 895, 2302, + /* 3280 */ 2302, 883, 2892, 919, 2302, 2841, 2302, 777, 2302, 2302, + /* 3290 */ 2891, 2302, 2302, 2302, 432, 2842, 900, 2844, 2845, 895, + /* 3300 */ 897, 2302, 883, 2892, 919, 2841, 2302, 2302, 2302, 2302, + /* 3310 */ 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, + /* 3320 */ 897, 2302, 2302, 2302, 2302, 2841, 2302, 2302, 2302, 2302, + /* 3330 */ 2859, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, + /* 3340 */ 897, 2302, 2302, 2302, 2302, 2302, 2806, 2302, 896, 2302, + /* 3350 */ 2859, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, + /* 3360 */ 2302, 2302, 2302, 2302, 2302, 2302, 2806, 2302, 896, 2302, + /* 3370 */ 2859, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, + /* 3380 */ 2302, 2302, 2302, 2302, 2302, 2302, 2806, 2302, 896, 2302, + /* 3390 */ 2302, 2302, 2302, 2840, 2302, 2302, 2891, 2302, 2302, 2302, + /* 3400 */ 414, 2842, 900, 2844, 2845, 895, 2302, 2302, 883, 2892, + /* 3410 */ 919, 2302, 2841, 2840, 2302, 2302, 2891, 2302, 2302, 2302, + /* 3420 */ 410, 2842, 900, 2844, 2845, 895, 2302, 897, 883, 2892, + /* 3430 */ 919, 2302, 2302, 2840, 2302, 2302, 2891, 2302, 2841, 2302, + /* 3440 */ 411, 2842, 900, 2844, 2845, 895, 2302, 2302, 883, 2892, + /* 3450 */ 919, 2302, 2302, 897, 2302, 2302, 2302, 2859, 2302, 2302, + /* 3460 */ 2302, 2841, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, + /* 3470 */ 2302, 2302, 2302, 2806, 2302, 896, 897, 2302, 2302, 2302, + /* 3480 */ 2302, 2841, 2302, 2859, 2302, 2302, 2302, 2302, 2302, 2302, + /* 3490 */ 2302, 2302, 2302, 2302, 2302, 2302, 897, 2302, 2302, 2806, + /* 3500 */ 2302, 896, 2302, 2841, 2302, 2302, 2859, 2302, 2302, 2302, + /* 3510 */ 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 897, 2302, + /* 3520 */ 2840, 2302, 2806, 2891, 896, 2302, 2859, 415, 2842, 900, + /* 3530 */ 2844, 2845, 895, 2302, 2302, 883, 2892, 919, 2302, 2302, + /* 3540 */ 2302, 2302, 2806, 2302, 896, 2302, 2840, 2302, 2859, 2891, + /* 3550 */ 2302, 2302, 2302, 429, 2842, 900, 2844, 2845, 895, 2302, + /* 3560 */ 2302, 883, 2892, 919, 2806, 2302, 896, 2302, 2841, 2840, + /* 3570 */ 2302, 2302, 2891, 2302, 2302, 2302, 416, 2842, 900, 2844, + /* 3580 */ 2845, 895, 2302, 897, 883, 2892, 919, 2841, 2302, 2840, + /* 3590 */ 2302, 2302, 2891, 2302, 2302, 2302, 417, 2842, 900, 2844, + /* 3600 */ 2845, 895, 897, 2302, 883, 2892, 919, 2302, 2302, 2841, + /* 3610 */ 2302, 2840, 2302, 2859, 2891, 2302, 2302, 2302, 433, 2842, + /* 3620 */ 900, 2844, 2845, 895, 897, 2302, 883, 2892, 919, 2806, + /* 3630 */ 2302, 896, 2859, 2302, 2302, 2302, 2302, 2302, 2302, 2302, + /* 3640 */ 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2806, 2302, + /* 3650 */ 896, 2302, 2302, 2302, 2859, 2302, 2302, 2302, 2302, 2302, + /* 3660 */ 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, + /* 3670 */ 2806, 2302, 896, 2302, 2841, 2302, 2840, 2302, 2302, 2891, + /* 3680 */ 2302, 2302, 2302, 419, 2842, 900, 2844, 2845, 895, 897, + /* 3690 */ 2302, 883, 2892, 919, 2302, 2840, 2302, 2302, 2891, 2302, + /* 3700 */ 2302, 2302, 434, 2842, 900, 2844, 2845, 895, 2302, 2302, + /* 3710 */ 883, 2892, 919, 2302, 2302, 2302, 2302, 2840, 2302, 2859, + /* 3720 */ 2891, 2302, 2302, 2841, 420, 2842, 900, 2844, 2845, 895, + /* 3730 */ 2302, 2302, 883, 2892, 919, 2806, 2302, 896, 897, 2302, + /* 3740 */ 2302, 2302, 2302, 2841, 2302, 2302, 2302, 2302, 2302, 2302, + /* 3750 */ 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 897, 2302, + /* 3760 */ 2302, 2302, 2302, 2841, 2302, 2302, 2302, 2302, 2859, 2302, + /* 3770 */ 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 897, 2302, + /* 3780 */ 2302, 2302, 2840, 2302, 2806, 2891, 896, 2302, 2859, 435, + /* 3790 */ 2842, 900, 2844, 2845, 895, 2302, 2302, 883, 2892, 919, + /* 3800 */ 2302, 2302, 2302, 2302, 2806, 2302, 896, 2302, 2859, 2302, + /* 3810 */ 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, + /* 3820 */ 2302, 2302, 2302, 2302, 2806, 2302, 896, 2302, 2302, 2302, + /* 3830 */ 2302, 2840, 2302, 2302, 2891, 2302, 2302, 2302, 421, 2842, + /* 3840 */ 900, 2844, 2845, 895, 2302, 2302, 883, 2892, 919, 2302, + /* 3850 */ 2841, 2840, 2302, 2302, 2891, 2302, 2302, 2302, 412, 2842, + /* 3860 */ 900, 2844, 2845, 895, 2302, 897, 883, 2892, 919, 2841, + /* 3870 */ 2302, 2840, 2302, 2302, 2891, 2302, 2302, 2302, 423, 2842, + /* 3880 */ 900, 2844, 2845, 895, 897, 2302, 883, 2892, 919, 2841, + /* 3890 */ 2302, 2302, 2302, 2302, 2302, 2859, 2302, 2302, 2302, 2302, + /* 3900 */ 2302, 2302, 2302, 2302, 897, 2302, 2302, 2302, 2302, 2302, + /* 3910 */ 2302, 2806, 2302, 896, 2859, 2302, 2302, 2302, 2302, 2302, + /* 3920 */ 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, + /* 3930 */ 2806, 2302, 896, 2302, 2859, 2302, 2302, 2302, 2302, 2302, + /* 3940 */ 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, + /* 3950 */ 2806, 2302, 896, 2302, 2302, 2302, 2841, 2302, 2840, 2302, + /* 3960 */ 2302, 2891, 2302, 2302, 2302, 424, 2842, 900, 2844, 2845, + /* 3970 */ 895, 897, 2302, 883, 2892, 919, 2841, 2840, 2302, 2302, + /* 3980 */ 2891, 2302, 2302, 2302, 425, 2842, 900, 2844, 2845, 895, + /* 3990 */ 2302, 897, 883, 2892, 919, 2841, 2302, 2840, 2302, 2302, + /* 4000 */ 2891, 2859, 2302, 2302, 426, 2842, 900, 2844, 2845, 895, + /* 4010 */ 897, 2302, 883, 2892, 919, 2302, 2302, 2806, 2302, 896, + /* 4020 */ 2302, 2859, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, + /* 4030 */ 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2806, 2302, 896, + /* 4040 */ 2859, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, + /* 4050 */ 2302, 2302, 2302, 2302, 2302, 2302, 2806, 2302, 896, 2302, + /* 4060 */ 2302, 2302, 2302, 2841, 2840, 2302, 2302, 2891, 2302, 2302, + /* 4070 */ 2302, 442, 2842, 900, 2844, 2845, 895, 2302, 897, 883, + /* 4080 */ 2892, 919, 2841, 2302, 2840, 2302, 2302, 2891, 2302, 2302, + /* 4090 */ 2302, 443, 2842, 900, 2844, 2845, 895, 897, 2302, 883, + /* 4100 */ 2892, 919, 2302, 2840, 2302, 2302, 2891, 2302, 2859, 2302, + /* 4110 */ 2853, 2842, 900, 2844, 2845, 895, 2302, 2302, 883, 2892, + /* 4120 */ 919, 2302, 2302, 2302, 2806, 2302, 896, 2859, 2302, 2302, + /* 4130 */ 2302, 2841, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, + /* 4140 */ 2302, 2302, 2302, 2806, 2302, 896, 897, 2302, 2302, 2302, + /* 4150 */ 2302, 2841, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, + /* 4160 */ 2302, 2302, 2302, 2302, 2302, 2302, 897, 2302, 2302, 2302, + /* 4170 */ 2302, 2840, 2302, 2302, 2891, 2302, 2859, 2302, 2852, 2842, + /* 4180 */ 900, 2844, 2845, 895, 2302, 2302, 883, 2892, 919, 2302, + /* 4190 */ 2840, 2302, 2806, 2891, 896, 2302, 2859, 2851, 2842, 900, + /* 4200 */ 2844, 2845, 895, 2302, 2302, 883, 2892, 919, 2302, 2302, + /* 4210 */ 2302, 2302, 2806, 2302, 896, 2302, 2302, 2302, 2302, 2841, + /* 4220 */ 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, + /* 4230 */ 2302, 2302, 2302, 2302, 897, 2302, 2302, 2302, 2302, 2840, + /* 4240 */ 2302, 2302, 2891, 2841, 2302, 2302, 459, 2842, 900, 2844, + /* 4250 */ 2845, 895, 2302, 2302, 883, 2892, 919, 2302, 897, 2840, + /* 4260 */ 2302, 2302, 2891, 2302, 2859, 2302, 460, 2842, 900, 2844, + /* 4270 */ 2845, 895, 2302, 2302, 883, 2892, 919, 2302, 2302, 2302, + /* 4280 */ 2806, 2302, 896, 2302, 2302, 2302, 2302, 2302, 2859, 2302, + /* 4290 */ 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, + /* 4300 */ 2302, 2302, 2302, 2302, 2806, 2302, 896, 2302, 2302, 2302, + /* 4310 */ 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, + /* 4320 */ 2302, 2302, 2302, 2302, 2302, 2841, 2302, 2840, 2302, 2302, + /* 4330 */ 2891, 2302, 2302, 2302, 456, 2842, 900, 2844, 2845, 895, + /* 4340 */ 897, 2302, 883, 2892, 919, 2302, 2302, 2302, 2302, 2841, + /* 4350 */ 2302, 2840, 2302, 2302, 2891, 2302, 2302, 2302, 461, 2842, + /* 4360 */ 900, 2844, 2845, 895, 897, 2302, 883, 2892, 919, 2302, + /* 4370 */ 2859, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, + /* 4380 */ 2302, 2302, 2302, 2302, 2302, 2302, 2806, 2302, 896, 2302, + /* 4390 */ 2302, 2302, 2302, 2302, 2859, 2302, 2302, 2302, 2302, 2302, + /* 4400 */ 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, + /* 4410 */ 2806, 2302, 896, 2302, 2302, 2302, 2302, 2302, 2302, 2302, + /* 4420 */ 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, 2302, + /* 4430 */ 2302, 2302, 2302, 898, 2302, 2302, 2891, 2302, 2302, 2302, + /* 4440 */ 432, 2842, 900, 2844, 2845, 895, 2302, 2302, 883, 2892, + /* 4450 */ 919, 2302, 2302, 2302, 2302, 2302, 2302, 2840, 2302, 2302, + /* 4460 */ 2891, 2302, 2302, 2302, 431, 2842, 900, 2844, 2845, 895, + /* 4470 */ 2302, 2302, 883, 2892, 919, }; static const YYCODETYPE yy_lookahead[] = { - /* 0 */ 519, 520, 425, 0, 473, 400, 401, 383, 431, 478, - /* 10 */ 426, 425, 12, 13, 431, 395, 473, 431, 398, 399, - /* 20 */ 20, 0, 22, 440, 441, 8, 9, 20, 14, 12, - /* 30 */ 13, 14, 15, 16, 20, 458, 36, 0, 38, 0, - /* 40 */ 386, 0, 21, 432, 458, 24, 25, 26, 27, 28, - /* 50 */ 29, 30, 31, 32, 443, 401, 449, 54, 8, 9, - /* 60 */ 455, 530, 12, 13, 14, 15, 16, 4, 68, 538, - /* 70 */ 463, 71, 488, 530, 491, 492, 469, 470, 410, 400, - /* 80 */ 401, 538, 82, 33, 22, 431, 418, 556, 557, 12, - /* 90 */ 13, 395, 561, 562, 398, 399, 55, 473, 36, 556, - /* 100 */ 557, 447, 478, 449, 561, 562, 434, 41, 42, 437, - /* 110 */ 473, 20, 112, 36, 20, 115, 77, 78, 79, 80, - /* 120 */ 81, 500, 83, 84, 85, 86, 87, 88, 89, 90, + /* 0 */ 536, 401, 536, 401, 404, 405, 404, 405, 544, 437, + /* 10 */ 544, 423, 12, 13, 4, 12, 13, 14, 15, 16, + /* 20 */ 20, 0, 22, 438, 406, 407, 562, 563, 456, 563, + /* 30 */ 423, 567, 568, 567, 568, 538, 36, 540, 38, 0, + /* 40 */ 20, 453, 21, 392, 426, 24, 25, 26, 27, 28, + /* 50 */ 29, 30, 31, 32, 20, 406, 407, 431, 407, 34, + /* 60 */ 453, 8, 9, 437, 54, 12, 13, 14, 15, 16, + /* 70 */ 0, 71, 21, 20, 74, 24, 25, 26, 27, 28, + /* 80 */ 29, 30, 31, 32, 499, 85, 20, 455, 437, 20, + /* 90 */ 464, 503, 504, 505, 24, 25, 26, 27, 28, 29, + /* 100 */ 30, 31, 32, 14, 453, 517, 455, 475, 476, 20, + /* 110 */ 503, 504, 20, 479, 22, 115, 406, 407, 118, 80, + /* 120 */ 81, 82, 83, 84, 517, 86, 87, 88, 89, 90, /* 130 */ 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, - /* 140 */ 101, 102, 103, 104, 105, 106, 107, 108, 494, 401, - /* 150 */ 529, 497, 152, 153, 530, 501, 502, 503, 504, 505, - /* 160 */ 506, 407, 538, 509, 510, 511, 116, 530, 430, 497, - /* 170 */ 516, 20, 518, 68, 112, 538, 522, 523, 115, 431, - /* 180 */ 556, 557, 386, 511, 446, 561, 562, 121, 122, 435, - /* 190 */ 124, 191, 192, 556, 557, 431, 542, 401, 561, 562, - /* 200 */ 44, 201, 202, 439, 550, 526, 527, 528, 171, 530, - /* 210 */ 531, 145, 20, 176, 450, 149, 216, 538, 218, 114, - /* 220 */ 20, 184, 407, 223, 119, 8, 9, 431, 21, 12, - /* 230 */ 13, 14, 15, 16, 422, 556, 557, 20, 426, 424, - /* 240 */ 561, 562, 400, 447, 37, 449, 39, 40, 41, 42, - /* 250 */ 435, 503, 252, 253, 254, 4, 256, 257, 258, 259, - /* 260 */ 260, 261, 262, 263, 264, 265, 266, 400, 401, 269, - /* 270 */ 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, - /* 280 */ 280, 281, 282, 283, 12, 13, 14, 420, 386, 20, - /* 290 */ 494, 186, 20, 497, 22, 218, 429, 501, 502, 503, - /* 300 */ 504, 505, 506, 401, 36, 509, 510, 511, 36, 449, - /* 310 */ 38, 155, 516, 432, 518, 115, 8, 9, 522, 523, - /* 320 */ 12, 13, 14, 15, 16, 483, 484, 386, 400, 469, - /* 330 */ 470, 8, 9, 431, 115, 12, 13, 14, 15, 16, - /* 340 */ 68, 20, 401, 71, 152, 153, 550, 75, 254, 447, - /* 350 */ 82, 449, 400, 401, 82, 21, 400, 401, 24, 25, - /* 360 */ 26, 27, 28, 29, 30, 31, 32, 12, 13, 20, - /* 370 */ 530, 308, 431, 155, 493, 20, 420, 22, 538, 451, - /* 380 */ 452, 431, 454, 75, 112, 457, 117, 115, 447, 439, - /* 390 */ 449, 36, 190, 38, 432, 433, 494, 557, 20, 497, - /* 400 */ 450, 561, 562, 501, 502, 503, 504, 505, 506, 507, - /* 410 */ 193, 509, 510, 511, 512, 513, 145, 146, 147, 148, - /* 420 */ 149, 150, 151, 68, 152, 153, 71, 20, 434, 22, - /* 430 */ 75, 400, 401, 125, 215, 494, 217, 82, 497, 116, - /* 440 */ 448, 449, 501, 502, 503, 504, 505, 506, 36, 155, - /* 450 */ 509, 510, 511, 297, 298, 299, 300, 301, 302, 303, - /* 460 */ 304, 305, 115, 191, 192, 58, 0, 112, 249, 267, - /* 470 */ 115, 254, 44, 201, 202, 14, 74, 525, 526, 527, - /* 480 */ 528, 20, 530, 531, 400, 401, 455, 36, 216, 287, - /* 490 */ 218, 497, 551, 552, 252, 223, 68, 54, 190, 301, - /* 500 */ 302, 303, 304, 305, 420, 511, 63, 152, 153, 66, - /* 510 */ 67, 20, 532, 429, 534, 297, 298, 299, 300, 301, - /* 520 */ 302, 303, 304, 305, 252, 253, 254, 308, 256, 257, - /* 530 */ 258, 259, 260, 261, 262, 263, 264, 265, 266, 196, - /* 540 */ 74, 269, 270, 271, 272, 273, 191, 192, 74, 277, - /* 550 */ 278, 279, 280, 281, 282, 283, 201, 202, 0, 20, - /* 560 */ 449, 310, 320, 321, 322, 323, 324, 325, 326, 191, - /* 570 */ 192, 216, 115, 218, 463, 267, 59, 60, 223, 431, - /* 580 */ 469, 470, 24, 25, 26, 27, 28, 29, 30, 31, - /* 590 */ 32, 268, 298, 299, 300, 287, 288, 289, 290, 291, - /* 600 */ 292, 293, 294, 295, 296, 3, 458, 252, 253, 254, - /* 610 */ 126, 256, 257, 258, 259, 260, 261, 262, 263, 264, - /* 620 */ 265, 266, 20, 20, 269, 270, 271, 272, 273, 20, - /* 630 */ 218, 22, 277, 278, 279, 280, 281, 282, 283, 284, - /* 640 */ 12, 13, 145, 152, 153, 36, 149, 400, 20, 73, - /* 650 */ 22, 284, 191, 386, 115, 308, 112, 314, 315, 316, - /* 660 */ 317, 417, 250, 251, 36, 20, 38, 58, 401, 218, - /* 670 */ 403, 127, 128, 129, 130, 131, 132, 133, 134, 135, - /* 680 */ 136, 431, 138, 139, 140, 141, 142, 143, 144, 386, - /* 690 */ 82, 447, 201, 202, 20, 385, 68, 387, 431, 71, - /* 700 */ 450, 250, 251, 75, 401, 12, 13, 14, 15, 16, - /* 710 */ 82, 431, 465, 466, 447, 254, 449, 34, 116, 439, - /* 720 */ 284, 417, 286, 12, 13, 14, 400, 530, 400, 401, - /* 730 */ 450, 20, 396, 22, 431, 538, 400, 431, 402, 14, - /* 740 */ 112, 497, 498, 115, 515, 20, 517, 36, 420, 38, - /* 750 */ 447, 447, 449, 556, 557, 511, 450, 126, 561, 562, - /* 760 */ 115, 494, 147, 431, 497, 308, 151, 530, 501, 502, - /* 770 */ 503, 504, 505, 506, 442, 538, 509, 510, 511, 68, - /* 780 */ 152, 153, 71, 516, 33, 518, 460, 211, 462, 522, - /* 790 */ 523, 400, 401, 82, 557, 193, 193, 494, 561, 562, - /* 800 */ 497, 497, 498, 499, 501, 502, 503, 504, 505, 506, - /* 810 */ 530, 420, 509, 510, 511, 511, 240, 241, 538, 191, - /* 820 */ 192, 445, 0, 112, 448, 449, 115, 8, 9, 201, - /* 830 */ 202, 12, 13, 14, 15, 16, 556, 557, 146, 147, - /* 840 */ 225, 561, 562, 151, 216, 230, 218, 308, 233, 400, - /* 850 */ 235, 223, 421, 8, 9, 33, 386, 12, 13, 14, - /* 860 */ 15, 16, 431, 152, 153, 191, 563, 564, 434, 22, - /* 870 */ 8, 9, 52, 442, 12, 13, 14, 15, 16, 432, - /* 880 */ 252, 253, 254, 36, 256, 257, 258, 259, 260, 261, - /* 890 */ 262, 263, 264, 265, 266, 400, 401, 269, 270, 271, - /* 900 */ 272, 273, 191, 192, 432, 277, 278, 279, 280, 281, - /* 910 */ 282, 283, 201, 202, 0, 420, 191, 447, 8, 9, - /* 920 */ 112, 20, 12, 13, 14, 15, 16, 216, 254, 218, - /* 930 */ 146, 497, 483, 484, 223, 127, 128, 129, 130, 131, - /* 940 */ 132, 133, 134, 135, 136, 511, 138, 139, 140, 141, - /* 950 */ 142, 143, 144, 308, 400, 401, 396, 47, 44, 112, - /* 960 */ 400, 116, 402, 252, 253, 254, 4, 256, 257, 258, - /* 970 */ 259, 260, 261, 262, 263, 264, 265, 266, 116, 254, - /* 980 */ 269, 270, 271, 272, 273, 23, 400, 401, 277, 278, - /* 990 */ 279, 280, 281, 282, 283, 12, 13, 515, 91, 517, - /* 1000 */ 22, 431, 386, 20, 68, 22, 420, 23, 386, 386, - /* 1010 */ 48, 49, 50, 193, 36, 231, 232, 400, 401, 36, - /* 1020 */ 432, 38, 431, 401, 204, 403, 116, 208, 77, 78, - /* 1030 */ 79, 440, 441, 49, 50, 84, 85, 86, 14, 15, - /* 1040 */ 16, 90, 0, 3, 400, 401, 95, 96, 97, 98, - /* 1050 */ 386, 68, 101, 431, 71, 119, 105, 106, 107, 108, - /* 1060 */ 82, 491, 492, 447, 420, 82, 159, 400, 401, 447, - /* 1070 */ 447, 449, 455, 400, 401, 432, 400, 401, 12, 13, - /* 1080 */ 526, 527, 528, 332, 530, 531, 20, 420, 22, 409, - /* 1090 */ 112, 184, 185, 420, 193, 112, 420, 431, 115, 116, - /* 1100 */ 400, 401, 36, 22, 38, 198, 386, 4, 428, 400, - /* 1110 */ 401, 447, 386, 47, 13, 479, 494, 36, 438, 497, - /* 1120 */ 420, 386, 19, 501, 502, 503, 504, 505, 506, 420, - /* 1130 */ 432, 509, 510, 511, 68, 152, 153, 71, 516, 20, - /* 1140 */ 518, 38, 400, 401, 522, 523, 400, 401, 82, 400, - /* 1150 */ 401, 0, 400, 401, 335, 254, 432, 54, 492, 400, - /* 1160 */ 401, 0, 420, 82, 61, 62, 420, 447, 386, 420, - /* 1170 */ 431, 68, 420, 447, 191, 192, 421, 386, 112, 420, - /* 1180 */ 441, 115, 447, 82, 201, 202, 431, 145, 146, 147, - /* 1190 */ 148, 149, 150, 151, 216, 416, 218, 442, 419, 216, - /* 1200 */ 13, 218, 0, 8, 9, 20, 223, 12, 13, 14, - /* 1210 */ 15, 16, 400, 401, 400, 401, 0, 114, 152, 153, - /* 1220 */ 8, 9, 119, 36, 12, 13, 14, 15, 16, 447, - /* 1230 */ 252, 253, 420, 418, 420, 252, 253, 254, 447, 256, - /* 1240 */ 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, - /* 1250 */ 1, 2, 269, 270, 271, 272, 273, 191, 192, 47, - /* 1260 */ 277, 278, 279, 280, 281, 282, 283, 201, 202, 8, - /* 1270 */ 9, 400, 401, 12, 13, 14, 15, 16, 387, 77, - /* 1280 */ 78, 79, 216, 20, 218, 409, 84, 85, 86, 223, - /* 1290 */ 33, 420, 90, 400, 401, 400, 401, 95, 96, 97, - /* 1300 */ 98, 405, 406, 101, 47, 386, 155, 105, 106, 107, - /* 1310 */ 108, 116, 193, 420, 438, 420, 405, 406, 252, 253, - /* 1320 */ 254, 170, 256, 257, 258, 259, 260, 261, 262, 263, - /* 1330 */ 264, 265, 266, 431, 459, 269, 270, 271, 272, 273, - /* 1340 */ 500, 439, 386, 277, 278, 279, 280, 281, 282, 283, - /* 1350 */ 12, 13, 450, 414, 415, 414, 415, 186, 20, 38, - /* 1360 */ 22, 444, 532, 386, 447, 116, 447, 386, 500, 529, - /* 1370 */ 330, 155, 473, 254, 36, 54, 38, 116, 401, 514, - /* 1380 */ 403, 386, 517, 386, 63, 64, 65, 66, 2, 68, - /* 1390 */ 386, 220, 36, 386, 8, 9, 13, 529, 12, 13, - /* 1400 */ 14, 15, 16, 447, 2, 244, 68, 33, 431, 71, - /* 1410 */ 8, 9, 386, 431, 12, 13, 14, 15, 16, 14, - /* 1420 */ 82, 47, 400, 401, 447, 20, 449, 20, 447, 530, - /* 1430 */ 389, 390, 450, 12, 13, 114, 386, 538, 82, 254, - /* 1440 */ 119, 20, 447, 22, 447, 386, 444, 565, 33, 447, - /* 1450 */ 112, 447, 33, 115, 447, 556, 557, 36, 473, 38, - /* 1460 */ 561, 562, 8, 9, 75, 82, 12, 13, 14, 15, - /* 1470 */ 16, 494, 444, 447, 497, 447, 33, 33, 501, 502, - /* 1480 */ 503, 504, 505, 506, 126, 33, 509, 510, 511, 68, - /* 1490 */ 152, 153, 71, 516, 234, 518, 236, 447, 120, 522, - /* 1500 */ 523, 123, 13, 82, 8, 9, 447, 186, 12, 13, - /* 1510 */ 14, 15, 16, 152, 153, 530, 195, 254, 36, 120, - /* 1520 */ 199, 200, 123, 538, 554, 36, 205, 206, 404, 191, - /* 1530 */ 192, 116, 120, 112, 120, 123, 115, 123, 180, 201, - /* 1540 */ 202, 556, 557, 47, 0, 224, 561, 562, 526, 527, - /* 1550 */ 528, 33, 530, 531, 216, 33, 218, 33, 13, 116, - /* 1560 */ 116, 223, 1, 2, 82, 33, 22, 0, 116, 533, - /* 1570 */ 116, 431, 33, 152, 153, 33, 33, 36, 51, 8, - /* 1580 */ 9, 36, 33, 12, 13, 14, 15, 16, 0, 22, - /* 1590 */ 252, 253, 254, 33, 256, 257, 258, 259, 260, 261, - /* 1600 */ 262, 263, 264, 265, 266, 0, 33, 269, 270, 271, - /* 1610 */ 272, 273, 191, 192, 0, 277, 278, 279, 280, 281, - /* 1620 */ 282, 283, 201, 202, 8, 9, 36, 22, 12, 13, - /* 1630 */ 14, 15, 16, 33, 116, 228, 22, 216, 116, 218, - /* 1640 */ 116, 252, 115, 33, 223, 33, 8, 9, 116, 547, - /* 1650 */ 12, 13, 14, 15, 16, 116, 8, 9, 116, 116, - /* 1660 */ 12, 13, 14, 15, 16, 116, 12, 13, 417, 33, - /* 1670 */ 12, 13, 33, 252, 253, 254, 116, 256, 257, 258, - /* 1680 */ 259, 260, 261, 262, 263, 264, 265, 266, 33, 116, - /* 1690 */ 269, 270, 271, 272, 273, 12, 13, 13, 277, 278, - /* 1700 */ 279, 280, 281, 282, 283, 18, 386, 20, 12, 13, - /* 1710 */ 33, 12, 13, 33, 27, 473, 116, 30, 12, 13, - /* 1720 */ 36, 401, 18, 33, 33, 38, 116, 23, 116, 12, - /* 1730 */ 13, 417, 116, 145, 146, 147, 148, 149, 150, 151, - /* 1740 */ 115, 54, 117, 56, 33, 33, 42, 43, 61, 62, - /* 1750 */ 46, 431, 116, 334, 116, 116, 12, 13, 399, 218, - /* 1760 */ 73, 57, 12, 13, 193, 12, 13, 447, 459, 449, - /* 1770 */ 36, 116, 530, 69, 70, 71, 72, 73, 12, 13, - /* 1780 */ 538, 553, 553, 553, 472, 553, 459, 495, 404, 401, - /* 1790 */ 446, 480, 459, 116, 459, 537, 116, 558, 556, 557, - /* 1800 */ 524, 114, 537, 561, 562, 459, 116, 116, 218, 540, - /* 1810 */ 419, 311, 54, 126, 494, 474, 82, 497, 496, 115, - /* 1820 */ 20, 501, 502, 503, 504, 505, 506, 116, 116, 509, - /* 1830 */ 510, 511, 400, 20, 514, 485, 516, 517, 518, 233, - /* 1840 */ 409, 490, 522, 523, 157, 158, 409, 160, 161, 162, - /* 1850 */ 163, 164, 165, 166, 167, 168, 169, 485, 154, 172, - /* 1860 */ 173, 174, 175, 176, 177, 178, 179, 214, 181, 182, - /* 1870 */ 183, 476, 400, 386, 187, 188, 189, 20, 401, 47, - /* 1880 */ 456, 194, 401, 456, 190, 400, 453, 401, 401, 113, - /* 1890 */ 403, 400, 456, 453, 453, 453, 413, 111, 400, 400, - /* 1900 */ 412, 110, 400, 411, 400, 400, 20, 393, 52, 397, - /* 1910 */ 393, 485, 208, 209, 210, 267, 397, 213, 431, 409, - /* 1920 */ 409, 20, 449, 20, 409, 402, 20, 402, 475, 409, - /* 1930 */ 226, 227, 20, 466, 447, 409, 449, 409, 20, 460, - /* 1940 */ 409, 386, 409, 239, 52, 409, 242, 400, 427, 245, - /* 1950 */ 246, 247, 248, 249, 389, 393, 401, 427, 403, 400, - /* 1960 */ 431, 389, 393, 447, 237, 431, 431, 489, 431, 431, - /* 1970 */ 115, 431, 20, 407, 222, 485, 221, 431, 484, 386, - /* 1980 */ 487, 494, 431, 431, 497, 431, 431, 431, 501, 502, - /* 1990 */ 503, 504, 505, 506, 401, 447, 509, 510, 511, 407, - /* 2000 */ 447, 400, 447, 516, 449, 518, 386, 449, 319, 522, - /* 2010 */ 523, 447, 308, 318, 546, 546, 207, 312, 548, 327, - /* 2020 */ 549, 401, 546, 403, 431, 545, 329, 543, 328, 307, - /* 2030 */ 306, 566, 482, 536, 336, 467, 535, 474, 481, 544, - /* 2040 */ 447, 467, 449, 333, 474, 331, 401, 20, 126, 494, - /* 2050 */ 541, 431, 497, 402, 309, 447, 501, 502, 503, 504, - /* 2060 */ 505, 506, 12, 13, 509, 510, 511, 447, 560, 449, - /* 2070 */ 407, 516, 22, 518, 386, 407, 500, 522, 523, 447, - /* 2080 */ 467, 447, 447, 199, 467, 464, 36, 494, 38, 401, - /* 2090 */ 497, 447, 407, 447, 501, 502, 503, 504, 505, 506, - /* 2100 */ 460, 115, 509, 510, 511, 521, 447, 199, 407, 516, - /* 2110 */ 461, 518, 386, 447, 494, 522, 523, 497, 68, 431, - /* 2120 */ 539, 501, 502, 503, 504, 505, 506, 401, 407, 509, - /* 2130 */ 510, 511, 82, 460, 559, 447, 516, 449, 518, 12, - /* 2140 */ 13, 426, 522, 523, 407, 115, 22, 401, 400, 22, - /* 2150 */ 447, 388, 436, 35, 447, 447, 386, 431, 407, 391, - /* 2160 */ 447, 392, 112, 36, 393, 38, 447, 447, 37, 40, - /* 2170 */ 447, 401, 447, 447, 394, 449, 447, 447, 447, 447, - /* 2180 */ 447, 408, 494, 447, 0, 497, 447, 447, 447, 501, - /* 2190 */ 502, 503, 504, 505, 506, 68, 447, 509, 510, 511, - /* 2200 */ 433, 431, 493, 447, 516, 477, 518, 447, 447, 447, - /* 2210 */ 522, 523, 423, 423, 433, 468, 423, 447, 384, 449, - /* 2220 */ 494, 486, 468, 497, 0, 0, 47, 501, 502, 503, - /* 2230 */ 504, 505, 506, 0, 36, 509, 510, 511, 386, 243, - /* 2240 */ 36, 36, 516, 36, 518, 243, 0, 36, 522, 523, - /* 2250 */ 36, 243, 36, 401, 0, 0, 243, 0, 36, 0, - /* 2260 */ 0, 22, 36, 0, 494, 36, 216, 497, 218, 238, - /* 2270 */ 0, 501, 502, 503, 504, 505, 506, 224, 0, 509, - /* 2280 */ 510, 511, 224, 431, 225, 218, 216, 0, 518, 212, - /* 2290 */ 211, 0, 522, 523, 0, 0, 0, 158, 51, 447, - /* 2300 */ 51, 449, 252, 253, 0, 36, 0, 0, 36, 0, - /* 2310 */ 54, 0, 51, 47, 0, 0, 0, 0, 51, 269, - /* 2320 */ 270, 386, 0, 0, 0, 0, 0, 277, 278, 279, - /* 2330 */ 280, 281, 282, 176, 36, 0, 401, 176, 0, 0, - /* 2340 */ 0, 0, 0, 216, 0, 218, 494, 0, 0, 497, - /* 2350 */ 0, 0, 0, 501, 502, 503, 504, 505, 506, 0, - /* 2360 */ 0, 509, 510, 511, 0, 0, 431, 0, 0, 0, - /* 2370 */ 518, 0, 0, 0, 522, 523, 0, 250, 251, 252, - /* 2380 */ 51, 47, 447, 0, 449, 0, 0, 0, 0, 0, - /* 2390 */ 0, 0, 22, 0, 158, 0, 269, 270, 157, 0, - /* 2400 */ 156, 0, 0, 22, 277, 278, 279, 280, 281, 282, - /* 2410 */ 386, 0, 0, 52, 22, 52, 36, 68, 0, 0, - /* 2420 */ 0, 68, 0, 68, 68, 401, 44, 0, 54, 494, - /* 2430 */ 36, 1, 497, 36, 0, 0, 501, 502, 503, 504, - /* 2440 */ 505, 506, 44, 36, 509, 510, 511, 386, 44, 19, - /* 2450 */ 54, 36, 0, 518, 54, 431, 47, 522, 523, 33, - /* 2460 */ 44, 51, 401, 14, 51, 51, 0, 44, 38, 45, - /* 2470 */ 0, 447, 0, 449, 0, 386, 0, 44, 207, 0, - /* 2480 */ 51, 0, 51, 53, 54, 0, 0, 0, 0, 36, - /* 2490 */ 401, 54, 431, 63, 64, 65, 66, 76, 68, 44, - /* 2500 */ 0, 36, 54, 44, 0, 36, 44, 0, 447, 36, - /* 2510 */ 449, 54, 54, 0, 0, 44, 0, 0, 494, 0, - /* 2520 */ 431, 497, 0, 0, 22, 501, 502, 503, 504, 505, - /* 2530 */ 506, 125, 22, 509, 510, 511, 447, 36, 449, 36, - /* 2540 */ 123, 36, 518, 0, 114, 36, 0, 523, 36, 119, - /* 2550 */ 22, 36, 22, 22, 36, 494, 36, 33, 497, 33, - /* 2560 */ 471, 36, 501, 502, 503, 504, 505, 506, 36, 508, - /* 2570 */ 509, 510, 511, 36, 36, 36, 0, 22, 0, 22, - /* 2580 */ 150, 386, 0, 494, 36, 56, 497, 0, 0, 36, - /* 2590 */ 501, 502, 503, 504, 505, 506, 401, 0, 509, 510, - /* 2600 */ 511, 36, 0, 36, 0, 22, 386, 36, 36, 20, - /* 2610 */ 36, 116, 115, 0, 115, 51, 0, 36, 193, 0, - /* 2620 */ 22, 401, 22, 0, 0, 195, 431, 197, 3, 193, - /* 2630 */ 200, 223, 229, 228, 193, 205, 193, 199, 193, 33, - /* 2640 */ 313, 36, 447, 203, 449, 203, 36, 219, 115, 313, - /* 2650 */ 116, 431, 116, 52, 224, 115, 115, 113, 111, 52, - /* 2660 */ 33, 116, 33, 33, 33, 116, 115, 447, 116, 449, - /* 2670 */ 116, 115, 51, 115, 115, 386, 82, 51, 33, 36, - /* 2680 */ 3, 115, 33, 36, 116, 116, 36, 36, 36, 494, - /* 2690 */ 401, 471, 497, 36, 36, 116, 501, 502, 503, 504, - /* 2700 */ 505, 506, 116, 33, 509, 510, 511, 51, 0, 0, - /* 2710 */ 51, 115, 44, 0, 494, 116, 44, 497, 386, 116, - /* 2720 */ 431, 501, 502, 503, 504, 505, 506, 115, 0, 509, - /* 2730 */ 510, 511, 115, 401, 116, 115, 447, 115, 449, 44, - /* 2740 */ 386, 297, 200, 33, 2, 313, 196, 552, 113, 285, - /* 2750 */ 113, 22, 116, 115, 115, 401, 196, 195, 252, 115, - /* 2760 */ 471, 386, 116, 431, 116, 51, 51, 22, 115, 115, - /* 2770 */ 0, 196, 0, 22, 44, 115, 401, 115, 115, 447, - /* 2780 */ 115, 449, 115, 494, 115, 431, 497, 116, 115, 115, - /* 2790 */ 501, 502, 503, 504, 505, 506, 115, 115, 509, 510, - /* 2800 */ 511, 447, 116, 449, 115, 117, 431, 115, 118, 51, - /* 2810 */ 116, 115, 115, 115, 115, 22, 255, 126, 116, 229, - /* 2820 */ 36, 36, 447, 116, 449, 36, 494, 115, 36, 497, - /* 2830 */ 36, 115, 36, 501, 502, 503, 504, 505, 506, 116, - /* 2840 */ 116, 509, 510, 511, 36, 33, 36, 116, 494, 116, - /* 2850 */ 115, 497, 115, 115, 137, 501, 502, 503, 504, 505, - /* 2860 */ 506, 22, 137, 509, 510, 511, 76, 22, 36, 494, - /* 2870 */ 75, 137, 497, 137, 36, 109, 501, 502, 503, 504, - /* 2880 */ 505, 506, 386, 36, 509, 510, 511, 555, 513, 36, - /* 2890 */ 36, 36, 36, 36, 36, 36, 36, 401, 82, 82, - /* 2900 */ 109, 33, 36, 36, 22, 36, 36, 386, 36, 82, - /* 2910 */ 36, 36, 36, 36, 36, 36, 22, 36, 564, 0, - /* 2920 */ 36, 0, 401, 36, 44, 54, 0, 431, 36, 44, - /* 2930 */ 0, 36, 44, 44, 0, 36, 0, 54, 22, 36, - /* 2940 */ 54, 0, 22, 447, 54, 449, 33, 36, 36, 386, - /* 2950 */ 22, 22, 431, 21, 567, 22, 21, 20, 567, 567, - /* 2960 */ 567, 567, 567, 567, 401, 567, 567, 471, 447, 567, - /* 2970 */ 449, 567, 567, 567, 567, 567, 567, 567, 567, 567, - /* 2980 */ 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, - /* 2990 */ 494, 567, 471, 497, 431, 567, 567, 501, 502, 503, - /* 3000 */ 504, 505, 506, 567, 567, 509, 510, 511, 567, 567, - /* 3010 */ 447, 567, 449, 567, 386, 494, 567, 567, 497, 567, - /* 3020 */ 567, 567, 501, 502, 503, 504, 505, 506, 567, 401, - /* 3030 */ 509, 510, 511, 567, 471, 567, 567, 567, 567, 567, - /* 3040 */ 567, 386, 567, 567, 567, 567, 567, 567, 567, 567, - /* 3050 */ 567, 567, 567, 567, 567, 567, 401, 494, 567, 431, - /* 3060 */ 497, 567, 567, 567, 501, 502, 503, 504, 505, 506, - /* 3070 */ 567, 567, 509, 510, 511, 447, 567, 449, 567, 386, - /* 3080 */ 567, 567, 567, 567, 567, 567, 431, 567, 567, 567, - /* 3090 */ 567, 567, 567, 567, 401, 567, 567, 567, 567, 471, - /* 3100 */ 567, 567, 447, 567, 449, 567, 567, 567, 386, 567, - /* 3110 */ 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, - /* 3120 */ 567, 567, 494, 401, 431, 497, 567, 567, 567, 501, - /* 3130 */ 502, 503, 504, 505, 506, 567, 567, 509, 510, 511, - /* 3140 */ 447, 567, 449, 567, 567, 567, 567, 386, 567, 494, - /* 3150 */ 567, 567, 497, 431, 567, 567, 501, 502, 503, 504, - /* 3160 */ 505, 506, 401, 567, 509, 510, 511, 567, 567, 447, - /* 3170 */ 567, 449, 567, 386, 567, 567, 567, 567, 567, 567, - /* 3180 */ 567, 567, 567, 567, 567, 567, 567, 494, 401, 567, - /* 3190 */ 497, 567, 431, 567, 501, 502, 503, 504, 505, 506, - /* 3200 */ 567, 567, 509, 510, 511, 567, 567, 567, 447, 567, - /* 3210 */ 449, 567, 567, 567, 567, 567, 494, 567, 431, 497, - /* 3220 */ 567, 567, 567, 501, 502, 503, 504, 505, 506, 567, - /* 3230 */ 567, 509, 510, 511, 447, 567, 449, 567, 386, 567, - /* 3240 */ 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, - /* 3250 */ 567, 567, 567, 401, 567, 494, 567, 567, 497, 386, - /* 3260 */ 567, 567, 501, 502, 503, 504, 505, 506, 567, 567, - /* 3270 */ 509, 510, 511, 567, 401, 567, 567, 567, 567, 567, - /* 3280 */ 567, 494, 567, 431, 497, 567, 567, 567, 501, 502, - /* 3290 */ 503, 504, 505, 506, 567, 567, 509, 510, 511, 447, - /* 3300 */ 567, 449, 567, 567, 431, 567, 567, 567, 567, 567, - /* 3310 */ 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, - /* 3320 */ 447, 567, 449, 567, 567, 567, 567, 567, 567, 567, - /* 3330 */ 567, 567, 567, 567, 567, 567, 386, 567, 567, 567, - /* 3340 */ 567, 567, 567, 567, 567, 567, 494, 567, 567, 497, - /* 3350 */ 567, 401, 567, 501, 502, 503, 504, 505, 506, 567, - /* 3360 */ 567, 509, 510, 511, 567, 567, 567, 494, 567, 567, - /* 3370 */ 497, 567, 567, 567, 501, 502, 503, 504, 505, 506, - /* 3380 */ 386, 431, 509, 510, 511, 567, 567, 567, 567, 567, - /* 3390 */ 567, 567, 567, 567, 567, 401, 567, 447, 567, 449, - /* 3400 */ 567, 386, 567, 567, 567, 567, 567, 567, 567, 567, - /* 3410 */ 567, 567, 567, 567, 567, 567, 401, 567, 567, 567, - /* 3420 */ 567, 386, 567, 567, 567, 431, 567, 567, 567, 567, - /* 3430 */ 567, 567, 567, 567, 567, 567, 401, 567, 567, 567, - /* 3440 */ 567, 447, 567, 449, 494, 567, 431, 497, 567, 567, - /* 3450 */ 567, 501, 502, 503, 504, 505, 506, 567, 567, 509, - /* 3460 */ 510, 511, 447, 567, 449, 567, 431, 567, 567, 567, - /* 3470 */ 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, - /* 3480 */ 567, 567, 447, 567, 449, 567, 386, 567, 494, 567, - /* 3490 */ 567, 497, 567, 567, 567, 501, 502, 503, 504, 505, - /* 3500 */ 506, 401, 567, 509, 510, 511, 567, 567, 567, 494, - /* 3510 */ 567, 567, 497, 567, 567, 567, 501, 502, 503, 504, - /* 3520 */ 505, 506, 567, 567, 509, 510, 511, 386, 567, 494, - /* 3530 */ 567, 431, 497, 567, 567, 567, 501, 502, 503, 504, - /* 3540 */ 505, 506, 401, 567, 509, 510, 511, 447, 567, 449, - /* 3550 */ 567, 386, 567, 567, 567, 567, 567, 567, 567, 567, - /* 3560 */ 567, 567, 567, 567, 567, 567, 401, 567, 567, 567, - /* 3570 */ 567, 567, 431, 567, 567, 567, 567, 567, 567, 567, - /* 3580 */ 567, 567, 567, 567, 567, 567, 567, 567, 447, 567, - /* 3590 */ 449, 567, 567, 567, 494, 567, 431, 497, 567, 567, - /* 3600 */ 567, 501, 502, 503, 504, 505, 506, 567, 567, 509, - /* 3610 */ 510, 511, 447, 567, 449, 567, 567, 567, 386, 567, - /* 3620 */ 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, - /* 3630 */ 567, 567, 567, 401, 567, 494, 567, 567, 497, 567, - /* 3640 */ 386, 567, 501, 502, 503, 504, 505, 506, 567, 567, - /* 3650 */ 509, 510, 511, 567, 567, 401, 567, 567, 567, 494, - /* 3660 */ 567, 567, 497, 431, 567, 567, 501, 502, 503, 504, - /* 3670 */ 505, 506, 567, 567, 509, 510, 511, 567, 567, 447, - /* 3680 */ 567, 449, 567, 386, 567, 431, 567, 567, 567, 567, - /* 3690 */ 567, 567, 567, 567, 567, 567, 567, 567, 401, 567, - /* 3700 */ 567, 447, 567, 449, 567, 567, 567, 386, 567, 567, - /* 3710 */ 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, - /* 3720 */ 567, 567, 401, 567, 567, 567, 494, 567, 431, 497, - /* 3730 */ 567, 567, 567, 501, 502, 503, 504, 505, 506, 567, - /* 3740 */ 567, 509, 510, 511, 447, 567, 449, 567, 494, 567, - /* 3750 */ 567, 497, 431, 567, 567, 501, 502, 503, 504, 505, - /* 3760 */ 506, 567, 567, 509, 510, 511, 567, 567, 447, 567, - /* 3770 */ 449, 567, 567, 567, 567, 567, 567, 567, 567, 567, - /* 3780 */ 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, - /* 3790 */ 567, 494, 567, 567, 497, 567, 567, 567, 501, 502, - /* 3800 */ 503, 504, 505, 506, 567, 567, 509, 510, 511, 567, - /* 3810 */ 567, 567, 567, 567, 567, 494, 567, 567, 497, 567, - /* 3820 */ 567, 567, 501, 502, 503, 504, 505, 506, 386, 567, - /* 3830 */ 509, 510, 511, 567, 567, 567, 567, 567, 567, 567, - /* 3840 */ 567, 567, 567, 401, 567, 567, 567, 386, 567, 567, - /* 3850 */ 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, - /* 3860 */ 567, 567, 401, 567, 567, 567, 567, 567, 567, 386, - /* 3870 */ 567, 567, 567, 431, 567, 567, 567, 567, 567, 567, - /* 3880 */ 567, 567, 567, 567, 401, 567, 567, 567, 567, 447, - /* 3890 */ 567, 449, 431, 567, 567, 567, 386, 567, 567, 567, - /* 3900 */ 567, 567, 567, 567, 567, 567, 567, 567, 447, 567, - /* 3910 */ 449, 401, 567, 567, 431, 567, 567, 567, 567, 567, - /* 3920 */ 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, - /* 3930 */ 447, 567, 449, 567, 386, 567, 494, 567, 567, 497, - /* 3940 */ 567, 431, 567, 501, 502, 503, 504, 505, 506, 401, - /* 3950 */ 567, 509, 510, 511, 567, 494, 567, 447, 497, 449, - /* 3960 */ 567, 567, 501, 502, 503, 504, 505, 506, 567, 567, - /* 3970 */ 509, 510, 511, 567, 567, 567, 567, 494, 567, 431, - /* 3980 */ 497, 567, 567, 386, 501, 502, 503, 504, 505, 506, - /* 3990 */ 567, 567, 509, 510, 511, 447, 567, 449, 401, 567, - /* 4000 */ 567, 567, 567, 567, 494, 567, 567, 497, 567, 567, - /* 4010 */ 567, 501, 502, 503, 504, 505, 506, 567, 567, 509, - /* 4020 */ 510, 511, 386, 567, 567, 567, 567, 567, 431, 567, - /* 4030 */ 567, 567, 567, 567, 567, 567, 567, 401, 567, 567, - /* 4040 */ 567, 567, 494, 567, 447, 497, 449, 567, 567, 501, - /* 4050 */ 502, 503, 504, 505, 506, 567, 567, 509, 510, 511, - /* 4060 */ 567, 567, 567, 567, 567, 567, 386, 431, 567, 567, - /* 4070 */ 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, - /* 4080 */ 567, 401, 567, 447, 567, 449, 567, 567, 567, 567, - /* 4090 */ 386, 494, 567, 567, 497, 567, 567, 567, 501, 502, - /* 4100 */ 503, 504, 505, 506, 567, 401, 509, 510, 511, 386, - /* 4110 */ 567, 431, 567, 567, 567, 567, 567, 567, 567, 567, - /* 4120 */ 567, 567, 567, 567, 401, 567, 567, 447, 567, 449, - /* 4130 */ 494, 567, 567, 497, 567, 431, 567, 501, 502, 503, - /* 4140 */ 504, 505, 506, 567, 567, 509, 510, 511, 567, 567, - /* 4150 */ 567, 447, 567, 449, 431, 567, 567, 567, 567, 567, - /* 4160 */ 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, - /* 4170 */ 447, 567, 449, 567, 494, 567, 567, 497, 386, 567, - /* 4180 */ 567, 501, 502, 503, 504, 505, 506, 567, 567, 509, - /* 4190 */ 510, 511, 567, 401, 567, 567, 567, 567, 494, 567, - /* 4200 */ 567, 497, 567, 567, 567, 501, 502, 503, 504, 505, - /* 4210 */ 506, 567, 567, 509, 510, 511, 567, 494, 567, 567, - /* 4220 */ 497, 567, 567, 431, 501, 502, 503, 504, 505, 506, - /* 4230 */ 567, 567, 509, 510, 511, 567, 567, 567, 567, 447, - /* 4240 */ 567, 449, 567, 567, 567, 567, 567, 567, 567, 567, - /* 4250 */ 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, - /* 4260 */ 386, 567, 567, 567, 567, 567, 567, 567, 567, 567, - /* 4270 */ 567, 567, 567, 567, 567, 401, 567, 567, 567, 567, - /* 4280 */ 567, 567, 567, 567, 567, 567, 494, 567, 567, 497, - /* 4290 */ 567, 567, 567, 501, 502, 503, 504, 505, 506, 567, - /* 4300 */ 567, 509, 510, 511, 567, 431, 567, 567, 567, 567, - /* 4310 */ 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, - /* 4320 */ 567, 447, 567, 449, 567, 567, 567, 567, 567, 567, - /* 4330 */ 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, - /* 4340 */ 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, - /* 4350 */ 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, - /* 4360 */ 567, 567, 567, 567, 567, 567, 567, 567, 494, 567, - /* 4370 */ 567, 497, 567, 567, 567, 501, 502, 503, 504, 505, - /* 4380 */ 506, 567, 567, 509, 510, 511, 383, 383, 383, 383, - /* 4390 */ 383, 383, 383, 383, 383, 383, 383, 383, 383, 383, - /* 4400 */ 383, 383, 383, 383, 383, 383, 383, 383, 383, 383, - /* 4410 */ 383, 383, 383, 383, 383, 383, 383, 383, 383, 383, - /* 4420 */ 383, 383, 383, 383, 383, 383, 383, 383, 383, 383, - /* 4430 */ 383, 383, 383, 383, 383, 383, 383, 383, 383, 383, - /* 4440 */ 383, 383, 383, 383, 383, 383, 383, 383, 383, 383, - /* 4450 */ 383, 383, 383, 383, 383, 383, 383, 383, 383, 383, - /* 4460 */ 383, 383, 383, 383, 383, 383, 383, 383, 383, 383, - /* 4470 */ 383, 383, 383, 383, 383, 383, 383, 383, 383, 383, - /* 4480 */ 383, 383, 383, 383, 383, 383, 383, 383, 383, 383, - /* 4490 */ 383, 383, 383, 383, 383, 383, 383, 383, 383, 383, - /* 4500 */ 383, 383, 383, 383, 383, 383, 383, 383, 383, 383, - /* 4510 */ 383, 383, 383, 383, 383, 383, 383, 383, 383, 383, - /* 4520 */ 383, 383, 383, 383, 383, 383, 383, 383, 383, 383, - /* 4530 */ 383, 383, 383, 383, 383, 383, 383, 383, 383, 383, - /* 4540 */ 383, 383, 383, 383, 383, 383, 383, 383, 383, 383, - /* 4550 */ 383, 383, 383, 383, 383, 383, 383, 383, 383, 383, - /* 4560 */ 383, 383, 383, 383, 383, 383, 383, 383, 383, 383, - /* 4570 */ 383, 383, 383, 383, 383, 383, 383, 383, 383, 383, - /* 4580 */ 383, 383, 383, 383, 383, 383, 383, 383, 383, 383, - /* 4590 */ 383, 383, 383, 383, 383, 383, 383, 383, 383, 383, - /* 4600 */ 383, 383, 383, 383, 383, 383, 383, 383, 383, 383, - /* 4610 */ 383, 383, 383, 383, 383, 383, 383, 383, 383, 383, - /* 4620 */ 383, 383, 383, 383, 383, 383, 383, 383, 383, 383, - /* 4630 */ 383, 383, 383, 383, 383, 383, 383, 383, 383, 383, - /* 4640 */ 383, 383, 383, 383, 383, 383, 383, 383, 383, 383, - /* 4650 */ 383, 383, 383, 383, 383, 383, 383, 383, 383, 383, - /* 4660 */ 383, 383, 383, 383, 383, 383, 383, 383, 383, 383, - /* 4670 */ 383, 383, 383, 383, 383, 383, 383, 383, 383, 383, - /* 4680 */ 383, 383, 383, 383, 383, 383, 383, 383, 383, 383, - /* 4690 */ 383, 383, 383, 383, 383, 383, 383, 383, 383, 383, - /* 4700 */ 383, 383, 383, 383, 383, 383, 383, 383, 383, 383, - /* 4710 */ 383, 383, 383, 383, 383, 383, 383, 383, 383, 383, - /* 4720 */ 383, 383, 383, 383, 383, 383, 383, 383, 383, 383, - /* 4730 */ 383, 383, 383, 383, 383, 383, 383, 383, 383, 383, - /* 4740 */ 383, 383, 383, 383, 383, 383, 383, 383, 383, 383, - /* 4750 */ 383, 383, 383, 383, 383, 383, 383, 383, 383, 383, - /* 4760 */ 383, 383, 383, 383, 383, 383, 383, 383, 383, + /* 140 */ 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, + /* 150 */ 111, 500, 118, 61, 503, 155, 156, 416, 507, 508, + /* 160 */ 509, 510, 511, 512, 118, 424, 515, 516, 517, 20, + /* 170 */ 536, 21, 20, 522, 22, 524, 20, 71, 544, 528, + /* 180 */ 529, 532, 533, 534, 118, 536, 537, 37, 36, 39, + /* 190 */ 40, 41, 42, 544, 194, 195, 562, 563, 391, 548, + /* 200 */ 393, 567, 568, 3, 204, 205, 451, 556, 427, 454, + /* 210 */ 455, 562, 563, 61, 194, 195, 567, 568, 437, 219, + /* 220 */ 20, 221, 199, 117, 20, 44, 226, 14, 122, 448, + /* 230 */ 8, 9, 20, 20, 12, 13, 14, 15, 16, 57, + /* 240 */ 118, 531, 532, 533, 534, 4, 536, 537, 66, 196, + /* 250 */ 71, 69, 70, 406, 254, 255, 256, 392, 258, 259, + /* 260 */ 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, + /* 270 */ 270, 271, 407, 20, 274, 275, 276, 277, 278, 279, + /* 280 */ 280, 281, 282, 283, 284, 285, 286, 287, 288, 12, + /* 290 */ 13, 14, 406, 392, 18, 189, 20, 20, 118, 22, + /* 300 */ 78, 122, 437, 27, 457, 458, 30, 460, 407, 256, + /* 310 */ 463, 155, 156, 36, 38, 38, 406, 407, 453, 119, + /* 320 */ 455, 0, 8, 9, 120, 256, 12, 13, 14, 15, + /* 330 */ 16, 431, 56, 57, 0, 59, 426, 437, 437, 158, + /* 340 */ 64, 65, 319, 320, 321, 322, 323, 313, 71, 455, + /* 350 */ 128, 74, 76, 20, 453, 78, 455, 471, 472, 313, + /* 360 */ 204, 205, 85, 469, 464, 500, 20, 392, 503, 475, + /* 370 */ 476, 118, 507, 508, 509, 510, 511, 512, 513, 313, + /* 380 */ 515, 516, 517, 518, 519, 148, 149, 150, 151, 152, + /* 390 */ 153, 154, 115, 117, 422, 118, 196, 425, 218, 20, + /* 400 */ 220, 500, 254, 438, 503, 129, 455, 194, 507, 508, + /* 410 */ 509, 510, 511, 512, 449, 193, 515, 516, 517, 20, + /* 420 */ 469, 520, 436, 522, 523, 524, 475, 476, 453, 528, + /* 430 */ 529, 251, 155, 156, 52, 313, 160, 161, 452, 163, + /* 440 */ 164, 165, 166, 167, 168, 169, 170, 171, 172, 406, + /* 450 */ 407, 175, 176, 177, 178, 179, 180, 181, 182, 402, + /* 460 */ 184, 185, 186, 406, 20, 408, 190, 191, 192, 256, + /* 470 */ 437, 194, 195, 197, 326, 327, 328, 329, 330, 331, + /* 480 */ 332, 204, 205, 302, 303, 304, 305, 306, 307, 308, + /* 490 */ 309, 310, 158, 313, 272, 174, 219, 464, 221, 2, + /* 500 */ 179, 155, 156, 226, 461, 8, 9, 173, 187, 12, + /* 510 */ 13, 14, 15, 16, 292, 293, 294, 295, 296, 297, + /* 520 */ 298, 299, 300, 301, 4, 211, 306, 307, 308, 309, + /* 530 */ 310, 254, 255, 256, 392, 258, 259, 260, 261, 262, + /* 540 */ 263, 264, 265, 266, 267, 268, 269, 270, 271, 407, + /* 550 */ 536, 274, 275, 276, 277, 278, 315, 406, 544, 282, + /* 560 */ 283, 284, 285, 286, 287, 288, 12, 13, 392, 158, + /* 570 */ 22, 407, 12, 13, 20, 196, 22, 563, 196, 437, + /* 580 */ 437, 567, 568, 407, 36, 14, 525, 526, 115, 207, + /* 590 */ 36, 20, 38, 20, 402, 453, 36, 455, 406, 456, + /* 600 */ 408, 437, 4, 130, 131, 132, 133, 134, 135, 136, + /* 610 */ 137, 138, 139, 437, 141, 142, 143, 144, 145, 146, + /* 620 */ 147, 23, 438, 439, 406, 71, 437, 506, 74, 453, + /* 630 */ 231, 455, 78, 85, 437, 406, 407, 448, 118, 85, + /* 640 */ 489, 490, 500, 446, 447, 503, 48, 49, 50, 507, + /* 650 */ 508, 509, 510, 511, 512, 341, 535, 515, 516, 517, + /* 660 */ 406, 407, 77, 115, 522, 437, 524, 411, 412, 115, + /* 670 */ 528, 529, 118, 509, 446, 447, 500, 406, 407, 503, + /* 680 */ 426, 392, 20, 507, 508, 509, 510, 511, 512, 435, + /* 690 */ 461, 515, 516, 517, 497, 498, 407, 426, 556, 0, + /* 700 */ 524, 14, 15, 16, 528, 529, 435, 489, 490, 155, + /* 710 */ 156, 406, 407, 302, 303, 304, 305, 306, 307, 308, + /* 720 */ 309, 310, 36, 8, 9, 77, 437, 12, 13, 14, + /* 730 */ 15, 16, 80, 81, 82, 406, 407, 1, 2, 87, + /* 740 */ 88, 89, 453, 129, 455, 93, 36, 36, 194, 195, + /* 750 */ 98, 99, 100, 101, 158, 289, 104, 76, 204, 205, + /* 760 */ 108, 109, 110, 111, 506, 194, 461, 219, 85, 221, + /* 770 */ 454, 455, 2, 219, 22, 221, 77, 20, 8, 9, + /* 780 */ 226, 221, 12, 13, 14, 15, 16, 440, 36, 500, + /* 790 */ 443, 406, 503, 535, 20, 85, 507, 508, 509, 510, + /* 800 */ 511, 512, 254, 255, 515, 516, 517, 389, 254, 255, + /* 810 */ 256, 392, 258, 259, 260, 261, 262, 263, 264, 265, + /* 820 */ 266, 267, 268, 269, 270, 271, 407, 256, 274, 275, + /* 830 */ 276, 277, 278, 313, 119, 392, 282, 283, 284, 285, + /* 840 */ 286, 287, 288, 289, 12, 13, 557, 558, 406, 407, + /* 850 */ 503, 466, 20, 468, 22, 119, 437, 129, 196, 22, + /* 860 */ 115, 532, 533, 534, 517, 536, 537, 115, 36, 506, + /* 870 */ 38, 189, 453, 36, 455, 130, 131, 132, 133, 134, + /* 880 */ 135, 136, 137, 138, 139, 437, 141, 142, 143, 144, + /* 890 */ 145, 146, 147, 445, 392, 214, 453, 479, 535, 303, + /* 900 */ 304, 305, 484, 71, 456, 223, 74, 221, 415, 437, + /* 910 */ 78, 62, 63, 406, 407, 23, 149, 85, 256, 500, + /* 920 */ 440, 413, 503, 242, 243, 94, 507, 508, 509, 510, + /* 930 */ 511, 512, 221, 426, 515, 516, 517, 444, 252, 253, + /* 940 */ 44, 49, 50, 524, 392, 406, 407, 115, 529, 441, + /* 950 */ 118, 440, 115, 196, 536, 453, 485, 406, 407, 407, + /* 960 */ 479, 409, 544, 252, 253, 426, 18, 71, 194, 497, + /* 970 */ 498, 23, 12, 13, 532, 533, 534, 426, 536, 537, + /* 980 */ 562, 563, 22, 503, 536, 567, 568, 155, 156, 437, + /* 990 */ 42, 43, 544, 162, 46, 392, 36, 517, 38, 411, + /* 1000 */ 412, 234, 235, 55, 0, 453, 438, 455, 60, 392, + /* 1010 */ 562, 563, 438, 256, 503, 567, 568, 536, 187, 188, + /* 1020 */ 72, 73, 74, 75, 76, 544, 194, 195, 517, 413, + /* 1030 */ 256, 71, 201, 33, 8, 9, 204, 205, 12, 13, + /* 1040 */ 14, 15, 16, 562, 563, 85, 430, 47, 567, 568, + /* 1050 */ 392, 219, 500, 221, 415, 503, 453, 441, 226, 507, + /* 1060 */ 508, 509, 510, 511, 512, 22, 118, 515, 516, 517, + /* 1070 */ 453, 420, 421, 434, 522, 115, 524, 149, 150, 36, + /* 1080 */ 528, 529, 154, 444, 479, 3, 254, 255, 256, 484, + /* 1090 */ 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, + /* 1100 */ 268, 269, 270, 271, 13, 157, 274, 275, 276, 277, + /* 1110 */ 278, 453, 420, 421, 282, 283, 284, 285, 286, 287, + /* 1120 */ 288, 12, 13, 14, 406, 407, 392, 392, 85, 20, + /* 1130 */ 392, 22, 8, 9, 395, 396, 12, 13, 14, 15, + /* 1140 */ 16, 536, 150, 437, 426, 36, 154, 38, 424, 544, + /* 1150 */ 4, 445, 148, 149, 150, 151, 152, 153, 154, 211, + /* 1160 */ 212, 213, 456, 33, 216, 19, 437, 562, 563, 0, + /* 1170 */ 392, 47, 567, 568, 445, 438, 85, 229, 230, 219, + /* 1180 */ 71, 221, 428, 74, 38, 456, 432, 453, 453, 241, + /* 1190 */ 0, 453, 244, 438, 85, 247, 248, 249, 250, 251, + /* 1200 */ 432, 8, 9, 57, 438, 12, 13, 14, 15, 16, + /* 1210 */ 64, 65, 406, 407, 254, 255, 289, 71, 291, 392, + /* 1220 */ 228, 392, 438, 437, 115, 233, 33, 118, 236, 437, + /* 1230 */ 238, 453, 426, 447, 274, 275, 407, 445, 409, 33, + /* 1240 */ 406, 407, 282, 283, 284, 285, 286, 287, 456, 406, + /* 1250 */ 407, 8, 9, 406, 407, 12, 13, 14, 15, 16, + /* 1260 */ 426, 313, 494, 117, 155, 156, 437, 20, 122, 426, + /* 1270 */ 80, 81, 82, 426, 20, 0, 33, 87, 88, 89, + /* 1280 */ 453, 437, 453, 93, 455, 406, 407, 392, 98, 99, + /* 1290 */ 100, 101, 571, 392, 104, 406, 407, 437, 108, 109, + /* 1300 */ 110, 111, 0, 194, 195, 426, 406, 407, 521, 521, + /* 1310 */ 523, 523, 119, 204, 205, 426, 456, 148, 149, 150, + /* 1320 */ 151, 152, 153, 154, 22, 119, 426, 392, 219, 500, + /* 1330 */ 221, 193, 503, 13, 33, 226, 507, 508, 509, 510, + /* 1340 */ 511, 512, 498, 393, 515, 516, 517, 450, 453, 450, + /* 1350 */ 453, 522, 453, 524, 453, 392, 148, 528, 529, 392, + /* 1360 */ 152, 538, 119, 254, 255, 256, 392, 258, 259, 260, + /* 1370 */ 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, + /* 1380 */ 271, 407, 0, 274, 275, 276, 277, 278, 453, 406, + /* 1390 */ 407, 282, 283, 284, 285, 286, 287, 288, 12, 13, + /* 1400 */ 392, 406, 407, 406, 407, 85, 20, 0, 22, 426, + /* 1410 */ 272, 437, 406, 407, 392, 407, 453, 409, 336, 392, + /* 1420 */ 453, 426, 36, 426, 38, 520, 44, 453, 523, 455, + /* 1430 */ 292, 392, 426, 8, 9, 406, 407, 12, 13, 14, + /* 1440 */ 15, 16, 8, 9, 427, 437, 12, 13, 14, 15, + /* 1450 */ 16, 55, 406, 407, 437, 426, 14, 71, 406, 407, + /* 1460 */ 74, 453, 20, 455, 57, 448, 450, 406, 407, 453, + /* 1470 */ 340, 85, 426, 0, 500, 453, 465, 503, 426, 33, + /* 1480 */ 453, 507, 508, 509, 510, 511, 512, 426, 514, 515, + /* 1490 */ 516, 517, 453, 47, 129, 0, 123, 123, 392, 126, + /* 1500 */ 126, 115, 33, 256, 118, 119, 155, 156, 500, 0, + /* 1510 */ 256, 503, 13, 407, 36, 507, 508, 509, 510, 511, + /* 1520 */ 512, 246, 33, 515, 516, 517, 123, 0, 33, 126, + /* 1530 */ 522, 123, 524, 33, 126, 36, 528, 529, 0, 13, + /* 1540 */ 33, 155, 156, 437, 119, 0, 33, 560, 183, 22, + /* 1550 */ 8, 9, 33, 119, 12, 13, 14, 15, 16, 453, + /* 1560 */ 22, 455, 36, 85, 1, 2, 78, 22, 8, 9, + /* 1570 */ 12, 13, 12, 13, 14, 15, 16, 36, 8, 9, + /* 1580 */ 194, 195, 12, 13, 14, 15, 16, 553, 119, 47, + /* 1590 */ 204, 205, 8, 9, 33, 33, 12, 13, 14, 15, + /* 1600 */ 16, 33, 33, 12, 13, 219, 500, 221, 119, 503, + /* 1610 */ 33, 539, 226, 507, 508, 509, 510, 511, 512, 119, + /* 1620 */ 33, 515, 516, 517, 51, 36, 119, 410, 522, 437, + /* 1630 */ 524, 158, 119, 237, 528, 529, 12, 13, 119, 338, + /* 1640 */ 254, 255, 256, 33, 258, 259, 260, 261, 262, 263, + /* 1650 */ 264, 265, 266, 267, 268, 269, 270, 271, 33, 423, + /* 1660 */ 274, 275, 276, 277, 278, 33, 33, 158, 282, 283, + /* 1670 */ 284, 285, 286, 287, 288, 12, 13, 392, 33, 119, + /* 1680 */ 119, 119, 479, 20, 423, 22, 33, 119, 119, 119, + /* 1690 */ 33, 118, 407, 118, 409, 120, 119, 405, 273, 36, + /* 1700 */ 33, 38, 0, 119, 12, 13, 119, 8, 9, 465, + /* 1710 */ 47, 12, 13, 14, 15, 16, 12, 13, 36, 8, + /* 1720 */ 9, 559, 437, 12, 13, 14, 15, 16, 392, 119, + /* 1730 */ 12, 13, 12, 13, 71, 12, 13, 74, 453, 536, + /* 1740 */ 455, 33, 254, 407, 119, 12, 13, 544, 85, 12, + /* 1750 */ 13, 119, 119, 12, 13, 36, 13, 13, 47, 559, + /* 1760 */ 58, 559, 221, 33, 119, 562, 563, 85, 33, 33, + /* 1770 */ 567, 568, 119, 437, 478, 33, 119, 559, 115, 36, + /* 1780 */ 36, 118, 465, 501, 452, 500, 119, 410, 503, 453, + /* 1790 */ 407, 455, 507, 508, 509, 510, 511, 512, 486, 465, + /* 1800 */ 515, 516, 517, 465, 85, 543, 543, 522, 530, 524, + /* 1810 */ 221, 546, 564, 528, 529, 465, 8, 9, 155, 156, + /* 1820 */ 12, 13, 14, 15, 16, 425, 316, 119, 480, 57, + /* 1830 */ 119, 502, 20, 406, 20, 491, 500, 236, 496, 503, + /* 1840 */ 491, 415, 482, 507, 508, 509, 510, 511, 512, 119, + /* 1850 */ 415, 515, 516, 517, 119, 119, 217, 194, 195, 406, + /* 1860 */ 524, 119, 20, 407, 528, 529, 47, 204, 205, 8, + /* 1870 */ 9, 462, 407, 12, 13, 14, 15, 16, 462, 193, + /* 1880 */ 459, 406, 219, 407, 221, 406, 8, 9, 459, 226, + /* 1890 */ 12, 13, 14, 15, 16, 462, 459, 459, 116, 41, + /* 1900 */ 42, 419, 114, 406, 418, 113, 20, 406, 417, 406, + /* 1910 */ 406, 406, 52, 399, 403, 399, 20, 254, 255, 256, + /* 1920 */ 403, 258, 259, 260, 261, 262, 263, 264, 265, 266, + /* 1930 */ 267, 268, 269, 270, 271, 491, 415, 274, 275, 276, + /* 1940 */ 277, 278, 455, 479, 415, 282, 283, 284, 285, 286, + /* 1950 */ 287, 288, 12, 13, 415, 20, 408, 20, 481, 415, + /* 1960 */ 20, 408, 22, 20, 479, 415, 472, 415, 20, 415, + /* 1970 */ 415, 272, 466, 52, 392, 399, 36, 406, 38, 433, + /* 1980 */ 119, 415, 124, 125, 433, 127, 437, 395, 395, 407, + /* 1990 */ 453, 409, 406, 437, 437, 399, 437, 119, 239, 118, + /* 2000 */ 536, 437, 437, 495, 196, 392, 148, 413, 544, 437, + /* 2010 */ 152, 71, 20, 493, 74, 437, 437, 437, 437, 437, + /* 2020 */ 407, 536, 491, 490, 225, 85, 562, 563, 488, 544, + /* 2030 */ 224, 567, 568, 413, 487, 453, 453, 455, 453, 325, + /* 2040 */ 406, 324, 552, 455, 552, 333, 210, 562, 563, 551, + /* 2050 */ 437, 453, 567, 568, 480, 115, 392, 555, 118, 335, + /* 2060 */ 334, 312, 317, 473, 552, 542, 453, 549, 455, 554, + /* 2070 */ 473, 407, 550, 409, 311, 480, 541, 337, 339, 407, + /* 2080 */ 342, 20, 500, 129, 314, 503, 408, 413, 413, 507, + /* 2090 */ 508, 509, 510, 511, 512, 155, 156, 515, 516, 517, + /* 2100 */ 572, 437, 566, 473, 522, 506, 524, 453, 565, 453, + /* 2110 */ 528, 529, 453, 500, 547, 453, 503, 453, 453, 455, + /* 2120 */ 507, 508, 509, 510, 511, 512, 202, 466, 515, 516, + /* 2130 */ 517, 473, 453, 118, 194, 195, 470, 524, 413, 527, + /* 2140 */ 413, 528, 529, 453, 204, 205, 202, 545, 467, 466, + /* 2150 */ 453, 453, 118, 432, 453, 407, 453, 406, 453, 219, + /* 2160 */ 413, 221, 453, 413, 500, 413, 226, 503, 453, 453, + /* 2170 */ 442, 507, 508, 509, 510, 511, 512, 22, 394, 515, + /* 2180 */ 516, 517, 453, 35, 453, 453, 522, 453, 524, 37, + /* 2190 */ 397, 40, 528, 529, 254, 255, 256, 400, 258, 259, + /* 2200 */ 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, + /* 2210 */ 270, 271, 399, 453, 274, 275, 276, 277, 278, 453, + /* 2220 */ 453, 453, 282, 283, 284, 285, 286, 287, 288, 12, + /* 2230 */ 13, 453, 453, 453, 453, 398, 453, 20, 453, 22, + /* 2240 */ 453, 483, 439, 474, 429, 499, 492, 474, 439, 429, + /* 2250 */ 429, 392, 414, 36, 390, 38, 0, 0, 0, 47, + /* 2260 */ 0, 36, 245, 36, 36, 245, 407, 36, 0, 36, + /* 2270 */ 36, 245, 36, 0, 0, 245, 0, 36, 0, 36, + /* 2280 */ 0, 22, 0, 36, 240, 0, 227, 0, 71, 227, + /* 2290 */ 221, 74, 228, 219, 0, 0, 437, 0, 215, 214, + /* 2300 */ 0, 0, 85, 161, 51, 51, 0, 36, 0, 0, + /* 2310 */ 0, 36, 453, 51, 455, 51, 47, 0, 57, 0, + /* 2320 */ 0, 0, 0, 0, 0, 0, 0, 12, 13, 0, + /* 2330 */ 0, 0, 115, 392, 36, 118, 179, 22, 179, 0, + /* 2340 */ 0, 0, 0, 0, 0, 0, 0, 0, 407, 0, + /* 2350 */ 0, 36, 0, 38, 0, 0, 0, 0, 0, 500, + /* 2360 */ 0, 0, 503, 51, 0, 47, 507, 508, 509, 510, + /* 2370 */ 511, 512, 155, 156, 515, 516, 517, 0, 437, 161, + /* 2380 */ 0, 522, 0, 524, 0, 0, 71, 528, 529, 0, + /* 2390 */ 0, 0, 0, 0, 453, 0, 455, 22, 0, 160, + /* 2400 */ 0, 159, 0, 0, 0, 22, 71, 0, 22, 71, + /* 2410 */ 36, 194, 195, 0, 52, 52, 0, 0, 0, 71, + /* 2420 */ 44, 204, 205, 36, 71, 57, 0, 57, 0, 57, + /* 2430 */ 36, 0, 44, 36, 0, 36, 219, 56, 221, 0, + /* 2440 */ 44, 500, 36, 226, 503, 0, 14, 33, 507, 508, + /* 2450 */ 509, 510, 511, 512, 44, 47, 515, 516, 517, 0, + /* 2460 */ 51, 0, 51, 522, 45, 524, 51, 44, 0, 528, + /* 2470 */ 529, 254, 255, 256, 0, 258, 259, 260, 261, 262, + /* 2480 */ 263, 264, 265, 266, 267, 268, 269, 270, 271, 1, + /* 2490 */ 0, 274, 275, 276, 277, 278, 44, 0, 210, 282, + /* 2500 */ 283, 284, 285, 286, 287, 288, 51, 19, 0, 51, + /* 2510 */ 0, 0, 79, 0, 0, 392, 36, 57, 0, 44, + /* 2520 */ 36, 57, 44, 0, 57, 36, 38, 44, 0, 36, + /* 2530 */ 407, 44, 0, 57, 219, 0, 221, 0, 0, 0, + /* 2540 */ 36, 53, 54, 0, 0, 57, 22, 126, 128, 0, + /* 2550 */ 0, 36, 22, 36, 66, 67, 68, 69, 36, 71, + /* 2560 */ 437, 36, 36, 36, 33, 36, 33, 252, 253, 254, + /* 2570 */ 36, 0, 36, 22, 22, 22, 453, 36, 455, 0, + /* 2580 */ 22, 36, 36, 36, 0, 22, 0, 0, 0, 274, + /* 2590 */ 275, 36, 36, 0, 0, 36, 36, 282, 283, 284, + /* 2600 */ 285, 286, 287, 0, 22, 117, 36, 59, 36, 20, + /* 2610 */ 122, 36, 0, 119, 118, 51, 118, 0, 196, 36, + /* 2620 */ 22, 392, 0, 500, 22, 196, 503, 226, 0, 202, + /* 2630 */ 507, 508, 509, 510, 511, 512, 407, 232, 515, 516, + /* 2640 */ 517, 153, 196, 0, 392, 196, 206, 222, 206, 196, + /* 2650 */ 3, 33, 318, 22, 318, 231, 36, 36, 118, 407, + /* 2660 */ 52, 119, 52, 33, 51, 33, 437, 33, 33, 33, + /* 2670 */ 51, 3, 118, 36, 33, 36, 119, 318, 36, 118, + /* 2680 */ 114, 119, 453, 118, 455, 116, 198, 36, 200, 437, + /* 2690 */ 85, 203, 569, 570, 36, 119, 208, 119, 118, 118, + /* 2700 */ 36, 36, 33, 118, 51, 453, 477, 455, 51, 119, + /* 2710 */ 118, 0, 0, 0, 119, 227, 119, 118, 44, 119, + /* 2720 */ 392, 44, 203, 119, 0, 119, 119, 118, 44, 500, + /* 2730 */ 119, 33, 503, 118, 118, 407, 507, 508, 509, 510, + /* 2740 */ 511, 512, 118, 302, 515, 516, 517, 290, 119, 2, + /* 2750 */ 22, 51, 500, 254, 51, 503, 118, 22, 118, 507, + /* 2760 */ 508, 509, 510, 511, 512, 437, 199, 515, 516, 517, + /* 2770 */ 116, 392, 199, 118, 118, 198, 0, 116, 119, 0, + /* 2780 */ 118, 453, 119, 455, 118, 118, 407, 44, 118, 118, + /* 2790 */ 118, 118, 22, 51, 119, 119, 118, 118, 118, 118, + /* 2800 */ 199, 119, 119, 118, 392, 477, 118, 120, 22, 118, + /* 2810 */ 558, 121, 118, 118, 118, 118, 437, 36, 129, 407, + /* 2820 */ 119, 36, 118, 33, 119, 36, 118, 36, 500, 119, + /* 2830 */ 36, 503, 453, 119, 455, 507, 508, 509, 510, 511, + /* 2840 */ 512, 119, 36, 515, 516, 517, 232, 36, 257, 437, + /* 2850 */ 119, 118, 118, 36, 118, 140, 477, 140, 140, 140, + /* 2860 */ 22, 79, 78, 22, 36, 453, 36, 455, 36, 392, + /* 2870 */ 36, 36, 36, 36, 112, 36, 36, 85, 36, 500, + /* 2880 */ 36, 85, 503, 112, 407, 33, 507, 508, 509, 510, + /* 2890 */ 511, 512, 392, 36, 515, 516, 517, 36, 36, 22, + /* 2900 */ 36, 36, 36, 85, 36, 36, 36, 407, 36, 36, + /* 2910 */ 22, 36, 500, 57, 437, 503, 0, 36, 44, 507, + /* 2920 */ 508, 509, 510, 511, 512, 0, 36, 515, 516, 517, + /* 2930 */ 453, 44, 455, 57, 0, 36, 57, 437, 44, 0, + /* 2940 */ 36, 57, 44, 0, 36, 0, 22, 0, 22, 0, + /* 2950 */ 36, 22, 33, 453, 36, 455, 36, 22, 21, 21, + /* 2960 */ 392, 573, 22, 22, 20, 573, 573, 573, 573, 573, + /* 2970 */ 573, 573, 573, 561, 573, 407, 573, 500, 573, 573, + /* 2980 */ 503, 573, 573, 573, 507, 508, 509, 510, 511, 512, + /* 2990 */ 573, 573, 515, 516, 517, 573, 573, 573, 573, 573, + /* 3000 */ 500, 573, 573, 503, 573, 437, 573, 507, 508, 509, + /* 3010 */ 510, 511, 512, 573, 573, 515, 516, 517, 573, 519, + /* 3020 */ 573, 453, 573, 455, 573, 392, 573, 38, 573, 573, + /* 3030 */ 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, + /* 3040 */ 407, 573, 573, 54, 573, 477, 57, 570, 573, 573, + /* 3050 */ 573, 573, 392, 573, 573, 66, 67, 68, 69, 573, + /* 3060 */ 71, 573, 573, 573, 573, 573, 573, 407, 500, 573, + /* 3070 */ 437, 503, 573, 573, 573, 507, 508, 509, 510, 511, + /* 3080 */ 512, 573, 573, 515, 516, 517, 453, 573, 455, 573, + /* 3090 */ 573, 573, 573, 573, 573, 573, 573, 437, 573, 573, + /* 3100 */ 573, 573, 573, 573, 573, 573, 117, 573, 573, 573, + /* 3110 */ 477, 122, 573, 453, 573, 455, 573, 573, 573, 573, + /* 3120 */ 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, + /* 3130 */ 573, 573, 573, 500, 573, 573, 503, 477, 392, 573, + /* 3140 */ 507, 508, 509, 510, 511, 512, 573, 573, 515, 516, + /* 3150 */ 517, 573, 573, 407, 573, 573, 573, 573, 392, 573, + /* 3160 */ 500, 573, 573, 503, 573, 573, 573, 507, 508, 509, + /* 3170 */ 510, 511, 512, 407, 573, 515, 516, 517, 189, 392, + /* 3180 */ 573, 573, 573, 437, 573, 573, 573, 198, 573, 573, + /* 3190 */ 573, 202, 203, 573, 407, 573, 573, 208, 209, 453, + /* 3200 */ 573, 455, 573, 437, 573, 573, 573, 573, 573, 573, + /* 3210 */ 573, 573, 573, 573, 573, 573, 227, 573, 573, 453, + /* 3220 */ 573, 455, 573, 477, 437, 573, 573, 573, 573, 573, + /* 3230 */ 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, + /* 3240 */ 453, 573, 455, 573, 573, 573, 500, 573, 573, 503, + /* 3250 */ 573, 573, 573, 507, 508, 509, 510, 511, 512, 573, + /* 3260 */ 573, 515, 516, 517, 573, 573, 500, 573, 573, 503, + /* 3270 */ 573, 573, 573, 507, 508, 509, 510, 511, 512, 573, + /* 3280 */ 573, 515, 516, 517, 573, 392, 573, 500, 573, 573, + /* 3290 */ 503, 573, 573, 573, 507, 508, 509, 510, 511, 512, + /* 3300 */ 407, 573, 515, 516, 517, 392, 573, 573, 573, 573, + /* 3310 */ 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, + /* 3320 */ 407, 573, 573, 573, 573, 392, 573, 573, 573, 573, + /* 3330 */ 437, 573, 573, 573, 573, 573, 573, 573, 573, 573, + /* 3340 */ 407, 573, 573, 573, 573, 573, 453, 573, 455, 573, + /* 3350 */ 437, 573, 573, 573, 573, 573, 573, 573, 573, 573, + /* 3360 */ 573, 573, 573, 573, 573, 573, 453, 573, 455, 573, + /* 3370 */ 437, 573, 573, 573, 573, 573, 573, 573, 573, 573, + /* 3380 */ 573, 573, 573, 573, 573, 573, 453, 573, 455, 573, + /* 3390 */ 573, 573, 573, 500, 573, 573, 503, 573, 573, 573, + /* 3400 */ 507, 508, 509, 510, 511, 512, 573, 573, 515, 516, + /* 3410 */ 517, 573, 392, 500, 573, 573, 503, 573, 573, 573, + /* 3420 */ 507, 508, 509, 510, 511, 512, 573, 407, 515, 516, + /* 3430 */ 517, 573, 573, 500, 573, 573, 503, 573, 392, 573, + /* 3440 */ 507, 508, 509, 510, 511, 512, 573, 573, 515, 516, + /* 3450 */ 517, 573, 573, 407, 573, 573, 573, 437, 573, 573, + /* 3460 */ 573, 392, 573, 573, 573, 573, 573, 573, 573, 573, + /* 3470 */ 573, 573, 573, 453, 573, 455, 407, 573, 573, 573, + /* 3480 */ 573, 392, 573, 437, 573, 573, 573, 573, 573, 573, + /* 3490 */ 573, 573, 573, 573, 573, 573, 407, 573, 573, 453, + /* 3500 */ 573, 455, 573, 392, 573, 573, 437, 573, 573, 573, + /* 3510 */ 573, 573, 573, 573, 573, 573, 573, 573, 407, 573, + /* 3520 */ 500, 573, 453, 503, 455, 573, 437, 507, 508, 509, + /* 3530 */ 510, 511, 512, 573, 573, 515, 516, 517, 573, 573, + /* 3540 */ 573, 573, 453, 573, 455, 573, 500, 573, 437, 503, + /* 3550 */ 573, 573, 573, 507, 508, 509, 510, 511, 512, 573, + /* 3560 */ 573, 515, 516, 517, 453, 573, 455, 573, 392, 500, + /* 3570 */ 573, 573, 503, 573, 573, 573, 507, 508, 509, 510, + /* 3580 */ 511, 512, 573, 407, 515, 516, 517, 392, 573, 500, + /* 3590 */ 573, 573, 503, 573, 573, 573, 507, 508, 509, 510, + /* 3600 */ 511, 512, 407, 573, 515, 516, 517, 573, 573, 392, + /* 3610 */ 573, 500, 573, 437, 503, 573, 573, 573, 507, 508, + /* 3620 */ 509, 510, 511, 512, 407, 573, 515, 516, 517, 453, + /* 3630 */ 573, 455, 437, 573, 573, 573, 573, 573, 573, 573, + /* 3640 */ 573, 573, 573, 573, 573, 573, 573, 573, 453, 573, + /* 3650 */ 455, 573, 573, 573, 437, 573, 573, 573, 573, 573, + /* 3660 */ 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, + /* 3670 */ 453, 573, 455, 573, 392, 573, 500, 573, 573, 503, + /* 3680 */ 573, 573, 573, 507, 508, 509, 510, 511, 512, 407, + /* 3690 */ 573, 515, 516, 517, 573, 500, 573, 573, 503, 573, + /* 3700 */ 573, 573, 507, 508, 509, 510, 511, 512, 573, 573, + /* 3710 */ 515, 516, 517, 573, 573, 573, 573, 500, 573, 437, + /* 3720 */ 503, 573, 573, 392, 507, 508, 509, 510, 511, 512, + /* 3730 */ 573, 573, 515, 516, 517, 453, 573, 455, 407, 573, + /* 3740 */ 573, 573, 573, 392, 573, 573, 573, 573, 573, 573, + /* 3750 */ 573, 573, 573, 573, 573, 573, 573, 573, 407, 573, + /* 3760 */ 573, 573, 573, 392, 573, 573, 573, 573, 437, 573, + /* 3770 */ 573, 573, 573, 573, 573, 573, 573, 573, 407, 573, + /* 3780 */ 573, 573, 500, 573, 453, 503, 455, 573, 437, 507, + /* 3790 */ 508, 509, 510, 511, 512, 573, 573, 515, 516, 517, + /* 3800 */ 573, 573, 573, 573, 453, 573, 455, 573, 437, 573, + /* 3810 */ 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, + /* 3820 */ 573, 573, 573, 573, 453, 573, 455, 573, 573, 573, + /* 3830 */ 573, 500, 573, 573, 503, 573, 573, 573, 507, 508, + /* 3840 */ 509, 510, 511, 512, 573, 573, 515, 516, 517, 573, + /* 3850 */ 392, 500, 573, 573, 503, 573, 573, 573, 507, 508, + /* 3860 */ 509, 510, 511, 512, 573, 407, 515, 516, 517, 392, + /* 3870 */ 573, 500, 573, 573, 503, 573, 573, 573, 507, 508, + /* 3880 */ 509, 510, 511, 512, 407, 573, 515, 516, 517, 392, + /* 3890 */ 573, 573, 573, 573, 573, 437, 573, 573, 573, 573, + /* 3900 */ 573, 573, 573, 573, 407, 573, 573, 573, 573, 573, + /* 3910 */ 573, 453, 573, 455, 437, 573, 573, 573, 573, 573, + /* 3920 */ 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, + /* 3930 */ 453, 573, 455, 573, 437, 573, 573, 573, 573, 573, + /* 3940 */ 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, + /* 3950 */ 453, 573, 455, 573, 573, 573, 392, 573, 500, 573, + /* 3960 */ 573, 503, 573, 573, 573, 507, 508, 509, 510, 511, + /* 3970 */ 512, 407, 573, 515, 516, 517, 392, 500, 573, 573, + /* 3980 */ 503, 573, 573, 573, 507, 508, 509, 510, 511, 512, + /* 3990 */ 573, 407, 515, 516, 517, 392, 573, 500, 573, 573, + /* 4000 */ 503, 437, 573, 573, 507, 508, 509, 510, 511, 512, + /* 4010 */ 407, 573, 515, 516, 517, 573, 573, 453, 573, 455, + /* 4020 */ 573, 437, 573, 573, 573, 573, 573, 573, 573, 573, + /* 4030 */ 573, 573, 573, 573, 573, 573, 573, 453, 573, 455, + /* 4040 */ 437, 573, 573, 573, 573, 573, 573, 573, 573, 573, + /* 4050 */ 573, 573, 573, 573, 573, 573, 453, 573, 455, 573, + /* 4060 */ 573, 573, 573, 392, 500, 573, 573, 503, 573, 573, + /* 4070 */ 573, 507, 508, 509, 510, 511, 512, 573, 407, 515, + /* 4080 */ 516, 517, 392, 573, 500, 573, 573, 503, 573, 573, + /* 4090 */ 573, 507, 508, 509, 510, 511, 512, 407, 573, 515, + /* 4100 */ 516, 517, 573, 500, 573, 573, 503, 573, 437, 573, + /* 4110 */ 507, 508, 509, 510, 511, 512, 573, 573, 515, 516, + /* 4120 */ 517, 573, 573, 573, 453, 573, 455, 437, 573, 573, + /* 4130 */ 573, 392, 573, 573, 573, 573, 573, 573, 573, 573, + /* 4140 */ 573, 573, 573, 453, 573, 455, 407, 573, 573, 573, + /* 4150 */ 573, 392, 573, 573, 573, 573, 573, 573, 573, 573, + /* 4160 */ 573, 573, 573, 573, 573, 573, 407, 573, 573, 573, + /* 4170 */ 573, 500, 573, 573, 503, 573, 437, 573, 507, 508, + /* 4180 */ 509, 510, 511, 512, 573, 573, 515, 516, 517, 573, + /* 4190 */ 500, 573, 453, 503, 455, 573, 437, 507, 508, 509, + /* 4200 */ 510, 511, 512, 573, 573, 515, 516, 517, 573, 573, + /* 4210 */ 573, 573, 453, 573, 455, 573, 573, 573, 573, 392, + /* 4220 */ 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, + /* 4230 */ 573, 573, 573, 573, 407, 573, 573, 573, 573, 500, + /* 4240 */ 573, 573, 503, 392, 573, 573, 507, 508, 509, 510, + /* 4250 */ 511, 512, 573, 573, 515, 516, 517, 573, 407, 500, + /* 4260 */ 573, 573, 503, 573, 437, 573, 507, 508, 509, 510, + /* 4270 */ 511, 512, 573, 573, 515, 516, 517, 573, 573, 573, + /* 4280 */ 453, 573, 455, 573, 573, 573, 573, 573, 437, 573, + /* 4290 */ 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, + /* 4300 */ 573, 573, 573, 573, 453, 573, 455, 573, 573, 573, + /* 4310 */ 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, + /* 4320 */ 573, 573, 573, 573, 573, 392, 573, 500, 573, 573, + /* 4330 */ 503, 573, 573, 573, 507, 508, 509, 510, 511, 512, + /* 4340 */ 407, 573, 515, 516, 517, 573, 573, 573, 573, 392, + /* 4350 */ 573, 500, 573, 573, 503, 573, 573, 573, 507, 508, + /* 4360 */ 509, 510, 511, 512, 407, 573, 515, 516, 517, 573, + /* 4370 */ 437, 573, 573, 573, 573, 573, 573, 573, 573, 573, + /* 4380 */ 573, 573, 573, 573, 573, 573, 453, 573, 455, 573, + /* 4390 */ 573, 573, 573, 573, 437, 573, 573, 573, 573, 573, + /* 4400 */ 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, + /* 4410 */ 453, 573, 455, 573, 573, 573, 573, 573, 573, 573, + /* 4420 */ 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, + /* 4430 */ 573, 573, 573, 500, 573, 573, 503, 573, 573, 573, + /* 4440 */ 507, 508, 509, 510, 511, 512, 573, 573, 515, 516, + /* 4450 */ 517, 573, 573, 573, 573, 573, 573, 500, 573, 573, + /* 4460 */ 503, 573, 573, 573, 507, 508, 509, 510, 511, 512, + /* 4470 */ 573, 573, 515, 516, 517, 389, 389, 389, 389, 389, + /* 4480 */ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, + /* 4490 */ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, + /* 4500 */ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, + /* 4510 */ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, + /* 4520 */ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, + /* 4530 */ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, + /* 4540 */ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, + /* 4550 */ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, + /* 4560 */ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, + /* 4570 */ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, + /* 4580 */ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, + /* 4590 */ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, + /* 4600 */ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, + /* 4610 */ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, + /* 4620 */ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, + /* 4630 */ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, + /* 4640 */ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, + /* 4650 */ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, + /* 4660 */ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, + /* 4670 */ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, + /* 4680 */ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, + /* 4690 */ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, + /* 4700 */ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, + /* 4710 */ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, + /* 4720 */ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, + /* 4730 */ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, + /* 4740 */ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, + /* 4750 */ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, + /* 4760 */ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, + /* 4770 */ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, + /* 4780 */ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, + /* 4790 */ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, + /* 4800 */ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, + /* 4810 */ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, + /* 4820 */ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, + /* 4830 */ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, + /* 4840 */ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, + /* 4850 */ 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, + /* 4860 */ 389, 389, 389, 389, }; -#define YY_SHIFT_COUNT (1008) +#define YY_SHIFT_COUNT (1024) #define YY_SHIFT_MIN (0) -#define YY_SHIFT_MAX (2941) +#define YY_SHIFT_MAX (2989) static const unsigned short int yy_shift_ofst[] = { - /* 0 */ 1704, 272, 355, 272, 628, 628, 628, 628, 628, 628, - /* 10 */ 628, 628, 628, 628, 628, 628, 711, 1338, 1338, 1421, - /* 20 */ 0, 983, 1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338, - /* 30 */ 1338, 1338, 1066, 1338, 1338, 1338, 1338, 1338, 1338, 1338, - /* 40 */ 1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338, - /* 50 */ 1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338, - /* 60 */ 1338, 1338, 539, 645, 219, 200, 347, 457, 347, 347, - /* 70 */ 200, 200, 347, 2050, 347, 1687, 2050, 63, 347, 7, - /* 80 */ 2127, 491, 491, 91, 91, 2127, 2127, 962, 962, 491, - /* 90 */ 378, 378, 192, 14, 14, 94, 269, 91, 91, 91, - /* 100 */ 91, 91, 91, 91, 91, 91, 91, 91, 151, 321, - /* 110 */ 349, 91, 91, 402, 7, 91, 151, 91, 7, 91, - /* 120 */ 91, 91, 91, 7, 91, 91, 91, 7, 91, 7, - /* 130 */ 7, 7, 474, 308, 308, 544, 544, 808, 951, 156, - /* 140 */ 334, 978, 978, 978, 978, 978, 978, 978, 978, 978, - /* 150 */ 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, - /* 160 */ 66, 602, 378, 192, 517, 517, 268, 603, 603, 603, - /* 170 */ 436, 436, 466, 1101, 268, 402, 7, 484, 7, 7, - /* 180 */ 367, 7, 7, 608, 7, 608, 608, 631, 683, 544, - /* 190 */ 544, 544, 544, 544, 544, 2430, 1202, 21, 217, 218, - /* 200 */ 218, 819, 242, 343, 198, 609, 294, 461, 725, 77, - /* 210 */ 77, 984, 901, 1081, 1081, 1081, 820, 1081, 674, 1119, - /* 220 */ 407, 428, 1405, 497, 1171, 1185, 1185, 1263, 1383, 1383, - /* 230 */ 1040, 1257, 251, 1185, 1101, 1500, 1758, 1800, 1813, 1606, - /* 240 */ 402, 1813, 402, 1653, 1800, 1857, 1832, 1857, 1832, 1694, - /* 250 */ 1800, 1857, 1800, 1832, 1694, 1694, 1694, 1776, 1786, 1800, - /* 260 */ 1800, 1791, 1800, 1800, 1800, 1886, 1856, 1886, 1856, 1813, - /* 270 */ 402, 402, 1901, 402, 1903, 1906, 402, 1903, 402, 1912, - /* 280 */ 402, 1918, 402, 402, 1892, 1892, 1800, 402, 1886, 7, - /* 290 */ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - /* 300 */ 1800, 683, 683, 1886, 608, 608, 608, 1727, 1855, 1813, - /* 310 */ 474, 1952, 1752, 1755, 1901, 474, 1500, 1800, 608, 1689, - /* 320 */ 1695, 1689, 1695, 1692, 1809, 1689, 1697, 1700, 1705, 1500, - /* 330 */ 1722, 1724, 1698, 1710, 1714, 1857, 2027, 1922, 1745, 1903, - /* 340 */ 474, 474, 1695, 608, 608, 608, 608, 1695, 608, 1884, - /* 350 */ 474, 608, 1918, 474, 1986, 608, 1908, 1918, 474, 631, - /* 360 */ 474, 1857, 608, 608, 608, 608, 608, 608, 608, 608, - /* 370 */ 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, - /* 380 */ 608, 608, 608, 608, 2030, 608, 1800, 474, 2124, 2118, - /* 390 */ 2131, 2129, 1886, 4386, 4386, 4386, 4386, 4386, 4386, 4386, - /* 400 */ 4386, 4386, 4386, 4386, 4386, 39, 1321, 558, 1103, 50, - /* 410 */ 323, 910, 845, 862, 1195, 1261, 1212, 1386, 1402, 1454, - /* 420 */ 1496, 1616, 1638, 1648, 1571, 1042, 1588, 17, 17, 17, - /* 430 */ 17, 17, 17, 17, 17, 17, 271, 207, 615, 907, - /* 440 */ 693, 693, 576, 105, 37, 443, 412, 451, 1151, 62, - /* 450 */ 847, 784, 692, 692, 1024, 1249, 202, 1024, 1024, 1024, - /* 460 */ 3, 1161, 1415, 914, 1374, 1358, 1216, 822, 1378, 1407, - /* 470 */ 1399, 1412, 1407, 1414, 1356, 1187, 1489, 1544, 1567, 1605, - /* 480 */ 1614, 1260, 1443, 1444, 936, 1452, 1518, 1522, 1524, 1361, - /* 490 */ 751, 1419, 1532, 1539, 1542, 1543, 1561, 1549, 1389, 1560, - /* 500 */ 1573, 1600, 1527, 1610, 1612, 1636, 1639, 1655, 1654, 1658, - /* 510 */ 1683, 1696, 1699, 1706, 1717, 1744, 1750, 1753, 1766, 1677, - /* 520 */ 1407, 1680, 1690, 1691, 1711, 1712, 1625, 1482, 1541, 1590, - /* 530 */ 1545, 1684, 1734, 41, 2184, 2224, 2225, 2179, 2233, 2198, - /* 540 */ 1996, 2204, 2205, 2207, 2002, 2246, 2211, 2214, 2008, 2216, - /* 550 */ 2254, 2255, 2013, 2257, 2222, 2259, 2226, 2260, 2239, 2263, - /* 560 */ 2229, 2031, 2270, 2053, 2278, 2058, 2059, 2067, 2070, 2287, - /* 570 */ 2294, 2295, 2077, 2079, 2291, 2296, 2139, 2247, 2249, 2304, - /* 580 */ 2269, 2306, 2307, 2272, 2256, 2309, 2261, 2311, 2266, 2314, - /* 590 */ 2315, 2316, 2267, 2317, 2322, 2323, 2324, 2325, 2326, 2157, - /* 600 */ 2298, 2335, 2161, 2338, 2339, 2340, 2341, 2342, 2344, 2347, - /* 610 */ 2348, 2350, 2351, 2352, 2359, 2360, 2364, 2365, 2367, 2368, - /* 620 */ 2369, 2371, 2372, 2329, 2373, 2334, 2376, 2383, 2385, 2386, - /* 630 */ 2387, 2388, 2389, 2390, 2391, 2370, 2393, 2236, 2395, 2241, - /* 640 */ 2399, 2244, 2401, 2402, 2381, 2361, 2392, 2363, 2411, 2349, - /* 650 */ 2412, 2353, 2380, 2418, 2355, 2419, 2356, 2420, 2422, 2394, - /* 660 */ 2374, 2382, 2427, 2397, 2396, 2398, 2434, 2407, 2400, 2404, - /* 670 */ 2435, 2415, 2452, 2409, 2416, 2426, 2410, 2413, 2449, 2414, - /* 680 */ 2466, 2424, 2423, 2470, 2472, 2474, 2476, 2433, 2271, 2479, - /* 690 */ 2410, 2429, 2481, 2410, 2431, 2485, 2486, 2421, 2487, 2488, - /* 700 */ 2453, 2437, 2455, 2500, 2465, 2448, 2459, 2504, 2469, 2457, - /* 710 */ 2462, 2507, 2473, 2458, 2471, 2513, 2514, 2516, 2517, 2519, - /* 720 */ 2522, 2406, 2417, 2501, 2502, 2523, 2510, 2503, 2505, 2509, - /* 730 */ 2512, 2515, 2518, 2520, 2525, 2532, 2524, 2526, 2537, 2538, - /* 740 */ 2528, 2539, 2543, 2530, 2546, 2531, 2576, 2555, 2529, 2578, - /* 750 */ 2557, 2548, 2582, 2587, 2588, 2553, 2597, 2565, 2602, 2567, - /* 760 */ 2604, 2583, 2589, 2571, 2572, 2574, 2495, 2497, 2613, 2425, - /* 770 */ 2403, 2405, 2499, 2408, 2410, 2564, 2616, 2436, 2581, 2598, - /* 780 */ 2619, 2428, 2600, 2441, 2438, 2623, 2624, 2443, 2440, 2445, - /* 790 */ 2442, 2625, 2606, 2327, 2533, 2534, 2540, 2536, 2605, 2610, - /* 800 */ 2541, 2601, 2544, 2607, 2547, 2545, 2627, 2629, 2549, 2551, - /* 810 */ 2556, 2558, 2552, 2630, 2621, 2626, 2559, 2631, 2336, 2594, - /* 820 */ 2554, 2645, 2566, 2643, 2568, 2569, 2677, 2649, 2432, 2647, - /* 830 */ 2650, 2651, 2652, 2657, 2658, 2579, 2586, 2656, 2444, 2670, - /* 840 */ 2659, 2708, 2709, 2596, 2668, 2599, 2603, 2612, 2617, 2550, - /* 850 */ 2620, 2713, 2672, 2542, 2728, 2618, 2622, 2560, 2695, 2562, - /* 860 */ 2710, 2635, 2464, 2637, 2742, 2729, 2506, 2638, 2639, 2644, - /* 870 */ 2653, 2654, 2636, 2646, 2660, 2662, 2663, 2665, 2667, 2648, - /* 880 */ 2714, 2669, 2673, 2715, 2671, 2745, 2561, 2674, 2681, 2770, - /* 890 */ 2686, 2682, 2575, 2730, 2689, 2688, 2772, 2751, 2690, 2692, - /* 900 */ 2410, 2758, 2696, 2697, 2694, 2698, 2699, 2691, 2793, 2590, - /* 910 */ 2702, 2784, 2785, 2712, 2707, 2789, 2716, 2723, 2792, 2660, - /* 920 */ 2724, 2794, 2662, 2731, 2796, 2663, 2733, 2808, 2665, 2717, - /* 930 */ 2725, 2734, 2736, 2735, 2812, 2737, 2810, 2738, 2812, 2812, - /* 940 */ 2839, 2790, 2795, 2845, 2832, 2838, 2847, 2853, 2854, 2855, - /* 950 */ 2856, 2857, 2858, 2859, 2860, 2816, 2766, 2817, 2791, 2868, - /* 960 */ 2866, 2867, 2869, 2882, 2870, 2872, 2874, 2827, 2524, 2875, - /* 970 */ 2526, 2876, 2877, 2878, 2879, 2894, 2881, 2919, 2884, 2871, - /* 980 */ 2880, 2921, 2887, 2883, 2885, 2926, 2892, 2886, 2888, 2930, - /* 990 */ 2895, 2890, 2889, 2934, 2899, 2936, 2916, 2903, 2941, 2920, - /* 1000 */ 2913, 2911, 2912, 2928, 2932, 2929, 2933, 2935, 2937, + /* 0 */ 948, 277, 554, 277, 832, 832, 832, 832, 832, 832, + /* 10 */ 832, 832, 832, 832, 832, 832, 1109, 1940, 1940, 2217, + /* 20 */ 0, 1386, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, + /* 30 */ 1940, 1940, 1663, 1940, 1940, 1940, 1940, 1940, 1940, 1940, + /* 40 */ 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, + /* 50 */ 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, + /* 60 */ 1940, 1940, 1940, 34, 66, 180, 253, 46, 122, 46, + /* 70 */ 46, 253, 253, 46, 960, 46, 276, 960, 520, 46, + /* 80 */ 149, 2315, 156, 156, 212, 212, 2315, 2315, 598, 598, + /* 90 */ 156, 20, 20, 346, 89, 89, 69, 204, 212, 212, + /* 100 */ 212, 212, 212, 212, 212, 212, 212, 212, 212, 333, + /* 110 */ 444, 573, 212, 212, 585, 149, 212, 333, 212, 149, + /* 120 */ 212, 212, 212, 212, 149, 212, 212, 212, 149, 212, + /* 130 */ 149, 149, 149, 648, 222, 222, 473, 473, 745, 652, + /* 140 */ 181, 51, 548, 548, 548, 548, 548, 548, 548, 548, + /* 150 */ 548, 548, 548, 548, 548, 548, 548, 548, 548, 548, + /* 160 */ 548, 1858, 200, 20, 346, 849, 849, 710, 379, 379, + /* 170 */ 379, 927, 927, 699, 1091, 710, 585, 149, 614, 149, + /* 180 */ 149, 466, 149, 149, 683, 149, 683, 683, 728, 25, + /* 190 */ 2488, 473, 473, 473, 473, 473, 473, 1190, 21, 53, + /* 200 */ 411, 411, 314, 148, 23, 220, 152, 596, 213, 571, + /* 210 */ 560, 560, 892, 662, 1043, 1043, 1043, 382, 1043, 774, + /* 220 */ 757, 92, 896, 1442, 1208, 682, 1247, 1247, 1254, 1320, + /* 230 */ 1320, 1082, 1000, 241, 1247, 1091, 1510, 1772, 1812, 1814, + /* 240 */ 1601, 585, 1814, 585, 1639, 1812, 1842, 1819, 1842, 1819, + /* 250 */ 1686, 1812, 1842, 1812, 1819, 1686, 1686, 1686, 1782, 1788, + /* 260 */ 1812, 1812, 1792, 1812, 1812, 1812, 1886, 1860, 1886, 1860, + /* 270 */ 1814, 585, 585, 1896, 585, 1935, 1937, 585, 1935, 585, + /* 280 */ 1943, 585, 1948, 585, 585, 1921, 1921, 1812, 585, 1886, + /* 290 */ 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, + /* 300 */ 149, 1812, 25, 25, 1886, 683, 683, 683, 1759, 1881, + /* 310 */ 1814, 648, 1992, 1799, 1806, 1896, 648, 1510, 1812, 683, + /* 320 */ 1714, 1717, 1714, 1717, 1712, 1836, 1714, 1724, 1726, 1745, + /* 330 */ 1510, 1749, 1763, 1738, 1739, 1740, 1842, 2061, 1954, 1770, + /* 340 */ 1935, 648, 648, 1717, 683, 683, 683, 683, 1717, 683, + /* 350 */ 1924, 648, 683, 1948, 648, 2015, 683, 1944, 1948, 648, + /* 360 */ 728, 648, 1842, 683, 683, 683, 683, 683, 683, 683, + /* 370 */ 683, 683, 683, 683, 683, 683, 683, 683, 683, 683, + /* 380 */ 683, 683, 683, 683, 683, 2034, 683, 1812, 648, 2155, + /* 390 */ 2148, 2152, 2151, 1886, 4475, 4475, 4475, 4475, 4475, 4475, + /* 400 */ 4475, 4475, 4475, 4475, 4475, 4475, 39, 2989, 70, 1146, + /* 410 */ 1193, 1243, 1425, 1711, 715, 1434, 1560, 1570, 1124, 497, + /* 420 */ 770, 1584, 1542, 1861, 1878, 1699, 1808, 1004, 1169, 1026, + /* 430 */ 1026, 1026, 1026, 1026, 1026, 1026, 1026, 1026, 237, 150, + /* 440 */ 992, 831, 3, 3, 681, 106, 321, 182, 686, 711, + /* 450 */ 334, 752, 837, 767, 928, 928, 687, 736, 1138, 687, + /* 460 */ 687, 687, 1407, 1275, 1206, 1382, 1446, 1365, 1473, 1509, + /* 470 */ 10, 1495, 1373, 399, 1374, 1403, 399, 1408, 1478, 1499, + /* 480 */ 1526, 1302, 1527, 1538, 1545, 1396, 1469, 1489, 179, 1500, + /* 490 */ 1513, 1519, 1561, 1351, 1301, 1130, 1507, 1562, 1568, 1569, + /* 500 */ 1563, 1577, 1488, 1587, 1610, 1632, 1573, 1625, 1633, 1645, + /* 510 */ 1653, 1657, 1558, 1591, 1624, 1692, 1704, 1718, 1720, 1723, + /* 520 */ 1733, 1737, 1741, 1667, 399, 1708, 1730, 1735, 1736, 1742, + /* 530 */ 1575, 1682, 1541, 1589, 1743, 1744, 1719, 1702, 2256, 2257, + /* 540 */ 2258, 2212, 2260, 2225, 2017, 2227, 2228, 2231, 2020, 2268, + /* 550 */ 2233, 2234, 2026, 2236, 2273, 2274, 2030, 2276, 2241, 2278, + /* 560 */ 2243, 2280, 2259, 2282, 2247, 2044, 2285, 2059, 2287, 2062, + /* 570 */ 2064, 2069, 2074, 2294, 2295, 2297, 2083, 2085, 2300, 2301, + /* 580 */ 2142, 2253, 2254, 2306, 2271, 2308, 2309, 2275, 2261, 2310, + /* 590 */ 2262, 2319, 2269, 2317, 2320, 2321, 2264, 2322, 2323, 2324, + /* 600 */ 2325, 2326, 2329, 2157, 2298, 2330, 2159, 2331, 2339, 2340, + /* 610 */ 2341, 2342, 2343, 2344, 2345, 2346, 2347, 2349, 2350, 2352, + /* 620 */ 2354, 2355, 2356, 2357, 2358, 2360, 2361, 2312, 2364, 2318, + /* 630 */ 2377, 2382, 2384, 2385, 2389, 2390, 2391, 2392, 2393, 2395, + /* 640 */ 2375, 2398, 2218, 2380, 2239, 2400, 2242, 2402, 2403, 2383, + /* 650 */ 2362, 2386, 2363, 2404, 2335, 2407, 2338, 2374, 2413, 2348, + /* 660 */ 2416, 2353, 2417, 2418, 2387, 2368, 2376, 2426, 2394, 2370, + /* 670 */ 2388, 2428, 2397, 2372, 2396, 2431, 2399, 2434, 2381, 2439, + /* 680 */ 2406, 2445, 2408, 2410, 2414, 2409, 2411, 2432, 2415, 2459, + /* 690 */ 2419, 2423, 2461, 2468, 2474, 2490, 2452, 2288, 2497, 2409, + /* 700 */ 2455, 2508, 2409, 2458, 2510, 2511, 2433, 2513, 2514, 2480, + /* 710 */ 2460, 2475, 2518, 2484, 2464, 2478, 2523, 2489, 2467, 2483, + /* 720 */ 2528, 2493, 2476, 2487, 2532, 2535, 2537, 2538, 2539, 2504, + /* 730 */ 2543, 2544, 2420, 2421, 2515, 2524, 2549, 2530, 2517, 2522, + /* 740 */ 2525, 2526, 2527, 2529, 2534, 2536, 2541, 2531, 2533, 2545, + /* 750 */ 2546, 2552, 2547, 2550, 2551, 2571, 2553, 2579, 2558, 2548, + /* 760 */ 2584, 2563, 2555, 2586, 2587, 2588, 2556, 2593, 2559, 2594, + /* 770 */ 2560, 2603, 2582, 2589, 2570, 2572, 2575, 2494, 2496, 2612, + /* 780 */ 2422, 2405, 2424, 2498, 2401, 2409, 2564, 2617, 2429, 2583, + /* 790 */ 2598, 2622, 2425, 2602, 2446, 2427, 2628, 2643, 2449, 2440, + /* 800 */ 2453, 2442, 2647, 2618, 2334, 2540, 2542, 2554, 2557, 2631, + /* 810 */ 2561, 2562, 2620, 2621, 2565, 2608, 2569, 2610, 2566, 2576, + /* 820 */ 2630, 2632, 2578, 2580, 2581, 2585, 2590, 2634, 2613, 2619, + /* 830 */ 2592, 2635, 2336, 2605, 2595, 2636, 2599, 2637, 2597, 2600, + /* 840 */ 2668, 2641, 2359, 2639, 2642, 2651, 2658, 2664, 2665, 2604, + /* 850 */ 2606, 2653, 2441, 2669, 2657, 2711, 2712, 2609, 2674, 2607, + /* 860 */ 2611, 2615, 2616, 2567, 2624, 2713, 2677, 2519, 2724, 2629, + /* 870 */ 2638, 2573, 2684, 2577, 2698, 2654, 2457, 2661, 2747, 2728, + /* 880 */ 2499, 2640, 2655, 2656, 2662, 2666, 2659, 2663, 2667, 2670, + /* 890 */ 2671, 2672, 2673, 2675, 2700, 2678, 2679, 2703, 2676, 2735, + /* 900 */ 2591, 2680, 2681, 2776, 2682, 2685, 2601, 2743, 2688, 2687, + /* 910 */ 2779, 2770, 2690, 2691, 2409, 2742, 2694, 2695, 2683, 2696, + /* 920 */ 2697, 2689, 2786, 2614, 2701, 2781, 2785, 2704, 2705, 2789, + /* 930 */ 2708, 2710, 2791, 2667, 2714, 2794, 2670, 2722, 2806, 2671, + /* 940 */ 2731, 2811, 2672, 2715, 2717, 2718, 2719, 2733, 2790, 2734, + /* 950 */ 2817, 2736, 2790, 2790, 2838, 2782, 2784, 2841, 2828, 2830, + /* 960 */ 2832, 2834, 2835, 2836, 2837, 2839, 2840, 2842, 2844, 2792, + /* 970 */ 2762, 2796, 2771, 2852, 2857, 2861, 2862, 2877, 2864, 2865, + /* 980 */ 2866, 2818, 2531, 2868, 2533, 2869, 2870, 2872, 2873, 2888, + /* 990 */ 2875, 2916, 2881, 2856, 2874, 2925, 2890, 2876, 2887, 2934, + /* 1000 */ 2899, 2879, 2894, 2939, 2904, 2884, 2898, 2943, 2908, 2945, + /* 1010 */ 2924, 2947, 2926, 2914, 2949, 2929, 2919, 2918, 2920, 2935, + /* 1020 */ 2937, 2940, 2941, 2938, 2944, }; -#define YY_REDUCE_COUNT (404) -#define YY_REDUCE_MIN (-519) -#define YY_REDUCE_MAX (3874) +#define YY_REDUCE_COUNT (405) +#define YY_REDUCE_MIN (-536) +#define YY_REDUCE_MAX (3957) static const short yy_reduce_ofst[] = { - /* 0 */ -376, -346, 1320, -204, 267, 622, 977, 1487, 1555, 1620, - /* 10 */ 1593, 1688, 1726, 1770, 1852, 1935, -98, -59, 303, 2024, - /* 20 */ 2061, 2089, 2195, 2220, 2289, 2332, 2354, 2375, 2496, 2521, - /* 30 */ 2563, 2628, 2655, 2693, 2722, 2761, 2787, 2852, 2873, 2950, - /* 40 */ 2994, 3015, 3035, 3100, 3141, 3165, 3232, 3254, 3297, 3321, - /* 50 */ 3442, 3461, 3483, 3510, 3548, 3597, 3636, 3680, 3704, 3723, - /* 60 */ 3792, 3874, -321, 280, -469, -48, -457, -363, 899, 985, - /* 70 */ 554, 1022, 1242, 304, 197, -72, 244, -160, 237, -417, - /* 80 */ -328, -393, 111, -133, 84, -6, 434, -380, -304, -140, - /* 90 */ -423, -414, 376, 336, 560, -252, -44, 328, 391, 495, - /* 100 */ 586, -395, 31, 644, 667, 673, 676, 617, -158, 247, - /* 110 */ 326, 700, 709, 680, 570, 742, 449, 746, -236, 749, - /* 120 */ 752, 759, 812, 431, 814, 871, 893, -50, 895, 591, - /* 130 */ 902, 755, -185, -519, -519, -38, -119, -389, -332, -20, - /* 140 */ 310, 470, 616, 623, 664, 720, 726, 735, 782, 791, - /* 150 */ 919, 956, 981, 995, 997, 1004, 1007, 1026, 1050, 1059, - /* 160 */ -262, -379, 148, -8, 896, 911, 939, -379, 840, 868, - /* 170 */ 229, 482, -246, 779, 941, 876, 666, -416, 250, 306, - /* 180 */ 865, 332, 739, 917, 982, 1002, 1028, -188, 1041, 447, - /* 190 */ 472, 588, 643, 698, 724, 636, 815, 891, 875, 830, - /* 200 */ 830, 882, 970, 1102, 1036, 1124, 830, 1140, 1140, 1251, - /* 210 */ 1314, 1359, 1309, 1228, 1229, 1230, 1312, 1232, 1140, 1327, - /* 220 */ 1384, 1292, 1388, 1344, 1311, 1333, 1335, 1140, 1258, 1265, - /* 230 */ 1239, 1276, 1269, 1346, 1391, 1341, 1322, 1432, 1350, 1351, - /* 240 */ 1431, 1372, 1437, 1395, 1472, 1477, 1424, 1481, 1427, 1433, - /* 250 */ 1485, 1486, 1491, 1436, 1440, 1441, 1442, 1483, 1488, 1498, - /* 260 */ 1499, 1492, 1502, 1504, 1505, 1514, 1512, 1517, 1519, 1426, - /* 270 */ 1510, 1511, 1473, 1515, 1523, 1453, 1520, 1525, 1526, 1467, - /* 280 */ 1528, 1479, 1531, 1533, 1521, 1530, 1547, 1536, 1562, 1529, - /* 290 */ 1534, 1535, 1537, 1538, 1540, 1546, 1551, 1552, 1554, 1556, - /* 300 */ 1559, 1565, 1572, 1569, 1516, 1548, 1553, 1478, 1493, 1490, - /* 310 */ 1566, 1494, 1550, 1557, 1558, 1592, 1563, 1601, 1564, 1468, - /* 320 */ 1568, 1469, 1574, 1471, 1470, 1476, 1480, 1495, 1484, 1570, - /* 330 */ 1497, 1501, 1465, 1508, 1575, 1645, 1576, 1509, 1581, 1651, - /* 340 */ 1663, 1668, 1613, 1608, 1632, 1634, 1635, 1617, 1644, 1621, - /* 350 */ 1685, 1646, 1640, 1701, 1584, 1659, 1649, 1673, 1721, 1715, - /* 360 */ 1737, 1746, 1666, 1703, 1707, 1708, 1713, 1719, 1720, 1723, - /* 370 */ 1725, 1729, 1730, 1731, 1732, 1733, 1736, 1739, 1740, 1741, - /* 380 */ 1749, 1756, 1760, 1761, 1716, 1762, 1748, 1751, 1763, 1768, - /* 390 */ 1769, 1780, 1771, 1728, 1767, 1709, 1735, 1747, 1754, 1789, - /* 400 */ 1790, 1781, 1793, 1773, 1834, + /* 0 */ 418, -349, -99, 142, 552, 829, 1008, 1285, 1582, 1664, + /* 10 */ 1106, 1859, 1941, 176, 1336, 1613, -135, 289, 2123, 419, + /* 20 */ 974, 2229, 2252, 2328, 2379, 2412, 2477, 2500, 2568, 2633, + /* 30 */ 2660, 2746, 2766, 2787, 2893, 2913, 2933, 3020, 3046, 3069, + /* 40 */ 3089, 3111, 3176, 3195, 3217, 3282, 3331, 3351, 3371, 3458, + /* 50 */ 3477, 3497, 3564, 3584, 3603, 3671, 3690, 3739, 3759, 3827, + /* 60 */ 3851, 3933, 3957, -351, 448, 605, -290, -366, 481, 1203, + /* 70 */ 1464, 329, 442, 1485, -412, -536, -153, -393, -534, 14, + /* 80 */ 197, 347, -106, -49, 254, 271, 480, 511, -400, -398, + /* 90 */ -368, -374, -100, -245, 57, 192, 164, -382, -90, 507, + /* 100 */ 539, 551, 43, 229, 718, 806, 834, 843, 305, 151, + /* 110 */ -114, 385, 847, 879, 639, 472, 889, 218, 900, 706, + /* 120 */ 983, 995, 997, 1006, -219, 1029, 1046, 1052, 729, 1061, + /* 130 */ 228, 792, 1017, 616, 61, 61, 184, -415, -35, -259, + /* 140 */ -503, -193, -25, 443, 502, 603, 617, 658, 734, 735, + /* 150 */ 738, 778, 827, 895, 901, 935, 963, 967, 1022, 1027, + /* 160 */ 1039, -14, 121, 33, 316, 256, 588, 651, 121, 258, + /* 170 */ 363, 787, 788, 508, -28, 692, 493, 844, 768, -428, + /* 180 */ 143, 905, 189, 786, 897, 860, 899, 1016, 754, 739, + /* 190 */ 471, 568, 574, 737, 755, 766, 784, 724, 950, 1011, + /* 200 */ 823, 823, 721, 987, 1034, 1072, 1217, 823, 1192, 1192, + /* 210 */ 1236, 1261, 1292, 1244, 1162, 1200, 1202, 1296, 1218, 1192, + /* 220 */ 1317, 1377, 1282, 1383, 1332, 1312, 1334, 1338, 1192, 1262, + /* 230 */ 1263, 1248, 1278, 1265, 1350, 1400, 1348, 1329, 1427, 1344, + /* 240 */ 1342, 1426, 1349, 1435, 1360, 1453, 1456, 1409, 1465, 1416, + /* 250 */ 1421, 1475, 1476, 1479, 1433, 1429, 1437, 1438, 1482, 1486, + /* 260 */ 1497, 1501, 1491, 1503, 1504, 1505, 1514, 1511, 1516, 1517, + /* 270 */ 1444, 1521, 1529, 1487, 1539, 1548, 1477, 1544, 1553, 1550, + /* 280 */ 1494, 1552, 1506, 1554, 1555, 1546, 1551, 1571, 1566, 1576, + /* 290 */ 1549, 1556, 1557, 1559, 1564, 1565, 1572, 1578, 1579, 1580, + /* 300 */ 1581, 1586, 1592, 1593, 1596, 1537, 1583, 1585, 1508, 1520, + /* 310 */ 1531, 1594, 1533, 1540, 1547, 1588, 1620, 1574, 1634, 1598, + /* 320 */ 1490, 1590, 1492, 1597, 1502, 1515, 1512, 1498, 1522, 1518, + /* 330 */ 1595, 1523, 1535, 1528, 1536, 1543, 1672, 1599, 1567, 1602, + /* 340 */ 1678, 1674, 1675, 1630, 1654, 1656, 1659, 1662, 1658, 1665, + /* 350 */ 1666, 1725, 1679, 1661, 1727, 1612, 1690, 1681, 1683, 1747, + /* 360 */ 1721, 1750, 1748, 1697, 1698, 1701, 1703, 1705, 1709, 1715, + /* 370 */ 1716, 1729, 1731, 1732, 1734, 1760, 1766, 1767, 1768, 1778, + /* 380 */ 1779, 1780, 1781, 1783, 1785, 1728, 1787, 1751, 1752, 1784, + /* 390 */ 1793, 1837, 1797, 1813, 1758, 1803, 1746, 1754, 1769, 1773, + /* 400 */ 1815, 1820, 1809, 1821, 1838, 1864, }; static const YYACTIONTYPE yy_default[] = { - /* 0 */ 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, - /* 10 */ 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, - /* 20 */ 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, - /* 30 */ 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, - /* 40 */ 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, - /* 50 */ 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, - /* 60 */ 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, - /* 70 */ 2268, 2268, 2645, 2268, 2268, 2601, 2268, 2268, 2268, 2268, - /* 80 */ 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, - /* 90 */ 2608, 2608, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, - /* 100 */ 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, - /* 110 */ 2268, 2268, 2268, 2374, 2268, 2268, 2268, 2268, 2268, 2268, - /* 120 */ 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, - /* 130 */ 2268, 2268, 2372, 2915, 2268, 3041, 2686, 2268, 2268, 2944, - /* 140 */ 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, - /* 150 */ 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, - /* 160 */ 2268, 2927, 2268, 2268, 2345, 2345, 2268, 2927, 2927, 2927, - /* 170 */ 2887, 2887, 2372, 2268, 2268, 2374, 2268, 2688, 2268, 2268, - /* 180 */ 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2517, 2298, 2268, - /* 190 */ 2268, 2268, 2268, 2268, 2268, 2671, 2268, 2268, 2973, 2919, - /* 200 */ 2920, 3035, 2268, 2976, 2938, 2268, 2933, 2268, 2268, 2268, - /* 210 */ 2268, 2268, 2963, 2268, 2268, 2268, 2268, 2268, 2268, 2613, - /* 220 */ 2268, 2714, 2268, 2460, 2665, 2268, 2268, 2268, 2268, 2268, - /* 230 */ 3019, 2917, 2957, 2268, 2268, 2967, 2268, 2268, 2268, 2702, - /* 240 */ 2374, 2268, 2374, 2658, 2596, 2268, 2606, 2268, 2606, 2603, - /* 250 */ 2268, 2268, 2268, 2606, 2603, 2603, 2603, 2448, 2444, 2268, - /* 260 */ 2268, 2442, 2268, 2268, 2268, 2268, 2328, 2268, 2328, 2268, - /* 270 */ 2374, 2374, 2268, 2374, 2268, 2268, 2374, 2268, 2374, 2268, - /* 280 */ 2374, 2268, 2374, 2374, 2477, 2477, 2268, 2374, 2268, 2268, - /* 290 */ 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, - /* 300 */ 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2700, 2681, 2268, - /* 310 */ 2372, 2268, 2669, 2667, 2268, 2372, 2967, 2268, 2268, 2989, - /* 320 */ 2984, 2989, 2984, 3003, 2999, 2989, 3008, 3005, 2969, 2967, - /* 330 */ 2950, 2946, 3038, 3025, 3021, 2268, 2268, 2955, 2953, 2268, - /* 340 */ 2372, 2372, 2984, 2268, 2268, 2268, 2268, 2984, 2268, 2268, - /* 350 */ 2372, 2268, 2268, 2372, 2268, 2268, 2268, 2268, 2372, 2268, - /* 360 */ 2372, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, - /* 370 */ 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, - /* 380 */ 2268, 2268, 2268, 2268, 2479, 2268, 2268, 2372, 2268, 2300, - /* 390 */ 2302, 2312, 2268, 2660, 3041, 2686, 2691, 2641, 2641, 2520, - /* 400 */ 2520, 3041, 2520, 2375, 2273, 2268, 2268, 2268, 2268, 2268, - /* 410 */ 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, - /* 420 */ 2819, 2268, 2268, 2268, 2268, 2268, 2268, 3002, 3001, 2820, - /* 430 */ 2268, 2891, 2890, 2889, 2880, 2819, 2473, 2268, 2268, 2268, - /* 440 */ 2818, 2817, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, - /* 450 */ 2268, 2268, 2632, 2631, 2811, 2268, 2268, 2812, 2810, 2809, - /* 460 */ 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2464, - /* 470 */ 2268, 2268, 2461, 2268, 2268, 2268, 2268, 2268, 2268, 2268, - /* 480 */ 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, - /* 490 */ 3022, 3026, 2268, 2268, 2268, 2268, 2916, 2268, 2268, 2268, - /* 500 */ 2268, 2268, 2790, 2268, 2268, 2268, 2268, 2268, 2758, 2753, - /* 510 */ 2744, 2735, 2750, 2741, 2729, 2747, 2738, 2726, 2723, 2268, - /* 520 */ 2488, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, - /* 530 */ 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, - /* 540 */ 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, - /* 550 */ 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, - /* 560 */ 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, - /* 570 */ 2268, 2268, 2268, 2268, 2268, 2268, 2602, 2268, 2268, 2268, - /* 580 */ 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, - /* 590 */ 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, - /* 600 */ 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, - /* 610 */ 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, - /* 620 */ 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, - /* 630 */ 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, - /* 640 */ 2268, 2617, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, - /* 650 */ 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, - /* 660 */ 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, - /* 670 */ 2268, 2268, 2268, 2268, 2268, 2317, 2797, 2268, 2268, 2268, - /* 680 */ 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, - /* 690 */ 2800, 2268, 2268, 2801, 2268, 2268, 2268, 2268, 2268, 2268, - /* 700 */ 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, - /* 710 */ 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, - /* 720 */ 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, - /* 730 */ 2268, 2268, 2268, 2268, 2268, 2268, 2419, 2418, 2268, 2268, - /* 740 */ 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, - /* 750 */ 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, - /* 760 */ 2268, 2268, 2268, 2268, 2268, 2268, 2802, 2268, 2268, 2268, - /* 770 */ 2268, 2685, 2268, 2268, 2792, 2268, 2268, 2268, 2268, 2268, - /* 780 */ 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, - /* 790 */ 2268, 3018, 2970, 2268, 2268, 2268, 2268, 2268, 2268, 2268, - /* 800 */ 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, - /* 810 */ 2268, 2268, 2268, 2268, 2268, 2790, 2268, 3000, 2268, 2268, - /* 820 */ 2268, 2268, 2268, 2268, 2268, 3016, 2268, 3020, 2268, 2268, - /* 830 */ 2268, 2268, 2268, 2268, 2268, 2926, 2922, 2268, 2268, 2918, - /* 840 */ 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, - /* 850 */ 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, - /* 860 */ 2877, 2268, 2268, 2268, 2911, 2268, 2268, 2268, 2268, 2268, - /* 870 */ 2268, 2268, 2268, 2268, 2516, 2515, 2514, 2513, 2268, 2268, - /* 880 */ 2268, 2268, 2268, 2268, 2802, 2268, 2805, 2268, 2268, 2268, - /* 890 */ 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, - /* 900 */ 2789, 2268, 2854, 2853, 2268, 2268, 2268, 2268, 2268, 2268, - /* 910 */ 2268, 2268, 2268, 2510, 2268, 2268, 2268, 2268, 2268, 2268, - /* 920 */ 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2494, - /* 930 */ 2492, 2491, 2490, 2268, 2527, 2268, 2268, 2268, 2523, 2522, - /* 940 */ 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, - /* 950 */ 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2393, - /* 960 */ 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2385, 2268, - /* 970 */ 2384, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, - /* 980 */ 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, - /* 990 */ 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, - /* 1000 */ 2297, 2268, 2268, 2268, 2268, 2268, 2268, 2268, 2268, + /* 0 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, + /* 10 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, + /* 20 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, + /* 30 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, + /* 40 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, + /* 50 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, + /* 60 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, + /* 70 */ 2300, 2300, 2300, 2683, 2300, 2300, 2639, 2300, 2300, 2300, + /* 80 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, + /* 90 */ 2300, 2646, 2646, 2300, 2300, 2300, 2300, 2300, 2300, 2300, + /* 100 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, + /* 110 */ 2300, 2300, 2300, 2300, 2410, 2300, 2300, 2300, 2300, 2300, + /* 120 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, + /* 130 */ 2300, 2300, 2300, 2408, 2956, 2300, 3084, 2724, 2300, 2300, + /* 140 */ 2985, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, + /* 150 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, + /* 160 */ 2300, 2300, 2968, 2300, 2300, 2381, 2381, 2300, 2968, 2968, + /* 170 */ 2968, 2928, 2928, 2408, 2300, 2300, 2410, 2300, 2726, 2300, + /* 180 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2553, 2330, + /* 190 */ 2709, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 3014, + /* 200 */ 2960, 2961, 3078, 2300, 3017, 2979, 2300, 2974, 2300, 2300, + /* 210 */ 2300, 2300, 2300, 3004, 2300, 2300, 2300, 2300, 2300, 2300, + /* 220 */ 2651, 2300, 2752, 2300, 2496, 2703, 2300, 2300, 2300, 2300, + /* 230 */ 2300, 3062, 2958, 2998, 2300, 2300, 3008, 2300, 2300, 2300, + /* 240 */ 2740, 2410, 2300, 2410, 2696, 2634, 2300, 2644, 2300, 2644, + /* 250 */ 2641, 2300, 2300, 2300, 2644, 2641, 2641, 2641, 2484, 2480, + /* 260 */ 2300, 2300, 2478, 2300, 2300, 2300, 2300, 2360, 2300, 2360, + /* 270 */ 2300, 2410, 2410, 2300, 2410, 2300, 2300, 2410, 2300, 2410, + /* 280 */ 2300, 2410, 2300, 2410, 2410, 2513, 2513, 2300, 2410, 2300, + /* 290 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, + /* 300 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2738, 2719, + /* 310 */ 2300, 2408, 2300, 2707, 2705, 2300, 2408, 3008, 2300, 2300, + /* 320 */ 3032, 3027, 3032, 3027, 3046, 3042, 3032, 3051, 3048, 3010, + /* 330 */ 3008, 2991, 2987, 3081, 3068, 3064, 2300, 2300, 2996, 2994, + /* 340 */ 2300, 2408, 2408, 3027, 2300, 2300, 2300, 2300, 3027, 2300, + /* 350 */ 2300, 2408, 2300, 2300, 2408, 2300, 2300, 2300, 2300, 2408, + /* 360 */ 2300, 2408, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, + /* 370 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, + /* 380 */ 2300, 2300, 2300, 2300, 2300, 2515, 2300, 2300, 2408, 2300, + /* 390 */ 2332, 2334, 2344, 2300, 2698, 3084, 2724, 2729, 2679, 2679, + /* 400 */ 2556, 2556, 3084, 2556, 2411, 2305, 2300, 2300, 2300, 2300, + /* 410 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, + /* 420 */ 2300, 2300, 2857, 2300, 2300, 2300, 2300, 2300, 2300, 3045, + /* 430 */ 3044, 2858, 2300, 2932, 2931, 2930, 2921, 2857, 2509, 2300, + /* 440 */ 2300, 2300, 2856, 2855, 2300, 2300, 2300, 2300, 2300, 2300, + /* 450 */ 2300, 2300, 2300, 2300, 2670, 2669, 2849, 2300, 2300, 2850, + /* 460 */ 2848, 2847, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, + /* 470 */ 2300, 2300, 2300, 2500, 2300, 2300, 2497, 2300, 2300, 2300, + /* 480 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, + /* 490 */ 2300, 2300, 2300, 2300, 3065, 3069, 2300, 2300, 2300, 2300, + /* 500 */ 2957, 2300, 2300, 2300, 2300, 2300, 2828, 2300, 2300, 2300, + /* 510 */ 2300, 2300, 2796, 2791, 2782, 2773, 2788, 2779, 2767, 2785, + /* 520 */ 2776, 2764, 2761, 2300, 2524, 2300, 2300, 2300, 2300, 2300, + /* 530 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, + /* 540 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, + /* 550 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, + /* 560 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, + /* 570 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, + /* 580 */ 2640, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, + /* 590 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, + /* 600 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, + /* 610 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, + /* 620 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, + /* 630 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, + /* 640 */ 2300, 2300, 2300, 2300, 2300, 2300, 2655, 2300, 2300, 2300, + /* 650 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, + /* 660 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, + /* 670 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, + /* 680 */ 2300, 2300, 2300, 2300, 2349, 2835, 2300, 2300, 2300, 2300, + /* 690 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2838, + /* 700 */ 2300, 2300, 2839, 2300, 2300, 2300, 2300, 2300, 2300, 2300, + /* 710 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, + /* 720 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, + /* 730 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, + /* 740 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2455, 2454, 2300, + /* 750 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, + /* 760 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, + /* 770 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2840, 2300, 2300, + /* 780 */ 2300, 2300, 2723, 2300, 2300, 2830, 2300, 2300, 2300, 2300, + /* 790 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, + /* 800 */ 2300, 2300, 3061, 3011, 2300, 2300, 2300, 2300, 2300, 2300, + /* 810 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, + /* 820 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2828, + /* 830 */ 2300, 3043, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 3059, + /* 840 */ 2300, 3063, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2967, + /* 850 */ 2963, 2300, 2300, 2959, 2300, 2300, 2300, 2300, 2300, 2300, + /* 860 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, + /* 870 */ 2300, 2300, 2300, 2300, 2918, 2300, 2300, 2300, 2952, 2300, + /* 880 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2552, 2551, + /* 890 */ 2550, 2549, 2300, 2300, 2300, 2300, 2300, 2300, 2840, 2300, + /* 900 */ 2843, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, + /* 910 */ 2300, 2300, 2300, 2300, 2827, 2300, 2895, 2894, 2300, 2300, + /* 920 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2546, 2300, 2300, + /* 930 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, + /* 940 */ 2300, 2300, 2300, 2530, 2528, 2527, 2526, 2300, 2563, 2300, + /* 950 */ 2300, 2300, 2559, 2558, 2300, 2300, 2300, 2300, 2300, 2300, + /* 960 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, + /* 970 */ 2300, 2300, 2300, 2429, 2300, 2300, 2300, 2300, 2300, 2300, + /* 980 */ 2300, 2300, 2421, 2300, 2420, 2300, 2300, 2300, 2300, 2300, + /* 990 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, + /* 1000 */ 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, 2300, + /* 1010 */ 2300, 2300, 2300, 2300, 2300, 2300, 2329, 2300, 2300, 2300, + /* 1020 */ 2300, 2300, 2300, 2300, 2300, }; /********** End of lemon-generated parsing tables *****************************/ @@ -1470,6 +1493,9 @@ static const YYCODETYPE yyFallback[] = { 0, /* NK_DOT => nothing */ 0, /* WITH => nothing */ 0, /* ENCRYPT_KEY => nothing */ + 0, /* ANODE => nothing */ + 0, /* UPDATE => nothing */ + 0, /* ANODES => nothing */ 0, /* DNODE => nothing */ 0, /* PORT => nothing */ 0, /* DNODES => nothing */ @@ -1529,12 +1555,12 @@ static const YYCODETYPE yyFallback[] = { 0, /* BWLIMIT => nothing */ 0, /* START => nothing */ 0, /* TIMESTAMP => nothing */ - 337, /* END => ABORT */ + 343, /* END => ABORT */ 0, /* TABLE => nothing */ 0, /* NK_LP => nothing */ 0, /* NK_RP => nothing */ 0, /* USING => nothing */ - 337, /* FILE => ABORT */ + 343, /* FILE => ABORT */ 0, /* STABLE => nothing */ 0, /* COLUMN => nothing */ 0, /* MODIFY => nothing */ @@ -1602,7 +1628,7 @@ static const YYCODETYPE yyFallback[] = { 0, /* VNODES => nothing */ 0, /* ALIVE => nothing */ 0, /* VIEWS => nothing */ - 337, /* VIEW => ABORT */ + 343, /* VIEW => ABORT */ 0, /* COMPACTS => nothing */ 0, /* NORMAL => nothing */ 0, /* CHILD => nothing */ @@ -1645,14 +1671,13 @@ static const YYCODETYPE yyFallback[] = { 0, /* PAUSE => nothing */ 0, /* RESUME => nothing */ 0, /* PRIMARY => nothing */ - 337, /* KEY => ABORT */ + 343, /* KEY => ABORT */ 0, /* TRIGGER => nothing */ 0, /* AT_ONCE => nothing */ 0, /* WINDOW_CLOSE => nothing */ 0, /* IGNORE => nothing */ 0, /* EXPIRED => nothing */ 0, /* FILL_HISTORY => nothing */ - 0, /* UPDATE => nothing */ 0, /* SUBTABLE => nothing */ 0, /* UNTREATED => nothing */ 0, /* KILL => nothing */ @@ -1681,10 +1706,13 @@ static const YYCODETYPE yyFallback[] = { 0, /* WDURATION => nothing */ 0, /* IROWTS => nothing */ 0, /* ISFILLED => nothing */ + 0, /* FLOW => nothing */ + 0, /* FHIGH => nothing */ + 0, /* FROWTS => nothing */ 0, /* CAST => nothing */ 0, /* POSITION => nothing */ 0, /* IN => nothing */ - 337, /* FOR => ABORT */ + 343, /* FOR => ABORT */ 0, /* NOW => nothing */ 0, /* TODAY => nothing */ 0, /* RAND => nothing */ @@ -1718,7 +1746,7 @@ static const YYCODETYPE yyFallback[] = { 0, /* LEFT => nothing */ 0, /* RIGHT => nothing */ 0, /* OUTER => nothing */ - 337, /* SEMI => ABORT */ + 343, /* SEMI => ABORT */ 0, /* ANTI => nothing */ 0, /* ASOF => nothing */ 0, /* WINDOW => nothing */ @@ -1734,6 +1762,7 @@ static const YYCODETYPE yyFallback[] = { 0, /* STATE_WINDOW => nothing */ 0, /* EVENT_WINDOW => nothing */ 0, /* COUNT_WINDOW => nothing */ + 0, /* ANOMALY_WINDOW => nothing */ 0, /* SLIDING => nothing */ 0, /* FILL => nothing */ 0, /* VALUE => nothing */ @@ -1754,51 +1783,51 @@ static const YYCODETYPE yyFallback[] = { 0, /* ASC => nothing */ 0, /* NULLS => nothing */ 0, /* ABORT => nothing */ - 337, /* AFTER => ABORT */ - 337, /* ATTACH => ABORT */ - 337, /* BEFORE => ABORT */ - 337, /* BEGIN => ABORT */ - 337, /* BITAND => ABORT */ - 337, /* BITNOT => ABORT */ - 337, /* BITOR => ABORT */ - 337, /* BLOCKS => ABORT */ - 337, /* CHANGE => ABORT */ - 337, /* COMMA => ABORT */ - 337, /* CONCAT => ABORT */ - 337, /* CONFLICT => ABORT */ - 337, /* COPY => ABORT */ - 337, /* DEFERRED => ABORT */ - 337, /* DELIMITERS => ABORT */ - 337, /* DETACH => ABORT */ - 337, /* DIVIDE => ABORT */ - 337, /* DOT => ABORT */ - 337, /* EACH => ABORT */ - 337, /* FAIL => ABORT */ - 337, /* GLOB => ABORT */ - 337, /* ID => ABORT */ - 337, /* IMMEDIATE => ABORT */ - 337, /* IMPORT => ABORT */ - 337, /* INITIALLY => ABORT */ - 337, /* INSTEAD => ABORT */ - 337, /* ISNULL => ABORT */ - 337, /* MODULES => ABORT */ - 337, /* NK_BITNOT => ABORT */ - 337, /* NK_SEMI => ABORT */ - 337, /* NOTNULL => ABORT */ - 337, /* OF => ABORT */ - 337, /* PLUS => ABORT */ - 337, /* PRIVILEGE => ABORT */ - 337, /* RAISE => ABORT */ - 337, /* RESTRICT => ABORT */ - 337, /* ROW => ABORT */ - 337, /* STAR => ABORT */ - 337, /* STATEMENT => ABORT */ - 337, /* STRICT => ABORT */ - 337, /* STRING => ABORT */ - 337, /* TIMES => ABORT */ - 337, /* VALUES => ABORT */ - 337, /* VARIABLE => ABORT */ - 337, /* WAL => ABORT */ + 343, /* AFTER => ABORT */ + 343, /* ATTACH => ABORT */ + 343, /* BEFORE => ABORT */ + 343, /* BEGIN => ABORT */ + 343, /* BITAND => ABORT */ + 343, /* BITNOT => ABORT */ + 343, /* BITOR => ABORT */ + 343, /* BLOCKS => ABORT */ + 343, /* CHANGE => ABORT */ + 343, /* COMMA => ABORT */ + 343, /* CONCAT => ABORT */ + 343, /* CONFLICT => ABORT */ + 343, /* COPY => ABORT */ + 343, /* DEFERRED => ABORT */ + 343, /* DELIMITERS => ABORT */ + 343, /* DETACH => ABORT */ + 343, /* DIVIDE => ABORT */ + 343, /* DOT => ABORT */ + 343, /* EACH => ABORT */ + 343, /* FAIL => ABORT */ + 343, /* GLOB => ABORT */ + 343, /* ID => ABORT */ + 343, /* IMMEDIATE => ABORT */ + 343, /* IMPORT => ABORT */ + 343, /* INITIALLY => ABORT */ + 343, /* INSTEAD => ABORT */ + 343, /* ISNULL => ABORT */ + 343, /* MODULES => ABORT */ + 343, /* NK_BITNOT => ABORT */ + 343, /* NK_SEMI => ABORT */ + 343, /* NOTNULL => ABORT */ + 343, /* OF => ABORT */ + 343, /* PLUS => ABORT */ + 343, /* PRIVILEGE => ABORT */ + 343, /* RAISE => ABORT */ + 343, /* RESTRICT => ABORT */ + 343, /* ROW => ABORT */ + 343, /* STAR => ABORT */ + 343, /* STATEMENT => ABORT */ + 343, /* STRICT => ABORT */ + 343, /* STRING => ABORT */ + 343, /* TIMES => ABORT */ + 343, /* VALUES => ABORT */ + 343, /* VARIABLE => ABORT */ + 343, /* WAL => ABORT */ }; #endif /* YYFALLBACK */ @@ -1940,519 +1969,525 @@ static const char *const yyTokenName[] = { /* 51 */ "NK_DOT", /* 52 */ "WITH", /* 53 */ "ENCRYPT_KEY", - /* 54 */ "DNODE", - /* 55 */ "PORT", - /* 56 */ "DNODES", - /* 57 */ "RESTORE", - /* 58 */ "NK_IPTOKEN", - /* 59 */ "FORCE", - /* 60 */ "UNSAFE", - /* 61 */ "CLUSTER", - /* 62 */ "LOCAL", - /* 63 */ "QNODE", - /* 64 */ "BNODE", - /* 65 */ "SNODE", - /* 66 */ "MNODE", - /* 67 */ "VNODE", - /* 68 */ "DATABASE", - /* 69 */ "USE", - /* 70 */ "FLUSH", - /* 71 */ "TRIM", - /* 72 */ "S3MIGRATE", - /* 73 */ "COMPACT", - /* 74 */ "IF", - /* 75 */ "NOT", - /* 76 */ "EXISTS", - /* 77 */ "BUFFER", - /* 78 */ "CACHEMODEL", - /* 79 */ "CACHESIZE", - /* 80 */ "COMP", - /* 81 */ "DURATION", - /* 82 */ "NK_VARIABLE", - /* 83 */ "MAXROWS", - /* 84 */ "MINROWS", - /* 85 */ "KEEP", - /* 86 */ "PAGES", - /* 87 */ "PAGESIZE", - /* 88 */ "TSDB_PAGESIZE", - /* 89 */ "PRECISION", - /* 90 */ "REPLICA", - /* 91 */ "VGROUPS", - /* 92 */ "SINGLE_STABLE", - /* 93 */ "RETENTIONS", - /* 94 */ "SCHEMALESS", - /* 95 */ "WAL_LEVEL", - /* 96 */ "WAL_FSYNC_PERIOD", - /* 97 */ "WAL_RETENTION_PERIOD", - /* 98 */ "WAL_RETENTION_SIZE", - /* 99 */ "WAL_ROLL_PERIOD", - /* 100 */ "WAL_SEGMENT_SIZE", - /* 101 */ "STT_TRIGGER", - /* 102 */ "TABLE_PREFIX", - /* 103 */ "TABLE_SUFFIX", - /* 104 */ "S3_CHUNKSIZE", - /* 105 */ "S3_KEEPLOCAL", - /* 106 */ "S3_COMPACT", - /* 107 */ "KEEP_TIME_OFFSET", - /* 108 */ "ENCRYPT_ALGORITHM", - /* 109 */ "NK_COLON", - /* 110 */ "BWLIMIT", - /* 111 */ "START", - /* 112 */ "TIMESTAMP", - /* 113 */ "END", - /* 114 */ "TABLE", - /* 115 */ "NK_LP", - /* 116 */ "NK_RP", - /* 117 */ "USING", - /* 118 */ "FILE", - /* 119 */ "STABLE", - /* 120 */ "COLUMN", - /* 121 */ "MODIFY", - /* 122 */ "RENAME", - /* 123 */ "TAG", - /* 124 */ "SET", - /* 125 */ "NK_EQ", - /* 126 */ "TAGS", - /* 127 */ "BOOL", - /* 128 */ "TINYINT", - /* 129 */ "SMALLINT", - /* 130 */ "INT", - /* 131 */ "INTEGER", - /* 132 */ "BIGINT", - /* 133 */ "FLOAT", - /* 134 */ "DOUBLE", - /* 135 */ "BINARY", - /* 136 */ "NCHAR", - /* 137 */ "UNSIGNED", - /* 138 */ "JSON", - /* 139 */ "VARCHAR", - /* 140 */ "MEDIUMBLOB", - /* 141 */ "BLOB", - /* 142 */ "VARBINARY", - /* 143 */ "GEOMETRY", - /* 144 */ "DECIMAL", - /* 145 */ "COMMENT", - /* 146 */ "MAX_DELAY", - /* 147 */ "WATERMARK", - /* 148 */ "ROLLUP", - /* 149 */ "TTL", - /* 150 */ "SMA", - /* 151 */ "DELETE_MARK", - /* 152 */ "FIRST", - /* 153 */ "LAST", - /* 154 */ "SHOW", - /* 155 */ "FULL", - /* 156 */ "PRIVILEGES", - /* 157 */ "DATABASES", - /* 158 */ "TABLES", - /* 159 */ "STABLES", - /* 160 */ "MNODES", - /* 161 */ "QNODES", - /* 162 */ "ARBGROUPS", - /* 163 */ "FUNCTIONS", - /* 164 */ "INDEXES", - /* 165 */ "ACCOUNTS", - /* 166 */ "APPS", - /* 167 */ "CONNECTIONS", - /* 168 */ "LICENCES", - /* 169 */ "GRANTS", - /* 170 */ "LOGS", - /* 171 */ "MACHINES", - /* 172 */ "ENCRYPTIONS", - /* 173 */ "QUERIES", - /* 174 */ "SCORES", - /* 175 */ "TOPICS", - /* 176 */ "VARIABLES", - /* 177 */ "BNODES", - /* 178 */ "SNODES", - /* 179 */ "TRANSACTIONS", - /* 180 */ "DISTRIBUTED", - /* 181 */ "CONSUMERS", - /* 182 */ "SUBSCRIPTIONS", - /* 183 */ "VNODES", - /* 184 */ "ALIVE", - /* 185 */ "VIEWS", - /* 186 */ "VIEW", - /* 187 */ "COMPACTS", - /* 188 */ "NORMAL", - /* 189 */ "CHILD", - /* 190 */ "LIKE", - /* 191 */ "TBNAME", - /* 192 */ "QTAGS", - /* 193 */ "AS", - /* 194 */ "SYSTEM", - /* 195 */ "TSMA", - /* 196 */ "INTERVAL", - /* 197 */ "RECURSIVE", - /* 198 */ "TSMAS", - /* 199 */ "FUNCTION", - /* 200 */ "INDEX", - /* 201 */ "COUNT", - /* 202 */ "LAST_ROW", - /* 203 */ "META", - /* 204 */ "ONLY", - /* 205 */ "TOPIC", - /* 206 */ "CONSUMER", - /* 207 */ "GROUP", - /* 208 */ "DESC", - /* 209 */ "DESCRIBE", - /* 210 */ "RESET", - /* 211 */ "QUERY", - /* 212 */ "CACHE", - /* 213 */ "EXPLAIN", - /* 214 */ "ANALYZE", - /* 215 */ "VERBOSE", - /* 216 */ "NK_BOOL", - /* 217 */ "RATIO", - /* 218 */ "NK_FLOAT", - /* 219 */ "OUTPUTTYPE", - /* 220 */ "AGGREGATE", - /* 221 */ "BUFSIZE", - /* 222 */ "LANGUAGE", - /* 223 */ "REPLACE", - /* 224 */ "STREAM", - /* 225 */ "INTO", - /* 226 */ "PAUSE", - /* 227 */ "RESUME", - /* 228 */ "PRIMARY", - /* 229 */ "KEY", - /* 230 */ "TRIGGER", - /* 231 */ "AT_ONCE", - /* 232 */ "WINDOW_CLOSE", - /* 233 */ "IGNORE", - /* 234 */ "EXPIRED", - /* 235 */ "FILL_HISTORY", - /* 236 */ "UPDATE", - /* 237 */ "SUBTABLE", - /* 238 */ "UNTREATED", - /* 239 */ "KILL", - /* 240 */ "CONNECTION", - /* 241 */ "TRANSACTION", - /* 242 */ "BALANCE", - /* 243 */ "VGROUP", - /* 244 */ "LEADER", - /* 245 */ "MERGE", - /* 246 */ "REDISTRIBUTE", - /* 247 */ "SPLIT", - /* 248 */ "DELETE", - /* 249 */ "INSERT", - /* 250 */ "NK_BIN", - /* 251 */ "NK_HEX", - /* 252 */ "NULL", - /* 253 */ "NK_QUESTION", - /* 254 */ "NK_ALIAS", - /* 255 */ "NK_ARROW", - /* 256 */ "ROWTS", - /* 257 */ "QSTART", - /* 258 */ "QEND", - /* 259 */ "QDURATION", - /* 260 */ "WSTART", - /* 261 */ "WEND", - /* 262 */ "WDURATION", - /* 263 */ "IROWTS", - /* 264 */ "ISFILLED", - /* 265 */ "CAST", - /* 266 */ "POSITION", - /* 267 */ "IN", - /* 268 */ "FOR", - /* 269 */ "NOW", - /* 270 */ "TODAY", - /* 271 */ "RAND", - /* 272 */ "SUBSTR", - /* 273 */ "SUBSTRING", - /* 274 */ "BOTH", - /* 275 */ "TRAILING", - /* 276 */ "LEADING", - /* 277 */ "TIMEZONE", - /* 278 */ "CLIENT_VERSION", - /* 279 */ "SERVER_VERSION", - /* 280 */ "SERVER_STATUS", - /* 281 */ "CURRENT_USER", - /* 282 */ "PI", - /* 283 */ "CASE", - /* 284 */ "WHEN", - /* 285 */ "THEN", - /* 286 */ "ELSE", - /* 287 */ "BETWEEN", - /* 288 */ "IS", - /* 289 */ "NK_LT", - /* 290 */ "NK_GT", - /* 291 */ "NK_LE", - /* 292 */ "NK_GE", - /* 293 */ "NK_NE", - /* 294 */ "MATCH", - /* 295 */ "NMATCH", - /* 296 */ "CONTAINS", - /* 297 */ "JOIN", - /* 298 */ "INNER", - /* 299 */ "LEFT", - /* 300 */ "RIGHT", - /* 301 */ "OUTER", - /* 302 */ "SEMI", - /* 303 */ "ANTI", - /* 304 */ "ASOF", - /* 305 */ "WINDOW", - /* 306 */ "WINDOW_OFFSET", - /* 307 */ "JLIMIT", - /* 308 */ "SELECT", - /* 309 */ "NK_HINT", - /* 310 */ "DISTINCT", - /* 311 */ "WHERE", - /* 312 */ "PARTITION", - /* 313 */ "BY", - /* 314 */ "SESSION", - /* 315 */ "STATE_WINDOW", - /* 316 */ "EVENT_WINDOW", - /* 317 */ "COUNT_WINDOW", - /* 318 */ "SLIDING", - /* 319 */ "FILL", - /* 320 */ "VALUE", - /* 321 */ "VALUE_F", - /* 322 */ "NONE", - /* 323 */ "PREV", - /* 324 */ "NULL_F", - /* 325 */ "LINEAR", - /* 326 */ "NEXT", - /* 327 */ "HAVING", - /* 328 */ "RANGE", - /* 329 */ "EVERY", - /* 330 */ "ORDER", - /* 331 */ "SLIMIT", - /* 332 */ "SOFFSET", - /* 333 */ "LIMIT", - /* 334 */ "OFFSET", - /* 335 */ "ASC", - /* 336 */ "NULLS", - /* 337 */ "ABORT", - /* 338 */ "AFTER", - /* 339 */ "ATTACH", - /* 340 */ "BEFORE", - /* 341 */ "BEGIN", - /* 342 */ "BITAND", - /* 343 */ "BITNOT", - /* 344 */ "BITOR", - /* 345 */ "BLOCKS", - /* 346 */ "CHANGE", - /* 347 */ "COMMA", - /* 348 */ "CONCAT", - /* 349 */ "CONFLICT", - /* 350 */ "COPY", - /* 351 */ "DEFERRED", - /* 352 */ "DELIMITERS", - /* 353 */ "DETACH", - /* 354 */ "DIVIDE", - /* 355 */ "DOT", - /* 356 */ "EACH", - /* 357 */ "FAIL", - /* 358 */ "GLOB", - /* 359 */ "ID", - /* 360 */ "IMMEDIATE", - /* 361 */ "IMPORT", - /* 362 */ "INITIALLY", - /* 363 */ "INSTEAD", - /* 364 */ "ISNULL", - /* 365 */ "MODULES", - /* 366 */ "NK_BITNOT", - /* 367 */ "NK_SEMI", - /* 368 */ "NOTNULL", - /* 369 */ "OF", - /* 370 */ "PLUS", - /* 371 */ "PRIVILEGE", - /* 372 */ "RAISE", - /* 373 */ "RESTRICT", - /* 374 */ "ROW", - /* 375 */ "STAR", - /* 376 */ "STATEMENT", - /* 377 */ "STRICT", - /* 378 */ "STRING", - /* 379 */ "TIMES", - /* 380 */ "VALUES", - /* 381 */ "VARIABLE", - /* 382 */ "WAL", - /* 383 */ "cmd", - /* 384 */ "account_options", - /* 385 */ "alter_account_options", - /* 386 */ "literal", - /* 387 */ "alter_account_option", - /* 388 */ "ip_range_list", - /* 389 */ "white_list", - /* 390 */ "white_list_opt", - /* 391 */ "is_import_opt", - /* 392 */ "is_createdb_opt", - /* 393 */ "user_name", - /* 394 */ "sysinfo_opt", - /* 395 */ "privileges", - /* 396 */ "priv_level", - /* 397 */ "with_clause_opt", - /* 398 */ "priv_type_list", - /* 399 */ "priv_type", - /* 400 */ "db_name", - /* 401 */ "table_name", - /* 402 */ "topic_name", - /* 403 */ "search_condition", - /* 404 */ "dnode_endpoint", - /* 405 */ "force_opt", - /* 406 */ "unsafe_opt", - /* 407 */ "not_exists_opt", - /* 408 */ "db_options", - /* 409 */ "exists_opt", - /* 410 */ "alter_db_options", - /* 411 */ "speed_opt", - /* 412 */ "start_opt", - /* 413 */ "end_opt", - /* 414 */ "integer_list", - /* 415 */ "variable_list", - /* 416 */ "retention_list", - /* 417 */ "signed", - /* 418 */ "alter_db_option", - /* 419 */ "retention", - /* 420 */ "full_table_name", - /* 421 */ "column_def_list", - /* 422 */ "tags_def_opt", - /* 423 */ "table_options", - /* 424 */ "multi_create_clause", - /* 425 */ "tag_list_opt", - /* 426 */ "tags_def", - /* 427 */ "with_opt", - /* 428 */ "multi_drop_clause", - /* 429 */ "alter_table_clause", - /* 430 */ "alter_table_options", - /* 431 */ "column_name", - /* 432 */ "type_name", - /* 433 */ "column_options", - /* 434 */ "tags_literal", - /* 435 */ "create_subtable_clause", - /* 436 */ "specific_cols_opt", - /* 437 */ "tags_literal_list", - /* 438 */ "drop_table_clause", - /* 439 */ "col_name_list", - /* 440 */ "tag_def_list", - /* 441 */ "tag_def", - /* 442 */ "column_def", - /* 443 */ "type_name_default_len", - /* 444 */ "duration_list", - /* 445 */ "rollup_func_list", - /* 446 */ "alter_table_option", - /* 447 */ "duration_literal", - /* 448 */ "rollup_func_name", - /* 449 */ "function_name", - /* 450 */ "col_name", - /* 451 */ "db_kind_opt", - /* 452 */ "table_kind_db_name_cond_opt", - /* 453 */ "like_pattern_opt", - /* 454 */ "db_name_cond_opt", - /* 455 */ "table_name_cond", - /* 456 */ "from_db_opt", - /* 457 */ "table_kind", - /* 458 */ "tag_item", - /* 459 */ "column_alias", - /* 460 */ "tsma_name", - /* 461 */ "tsma_func_list", - /* 462 */ "full_tsma_name", - /* 463 */ "func_list", - /* 464 */ "index_options", - /* 465 */ "full_index_name", - /* 466 */ "index_name", - /* 467 */ "sliding_opt", - /* 468 */ "sma_stream_opt", - /* 469 */ "func", - /* 470 */ "sma_func_name", - /* 471 */ "expression_list", - /* 472 */ "with_meta", - /* 473 */ "query_or_subquery", - /* 474 */ "where_clause_opt", - /* 475 */ "cgroup_name", - /* 476 */ "analyze_opt", - /* 477 */ "explain_options", - /* 478 */ "insert_query", - /* 479 */ "or_replace_opt", - /* 480 */ "agg_func_opt", - /* 481 */ "bufsize_opt", - /* 482 */ "language_opt", - /* 483 */ "full_view_name", - /* 484 */ "view_name", - /* 485 */ "stream_name", - /* 486 */ "stream_options", - /* 487 */ "col_list_opt", - /* 488 */ "tag_def_or_ref_opt", - /* 489 */ "subtable_opt", - /* 490 */ "ignore_opt", - /* 491 */ "column_stream_def_list", - /* 492 */ "column_stream_def", - /* 493 */ "stream_col_options", - /* 494 */ "expression", - /* 495 */ "on_vgroup_id", - /* 496 */ "dnode_list", - /* 497 */ "literal_func", - /* 498 */ "signed_literal", - /* 499 */ "literal_list", - /* 500 */ "table_alias", - /* 501 */ "expr_or_subquery", - /* 502 */ "pseudo_column", - /* 503 */ "column_reference", - /* 504 */ "function_expression", - /* 505 */ "case_when_expression", - /* 506 */ "star_func", - /* 507 */ "star_func_para_list", - /* 508 */ "trim_specification_type", - /* 509 */ "substr_func", - /* 510 */ "rand_func", - /* 511 */ "noarg_func", - /* 512 */ "other_para_list", - /* 513 */ "star_func_para", - /* 514 */ "when_then_list", - /* 515 */ "case_when_else_opt", - /* 516 */ "common_expression", - /* 517 */ "when_then_expr", - /* 518 */ "predicate", - /* 519 */ "compare_op", - /* 520 */ "in_op", - /* 521 */ "in_predicate_value", - /* 522 */ "boolean_value_expression", - /* 523 */ "boolean_primary", - /* 524 */ "from_clause_opt", - /* 525 */ "table_reference_list", - /* 526 */ "table_reference", - /* 527 */ "table_primary", - /* 528 */ "joined_table", - /* 529 */ "alias_opt", - /* 530 */ "subquery", - /* 531 */ "parenthesized_joined_table", - /* 532 */ "join_type", - /* 533 */ "join_subtype", - /* 534 */ "join_on_clause_opt", - /* 535 */ "window_offset_clause_opt", - /* 536 */ "jlimit_clause_opt", - /* 537 */ "window_offset_literal", - /* 538 */ "query_specification", - /* 539 */ "hint_list", - /* 540 */ "set_quantifier_opt", - /* 541 */ "tag_mode_opt", - /* 542 */ "select_list", - /* 543 */ "partition_by_clause_opt", - /* 544 */ "range_opt", - /* 545 */ "every_opt", - /* 546 */ "fill_opt", - /* 547 */ "twindow_clause_opt", - /* 548 */ "group_by_clause_opt", - /* 549 */ "having_clause_opt", - /* 550 */ "select_item", - /* 551 */ "partition_list", - /* 552 */ "partition_item", - /* 553 */ "interval_sliding_duration_literal", - /* 554 */ "fill_mode", - /* 555 */ "group_by_list", - /* 556 */ "query_expression", - /* 557 */ "query_simple", - /* 558 */ "order_by_clause_opt", - /* 559 */ "slimit_clause_opt", - /* 560 */ "limit_clause_opt", - /* 561 */ "union_query_expression", - /* 562 */ "query_simple_or_subquery", - /* 563 */ "sort_specification_list", - /* 564 */ "sort_specification", - /* 565 */ "ordering_specification_opt", - /* 566 */ "null_ordering_opt", + /* 54 */ "ANODE", + /* 55 */ "UPDATE", + /* 56 */ "ANODES", + /* 57 */ "DNODE", + /* 58 */ "PORT", + /* 59 */ "DNODES", + /* 60 */ "RESTORE", + /* 61 */ "NK_IPTOKEN", + /* 62 */ "FORCE", + /* 63 */ "UNSAFE", + /* 64 */ "CLUSTER", + /* 65 */ "LOCAL", + /* 66 */ "QNODE", + /* 67 */ "BNODE", + /* 68 */ "SNODE", + /* 69 */ "MNODE", + /* 70 */ "VNODE", + /* 71 */ "DATABASE", + /* 72 */ "USE", + /* 73 */ "FLUSH", + /* 74 */ "TRIM", + /* 75 */ "S3MIGRATE", + /* 76 */ "COMPACT", + /* 77 */ "IF", + /* 78 */ "NOT", + /* 79 */ "EXISTS", + /* 80 */ "BUFFER", + /* 81 */ "CACHEMODEL", + /* 82 */ "CACHESIZE", + /* 83 */ "COMP", + /* 84 */ "DURATION", + /* 85 */ "NK_VARIABLE", + /* 86 */ "MAXROWS", + /* 87 */ "MINROWS", + /* 88 */ "KEEP", + /* 89 */ "PAGES", + /* 90 */ "PAGESIZE", + /* 91 */ "TSDB_PAGESIZE", + /* 92 */ "PRECISION", + /* 93 */ "REPLICA", + /* 94 */ "VGROUPS", + /* 95 */ "SINGLE_STABLE", + /* 96 */ "RETENTIONS", + /* 97 */ "SCHEMALESS", + /* 98 */ "WAL_LEVEL", + /* 99 */ "WAL_FSYNC_PERIOD", + /* 100 */ "WAL_RETENTION_PERIOD", + /* 101 */ "WAL_RETENTION_SIZE", + /* 102 */ "WAL_ROLL_PERIOD", + /* 103 */ "WAL_SEGMENT_SIZE", + /* 104 */ "STT_TRIGGER", + /* 105 */ "TABLE_PREFIX", + /* 106 */ "TABLE_SUFFIX", + /* 107 */ "S3_CHUNKSIZE", + /* 108 */ "S3_KEEPLOCAL", + /* 109 */ "S3_COMPACT", + /* 110 */ "KEEP_TIME_OFFSET", + /* 111 */ "ENCRYPT_ALGORITHM", + /* 112 */ "NK_COLON", + /* 113 */ "BWLIMIT", + /* 114 */ "START", + /* 115 */ "TIMESTAMP", + /* 116 */ "END", + /* 117 */ "TABLE", + /* 118 */ "NK_LP", + /* 119 */ "NK_RP", + /* 120 */ "USING", + /* 121 */ "FILE", + /* 122 */ "STABLE", + /* 123 */ "COLUMN", + /* 124 */ "MODIFY", + /* 125 */ "RENAME", + /* 126 */ "TAG", + /* 127 */ "SET", + /* 128 */ "NK_EQ", + /* 129 */ "TAGS", + /* 130 */ "BOOL", + /* 131 */ "TINYINT", + /* 132 */ "SMALLINT", + /* 133 */ "INT", + /* 134 */ "INTEGER", + /* 135 */ "BIGINT", + /* 136 */ "FLOAT", + /* 137 */ "DOUBLE", + /* 138 */ "BINARY", + /* 139 */ "NCHAR", + /* 140 */ "UNSIGNED", + /* 141 */ "JSON", + /* 142 */ "VARCHAR", + /* 143 */ "MEDIUMBLOB", + /* 144 */ "BLOB", + /* 145 */ "VARBINARY", + /* 146 */ "GEOMETRY", + /* 147 */ "DECIMAL", + /* 148 */ "COMMENT", + /* 149 */ "MAX_DELAY", + /* 150 */ "WATERMARK", + /* 151 */ "ROLLUP", + /* 152 */ "TTL", + /* 153 */ "SMA", + /* 154 */ "DELETE_MARK", + /* 155 */ "FIRST", + /* 156 */ "LAST", + /* 157 */ "SHOW", + /* 158 */ "FULL", + /* 159 */ "PRIVILEGES", + /* 160 */ "DATABASES", + /* 161 */ "TABLES", + /* 162 */ "STABLES", + /* 163 */ "MNODES", + /* 164 */ "QNODES", + /* 165 */ "ARBGROUPS", + /* 166 */ "FUNCTIONS", + /* 167 */ "INDEXES", + /* 168 */ "ACCOUNTS", + /* 169 */ "APPS", + /* 170 */ "CONNECTIONS", + /* 171 */ "LICENCES", + /* 172 */ "GRANTS", + /* 173 */ "LOGS", + /* 174 */ "MACHINES", + /* 175 */ "ENCRYPTIONS", + /* 176 */ "QUERIES", + /* 177 */ "SCORES", + /* 178 */ "TOPICS", + /* 179 */ "VARIABLES", + /* 180 */ "BNODES", + /* 181 */ "SNODES", + /* 182 */ "TRANSACTIONS", + /* 183 */ "DISTRIBUTED", + /* 184 */ "CONSUMERS", + /* 185 */ "SUBSCRIPTIONS", + /* 186 */ "VNODES", + /* 187 */ "ALIVE", + /* 188 */ "VIEWS", + /* 189 */ "VIEW", + /* 190 */ "COMPACTS", + /* 191 */ "NORMAL", + /* 192 */ "CHILD", + /* 193 */ "LIKE", + /* 194 */ "TBNAME", + /* 195 */ "QTAGS", + /* 196 */ "AS", + /* 197 */ "SYSTEM", + /* 198 */ "TSMA", + /* 199 */ "INTERVAL", + /* 200 */ "RECURSIVE", + /* 201 */ "TSMAS", + /* 202 */ "FUNCTION", + /* 203 */ "INDEX", + /* 204 */ "COUNT", + /* 205 */ "LAST_ROW", + /* 206 */ "META", + /* 207 */ "ONLY", + /* 208 */ "TOPIC", + /* 209 */ "CONSUMER", + /* 210 */ "GROUP", + /* 211 */ "DESC", + /* 212 */ "DESCRIBE", + /* 213 */ "RESET", + /* 214 */ "QUERY", + /* 215 */ "CACHE", + /* 216 */ "EXPLAIN", + /* 217 */ "ANALYZE", + /* 218 */ "VERBOSE", + /* 219 */ "NK_BOOL", + /* 220 */ "RATIO", + /* 221 */ "NK_FLOAT", + /* 222 */ "OUTPUTTYPE", + /* 223 */ "AGGREGATE", + /* 224 */ "BUFSIZE", + /* 225 */ "LANGUAGE", + /* 226 */ "REPLACE", + /* 227 */ "STREAM", + /* 228 */ "INTO", + /* 229 */ "PAUSE", + /* 230 */ "RESUME", + /* 231 */ "PRIMARY", + /* 232 */ "KEY", + /* 233 */ "TRIGGER", + /* 234 */ "AT_ONCE", + /* 235 */ "WINDOW_CLOSE", + /* 236 */ "IGNORE", + /* 237 */ "EXPIRED", + /* 238 */ "FILL_HISTORY", + /* 239 */ "SUBTABLE", + /* 240 */ "UNTREATED", + /* 241 */ "KILL", + /* 242 */ "CONNECTION", + /* 243 */ "TRANSACTION", + /* 244 */ "BALANCE", + /* 245 */ "VGROUP", + /* 246 */ "LEADER", + /* 247 */ "MERGE", + /* 248 */ "REDISTRIBUTE", + /* 249 */ "SPLIT", + /* 250 */ "DELETE", + /* 251 */ "INSERT", + /* 252 */ "NK_BIN", + /* 253 */ "NK_HEX", + /* 254 */ "NULL", + /* 255 */ "NK_QUESTION", + /* 256 */ "NK_ALIAS", + /* 257 */ "NK_ARROW", + /* 258 */ "ROWTS", + /* 259 */ "QSTART", + /* 260 */ "QEND", + /* 261 */ "QDURATION", + /* 262 */ "WSTART", + /* 263 */ "WEND", + /* 264 */ "WDURATION", + /* 265 */ "IROWTS", + /* 266 */ "ISFILLED", + /* 267 */ "FLOW", + /* 268 */ "FHIGH", + /* 269 */ "FROWTS", + /* 270 */ "CAST", + /* 271 */ "POSITION", + /* 272 */ "IN", + /* 273 */ "FOR", + /* 274 */ "NOW", + /* 275 */ "TODAY", + /* 276 */ "RAND", + /* 277 */ "SUBSTR", + /* 278 */ "SUBSTRING", + /* 279 */ "BOTH", + /* 280 */ "TRAILING", + /* 281 */ "LEADING", + /* 282 */ "TIMEZONE", + /* 283 */ "CLIENT_VERSION", + /* 284 */ "SERVER_VERSION", + /* 285 */ "SERVER_STATUS", + /* 286 */ "CURRENT_USER", + /* 287 */ "PI", + /* 288 */ "CASE", + /* 289 */ "WHEN", + /* 290 */ "THEN", + /* 291 */ "ELSE", + /* 292 */ "BETWEEN", + /* 293 */ "IS", + /* 294 */ "NK_LT", + /* 295 */ "NK_GT", + /* 296 */ "NK_LE", + /* 297 */ "NK_GE", + /* 298 */ "NK_NE", + /* 299 */ "MATCH", + /* 300 */ "NMATCH", + /* 301 */ "CONTAINS", + /* 302 */ "JOIN", + /* 303 */ "INNER", + /* 304 */ "LEFT", + /* 305 */ "RIGHT", + /* 306 */ "OUTER", + /* 307 */ "SEMI", + /* 308 */ "ANTI", + /* 309 */ "ASOF", + /* 310 */ "WINDOW", + /* 311 */ "WINDOW_OFFSET", + /* 312 */ "JLIMIT", + /* 313 */ "SELECT", + /* 314 */ "NK_HINT", + /* 315 */ "DISTINCT", + /* 316 */ "WHERE", + /* 317 */ "PARTITION", + /* 318 */ "BY", + /* 319 */ "SESSION", + /* 320 */ "STATE_WINDOW", + /* 321 */ "EVENT_WINDOW", + /* 322 */ "COUNT_WINDOW", + /* 323 */ "ANOMALY_WINDOW", + /* 324 */ "SLIDING", + /* 325 */ "FILL", + /* 326 */ "VALUE", + /* 327 */ "VALUE_F", + /* 328 */ "NONE", + /* 329 */ "PREV", + /* 330 */ "NULL_F", + /* 331 */ "LINEAR", + /* 332 */ "NEXT", + /* 333 */ "HAVING", + /* 334 */ "RANGE", + /* 335 */ "EVERY", + /* 336 */ "ORDER", + /* 337 */ "SLIMIT", + /* 338 */ "SOFFSET", + /* 339 */ "LIMIT", + /* 340 */ "OFFSET", + /* 341 */ "ASC", + /* 342 */ "NULLS", + /* 343 */ "ABORT", + /* 344 */ "AFTER", + /* 345 */ "ATTACH", + /* 346 */ "BEFORE", + /* 347 */ "BEGIN", + /* 348 */ "BITAND", + /* 349 */ "BITNOT", + /* 350 */ "BITOR", + /* 351 */ "BLOCKS", + /* 352 */ "CHANGE", + /* 353 */ "COMMA", + /* 354 */ "CONCAT", + /* 355 */ "CONFLICT", + /* 356 */ "COPY", + /* 357 */ "DEFERRED", + /* 358 */ "DELIMITERS", + /* 359 */ "DETACH", + /* 360 */ "DIVIDE", + /* 361 */ "DOT", + /* 362 */ "EACH", + /* 363 */ "FAIL", + /* 364 */ "GLOB", + /* 365 */ "ID", + /* 366 */ "IMMEDIATE", + /* 367 */ "IMPORT", + /* 368 */ "INITIALLY", + /* 369 */ "INSTEAD", + /* 370 */ "ISNULL", + /* 371 */ "MODULES", + /* 372 */ "NK_BITNOT", + /* 373 */ "NK_SEMI", + /* 374 */ "NOTNULL", + /* 375 */ "OF", + /* 376 */ "PLUS", + /* 377 */ "PRIVILEGE", + /* 378 */ "RAISE", + /* 379 */ "RESTRICT", + /* 380 */ "ROW", + /* 381 */ "STAR", + /* 382 */ "STATEMENT", + /* 383 */ "STRICT", + /* 384 */ "STRING", + /* 385 */ "TIMES", + /* 386 */ "VALUES", + /* 387 */ "VARIABLE", + /* 388 */ "WAL", + /* 389 */ "cmd", + /* 390 */ "account_options", + /* 391 */ "alter_account_options", + /* 392 */ "literal", + /* 393 */ "alter_account_option", + /* 394 */ "ip_range_list", + /* 395 */ "white_list", + /* 396 */ "white_list_opt", + /* 397 */ "is_import_opt", + /* 398 */ "is_createdb_opt", + /* 399 */ "user_name", + /* 400 */ "sysinfo_opt", + /* 401 */ "privileges", + /* 402 */ "priv_level", + /* 403 */ "with_clause_opt", + /* 404 */ "priv_type_list", + /* 405 */ "priv_type", + /* 406 */ "db_name", + /* 407 */ "table_name", + /* 408 */ "topic_name", + /* 409 */ "search_condition", + /* 410 */ "dnode_endpoint", + /* 411 */ "force_opt", + /* 412 */ "unsafe_opt", + /* 413 */ "not_exists_opt", + /* 414 */ "db_options", + /* 415 */ "exists_opt", + /* 416 */ "alter_db_options", + /* 417 */ "speed_opt", + /* 418 */ "start_opt", + /* 419 */ "end_opt", + /* 420 */ "integer_list", + /* 421 */ "variable_list", + /* 422 */ "retention_list", + /* 423 */ "signed", + /* 424 */ "alter_db_option", + /* 425 */ "retention", + /* 426 */ "full_table_name", + /* 427 */ "column_def_list", + /* 428 */ "tags_def_opt", + /* 429 */ "table_options", + /* 430 */ "multi_create_clause", + /* 431 */ "tag_list_opt", + /* 432 */ "tags_def", + /* 433 */ "with_opt", + /* 434 */ "multi_drop_clause", + /* 435 */ "alter_table_clause", + /* 436 */ "alter_table_options", + /* 437 */ "column_name", + /* 438 */ "type_name", + /* 439 */ "column_options", + /* 440 */ "tags_literal", + /* 441 */ "create_subtable_clause", + /* 442 */ "specific_cols_opt", + /* 443 */ "tags_literal_list", + /* 444 */ "drop_table_clause", + /* 445 */ "col_name_list", + /* 446 */ "tag_def_list", + /* 447 */ "tag_def", + /* 448 */ "column_def", + /* 449 */ "type_name_default_len", + /* 450 */ "duration_list", + /* 451 */ "rollup_func_list", + /* 452 */ "alter_table_option", + /* 453 */ "duration_literal", + /* 454 */ "rollup_func_name", + /* 455 */ "function_name", + /* 456 */ "col_name", + /* 457 */ "db_kind_opt", + /* 458 */ "table_kind_db_name_cond_opt", + /* 459 */ "like_pattern_opt", + /* 460 */ "db_name_cond_opt", + /* 461 */ "table_name_cond", + /* 462 */ "from_db_opt", + /* 463 */ "table_kind", + /* 464 */ "tag_item", + /* 465 */ "column_alias", + /* 466 */ "tsma_name", + /* 467 */ "tsma_func_list", + /* 468 */ "full_tsma_name", + /* 469 */ "func_list", + /* 470 */ "index_options", + /* 471 */ "full_index_name", + /* 472 */ "index_name", + /* 473 */ "sliding_opt", + /* 474 */ "sma_stream_opt", + /* 475 */ "func", + /* 476 */ "sma_func_name", + /* 477 */ "expression_list", + /* 478 */ "with_meta", + /* 479 */ "query_or_subquery", + /* 480 */ "where_clause_opt", + /* 481 */ "cgroup_name", + /* 482 */ "analyze_opt", + /* 483 */ "explain_options", + /* 484 */ "insert_query", + /* 485 */ "or_replace_opt", + /* 486 */ "agg_func_opt", + /* 487 */ "bufsize_opt", + /* 488 */ "language_opt", + /* 489 */ "full_view_name", + /* 490 */ "view_name", + /* 491 */ "stream_name", + /* 492 */ "stream_options", + /* 493 */ "col_list_opt", + /* 494 */ "tag_def_or_ref_opt", + /* 495 */ "subtable_opt", + /* 496 */ "ignore_opt", + /* 497 */ "column_stream_def_list", + /* 498 */ "column_stream_def", + /* 499 */ "stream_col_options", + /* 500 */ "expression", + /* 501 */ "on_vgroup_id", + /* 502 */ "dnode_list", + /* 503 */ "literal_func", + /* 504 */ "signed_literal", + /* 505 */ "literal_list", + /* 506 */ "table_alias", + /* 507 */ "expr_or_subquery", + /* 508 */ "pseudo_column", + /* 509 */ "column_reference", + /* 510 */ "function_expression", + /* 511 */ "case_when_expression", + /* 512 */ "star_func", + /* 513 */ "star_func_para_list", + /* 514 */ "trim_specification_type", + /* 515 */ "substr_func", + /* 516 */ "rand_func", + /* 517 */ "noarg_func", + /* 518 */ "other_para_list", + /* 519 */ "star_func_para", + /* 520 */ "when_then_list", + /* 521 */ "case_when_else_opt", + /* 522 */ "common_expression", + /* 523 */ "when_then_expr", + /* 524 */ "predicate", + /* 525 */ "compare_op", + /* 526 */ "in_op", + /* 527 */ "in_predicate_value", + /* 528 */ "boolean_value_expression", + /* 529 */ "boolean_primary", + /* 530 */ "from_clause_opt", + /* 531 */ "table_reference_list", + /* 532 */ "table_reference", + /* 533 */ "table_primary", + /* 534 */ "joined_table", + /* 535 */ "alias_opt", + /* 536 */ "subquery", + /* 537 */ "parenthesized_joined_table", + /* 538 */ "join_type", + /* 539 */ "join_subtype", + /* 540 */ "join_on_clause_opt", + /* 541 */ "window_offset_clause_opt", + /* 542 */ "jlimit_clause_opt", + /* 543 */ "window_offset_literal", + /* 544 */ "query_specification", + /* 545 */ "hint_list", + /* 546 */ "set_quantifier_opt", + /* 547 */ "tag_mode_opt", + /* 548 */ "select_list", + /* 549 */ "partition_by_clause_opt", + /* 550 */ "range_opt", + /* 551 */ "every_opt", + /* 552 */ "fill_opt", + /* 553 */ "twindow_clause_opt", + /* 554 */ "group_by_clause_opt", + /* 555 */ "having_clause_opt", + /* 556 */ "select_item", + /* 557 */ "partition_list", + /* 558 */ "partition_item", + /* 559 */ "interval_sliding_duration_literal", + /* 560 */ "fill_mode", + /* 561 */ "group_by_list", + /* 562 */ "query_expression", + /* 563 */ "query_simple", + /* 564 */ "order_by_clause_opt", + /* 565 */ "slimit_clause_opt", + /* 566 */ "limit_clause_opt", + /* 567 */ "union_query_expression", + /* 568 */ "query_simple_or_subquery", + /* 569 */ "sort_specification_list", + /* 570 */ "sort_specification", + /* 571 */ "ordering_specification_opt", + /* 572 */ "null_ordering_opt", }; #endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */ @@ -2520,719 +2555,730 @@ static const char *const yyRuleName[] = { /* 57 */ "with_clause_opt ::=", /* 58 */ "with_clause_opt ::= WITH search_condition", /* 59 */ "cmd ::= CREATE ENCRYPT_KEY NK_STRING", - /* 60 */ "cmd ::= CREATE DNODE dnode_endpoint", - /* 61 */ "cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER", - /* 62 */ "cmd ::= DROP DNODE NK_INTEGER force_opt", - /* 63 */ "cmd ::= DROP DNODE dnode_endpoint force_opt", - /* 64 */ "cmd ::= DROP DNODE NK_INTEGER unsafe_opt", - /* 65 */ "cmd ::= DROP DNODE dnode_endpoint unsafe_opt", - /* 66 */ "cmd ::= ALTER DNODE NK_INTEGER NK_STRING", - /* 67 */ "cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING", - /* 68 */ "cmd ::= ALTER ALL DNODES NK_STRING", - /* 69 */ "cmd ::= ALTER ALL DNODES NK_STRING NK_STRING", - /* 70 */ "cmd ::= RESTORE DNODE NK_INTEGER", - /* 71 */ "dnode_endpoint ::= NK_STRING", - /* 72 */ "dnode_endpoint ::= NK_ID", - /* 73 */ "dnode_endpoint ::= NK_IPTOKEN", - /* 74 */ "force_opt ::=", - /* 75 */ "force_opt ::= FORCE", - /* 76 */ "unsafe_opt ::= UNSAFE", - /* 77 */ "cmd ::= ALTER CLUSTER NK_STRING", - /* 78 */ "cmd ::= ALTER CLUSTER NK_STRING NK_STRING", - /* 79 */ "cmd ::= ALTER LOCAL NK_STRING", - /* 80 */ "cmd ::= ALTER LOCAL NK_STRING NK_STRING", - /* 81 */ "cmd ::= CREATE QNODE ON DNODE NK_INTEGER", - /* 82 */ "cmd ::= DROP QNODE ON DNODE NK_INTEGER", - /* 83 */ "cmd ::= RESTORE QNODE ON DNODE NK_INTEGER", - /* 84 */ "cmd ::= CREATE BNODE ON DNODE NK_INTEGER", - /* 85 */ "cmd ::= DROP BNODE ON DNODE NK_INTEGER", - /* 86 */ "cmd ::= CREATE SNODE ON DNODE NK_INTEGER", - /* 87 */ "cmd ::= DROP SNODE ON DNODE NK_INTEGER", - /* 88 */ "cmd ::= CREATE MNODE ON DNODE NK_INTEGER", - /* 89 */ "cmd ::= DROP MNODE ON DNODE NK_INTEGER", - /* 90 */ "cmd ::= RESTORE MNODE ON DNODE NK_INTEGER", - /* 91 */ "cmd ::= RESTORE VNODE ON DNODE NK_INTEGER", - /* 92 */ "cmd ::= CREATE DATABASE not_exists_opt db_name db_options", - /* 93 */ "cmd ::= DROP DATABASE exists_opt db_name", - /* 94 */ "cmd ::= USE db_name", - /* 95 */ "cmd ::= ALTER DATABASE db_name alter_db_options", - /* 96 */ "cmd ::= FLUSH DATABASE db_name", - /* 97 */ "cmd ::= TRIM DATABASE db_name speed_opt", - /* 98 */ "cmd ::= S3MIGRATE DATABASE db_name", - /* 99 */ "cmd ::= COMPACT DATABASE db_name start_opt end_opt", - /* 100 */ "not_exists_opt ::= IF NOT EXISTS", - /* 101 */ "not_exists_opt ::=", - /* 102 */ "exists_opt ::= IF EXISTS", - /* 103 */ "exists_opt ::=", - /* 104 */ "db_options ::=", - /* 105 */ "db_options ::= db_options BUFFER NK_INTEGER", - /* 106 */ "db_options ::= db_options CACHEMODEL NK_STRING", - /* 107 */ "db_options ::= db_options CACHESIZE NK_INTEGER", - /* 108 */ "db_options ::= db_options COMP NK_INTEGER", - /* 109 */ "db_options ::= db_options DURATION NK_INTEGER", - /* 110 */ "db_options ::= db_options DURATION NK_VARIABLE", - /* 111 */ "db_options ::= db_options MAXROWS NK_INTEGER", - /* 112 */ "db_options ::= db_options MINROWS NK_INTEGER", - /* 113 */ "db_options ::= db_options KEEP integer_list", - /* 114 */ "db_options ::= db_options KEEP variable_list", - /* 115 */ "db_options ::= db_options PAGES NK_INTEGER", - /* 116 */ "db_options ::= db_options PAGESIZE NK_INTEGER", - /* 117 */ "db_options ::= db_options TSDB_PAGESIZE NK_INTEGER", - /* 118 */ "db_options ::= db_options PRECISION NK_STRING", - /* 119 */ "db_options ::= db_options REPLICA NK_INTEGER", - /* 120 */ "db_options ::= db_options VGROUPS NK_INTEGER", - /* 121 */ "db_options ::= db_options SINGLE_STABLE NK_INTEGER", - /* 122 */ "db_options ::= db_options RETENTIONS retention_list", - /* 123 */ "db_options ::= db_options SCHEMALESS NK_INTEGER", - /* 124 */ "db_options ::= db_options WAL_LEVEL NK_INTEGER", - /* 125 */ "db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER", - /* 126 */ "db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER", - /* 127 */ "db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER", - /* 128 */ "db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER", - /* 129 */ "db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER", - /* 130 */ "db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER", - /* 131 */ "db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER", - /* 132 */ "db_options ::= db_options STT_TRIGGER NK_INTEGER", - /* 133 */ "db_options ::= db_options TABLE_PREFIX signed", - /* 134 */ "db_options ::= db_options TABLE_SUFFIX signed", - /* 135 */ "db_options ::= db_options S3_CHUNKSIZE NK_INTEGER", - /* 136 */ "db_options ::= db_options S3_KEEPLOCAL NK_INTEGER", - /* 137 */ "db_options ::= db_options S3_KEEPLOCAL NK_VARIABLE", - /* 138 */ "db_options ::= db_options S3_COMPACT NK_INTEGER", - /* 139 */ "db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER", - /* 140 */ "db_options ::= db_options ENCRYPT_ALGORITHM NK_STRING", - /* 141 */ "alter_db_options ::= alter_db_option", - /* 142 */ "alter_db_options ::= alter_db_options alter_db_option", - /* 143 */ "alter_db_option ::= BUFFER NK_INTEGER", - /* 144 */ "alter_db_option ::= CACHEMODEL NK_STRING", - /* 145 */ "alter_db_option ::= CACHESIZE NK_INTEGER", - /* 146 */ "alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER", - /* 147 */ "alter_db_option ::= KEEP integer_list", - /* 148 */ "alter_db_option ::= KEEP variable_list", - /* 149 */ "alter_db_option ::= PAGES NK_INTEGER", - /* 150 */ "alter_db_option ::= REPLICA NK_INTEGER", - /* 151 */ "alter_db_option ::= WAL_LEVEL NK_INTEGER", - /* 152 */ "alter_db_option ::= STT_TRIGGER NK_INTEGER", - /* 153 */ "alter_db_option ::= MINROWS NK_INTEGER", - /* 154 */ "alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER", - /* 155 */ "alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER", - /* 156 */ "alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER", - /* 157 */ "alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER", - /* 158 */ "alter_db_option ::= S3_KEEPLOCAL NK_INTEGER", - /* 159 */ "alter_db_option ::= S3_KEEPLOCAL NK_VARIABLE", - /* 160 */ "alter_db_option ::= S3_COMPACT NK_INTEGER", - /* 161 */ "alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER", - /* 162 */ "alter_db_option ::= ENCRYPT_ALGORITHM NK_STRING", - /* 163 */ "integer_list ::= NK_INTEGER", - /* 164 */ "integer_list ::= integer_list NK_COMMA NK_INTEGER", - /* 165 */ "variable_list ::= NK_VARIABLE", - /* 166 */ "variable_list ::= variable_list NK_COMMA NK_VARIABLE", - /* 167 */ "retention_list ::= retention", - /* 168 */ "retention_list ::= retention_list NK_COMMA retention", - /* 169 */ "retention ::= NK_VARIABLE NK_COLON NK_VARIABLE", - /* 170 */ "retention ::= NK_MINUS NK_COLON NK_VARIABLE", - /* 171 */ "speed_opt ::=", - /* 172 */ "speed_opt ::= BWLIMIT NK_INTEGER", - /* 173 */ "start_opt ::=", - /* 174 */ "start_opt ::= START WITH NK_INTEGER", - /* 175 */ "start_opt ::= START WITH NK_STRING", - /* 176 */ "start_opt ::= START WITH TIMESTAMP NK_STRING", - /* 177 */ "end_opt ::=", - /* 178 */ "end_opt ::= END WITH NK_INTEGER", - /* 179 */ "end_opt ::= END WITH NK_STRING", - /* 180 */ "end_opt ::= END WITH TIMESTAMP NK_STRING", - /* 181 */ "cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options", - /* 182 */ "cmd ::= CREATE TABLE multi_create_clause", - /* 183 */ "cmd ::= CREATE TABLE not_exists_opt USING full_table_name NK_LP tag_list_opt NK_RP FILE NK_STRING", - /* 184 */ "cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options", - /* 185 */ "cmd ::= DROP TABLE with_opt multi_drop_clause", - /* 186 */ "cmd ::= DROP STABLE with_opt exists_opt full_table_name", - /* 187 */ "cmd ::= ALTER TABLE alter_table_clause", - /* 188 */ "cmd ::= ALTER STABLE alter_table_clause", - /* 189 */ "alter_table_clause ::= full_table_name alter_table_options", - /* 190 */ "alter_table_clause ::= full_table_name ADD COLUMN column_name type_name column_options", - /* 191 */ "alter_table_clause ::= full_table_name DROP COLUMN column_name", - /* 192 */ "alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name", - /* 193 */ "alter_table_clause ::= full_table_name MODIFY COLUMN column_name column_options", - /* 194 */ "alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name", - /* 195 */ "alter_table_clause ::= full_table_name ADD TAG column_name type_name", - /* 196 */ "alter_table_clause ::= full_table_name DROP TAG column_name", - /* 197 */ "alter_table_clause ::= full_table_name MODIFY TAG column_name type_name", - /* 198 */ "alter_table_clause ::= full_table_name RENAME TAG column_name column_name", - /* 199 */ "alter_table_clause ::= full_table_name SET TAG column_name NK_EQ tags_literal", - /* 200 */ "multi_create_clause ::= create_subtable_clause", - /* 201 */ "multi_create_clause ::= multi_create_clause create_subtable_clause", - /* 202 */ "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", - /* 203 */ "multi_drop_clause ::= drop_table_clause", - /* 204 */ "multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause", - /* 205 */ "drop_table_clause ::= exists_opt full_table_name", - /* 206 */ "with_opt ::=", - /* 207 */ "with_opt ::= WITH", - /* 208 */ "specific_cols_opt ::=", - /* 209 */ "specific_cols_opt ::= NK_LP col_name_list NK_RP", - /* 210 */ "full_table_name ::= table_name", - /* 211 */ "full_table_name ::= db_name NK_DOT table_name", - /* 212 */ "tag_def_list ::= tag_def", - /* 213 */ "tag_def_list ::= tag_def_list NK_COMMA tag_def", - /* 214 */ "tag_def ::= column_name type_name", - /* 215 */ "column_def_list ::= column_def", - /* 216 */ "column_def_list ::= column_def_list NK_COMMA column_def", - /* 217 */ "column_def ::= column_name type_name column_options", - /* 218 */ "type_name ::= BOOL", - /* 219 */ "type_name ::= TINYINT", - /* 220 */ "type_name ::= SMALLINT", - /* 221 */ "type_name ::= INT", - /* 222 */ "type_name ::= INTEGER", - /* 223 */ "type_name ::= BIGINT", - /* 224 */ "type_name ::= FLOAT", - /* 225 */ "type_name ::= DOUBLE", - /* 226 */ "type_name ::= BINARY NK_LP NK_INTEGER NK_RP", - /* 227 */ "type_name ::= TIMESTAMP", - /* 228 */ "type_name ::= NCHAR NK_LP NK_INTEGER NK_RP", - /* 229 */ "type_name ::= TINYINT UNSIGNED", - /* 230 */ "type_name ::= SMALLINT UNSIGNED", - /* 231 */ "type_name ::= INT UNSIGNED", - /* 232 */ "type_name ::= BIGINT UNSIGNED", - /* 233 */ "type_name ::= JSON", - /* 234 */ "type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP", - /* 235 */ "type_name ::= MEDIUMBLOB", - /* 236 */ "type_name ::= BLOB", - /* 237 */ "type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP", - /* 238 */ "type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP", - /* 239 */ "type_name ::= DECIMAL", - /* 240 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP", - /* 241 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP", - /* 242 */ "type_name_default_len ::= BINARY", - /* 243 */ "type_name_default_len ::= NCHAR", - /* 244 */ "type_name_default_len ::= VARCHAR", - /* 245 */ "type_name_default_len ::= VARBINARY", - /* 246 */ "tags_def_opt ::=", - /* 247 */ "tags_def_opt ::= tags_def", - /* 248 */ "tags_def ::= TAGS NK_LP tag_def_list NK_RP", - /* 249 */ "table_options ::=", - /* 250 */ "table_options ::= table_options COMMENT NK_STRING", - /* 251 */ "table_options ::= table_options MAX_DELAY duration_list", - /* 252 */ "table_options ::= table_options WATERMARK duration_list", - /* 253 */ "table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP", - /* 254 */ "table_options ::= table_options TTL NK_INTEGER", - /* 255 */ "table_options ::= table_options SMA NK_LP col_name_list NK_RP", - /* 256 */ "table_options ::= table_options DELETE_MARK duration_list", - /* 257 */ "alter_table_options ::= alter_table_option", - /* 258 */ "alter_table_options ::= alter_table_options alter_table_option", - /* 259 */ "alter_table_option ::= COMMENT NK_STRING", - /* 260 */ "alter_table_option ::= TTL NK_INTEGER", - /* 261 */ "duration_list ::= duration_literal", - /* 262 */ "duration_list ::= duration_list NK_COMMA duration_literal", - /* 263 */ "rollup_func_list ::= rollup_func_name", - /* 264 */ "rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name", - /* 265 */ "rollup_func_name ::= function_name", - /* 266 */ "rollup_func_name ::= FIRST", - /* 267 */ "rollup_func_name ::= LAST", - /* 268 */ "col_name_list ::= col_name", - /* 269 */ "col_name_list ::= col_name_list NK_COMMA col_name", - /* 270 */ "col_name ::= column_name", - /* 271 */ "cmd ::= SHOW DNODES", - /* 272 */ "cmd ::= SHOW USERS", - /* 273 */ "cmd ::= SHOW USERS FULL", - /* 274 */ "cmd ::= SHOW USER PRIVILEGES", - /* 275 */ "cmd ::= SHOW db_kind_opt DATABASES", - /* 276 */ "cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt", - /* 277 */ "cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt", - /* 278 */ "cmd ::= SHOW db_name_cond_opt VGROUPS", - /* 279 */ "cmd ::= SHOW MNODES", - /* 280 */ "cmd ::= SHOW QNODES", - /* 281 */ "cmd ::= SHOW ARBGROUPS", - /* 282 */ "cmd ::= SHOW FUNCTIONS", - /* 283 */ "cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt", - /* 284 */ "cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name", - /* 285 */ "cmd ::= SHOW STREAMS", - /* 286 */ "cmd ::= SHOW ACCOUNTS", - /* 287 */ "cmd ::= SHOW APPS", - /* 288 */ "cmd ::= SHOW CONNECTIONS", - /* 289 */ "cmd ::= SHOW LICENCES", - /* 290 */ "cmd ::= SHOW GRANTS", - /* 291 */ "cmd ::= SHOW GRANTS FULL", - /* 292 */ "cmd ::= SHOW GRANTS LOGS", - /* 293 */ "cmd ::= SHOW CLUSTER MACHINES", - /* 294 */ "cmd ::= SHOW CREATE DATABASE db_name", - /* 295 */ "cmd ::= SHOW CREATE TABLE full_table_name", - /* 296 */ "cmd ::= SHOW CREATE STABLE full_table_name", - /* 297 */ "cmd ::= SHOW ENCRYPTIONS", - /* 298 */ "cmd ::= SHOW QUERIES", - /* 299 */ "cmd ::= SHOW SCORES", - /* 300 */ "cmd ::= SHOW TOPICS", - /* 301 */ "cmd ::= SHOW VARIABLES", - /* 302 */ "cmd ::= SHOW CLUSTER VARIABLES", - /* 303 */ "cmd ::= SHOW LOCAL VARIABLES", - /* 304 */ "cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt", - /* 305 */ "cmd ::= SHOW BNODES", - /* 306 */ "cmd ::= SHOW SNODES", - /* 307 */ "cmd ::= SHOW CLUSTER", - /* 308 */ "cmd ::= SHOW TRANSACTIONS", - /* 309 */ "cmd ::= SHOW TABLE DISTRIBUTED full_table_name", - /* 310 */ "cmd ::= SHOW CONSUMERS", - /* 311 */ "cmd ::= SHOW SUBSCRIPTIONS", - /* 312 */ "cmd ::= SHOW TAGS FROM table_name_cond from_db_opt", - /* 313 */ "cmd ::= SHOW TAGS FROM db_name NK_DOT table_name", - /* 314 */ "cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt", - /* 315 */ "cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name", - /* 316 */ "cmd ::= SHOW VNODES ON DNODE NK_INTEGER", - /* 317 */ "cmd ::= SHOW VNODES", - /* 318 */ "cmd ::= SHOW db_name_cond_opt ALIVE", - /* 319 */ "cmd ::= SHOW CLUSTER ALIVE", - /* 320 */ "cmd ::= SHOW db_name_cond_opt VIEWS like_pattern_opt", - /* 321 */ "cmd ::= SHOW CREATE VIEW full_table_name", - /* 322 */ "cmd ::= SHOW COMPACTS", - /* 323 */ "cmd ::= SHOW COMPACT NK_INTEGER", - /* 324 */ "table_kind_db_name_cond_opt ::=", - /* 325 */ "table_kind_db_name_cond_opt ::= table_kind", - /* 326 */ "table_kind_db_name_cond_opt ::= db_name NK_DOT", - /* 327 */ "table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT", - /* 328 */ "table_kind ::= NORMAL", - /* 329 */ "table_kind ::= CHILD", - /* 330 */ "db_name_cond_opt ::=", - /* 331 */ "db_name_cond_opt ::= db_name NK_DOT", - /* 332 */ "like_pattern_opt ::=", - /* 333 */ "like_pattern_opt ::= LIKE NK_STRING", - /* 334 */ "table_name_cond ::= table_name", - /* 335 */ "from_db_opt ::=", - /* 336 */ "from_db_opt ::= FROM db_name", - /* 337 */ "tag_list_opt ::=", - /* 338 */ "tag_list_opt ::= tag_item", - /* 339 */ "tag_list_opt ::= tag_list_opt NK_COMMA tag_item", - /* 340 */ "tag_item ::= TBNAME", - /* 341 */ "tag_item ::= QTAGS", - /* 342 */ "tag_item ::= column_name", - /* 343 */ "tag_item ::= column_name column_alias", - /* 344 */ "tag_item ::= column_name AS column_alias", - /* 345 */ "db_kind_opt ::=", - /* 346 */ "db_kind_opt ::= USER", - /* 347 */ "db_kind_opt ::= SYSTEM", - /* 348 */ "cmd ::= CREATE TSMA not_exists_opt tsma_name ON full_table_name tsma_func_list INTERVAL NK_LP duration_literal NK_RP", - /* 349 */ "cmd ::= CREATE RECURSIVE TSMA not_exists_opt tsma_name ON full_table_name INTERVAL NK_LP duration_literal NK_RP", - /* 350 */ "cmd ::= DROP TSMA exists_opt full_tsma_name", - /* 351 */ "cmd ::= SHOW db_name_cond_opt TSMAS", - /* 352 */ "full_tsma_name ::= tsma_name", - /* 353 */ "full_tsma_name ::= db_name NK_DOT tsma_name", - /* 354 */ "tsma_func_list ::= FUNCTION NK_LP func_list NK_RP", - /* 355 */ "cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options", - /* 356 */ "cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP", - /* 357 */ "cmd ::= DROP INDEX exists_opt full_index_name", - /* 358 */ "full_index_name ::= index_name", - /* 359 */ "full_index_name ::= db_name NK_DOT index_name", - /* 360 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt", - /* 361 */ "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", - /* 362 */ "func_list ::= func", - /* 363 */ "func_list ::= func_list NK_COMMA func", - /* 364 */ "func ::= sma_func_name NK_LP expression_list NK_RP", - /* 365 */ "sma_func_name ::= function_name", - /* 366 */ "sma_func_name ::= COUNT", - /* 367 */ "sma_func_name ::= FIRST", - /* 368 */ "sma_func_name ::= LAST", - /* 369 */ "sma_func_name ::= LAST_ROW", - /* 370 */ "sma_stream_opt ::=", - /* 371 */ "sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal", - /* 372 */ "sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal", - /* 373 */ "sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal", - /* 374 */ "with_meta ::= AS", - /* 375 */ "with_meta ::= WITH META AS", - /* 376 */ "with_meta ::= ONLY META AS", - /* 377 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery", - /* 378 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name", - /* 379 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt", - /* 380 */ "cmd ::= DROP TOPIC exists_opt topic_name", - /* 381 */ "cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name", - /* 382 */ "cmd ::= DESC full_table_name", - /* 383 */ "cmd ::= DESCRIBE full_table_name", - /* 384 */ "cmd ::= RESET QUERY CACHE", - /* 385 */ "cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery", - /* 386 */ "cmd ::= EXPLAIN analyze_opt explain_options insert_query", - /* 387 */ "analyze_opt ::=", - /* 388 */ "analyze_opt ::= ANALYZE", - /* 389 */ "explain_options ::=", - /* 390 */ "explain_options ::= explain_options VERBOSE NK_BOOL", - /* 391 */ "explain_options ::= explain_options RATIO NK_FLOAT", - /* 392 */ "cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt", - /* 393 */ "cmd ::= DROP FUNCTION exists_opt function_name", - /* 394 */ "agg_func_opt ::=", - /* 395 */ "agg_func_opt ::= AGGREGATE", - /* 396 */ "bufsize_opt ::=", - /* 397 */ "bufsize_opt ::= BUFSIZE NK_INTEGER", - /* 398 */ "language_opt ::=", - /* 399 */ "language_opt ::= LANGUAGE NK_STRING", - /* 400 */ "or_replace_opt ::=", - /* 401 */ "or_replace_opt ::= OR REPLACE", - /* 402 */ "cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery", - /* 403 */ "cmd ::= DROP VIEW exists_opt full_view_name", - /* 404 */ "full_view_name ::= view_name", - /* 405 */ "full_view_name ::= db_name NK_DOT view_name", - /* 406 */ "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", - /* 407 */ "cmd ::= DROP STREAM exists_opt stream_name", - /* 408 */ "cmd ::= PAUSE STREAM exists_opt stream_name", - /* 409 */ "cmd ::= RESUME STREAM exists_opt ignore_opt stream_name", - /* 410 */ "col_list_opt ::=", - /* 411 */ "col_list_opt ::= NK_LP column_stream_def_list NK_RP", - /* 412 */ "column_stream_def_list ::= column_stream_def", - /* 413 */ "column_stream_def_list ::= column_stream_def_list NK_COMMA column_stream_def", - /* 414 */ "column_stream_def ::= column_name stream_col_options", - /* 415 */ "stream_col_options ::=", - /* 416 */ "stream_col_options ::= stream_col_options PRIMARY KEY", - /* 417 */ "tag_def_or_ref_opt ::=", - /* 418 */ "tag_def_or_ref_opt ::= tags_def", - /* 419 */ "tag_def_or_ref_opt ::= TAGS NK_LP column_stream_def_list NK_RP", - /* 420 */ "stream_options ::=", - /* 421 */ "stream_options ::= stream_options TRIGGER AT_ONCE", - /* 422 */ "stream_options ::= stream_options TRIGGER WINDOW_CLOSE", - /* 423 */ "stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal", - /* 424 */ "stream_options ::= stream_options WATERMARK duration_literal", - /* 425 */ "stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER", - /* 426 */ "stream_options ::= stream_options FILL_HISTORY NK_INTEGER", - /* 427 */ "stream_options ::= stream_options DELETE_MARK duration_literal", - /* 428 */ "stream_options ::= stream_options IGNORE UPDATE NK_INTEGER", - /* 429 */ "subtable_opt ::=", - /* 430 */ "subtable_opt ::= SUBTABLE NK_LP expression NK_RP", - /* 431 */ "ignore_opt ::=", - /* 432 */ "ignore_opt ::= IGNORE UNTREATED", - /* 433 */ "cmd ::= KILL CONNECTION NK_INTEGER", - /* 434 */ "cmd ::= KILL QUERY NK_STRING", - /* 435 */ "cmd ::= KILL TRANSACTION NK_INTEGER", - /* 436 */ "cmd ::= KILL COMPACT NK_INTEGER", - /* 437 */ "cmd ::= BALANCE VGROUP", - /* 438 */ "cmd ::= BALANCE VGROUP LEADER on_vgroup_id", - /* 439 */ "cmd ::= BALANCE VGROUP LEADER DATABASE db_name", - /* 440 */ "cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER", - /* 441 */ "cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list", - /* 442 */ "cmd ::= SPLIT VGROUP NK_INTEGER", - /* 443 */ "on_vgroup_id ::=", - /* 444 */ "on_vgroup_id ::= ON NK_INTEGER", - /* 445 */ "dnode_list ::= DNODE NK_INTEGER", - /* 446 */ "dnode_list ::= dnode_list DNODE NK_INTEGER", - /* 447 */ "cmd ::= DELETE FROM full_table_name where_clause_opt", - /* 448 */ "cmd ::= query_or_subquery", - /* 449 */ "cmd ::= insert_query", - /* 450 */ "insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery", - /* 451 */ "insert_query ::= INSERT INTO full_table_name query_or_subquery", - /* 452 */ "tags_literal ::= NK_INTEGER", - /* 453 */ "tags_literal ::= NK_INTEGER NK_PLUS duration_literal", - /* 454 */ "tags_literal ::= NK_INTEGER NK_MINUS duration_literal", - /* 455 */ "tags_literal ::= NK_PLUS NK_INTEGER", - /* 456 */ "tags_literal ::= NK_PLUS NK_INTEGER NK_PLUS duration_literal", - /* 457 */ "tags_literal ::= NK_PLUS NK_INTEGER NK_MINUS duration_literal", - /* 458 */ "tags_literal ::= NK_MINUS NK_INTEGER", - /* 459 */ "tags_literal ::= NK_MINUS NK_INTEGER NK_PLUS duration_literal", - /* 460 */ "tags_literal ::= NK_MINUS NK_INTEGER NK_MINUS duration_literal", - /* 461 */ "tags_literal ::= NK_FLOAT", - /* 462 */ "tags_literal ::= NK_PLUS NK_FLOAT", - /* 463 */ "tags_literal ::= NK_MINUS NK_FLOAT", - /* 464 */ "tags_literal ::= NK_BIN", - /* 465 */ "tags_literal ::= NK_BIN NK_PLUS duration_literal", - /* 466 */ "tags_literal ::= NK_BIN NK_MINUS duration_literal", - /* 467 */ "tags_literal ::= NK_PLUS NK_BIN", - /* 468 */ "tags_literal ::= NK_PLUS NK_BIN NK_PLUS duration_literal", - /* 469 */ "tags_literal ::= NK_PLUS NK_BIN NK_MINUS duration_literal", - /* 470 */ "tags_literal ::= NK_MINUS NK_BIN", - /* 471 */ "tags_literal ::= NK_MINUS NK_BIN NK_PLUS duration_literal", - /* 472 */ "tags_literal ::= NK_MINUS NK_BIN NK_MINUS duration_literal", - /* 473 */ "tags_literal ::= NK_HEX", - /* 474 */ "tags_literal ::= NK_HEX NK_PLUS duration_literal", - /* 475 */ "tags_literal ::= NK_HEX NK_MINUS duration_literal", - /* 476 */ "tags_literal ::= NK_PLUS NK_HEX", - /* 477 */ "tags_literal ::= NK_PLUS NK_HEX NK_PLUS duration_literal", - /* 478 */ "tags_literal ::= NK_PLUS NK_HEX NK_MINUS duration_literal", - /* 479 */ "tags_literal ::= NK_MINUS NK_HEX", - /* 480 */ "tags_literal ::= NK_MINUS NK_HEX NK_PLUS duration_literal", - /* 481 */ "tags_literal ::= NK_MINUS NK_HEX NK_MINUS duration_literal", - /* 482 */ "tags_literal ::= NK_STRING", - /* 483 */ "tags_literal ::= NK_STRING NK_PLUS duration_literal", - /* 484 */ "tags_literal ::= NK_STRING NK_MINUS duration_literal", - /* 485 */ "tags_literal ::= NK_BOOL", - /* 486 */ "tags_literal ::= NULL", - /* 487 */ "tags_literal ::= literal_func", - /* 488 */ "tags_literal ::= literal_func NK_PLUS duration_literal", - /* 489 */ "tags_literal ::= literal_func NK_MINUS duration_literal", - /* 490 */ "tags_literal_list ::= tags_literal", - /* 491 */ "tags_literal_list ::= tags_literal_list NK_COMMA tags_literal", - /* 492 */ "literal ::= NK_INTEGER", - /* 493 */ "literal ::= NK_FLOAT", - /* 494 */ "literal ::= NK_STRING", - /* 495 */ "literal ::= NK_BOOL", - /* 496 */ "literal ::= TIMESTAMP NK_STRING", - /* 497 */ "literal ::= duration_literal", - /* 498 */ "literal ::= NULL", - /* 499 */ "literal ::= NK_QUESTION", - /* 500 */ "duration_literal ::= NK_VARIABLE", - /* 501 */ "signed ::= NK_INTEGER", - /* 502 */ "signed ::= NK_PLUS NK_INTEGER", - /* 503 */ "signed ::= NK_MINUS NK_INTEGER", - /* 504 */ "signed ::= NK_FLOAT", - /* 505 */ "signed ::= NK_PLUS NK_FLOAT", - /* 506 */ "signed ::= NK_MINUS NK_FLOAT", - /* 507 */ "signed_literal ::= signed", - /* 508 */ "signed_literal ::= NK_STRING", - /* 509 */ "signed_literal ::= NK_BOOL", - /* 510 */ "signed_literal ::= TIMESTAMP NK_STRING", - /* 511 */ "signed_literal ::= duration_literal", - /* 512 */ "signed_literal ::= NULL", - /* 513 */ "signed_literal ::= literal_func", - /* 514 */ "signed_literal ::= NK_QUESTION", - /* 515 */ "literal_list ::= signed_literal", - /* 516 */ "literal_list ::= literal_list NK_COMMA signed_literal", - /* 517 */ "db_name ::= NK_ID", - /* 518 */ "table_name ::= NK_ID", - /* 519 */ "column_name ::= NK_ID", - /* 520 */ "function_name ::= NK_ID", - /* 521 */ "view_name ::= NK_ID", - /* 522 */ "table_alias ::= NK_ID", - /* 523 */ "column_alias ::= NK_ID", - /* 524 */ "column_alias ::= NK_ALIAS", - /* 525 */ "user_name ::= NK_ID", - /* 526 */ "topic_name ::= NK_ID", - /* 527 */ "stream_name ::= NK_ID", - /* 528 */ "cgroup_name ::= NK_ID", - /* 529 */ "index_name ::= NK_ID", - /* 530 */ "tsma_name ::= NK_ID", - /* 531 */ "expr_or_subquery ::= expression", - /* 532 */ "expression ::= literal", - /* 533 */ "expression ::= pseudo_column", - /* 534 */ "expression ::= column_reference", - /* 535 */ "expression ::= function_expression", - /* 536 */ "expression ::= case_when_expression", - /* 537 */ "expression ::= NK_LP expression NK_RP", - /* 538 */ "expression ::= NK_PLUS expr_or_subquery", - /* 539 */ "expression ::= NK_MINUS expr_or_subquery", - /* 540 */ "expression ::= expr_or_subquery NK_PLUS expr_or_subquery", - /* 541 */ "expression ::= expr_or_subquery NK_MINUS expr_or_subquery", - /* 542 */ "expression ::= expr_or_subquery NK_STAR expr_or_subquery", - /* 543 */ "expression ::= expr_or_subquery NK_SLASH expr_or_subquery", - /* 544 */ "expression ::= expr_or_subquery NK_REM expr_or_subquery", - /* 545 */ "expression ::= column_reference NK_ARROW NK_STRING", - /* 546 */ "expression ::= expr_or_subquery NK_BITAND expr_or_subquery", - /* 547 */ "expression ::= expr_or_subquery NK_BITOR expr_or_subquery", - /* 548 */ "expression_list ::= expr_or_subquery", - /* 549 */ "expression_list ::= expression_list NK_COMMA expr_or_subquery", - /* 550 */ "column_reference ::= column_name", - /* 551 */ "column_reference ::= table_name NK_DOT column_name", - /* 552 */ "column_reference ::= NK_ALIAS", - /* 553 */ "column_reference ::= table_name NK_DOT NK_ALIAS", - /* 554 */ "pseudo_column ::= ROWTS", - /* 555 */ "pseudo_column ::= TBNAME", - /* 556 */ "pseudo_column ::= table_name NK_DOT TBNAME", - /* 557 */ "pseudo_column ::= QSTART", - /* 558 */ "pseudo_column ::= QEND", - /* 559 */ "pseudo_column ::= QDURATION", - /* 560 */ "pseudo_column ::= WSTART", - /* 561 */ "pseudo_column ::= WEND", - /* 562 */ "pseudo_column ::= WDURATION", - /* 563 */ "pseudo_column ::= IROWTS", - /* 564 */ "pseudo_column ::= ISFILLED", - /* 565 */ "pseudo_column ::= QTAGS", - /* 566 */ "function_expression ::= function_name NK_LP expression_list NK_RP", - /* 567 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP", - /* 568 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP", - /* 569 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name_default_len NK_RP", - /* 570 */ "function_expression ::= POSITION NK_LP expr_or_subquery IN expr_or_subquery NK_RP", - /* 571 */ "function_expression ::= TRIM NK_LP expr_or_subquery NK_RP", - /* 572 */ "function_expression ::= TRIM NK_LP trim_specification_type FROM expr_or_subquery NK_RP", - /* 573 */ "function_expression ::= TRIM NK_LP expr_or_subquery FROM expr_or_subquery NK_RP", - /* 574 */ "function_expression ::= TRIM NK_LP trim_specification_type expr_or_subquery FROM expr_or_subquery NK_RP", - /* 575 */ "function_expression ::= substr_func NK_LP expression_list NK_RP", - /* 576 */ "function_expression ::= substr_func NK_LP expr_or_subquery FROM expr_or_subquery NK_RP", - /* 577 */ "function_expression ::= substr_func NK_LP expr_or_subquery FROM expr_or_subquery FOR expr_or_subquery NK_RP", - /* 578 */ "function_expression ::= REPLACE NK_LP expression_list NK_RP", - /* 579 */ "function_expression ::= literal_func", - /* 580 */ "function_expression ::= rand_func", - /* 581 */ "literal_func ::= noarg_func NK_LP NK_RP", - /* 582 */ "literal_func ::= NOW", - /* 583 */ "literal_func ::= TODAY", - /* 584 */ "rand_func ::= RAND NK_LP NK_RP", - /* 585 */ "rand_func ::= RAND NK_LP expression_list NK_RP", - /* 586 */ "substr_func ::= SUBSTR", - /* 587 */ "substr_func ::= SUBSTRING", - /* 588 */ "trim_specification_type ::= BOTH", - /* 589 */ "trim_specification_type ::= TRAILING", - /* 590 */ "trim_specification_type ::= LEADING", - /* 591 */ "noarg_func ::= NOW", - /* 592 */ "noarg_func ::= TODAY", - /* 593 */ "noarg_func ::= TIMEZONE", - /* 594 */ "noarg_func ::= DATABASE", - /* 595 */ "noarg_func ::= CLIENT_VERSION", - /* 596 */ "noarg_func ::= SERVER_VERSION", - /* 597 */ "noarg_func ::= SERVER_STATUS", - /* 598 */ "noarg_func ::= CURRENT_USER", - /* 599 */ "noarg_func ::= USER", - /* 600 */ "noarg_func ::= PI", - /* 601 */ "star_func ::= COUNT", - /* 602 */ "star_func ::= FIRST", - /* 603 */ "star_func ::= LAST", - /* 604 */ "star_func ::= LAST_ROW", - /* 605 */ "star_func_para_list ::= NK_STAR", - /* 606 */ "star_func_para_list ::= other_para_list", - /* 607 */ "other_para_list ::= star_func_para", - /* 608 */ "other_para_list ::= other_para_list NK_COMMA star_func_para", - /* 609 */ "star_func_para ::= expr_or_subquery", - /* 610 */ "star_func_para ::= table_name NK_DOT NK_STAR", - /* 611 */ "case_when_expression ::= CASE when_then_list case_when_else_opt END", - /* 612 */ "case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END", - /* 613 */ "when_then_list ::= when_then_expr", - /* 614 */ "when_then_list ::= when_then_list when_then_expr", - /* 615 */ "when_then_expr ::= WHEN common_expression THEN common_expression", - /* 616 */ "case_when_else_opt ::=", - /* 617 */ "case_when_else_opt ::= ELSE common_expression", - /* 618 */ "predicate ::= expr_or_subquery compare_op expr_or_subquery", - /* 619 */ "predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery", - /* 620 */ "predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery", - /* 621 */ "predicate ::= expr_or_subquery IS NULL", - /* 622 */ "predicate ::= expr_or_subquery IS NOT NULL", - /* 623 */ "predicate ::= expr_or_subquery in_op in_predicate_value", - /* 624 */ "compare_op ::= NK_LT", - /* 625 */ "compare_op ::= NK_GT", - /* 626 */ "compare_op ::= NK_LE", - /* 627 */ "compare_op ::= NK_GE", - /* 628 */ "compare_op ::= NK_NE", - /* 629 */ "compare_op ::= NK_EQ", - /* 630 */ "compare_op ::= LIKE", - /* 631 */ "compare_op ::= NOT LIKE", - /* 632 */ "compare_op ::= MATCH", - /* 633 */ "compare_op ::= NMATCH", - /* 634 */ "compare_op ::= CONTAINS", - /* 635 */ "in_op ::= IN", - /* 636 */ "in_op ::= NOT IN", - /* 637 */ "in_predicate_value ::= NK_LP literal_list NK_RP", - /* 638 */ "boolean_value_expression ::= boolean_primary", - /* 639 */ "boolean_value_expression ::= NOT boolean_primary", - /* 640 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression", - /* 641 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression", - /* 642 */ "boolean_primary ::= predicate", - /* 643 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP", - /* 644 */ "common_expression ::= expr_or_subquery", - /* 645 */ "common_expression ::= boolean_value_expression", - /* 646 */ "from_clause_opt ::=", - /* 647 */ "from_clause_opt ::= FROM table_reference_list", - /* 648 */ "table_reference_list ::= table_reference", - /* 649 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference", - /* 650 */ "table_reference ::= table_primary", - /* 651 */ "table_reference ::= joined_table", - /* 652 */ "table_primary ::= table_name alias_opt", - /* 653 */ "table_primary ::= db_name NK_DOT table_name alias_opt", - /* 654 */ "table_primary ::= subquery alias_opt", - /* 655 */ "table_primary ::= parenthesized_joined_table", - /* 656 */ "alias_opt ::=", - /* 657 */ "alias_opt ::= table_alias", - /* 658 */ "alias_opt ::= AS table_alias", - /* 659 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP", - /* 660 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP", - /* 661 */ "joined_table ::= table_reference join_type join_subtype JOIN table_reference join_on_clause_opt window_offset_clause_opt jlimit_clause_opt", - /* 662 */ "join_type ::=", - /* 663 */ "join_type ::= INNER", - /* 664 */ "join_type ::= LEFT", - /* 665 */ "join_type ::= RIGHT", - /* 666 */ "join_type ::= FULL", - /* 667 */ "join_subtype ::=", - /* 668 */ "join_subtype ::= OUTER", - /* 669 */ "join_subtype ::= SEMI", - /* 670 */ "join_subtype ::= ANTI", - /* 671 */ "join_subtype ::= ASOF", - /* 672 */ "join_subtype ::= WINDOW", - /* 673 */ "join_on_clause_opt ::=", - /* 674 */ "join_on_clause_opt ::= ON search_condition", - /* 675 */ "window_offset_clause_opt ::=", - /* 676 */ "window_offset_clause_opt ::= WINDOW_OFFSET NK_LP window_offset_literal NK_COMMA window_offset_literal NK_RP", - /* 677 */ "window_offset_literal ::= NK_VARIABLE", - /* 678 */ "window_offset_literal ::= NK_MINUS NK_VARIABLE", - /* 679 */ "jlimit_clause_opt ::=", - /* 680 */ "jlimit_clause_opt ::= JLIMIT NK_INTEGER", - /* 681 */ "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", - /* 682 */ "hint_list ::=", - /* 683 */ "hint_list ::= NK_HINT", - /* 684 */ "tag_mode_opt ::=", - /* 685 */ "tag_mode_opt ::= TAGS", - /* 686 */ "set_quantifier_opt ::=", - /* 687 */ "set_quantifier_opt ::= DISTINCT", - /* 688 */ "set_quantifier_opt ::= ALL", - /* 689 */ "select_list ::= select_item", - /* 690 */ "select_list ::= select_list NK_COMMA select_item", - /* 691 */ "select_item ::= NK_STAR", - /* 692 */ "select_item ::= common_expression", - /* 693 */ "select_item ::= common_expression column_alias", - /* 694 */ "select_item ::= common_expression AS column_alias", - /* 695 */ "select_item ::= table_name NK_DOT NK_STAR", - /* 696 */ "where_clause_opt ::=", - /* 697 */ "where_clause_opt ::= WHERE search_condition", - /* 698 */ "partition_by_clause_opt ::=", - /* 699 */ "partition_by_clause_opt ::= PARTITION BY partition_list", - /* 700 */ "partition_list ::= partition_item", - /* 701 */ "partition_list ::= partition_list NK_COMMA partition_item", - /* 702 */ "partition_item ::= expr_or_subquery", - /* 703 */ "partition_item ::= expr_or_subquery column_alias", - /* 704 */ "partition_item ::= expr_or_subquery AS column_alias", - /* 705 */ "twindow_clause_opt ::=", - /* 706 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP", - /* 707 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP", - /* 708 */ "twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt", - /* 709 */ "twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt", - /* 710 */ "twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition", - /* 711 */ "twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP", - /* 712 */ "twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP", - /* 713 */ "sliding_opt ::=", - /* 714 */ "sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP", - /* 715 */ "interval_sliding_duration_literal ::= NK_VARIABLE", - /* 716 */ "interval_sliding_duration_literal ::= NK_STRING", - /* 717 */ "interval_sliding_duration_literal ::= NK_INTEGER", - /* 718 */ "fill_opt ::=", - /* 719 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", - /* 720 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP", - /* 721 */ "fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP", - /* 722 */ "fill_mode ::= NONE", - /* 723 */ "fill_mode ::= PREV", - /* 724 */ "fill_mode ::= NULL", - /* 725 */ "fill_mode ::= NULL_F", - /* 726 */ "fill_mode ::= LINEAR", - /* 727 */ "fill_mode ::= NEXT", - /* 728 */ "group_by_clause_opt ::=", - /* 729 */ "group_by_clause_opt ::= GROUP BY group_by_list", - /* 730 */ "group_by_list ::= expr_or_subquery", - /* 731 */ "group_by_list ::= group_by_list NK_COMMA expr_or_subquery", - /* 732 */ "having_clause_opt ::=", - /* 733 */ "having_clause_opt ::= HAVING search_condition", - /* 734 */ "range_opt ::=", - /* 735 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP", - /* 736 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_RP", - /* 737 */ "every_opt ::=", - /* 738 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP", - /* 739 */ "query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt", - /* 740 */ "query_simple ::= query_specification", - /* 741 */ "query_simple ::= union_query_expression", - /* 742 */ "union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery", - /* 743 */ "union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery", - /* 744 */ "query_simple_or_subquery ::= query_simple", - /* 745 */ "query_simple_or_subquery ::= subquery", - /* 746 */ "query_or_subquery ::= query_expression", - /* 747 */ "query_or_subquery ::= subquery", - /* 748 */ "order_by_clause_opt ::=", - /* 749 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", - /* 750 */ "slimit_clause_opt ::=", - /* 751 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", - /* 752 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", - /* 753 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 754 */ "limit_clause_opt ::=", - /* 755 */ "limit_clause_opt ::= LIMIT NK_INTEGER", - /* 756 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", - /* 757 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 758 */ "subquery ::= NK_LP query_expression NK_RP", - /* 759 */ "subquery ::= NK_LP subquery NK_RP", - /* 760 */ "search_condition ::= common_expression", - /* 761 */ "sort_specification_list ::= sort_specification", - /* 762 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", - /* 763 */ "sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt", - /* 764 */ "ordering_specification_opt ::=", - /* 765 */ "ordering_specification_opt ::= ASC", - /* 766 */ "ordering_specification_opt ::= DESC", - /* 767 */ "null_ordering_opt ::=", - /* 768 */ "null_ordering_opt ::= NULLS FIRST", - /* 769 */ "null_ordering_opt ::= NULLS LAST", - /* 770 */ "column_options ::=", - /* 771 */ "column_options ::= column_options PRIMARY KEY", - /* 772 */ "column_options ::= column_options NK_ID NK_STRING", + /* 60 */ "cmd ::= CREATE ANODE NK_STRING", + /* 61 */ "cmd ::= UPDATE ANODE NK_INTEGER", + /* 62 */ "cmd ::= UPDATE ALL ANODES", + /* 63 */ "cmd ::= DROP ANODE NK_INTEGER", + /* 64 */ "cmd ::= CREATE DNODE dnode_endpoint", + /* 65 */ "cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER", + /* 66 */ "cmd ::= DROP DNODE NK_INTEGER force_opt", + /* 67 */ "cmd ::= DROP DNODE dnode_endpoint force_opt", + /* 68 */ "cmd ::= DROP DNODE NK_INTEGER unsafe_opt", + /* 69 */ "cmd ::= DROP DNODE dnode_endpoint unsafe_opt", + /* 70 */ "cmd ::= ALTER DNODE NK_INTEGER NK_STRING", + /* 71 */ "cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING", + /* 72 */ "cmd ::= ALTER ALL DNODES NK_STRING", + /* 73 */ "cmd ::= ALTER ALL DNODES NK_STRING NK_STRING", + /* 74 */ "cmd ::= RESTORE DNODE NK_INTEGER", + /* 75 */ "dnode_endpoint ::= NK_STRING", + /* 76 */ "dnode_endpoint ::= NK_ID", + /* 77 */ "dnode_endpoint ::= NK_IPTOKEN", + /* 78 */ "force_opt ::=", + /* 79 */ "force_opt ::= FORCE", + /* 80 */ "unsafe_opt ::= UNSAFE", + /* 81 */ "cmd ::= ALTER CLUSTER NK_STRING", + /* 82 */ "cmd ::= ALTER CLUSTER NK_STRING NK_STRING", + /* 83 */ "cmd ::= ALTER LOCAL NK_STRING", + /* 84 */ "cmd ::= ALTER LOCAL NK_STRING NK_STRING", + /* 85 */ "cmd ::= CREATE QNODE ON DNODE NK_INTEGER", + /* 86 */ "cmd ::= DROP QNODE ON DNODE NK_INTEGER", + /* 87 */ "cmd ::= RESTORE QNODE ON DNODE NK_INTEGER", + /* 88 */ "cmd ::= CREATE BNODE ON DNODE NK_INTEGER", + /* 89 */ "cmd ::= DROP BNODE ON DNODE NK_INTEGER", + /* 90 */ "cmd ::= CREATE SNODE ON DNODE NK_INTEGER", + /* 91 */ "cmd ::= DROP SNODE ON DNODE NK_INTEGER", + /* 92 */ "cmd ::= CREATE MNODE ON DNODE NK_INTEGER", + /* 93 */ "cmd ::= DROP MNODE ON DNODE NK_INTEGER", + /* 94 */ "cmd ::= RESTORE MNODE ON DNODE NK_INTEGER", + /* 95 */ "cmd ::= RESTORE VNODE ON DNODE NK_INTEGER", + /* 96 */ "cmd ::= CREATE DATABASE not_exists_opt db_name db_options", + /* 97 */ "cmd ::= DROP DATABASE exists_opt db_name", + /* 98 */ "cmd ::= USE db_name", + /* 99 */ "cmd ::= ALTER DATABASE db_name alter_db_options", + /* 100 */ "cmd ::= FLUSH DATABASE db_name", + /* 101 */ "cmd ::= TRIM DATABASE db_name speed_opt", + /* 102 */ "cmd ::= S3MIGRATE DATABASE db_name", + /* 103 */ "cmd ::= COMPACT DATABASE db_name start_opt end_opt", + /* 104 */ "not_exists_opt ::= IF NOT EXISTS", + /* 105 */ "not_exists_opt ::=", + /* 106 */ "exists_opt ::= IF EXISTS", + /* 107 */ "exists_opt ::=", + /* 108 */ "db_options ::=", + /* 109 */ "db_options ::= db_options BUFFER NK_INTEGER", + /* 110 */ "db_options ::= db_options CACHEMODEL NK_STRING", + /* 111 */ "db_options ::= db_options CACHESIZE NK_INTEGER", + /* 112 */ "db_options ::= db_options COMP NK_INTEGER", + /* 113 */ "db_options ::= db_options DURATION NK_INTEGER", + /* 114 */ "db_options ::= db_options DURATION NK_VARIABLE", + /* 115 */ "db_options ::= db_options MAXROWS NK_INTEGER", + /* 116 */ "db_options ::= db_options MINROWS NK_INTEGER", + /* 117 */ "db_options ::= db_options KEEP integer_list", + /* 118 */ "db_options ::= db_options KEEP variable_list", + /* 119 */ "db_options ::= db_options PAGES NK_INTEGER", + /* 120 */ "db_options ::= db_options PAGESIZE NK_INTEGER", + /* 121 */ "db_options ::= db_options TSDB_PAGESIZE NK_INTEGER", + /* 122 */ "db_options ::= db_options PRECISION NK_STRING", + /* 123 */ "db_options ::= db_options REPLICA NK_INTEGER", + /* 124 */ "db_options ::= db_options VGROUPS NK_INTEGER", + /* 125 */ "db_options ::= db_options SINGLE_STABLE NK_INTEGER", + /* 126 */ "db_options ::= db_options RETENTIONS retention_list", + /* 127 */ "db_options ::= db_options SCHEMALESS NK_INTEGER", + /* 128 */ "db_options ::= db_options WAL_LEVEL NK_INTEGER", + /* 129 */ "db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER", + /* 130 */ "db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER", + /* 131 */ "db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER", + /* 132 */ "db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER", + /* 133 */ "db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER", + /* 134 */ "db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER", + /* 135 */ "db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER", + /* 136 */ "db_options ::= db_options STT_TRIGGER NK_INTEGER", + /* 137 */ "db_options ::= db_options TABLE_PREFIX signed", + /* 138 */ "db_options ::= db_options TABLE_SUFFIX signed", + /* 139 */ "db_options ::= db_options S3_CHUNKSIZE NK_INTEGER", + /* 140 */ "db_options ::= db_options S3_KEEPLOCAL NK_INTEGER", + /* 141 */ "db_options ::= db_options S3_KEEPLOCAL NK_VARIABLE", + /* 142 */ "db_options ::= db_options S3_COMPACT NK_INTEGER", + /* 143 */ "db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER", + /* 144 */ "db_options ::= db_options ENCRYPT_ALGORITHM NK_STRING", + /* 145 */ "alter_db_options ::= alter_db_option", + /* 146 */ "alter_db_options ::= alter_db_options alter_db_option", + /* 147 */ "alter_db_option ::= BUFFER NK_INTEGER", + /* 148 */ "alter_db_option ::= CACHEMODEL NK_STRING", + /* 149 */ "alter_db_option ::= CACHESIZE NK_INTEGER", + /* 150 */ "alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER", + /* 151 */ "alter_db_option ::= KEEP integer_list", + /* 152 */ "alter_db_option ::= KEEP variable_list", + /* 153 */ "alter_db_option ::= PAGES NK_INTEGER", + /* 154 */ "alter_db_option ::= REPLICA NK_INTEGER", + /* 155 */ "alter_db_option ::= WAL_LEVEL NK_INTEGER", + /* 156 */ "alter_db_option ::= STT_TRIGGER NK_INTEGER", + /* 157 */ "alter_db_option ::= MINROWS NK_INTEGER", + /* 158 */ "alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER", + /* 159 */ "alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER", + /* 160 */ "alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER", + /* 161 */ "alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER", + /* 162 */ "alter_db_option ::= S3_KEEPLOCAL NK_INTEGER", + /* 163 */ "alter_db_option ::= S3_KEEPLOCAL NK_VARIABLE", + /* 164 */ "alter_db_option ::= S3_COMPACT NK_INTEGER", + /* 165 */ "alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER", + /* 166 */ "alter_db_option ::= ENCRYPT_ALGORITHM NK_STRING", + /* 167 */ "integer_list ::= NK_INTEGER", + /* 168 */ "integer_list ::= integer_list NK_COMMA NK_INTEGER", + /* 169 */ "variable_list ::= NK_VARIABLE", + /* 170 */ "variable_list ::= variable_list NK_COMMA NK_VARIABLE", + /* 171 */ "retention_list ::= retention", + /* 172 */ "retention_list ::= retention_list NK_COMMA retention", + /* 173 */ "retention ::= NK_VARIABLE NK_COLON NK_VARIABLE", + /* 174 */ "retention ::= NK_MINUS NK_COLON NK_VARIABLE", + /* 175 */ "speed_opt ::=", + /* 176 */ "speed_opt ::= BWLIMIT NK_INTEGER", + /* 177 */ "start_opt ::=", + /* 178 */ "start_opt ::= START WITH NK_INTEGER", + /* 179 */ "start_opt ::= START WITH NK_STRING", + /* 180 */ "start_opt ::= START WITH TIMESTAMP NK_STRING", + /* 181 */ "end_opt ::=", + /* 182 */ "end_opt ::= END WITH NK_INTEGER", + /* 183 */ "end_opt ::= END WITH NK_STRING", + /* 184 */ "end_opt ::= END WITH TIMESTAMP NK_STRING", + /* 185 */ "cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options", + /* 186 */ "cmd ::= CREATE TABLE multi_create_clause", + /* 187 */ "cmd ::= CREATE TABLE not_exists_opt USING full_table_name NK_LP tag_list_opt NK_RP FILE NK_STRING", + /* 188 */ "cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options", + /* 189 */ "cmd ::= DROP TABLE with_opt multi_drop_clause", + /* 190 */ "cmd ::= DROP STABLE with_opt exists_opt full_table_name", + /* 191 */ "cmd ::= ALTER TABLE alter_table_clause", + /* 192 */ "cmd ::= ALTER STABLE alter_table_clause", + /* 193 */ "alter_table_clause ::= full_table_name alter_table_options", + /* 194 */ "alter_table_clause ::= full_table_name ADD COLUMN column_name type_name column_options", + /* 195 */ "alter_table_clause ::= full_table_name DROP COLUMN column_name", + /* 196 */ "alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name", + /* 197 */ "alter_table_clause ::= full_table_name MODIFY COLUMN column_name column_options", + /* 198 */ "alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name", + /* 199 */ "alter_table_clause ::= full_table_name ADD TAG column_name type_name", + /* 200 */ "alter_table_clause ::= full_table_name DROP TAG column_name", + /* 201 */ "alter_table_clause ::= full_table_name MODIFY TAG column_name type_name", + /* 202 */ "alter_table_clause ::= full_table_name RENAME TAG column_name column_name", + /* 203 */ "alter_table_clause ::= full_table_name SET TAG column_name NK_EQ tags_literal", + /* 204 */ "multi_create_clause ::= create_subtable_clause", + /* 205 */ "multi_create_clause ::= multi_create_clause create_subtable_clause", + /* 206 */ "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", + /* 207 */ "multi_drop_clause ::= drop_table_clause", + /* 208 */ "multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause", + /* 209 */ "drop_table_clause ::= exists_opt full_table_name", + /* 210 */ "with_opt ::=", + /* 211 */ "with_opt ::= WITH", + /* 212 */ "specific_cols_opt ::=", + /* 213 */ "specific_cols_opt ::= NK_LP col_name_list NK_RP", + /* 214 */ "full_table_name ::= table_name", + /* 215 */ "full_table_name ::= db_name NK_DOT table_name", + /* 216 */ "tag_def_list ::= tag_def", + /* 217 */ "tag_def_list ::= tag_def_list NK_COMMA tag_def", + /* 218 */ "tag_def ::= column_name type_name", + /* 219 */ "column_def_list ::= column_def", + /* 220 */ "column_def_list ::= column_def_list NK_COMMA column_def", + /* 221 */ "column_def ::= column_name type_name column_options", + /* 222 */ "type_name ::= BOOL", + /* 223 */ "type_name ::= TINYINT", + /* 224 */ "type_name ::= SMALLINT", + /* 225 */ "type_name ::= INT", + /* 226 */ "type_name ::= INTEGER", + /* 227 */ "type_name ::= BIGINT", + /* 228 */ "type_name ::= FLOAT", + /* 229 */ "type_name ::= DOUBLE", + /* 230 */ "type_name ::= BINARY NK_LP NK_INTEGER NK_RP", + /* 231 */ "type_name ::= TIMESTAMP", + /* 232 */ "type_name ::= NCHAR NK_LP NK_INTEGER NK_RP", + /* 233 */ "type_name ::= TINYINT UNSIGNED", + /* 234 */ "type_name ::= SMALLINT UNSIGNED", + /* 235 */ "type_name ::= INT UNSIGNED", + /* 236 */ "type_name ::= BIGINT UNSIGNED", + /* 237 */ "type_name ::= JSON", + /* 238 */ "type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP", + /* 239 */ "type_name ::= MEDIUMBLOB", + /* 240 */ "type_name ::= BLOB", + /* 241 */ "type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP", + /* 242 */ "type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP", + /* 243 */ "type_name ::= DECIMAL", + /* 244 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP", + /* 245 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP", + /* 246 */ "type_name_default_len ::= BINARY", + /* 247 */ "type_name_default_len ::= NCHAR", + /* 248 */ "type_name_default_len ::= VARCHAR", + /* 249 */ "type_name_default_len ::= VARBINARY", + /* 250 */ "tags_def_opt ::=", + /* 251 */ "tags_def_opt ::= tags_def", + /* 252 */ "tags_def ::= TAGS NK_LP tag_def_list NK_RP", + /* 253 */ "table_options ::=", + /* 254 */ "table_options ::= table_options COMMENT NK_STRING", + /* 255 */ "table_options ::= table_options MAX_DELAY duration_list", + /* 256 */ "table_options ::= table_options WATERMARK duration_list", + /* 257 */ "table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP", + /* 258 */ "table_options ::= table_options TTL NK_INTEGER", + /* 259 */ "table_options ::= table_options SMA NK_LP col_name_list NK_RP", + /* 260 */ "table_options ::= table_options DELETE_MARK duration_list", + /* 261 */ "alter_table_options ::= alter_table_option", + /* 262 */ "alter_table_options ::= alter_table_options alter_table_option", + /* 263 */ "alter_table_option ::= COMMENT NK_STRING", + /* 264 */ "alter_table_option ::= TTL NK_INTEGER", + /* 265 */ "duration_list ::= duration_literal", + /* 266 */ "duration_list ::= duration_list NK_COMMA duration_literal", + /* 267 */ "rollup_func_list ::= rollup_func_name", + /* 268 */ "rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name", + /* 269 */ "rollup_func_name ::= function_name", + /* 270 */ "rollup_func_name ::= FIRST", + /* 271 */ "rollup_func_name ::= LAST", + /* 272 */ "col_name_list ::= col_name", + /* 273 */ "col_name_list ::= col_name_list NK_COMMA col_name", + /* 274 */ "col_name ::= column_name", + /* 275 */ "cmd ::= SHOW DNODES", + /* 276 */ "cmd ::= SHOW USERS", + /* 277 */ "cmd ::= SHOW USERS FULL", + /* 278 */ "cmd ::= SHOW USER PRIVILEGES", + /* 279 */ "cmd ::= SHOW db_kind_opt DATABASES", + /* 280 */ "cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt", + /* 281 */ "cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt", + /* 282 */ "cmd ::= SHOW db_name_cond_opt VGROUPS", + /* 283 */ "cmd ::= SHOW MNODES", + /* 284 */ "cmd ::= SHOW QNODES", + /* 285 */ "cmd ::= SHOW ANODES", + /* 286 */ "cmd ::= SHOW ANODES FULL", + /* 287 */ "cmd ::= SHOW ARBGROUPS", + /* 288 */ "cmd ::= SHOW FUNCTIONS", + /* 289 */ "cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt", + /* 290 */ "cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name", + /* 291 */ "cmd ::= SHOW STREAMS", + /* 292 */ "cmd ::= SHOW ACCOUNTS", + /* 293 */ "cmd ::= SHOW APPS", + /* 294 */ "cmd ::= SHOW CONNECTIONS", + /* 295 */ "cmd ::= SHOW LICENCES", + /* 296 */ "cmd ::= SHOW GRANTS", + /* 297 */ "cmd ::= SHOW GRANTS FULL", + /* 298 */ "cmd ::= SHOW GRANTS LOGS", + /* 299 */ "cmd ::= SHOW CLUSTER MACHINES", + /* 300 */ "cmd ::= SHOW CREATE DATABASE db_name", + /* 301 */ "cmd ::= SHOW CREATE TABLE full_table_name", + /* 302 */ "cmd ::= SHOW CREATE STABLE full_table_name", + /* 303 */ "cmd ::= SHOW ENCRYPTIONS", + /* 304 */ "cmd ::= SHOW QUERIES", + /* 305 */ "cmd ::= SHOW SCORES", + /* 306 */ "cmd ::= SHOW TOPICS", + /* 307 */ "cmd ::= SHOW VARIABLES", + /* 308 */ "cmd ::= SHOW CLUSTER VARIABLES", + /* 309 */ "cmd ::= SHOW LOCAL VARIABLES", + /* 310 */ "cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt", + /* 311 */ "cmd ::= SHOW BNODES", + /* 312 */ "cmd ::= SHOW SNODES", + /* 313 */ "cmd ::= SHOW CLUSTER", + /* 314 */ "cmd ::= SHOW TRANSACTIONS", + /* 315 */ "cmd ::= SHOW TABLE DISTRIBUTED full_table_name", + /* 316 */ "cmd ::= SHOW CONSUMERS", + /* 317 */ "cmd ::= SHOW SUBSCRIPTIONS", + /* 318 */ "cmd ::= SHOW TAGS FROM table_name_cond from_db_opt", + /* 319 */ "cmd ::= SHOW TAGS FROM db_name NK_DOT table_name", + /* 320 */ "cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt", + /* 321 */ "cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name", + /* 322 */ "cmd ::= SHOW VNODES ON DNODE NK_INTEGER", + /* 323 */ "cmd ::= SHOW VNODES", + /* 324 */ "cmd ::= SHOW db_name_cond_opt ALIVE", + /* 325 */ "cmd ::= SHOW CLUSTER ALIVE", + /* 326 */ "cmd ::= SHOW db_name_cond_opt VIEWS like_pattern_opt", + /* 327 */ "cmd ::= SHOW CREATE VIEW full_table_name", + /* 328 */ "cmd ::= SHOW COMPACTS", + /* 329 */ "cmd ::= SHOW COMPACT NK_INTEGER", + /* 330 */ "table_kind_db_name_cond_opt ::=", + /* 331 */ "table_kind_db_name_cond_opt ::= table_kind", + /* 332 */ "table_kind_db_name_cond_opt ::= db_name NK_DOT", + /* 333 */ "table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT", + /* 334 */ "table_kind ::= NORMAL", + /* 335 */ "table_kind ::= CHILD", + /* 336 */ "db_name_cond_opt ::=", + /* 337 */ "db_name_cond_opt ::= db_name NK_DOT", + /* 338 */ "like_pattern_opt ::=", + /* 339 */ "like_pattern_opt ::= LIKE NK_STRING", + /* 340 */ "table_name_cond ::= table_name", + /* 341 */ "from_db_opt ::=", + /* 342 */ "from_db_opt ::= FROM db_name", + /* 343 */ "tag_list_opt ::=", + /* 344 */ "tag_list_opt ::= tag_item", + /* 345 */ "tag_list_opt ::= tag_list_opt NK_COMMA tag_item", + /* 346 */ "tag_item ::= TBNAME", + /* 347 */ "tag_item ::= QTAGS", + /* 348 */ "tag_item ::= column_name", + /* 349 */ "tag_item ::= column_name column_alias", + /* 350 */ "tag_item ::= column_name AS column_alias", + /* 351 */ "db_kind_opt ::=", + /* 352 */ "db_kind_opt ::= USER", + /* 353 */ "db_kind_opt ::= SYSTEM", + /* 354 */ "cmd ::= CREATE TSMA not_exists_opt tsma_name ON full_table_name tsma_func_list INTERVAL NK_LP duration_literal NK_RP", + /* 355 */ "cmd ::= CREATE RECURSIVE TSMA not_exists_opt tsma_name ON full_table_name INTERVAL NK_LP duration_literal NK_RP", + /* 356 */ "cmd ::= DROP TSMA exists_opt full_tsma_name", + /* 357 */ "cmd ::= SHOW db_name_cond_opt TSMAS", + /* 358 */ "full_tsma_name ::= tsma_name", + /* 359 */ "full_tsma_name ::= db_name NK_DOT tsma_name", + /* 360 */ "tsma_func_list ::= FUNCTION NK_LP func_list NK_RP", + /* 361 */ "cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options", + /* 362 */ "cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP", + /* 363 */ "cmd ::= DROP INDEX exists_opt full_index_name", + /* 364 */ "full_index_name ::= index_name", + /* 365 */ "full_index_name ::= db_name NK_DOT index_name", + /* 366 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt", + /* 367 */ "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", + /* 368 */ "func_list ::= func", + /* 369 */ "func_list ::= func_list NK_COMMA func", + /* 370 */ "func ::= sma_func_name NK_LP expression_list NK_RP", + /* 371 */ "sma_func_name ::= function_name", + /* 372 */ "sma_func_name ::= COUNT", + /* 373 */ "sma_func_name ::= FIRST", + /* 374 */ "sma_func_name ::= LAST", + /* 375 */ "sma_func_name ::= LAST_ROW", + /* 376 */ "sma_stream_opt ::=", + /* 377 */ "sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal", + /* 378 */ "sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal", + /* 379 */ "sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal", + /* 380 */ "with_meta ::= AS", + /* 381 */ "with_meta ::= WITH META AS", + /* 382 */ "with_meta ::= ONLY META AS", + /* 383 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery", + /* 384 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name", + /* 385 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt", + /* 386 */ "cmd ::= DROP TOPIC exists_opt topic_name", + /* 387 */ "cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name", + /* 388 */ "cmd ::= DESC full_table_name", + /* 389 */ "cmd ::= DESCRIBE full_table_name", + /* 390 */ "cmd ::= RESET QUERY CACHE", + /* 391 */ "cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery", + /* 392 */ "cmd ::= EXPLAIN analyze_opt explain_options insert_query", + /* 393 */ "analyze_opt ::=", + /* 394 */ "analyze_opt ::= ANALYZE", + /* 395 */ "explain_options ::=", + /* 396 */ "explain_options ::= explain_options VERBOSE NK_BOOL", + /* 397 */ "explain_options ::= explain_options RATIO NK_FLOAT", + /* 398 */ "cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt", + /* 399 */ "cmd ::= DROP FUNCTION exists_opt function_name", + /* 400 */ "agg_func_opt ::=", + /* 401 */ "agg_func_opt ::= AGGREGATE", + /* 402 */ "bufsize_opt ::=", + /* 403 */ "bufsize_opt ::= BUFSIZE NK_INTEGER", + /* 404 */ "language_opt ::=", + /* 405 */ "language_opt ::= LANGUAGE NK_STRING", + /* 406 */ "or_replace_opt ::=", + /* 407 */ "or_replace_opt ::= OR REPLACE", + /* 408 */ "cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery", + /* 409 */ "cmd ::= DROP VIEW exists_opt full_view_name", + /* 410 */ "full_view_name ::= view_name", + /* 411 */ "full_view_name ::= db_name NK_DOT view_name", + /* 412 */ "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", + /* 413 */ "cmd ::= DROP STREAM exists_opt stream_name", + /* 414 */ "cmd ::= PAUSE STREAM exists_opt stream_name", + /* 415 */ "cmd ::= RESUME STREAM exists_opt ignore_opt stream_name", + /* 416 */ "col_list_opt ::=", + /* 417 */ "col_list_opt ::= NK_LP column_stream_def_list NK_RP", + /* 418 */ "column_stream_def_list ::= column_stream_def", + /* 419 */ "column_stream_def_list ::= column_stream_def_list NK_COMMA column_stream_def", + /* 420 */ "column_stream_def ::= column_name stream_col_options", + /* 421 */ "stream_col_options ::=", + /* 422 */ "stream_col_options ::= stream_col_options PRIMARY KEY", + /* 423 */ "tag_def_or_ref_opt ::=", + /* 424 */ "tag_def_or_ref_opt ::= tags_def", + /* 425 */ "tag_def_or_ref_opt ::= TAGS NK_LP column_stream_def_list NK_RP", + /* 426 */ "stream_options ::=", + /* 427 */ "stream_options ::= stream_options TRIGGER AT_ONCE", + /* 428 */ "stream_options ::= stream_options TRIGGER WINDOW_CLOSE", + /* 429 */ "stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal", + /* 430 */ "stream_options ::= stream_options WATERMARK duration_literal", + /* 431 */ "stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER", + /* 432 */ "stream_options ::= stream_options FILL_HISTORY NK_INTEGER", + /* 433 */ "stream_options ::= stream_options DELETE_MARK duration_literal", + /* 434 */ "stream_options ::= stream_options IGNORE UPDATE NK_INTEGER", + /* 435 */ "subtable_opt ::=", + /* 436 */ "subtable_opt ::= SUBTABLE NK_LP expression NK_RP", + /* 437 */ "ignore_opt ::=", + /* 438 */ "ignore_opt ::= IGNORE UNTREATED", + /* 439 */ "cmd ::= KILL CONNECTION NK_INTEGER", + /* 440 */ "cmd ::= KILL QUERY NK_STRING", + /* 441 */ "cmd ::= KILL TRANSACTION NK_INTEGER", + /* 442 */ "cmd ::= KILL COMPACT NK_INTEGER", + /* 443 */ "cmd ::= BALANCE VGROUP", + /* 444 */ "cmd ::= BALANCE VGROUP LEADER on_vgroup_id", + /* 445 */ "cmd ::= BALANCE VGROUP LEADER DATABASE db_name", + /* 446 */ "cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER", + /* 447 */ "cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list", + /* 448 */ "cmd ::= SPLIT VGROUP NK_INTEGER", + /* 449 */ "on_vgroup_id ::=", + /* 450 */ "on_vgroup_id ::= ON NK_INTEGER", + /* 451 */ "dnode_list ::= DNODE NK_INTEGER", + /* 452 */ "dnode_list ::= dnode_list DNODE NK_INTEGER", + /* 453 */ "cmd ::= DELETE FROM full_table_name where_clause_opt", + /* 454 */ "cmd ::= query_or_subquery", + /* 455 */ "cmd ::= insert_query", + /* 456 */ "insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery", + /* 457 */ "insert_query ::= INSERT INTO full_table_name query_or_subquery", + /* 458 */ "tags_literal ::= NK_INTEGER", + /* 459 */ "tags_literal ::= NK_INTEGER NK_PLUS duration_literal", + /* 460 */ "tags_literal ::= NK_INTEGER NK_MINUS duration_literal", + /* 461 */ "tags_literal ::= NK_PLUS NK_INTEGER", + /* 462 */ "tags_literal ::= NK_PLUS NK_INTEGER NK_PLUS duration_literal", + /* 463 */ "tags_literal ::= NK_PLUS NK_INTEGER NK_MINUS duration_literal", + /* 464 */ "tags_literal ::= NK_MINUS NK_INTEGER", + /* 465 */ "tags_literal ::= NK_MINUS NK_INTEGER NK_PLUS duration_literal", + /* 466 */ "tags_literal ::= NK_MINUS NK_INTEGER NK_MINUS duration_literal", + /* 467 */ "tags_literal ::= NK_FLOAT", + /* 468 */ "tags_literal ::= NK_PLUS NK_FLOAT", + /* 469 */ "tags_literal ::= NK_MINUS NK_FLOAT", + /* 470 */ "tags_literal ::= NK_BIN", + /* 471 */ "tags_literal ::= NK_BIN NK_PLUS duration_literal", + /* 472 */ "tags_literal ::= NK_BIN NK_MINUS duration_literal", + /* 473 */ "tags_literal ::= NK_PLUS NK_BIN", + /* 474 */ "tags_literal ::= NK_PLUS NK_BIN NK_PLUS duration_literal", + /* 475 */ "tags_literal ::= NK_PLUS NK_BIN NK_MINUS duration_literal", + /* 476 */ "tags_literal ::= NK_MINUS NK_BIN", + /* 477 */ "tags_literal ::= NK_MINUS NK_BIN NK_PLUS duration_literal", + /* 478 */ "tags_literal ::= NK_MINUS NK_BIN NK_MINUS duration_literal", + /* 479 */ "tags_literal ::= NK_HEX", + /* 480 */ "tags_literal ::= NK_HEX NK_PLUS duration_literal", + /* 481 */ "tags_literal ::= NK_HEX NK_MINUS duration_literal", + /* 482 */ "tags_literal ::= NK_PLUS NK_HEX", + /* 483 */ "tags_literal ::= NK_PLUS NK_HEX NK_PLUS duration_literal", + /* 484 */ "tags_literal ::= NK_PLUS NK_HEX NK_MINUS duration_literal", + /* 485 */ "tags_literal ::= NK_MINUS NK_HEX", + /* 486 */ "tags_literal ::= NK_MINUS NK_HEX NK_PLUS duration_literal", + /* 487 */ "tags_literal ::= NK_MINUS NK_HEX NK_MINUS duration_literal", + /* 488 */ "tags_literal ::= NK_STRING", + /* 489 */ "tags_literal ::= NK_STRING NK_PLUS duration_literal", + /* 490 */ "tags_literal ::= NK_STRING NK_MINUS duration_literal", + /* 491 */ "tags_literal ::= NK_BOOL", + /* 492 */ "tags_literal ::= NULL", + /* 493 */ "tags_literal ::= literal_func", + /* 494 */ "tags_literal ::= literal_func NK_PLUS duration_literal", + /* 495 */ "tags_literal ::= literal_func NK_MINUS duration_literal", + /* 496 */ "tags_literal_list ::= tags_literal", + /* 497 */ "tags_literal_list ::= tags_literal_list NK_COMMA tags_literal", + /* 498 */ "literal ::= NK_INTEGER", + /* 499 */ "literal ::= NK_FLOAT", + /* 500 */ "literal ::= NK_STRING", + /* 501 */ "literal ::= NK_BOOL", + /* 502 */ "literal ::= TIMESTAMP NK_STRING", + /* 503 */ "literal ::= duration_literal", + /* 504 */ "literal ::= NULL", + /* 505 */ "literal ::= NK_QUESTION", + /* 506 */ "duration_literal ::= NK_VARIABLE", + /* 507 */ "signed ::= NK_INTEGER", + /* 508 */ "signed ::= NK_PLUS NK_INTEGER", + /* 509 */ "signed ::= NK_MINUS NK_INTEGER", + /* 510 */ "signed ::= NK_FLOAT", + /* 511 */ "signed ::= NK_PLUS NK_FLOAT", + /* 512 */ "signed ::= NK_MINUS NK_FLOAT", + /* 513 */ "signed_literal ::= signed", + /* 514 */ "signed_literal ::= NK_STRING", + /* 515 */ "signed_literal ::= NK_BOOL", + /* 516 */ "signed_literal ::= TIMESTAMP NK_STRING", + /* 517 */ "signed_literal ::= duration_literal", + /* 518 */ "signed_literal ::= NULL", + /* 519 */ "signed_literal ::= literal_func", + /* 520 */ "signed_literal ::= NK_QUESTION", + /* 521 */ "literal_list ::= signed_literal", + /* 522 */ "literal_list ::= literal_list NK_COMMA signed_literal", + /* 523 */ "db_name ::= NK_ID", + /* 524 */ "table_name ::= NK_ID", + /* 525 */ "column_name ::= NK_ID", + /* 526 */ "function_name ::= NK_ID", + /* 527 */ "view_name ::= NK_ID", + /* 528 */ "table_alias ::= NK_ID", + /* 529 */ "column_alias ::= NK_ID", + /* 530 */ "column_alias ::= NK_ALIAS", + /* 531 */ "user_name ::= NK_ID", + /* 532 */ "topic_name ::= NK_ID", + /* 533 */ "stream_name ::= NK_ID", + /* 534 */ "cgroup_name ::= NK_ID", + /* 535 */ "index_name ::= NK_ID", + /* 536 */ "tsma_name ::= NK_ID", + /* 537 */ "expr_or_subquery ::= expression", + /* 538 */ "expression ::= literal", + /* 539 */ "expression ::= pseudo_column", + /* 540 */ "expression ::= column_reference", + /* 541 */ "expression ::= function_expression", + /* 542 */ "expression ::= case_when_expression", + /* 543 */ "expression ::= NK_LP expression NK_RP", + /* 544 */ "expression ::= NK_PLUS expr_or_subquery", + /* 545 */ "expression ::= NK_MINUS expr_or_subquery", + /* 546 */ "expression ::= expr_or_subquery NK_PLUS expr_or_subquery", + /* 547 */ "expression ::= expr_or_subquery NK_MINUS expr_or_subquery", + /* 548 */ "expression ::= expr_or_subquery NK_STAR expr_or_subquery", + /* 549 */ "expression ::= expr_or_subquery NK_SLASH expr_or_subquery", + /* 550 */ "expression ::= expr_or_subquery NK_REM expr_or_subquery", + /* 551 */ "expression ::= column_reference NK_ARROW NK_STRING", + /* 552 */ "expression ::= expr_or_subquery NK_BITAND expr_or_subquery", + /* 553 */ "expression ::= expr_or_subquery NK_BITOR expr_or_subquery", + /* 554 */ "expression_list ::= expr_or_subquery", + /* 555 */ "expression_list ::= expression_list NK_COMMA expr_or_subquery", + /* 556 */ "column_reference ::= column_name", + /* 557 */ "column_reference ::= table_name NK_DOT column_name", + /* 558 */ "column_reference ::= NK_ALIAS", + /* 559 */ "column_reference ::= table_name NK_DOT NK_ALIAS", + /* 560 */ "pseudo_column ::= ROWTS", + /* 561 */ "pseudo_column ::= TBNAME", + /* 562 */ "pseudo_column ::= table_name NK_DOT TBNAME", + /* 563 */ "pseudo_column ::= QSTART", + /* 564 */ "pseudo_column ::= QEND", + /* 565 */ "pseudo_column ::= QDURATION", + /* 566 */ "pseudo_column ::= WSTART", + /* 567 */ "pseudo_column ::= WEND", + /* 568 */ "pseudo_column ::= WDURATION", + /* 569 */ "pseudo_column ::= IROWTS", + /* 570 */ "pseudo_column ::= ISFILLED", + /* 571 */ "pseudo_column ::= QTAGS", + /* 572 */ "pseudo_column ::= FLOW", + /* 573 */ "pseudo_column ::= FHIGH", + /* 574 */ "pseudo_column ::= FROWTS", + /* 575 */ "function_expression ::= function_name NK_LP expression_list NK_RP", + /* 576 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP", + /* 577 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP", + /* 578 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name_default_len NK_RP", + /* 579 */ "function_expression ::= POSITION NK_LP expr_or_subquery IN expr_or_subquery NK_RP", + /* 580 */ "function_expression ::= TRIM NK_LP expr_or_subquery NK_RP", + /* 581 */ "function_expression ::= TRIM NK_LP trim_specification_type FROM expr_or_subquery NK_RP", + /* 582 */ "function_expression ::= TRIM NK_LP expr_or_subquery FROM expr_or_subquery NK_RP", + /* 583 */ "function_expression ::= TRIM NK_LP trim_specification_type expr_or_subquery FROM expr_or_subquery NK_RP", + /* 584 */ "function_expression ::= substr_func NK_LP expression_list NK_RP", + /* 585 */ "function_expression ::= substr_func NK_LP expr_or_subquery FROM expr_or_subquery NK_RP", + /* 586 */ "function_expression ::= substr_func NK_LP expr_or_subquery FROM expr_or_subquery FOR expr_or_subquery NK_RP", + /* 587 */ "function_expression ::= REPLACE NK_LP expression_list NK_RP", + /* 588 */ "function_expression ::= literal_func", + /* 589 */ "function_expression ::= rand_func", + /* 590 */ "literal_func ::= noarg_func NK_LP NK_RP", + /* 591 */ "literal_func ::= NOW", + /* 592 */ "literal_func ::= TODAY", + /* 593 */ "rand_func ::= RAND NK_LP NK_RP", + /* 594 */ "rand_func ::= RAND NK_LP expression_list NK_RP", + /* 595 */ "substr_func ::= SUBSTR", + /* 596 */ "substr_func ::= SUBSTRING", + /* 597 */ "trim_specification_type ::= BOTH", + /* 598 */ "trim_specification_type ::= TRAILING", + /* 599 */ "trim_specification_type ::= LEADING", + /* 600 */ "noarg_func ::= NOW", + /* 601 */ "noarg_func ::= TODAY", + /* 602 */ "noarg_func ::= TIMEZONE", + /* 603 */ "noarg_func ::= DATABASE", + /* 604 */ "noarg_func ::= CLIENT_VERSION", + /* 605 */ "noarg_func ::= SERVER_VERSION", + /* 606 */ "noarg_func ::= SERVER_STATUS", + /* 607 */ "noarg_func ::= CURRENT_USER", + /* 608 */ "noarg_func ::= USER", + /* 609 */ "noarg_func ::= PI", + /* 610 */ "star_func ::= COUNT", + /* 611 */ "star_func ::= FIRST", + /* 612 */ "star_func ::= LAST", + /* 613 */ "star_func ::= LAST_ROW", + /* 614 */ "star_func_para_list ::= NK_STAR", + /* 615 */ "star_func_para_list ::= other_para_list", + /* 616 */ "other_para_list ::= star_func_para", + /* 617 */ "other_para_list ::= other_para_list NK_COMMA star_func_para", + /* 618 */ "star_func_para ::= expr_or_subquery", + /* 619 */ "star_func_para ::= table_name NK_DOT NK_STAR", + /* 620 */ "case_when_expression ::= CASE when_then_list case_when_else_opt END", + /* 621 */ "case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END", + /* 622 */ "when_then_list ::= when_then_expr", + /* 623 */ "when_then_list ::= when_then_list when_then_expr", + /* 624 */ "when_then_expr ::= WHEN common_expression THEN common_expression", + /* 625 */ "case_when_else_opt ::=", + /* 626 */ "case_when_else_opt ::= ELSE common_expression", + /* 627 */ "predicate ::= expr_or_subquery compare_op expr_or_subquery", + /* 628 */ "predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery", + /* 629 */ "predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery", + /* 630 */ "predicate ::= expr_or_subquery IS NULL", + /* 631 */ "predicate ::= expr_or_subquery IS NOT NULL", + /* 632 */ "predicate ::= expr_or_subquery in_op in_predicate_value", + /* 633 */ "compare_op ::= NK_LT", + /* 634 */ "compare_op ::= NK_GT", + /* 635 */ "compare_op ::= NK_LE", + /* 636 */ "compare_op ::= NK_GE", + /* 637 */ "compare_op ::= NK_NE", + /* 638 */ "compare_op ::= NK_EQ", + /* 639 */ "compare_op ::= LIKE", + /* 640 */ "compare_op ::= NOT LIKE", + /* 641 */ "compare_op ::= MATCH", + /* 642 */ "compare_op ::= NMATCH", + /* 643 */ "compare_op ::= CONTAINS", + /* 644 */ "in_op ::= IN", + /* 645 */ "in_op ::= NOT IN", + /* 646 */ "in_predicate_value ::= NK_LP literal_list NK_RP", + /* 647 */ "boolean_value_expression ::= boolean_primary", + /* 648 */ "boolean_value_expression ::= NOT boolean_primary", + /* 649 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression", + /* 650 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression", + /* 651 */ "boolean_primary ::= predicate", + /* 652 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP", + /* 653 */ "common_expression ::= expr_or_subquery", + /* 654 */ "common_expression ::= boolean_value_expression", + /* 655 */ "from_clause_opt ::=", + /* 656 */ "from_clause_opt ::= FROM table_reference_list", + /* 657 */ "table_reference_list ::= table_reference", + /* 658 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference", + /* 659 */ "table_reference ::= table_primary", + /* 660 */ "table_reference ::= joined_table", + /* 661 */ "table_primary ::= table_name alias_opt", + /* 662 */ "table_primary ::= db_name NK_DOT table_name alias_opt", + /* 663 */ "table_primary ::= subquery alias_opt", + /* 664 */ "table_primary ::= parenthesized_joined_table", + /* 665 */ "alias_opt ::=", + /* 666 */ "alias_opt ::= table_alias", + /* 667 */ "alias_opt ::= AS table_alias", + /* 668 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP", + /* 669 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP", + /* 670 */ "joined_table ::= table_reference join_type join_subtype JOIN table_reference join_on_clause_opt window_offset_clause_opt jlimit_clause_opt", + /* 671 */ "join_type ::=", + /* 672 */ "join_type ::= INNER", + /* 673 */ "join_type ::= LEFT", + /* 674 */ "join_type ::= RIGHT", + /* 675 */ "join_type ::= FULL", + /* 676 */ "join_subtype ::=", + /* 677 */ "join_subtype ::= OUTER", + /* 678 */ "join_subtype ::= SEMI", + /* 679 */ "join_subtype ::= ANTI", + /* 680 */ "join_subtype ::= ASOF", + /* 681 */ "join_subtype ::= WINDOW", + /* 682 */ "join_on_clause_opt ::=", + /* 683 */ "join_on_clause_opt ::= ON search_condition", + /* 684 */ "window_offset_clause_opt ::=", + /* 685 */ "window_offset_clause_opt ::= WINDOW_OFFSET NK_LP window_offset_literal NK_COMMA window_offset_literal NK_RP", + /* 686 */ "window_offset_literal ::= NK_VARIABLE", + /* 687 */ "window_offset_literal ::= NK_MINUS NK_VARIABLE", + /* 688 */ "jlimit_clause_opt ::=", + /* 689 */ "jlimit_clause_opt ::= JLIMIT NK_INTEGER", + /* 690 */ "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", + /* 691 */ "hint_list ::=", + /* 692 */ "hint_list ::= NK_HINT", + /* 693 */ "tag_mode_opt ::=", + /* 694 */ "tag_mode_opt ::= TAGS", + /* 695 */ "set_quantifier_opt ::=", + /* 696 */ "set_quantifier_opt ::= DISTINCT", + /* 697 */ "set_quantifier_opt ::= ALL", + /* 698 */ "select_list ::= select_item", + /* 699 */ "select_list ::= select_list NK_COMMA select_item", + /* 700 */ "select_item ::= NK_STAR", + /* 701 */ "select_item ::= common_expression", + /* 702 */ "select_item ::= common_expression column_alias", + /* 703 */ "select_item ::= common_expression AS column_alias", + /* 704 */ "select_item ::= table_name NK_DOT NK_STAR", + /* 705 */ "where_clause_opt ::=", + /* 706 */ "where_clause_opt ::= WHERE search_condition", + /* 707 */ "partition_by_clause_opt ::=", + /* 708 */ "partition_by_clause_opt ::= PARTITION BY partition_list", + /* 709 */ "partition_list ::= partition_item", + /* 710 */ "partition_list ::= partition_list NK_COMMA partition_item", + /* 711 */ "partition_item ::= expr_or_subquery", + /* 712 */ "partition_item ::= expr_or_subquery column_alias", + /* 713 */ "partition_item ::= expr_or_subquery AS column_alias", + /* 714 */ "twindow_clause_opt ::=", + /* 715 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP", + /* 716 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP", + /* 717 */ "twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt", + /* 718 */ "twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt", + /* 719 */ "twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition", + /* 720 */ "twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP", + /* 721 */ "twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP", + /* 722 */ "twindow_clause_opt ::= ANOMALY_WINDOW NK_LP expr_or_subquery NK_RP", + /* 723 */ "twindow_clause_opt ::= ANOMALY_WINDOW NK_LP expr_or_subquery NK_COMMA NK_STRING NK_RP", + /* 724 */ "sliding_opt ::=", + /* 725 */ "sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP", + /* 726 */ "interval_sliding_duration_literal ::= NK_VARIABLE", + /* 727 */ "interval_sliding_duration_literal ::= NK_STRING", + /* 728 */ "interval_sliding_duration_literal ::= NK_INTEGER", + /* 729 */ "fill_opt ::=", + /* 730 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", + /* 731 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP", + /* 732 */ "fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP", + /* 733 */ "fill_mode ::= NONE", + /* 734 */ "fill_mode ::= PREV", + /* 735 */ "fill_mode ::= NULL", + /* 736 */ "fill_mode ::= NULL_F", + /* 737 */ "fill_mode ::= LINEAR", + /* 738 */ "fill_mode ::= NEXT", + /* 739 */ "group_by_clause_opt ::=", + /* 740 */ "group_by_clause_opt ::= GROUP BY group_by_list", + /* 741 */ "group_by_list ::= expr_or_subquery", + /* 742 */ "group_by_list ::= group_by_list NK_COMMA expr_or_subquery", + /* 743 */ "having_clause_opt ::=", + /* 744 */ "having_clause_opt ::= HAVING search_condition", + /* 745 */ "range_opt ::=", + /* 746 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP", + /* 747 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_RP", + /* 748 */ "every_opt ::=", + /* 749 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP", + /* 750 */ "query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt", + /* 751 */ "query_simple ::= query_specification", + /* 752 */ "query_simple ::= union_query_expression", + /* 753 */ "union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery", + /* 754 */ "union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery", + /* 755 */ "query_simple_or_subquery ::= query_simple", + /* 756 */ "query_simple_or_subquery ::= subquery", + /* 757 */ "query_or_subquery ::= query_expression", + /* 758 */ "query_or_subquery ::= subquery", + /* 759 */ "order_by_clause_opt ::=", + /* 760 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", + /* 761 */ "slimit_clause_opt ::=", + /* 762 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", + /* 763 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", + /* 764 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 765 */ "limit_clause_opt ::=", + /* 766 */ "limit_clause_opt ::= LIMIT NK_INTEGER", + /* 767 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", + /* 768 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 769 */ "subquery ::= NK_LP query_expression NK_RP", + /* 770 */ "subquery ::= NK_LP subquery NK_RP", + /* 771 */ "search_condition ::= common_expression", + /* 772 */ "sort_specification_list ::= sort_specification", + /* 773 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", + /* 774 */ "sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt", + /* 775 */ "ordering_specification_opt ::=", + /* 776 */ "ordering_specification_opt ::= ASC", + /* 777 */ "ordering_specification_opt ::= DESC", + /* 778 */ "null_ordering_opt ::=", + /* 779 */ "null_ordering_opt ::= NULLS FIRST", + /* 780 */ "null_ordering_opt ::= NULLS LAST", + /* 781 */ "column_options ::=", + /* 782 */ "column_options ::= column_options PRIMARY KEY", + /* 783 */ "column_options ::= column_options NK_ID NK_STRING", }; #endif /* NDEBUG */ @@ -3359,266 +3405,266 @@ static void yy_destructor( */ /********* Begin destructor definitions ***************************************/ /* Default NON-TERMINAL Destructor */ - case 383: /* cmd */ - case 386: /* literal */ - case 397: /* with_clause_opt */ - case 403: /* search_condition */ - case 408: /* db_options */ - case 410: /* alter_db_options */ - case 412: /* start_opt */ - case 413: /* end_opt */ - case 417: /* signed */ - case 419: /* retention */ - case 420: /* full_table_name */ - case 423: /* table_options */ - case 429: /* alter_table_clause */ - case 430: /* alter_table_options */ - case 433: /* column_options */ - case 434: /* tags_literal */ - case 435: /* create_subtable_clause */ - case 438: /* drop_table_clause */ - case 441: /* tag_def */ - case 442: /* column_def */ - case 447: /* duration_literal */ - case 448: /* rollup_func_name */ - case 450: /* col_name */ - case 453: /* like_pattern_opt */ - case 454: /* db_name_cond_opt */ - case 455: /* table_name_cond */ - case 456: /* from_db_opt */ - case 458: /* tag_item */ - case 462: /* full_tsma_name */ - case 464: /* index_options */ - case 465: /* full_index_name */ - case 467: /* sliding_opt */ - case 468: /* sma_stream_opt */ - case 469: /* func */ - case 473: /* query_or_subquery */ - case 474: /* where_clause_opt */ - case 477: /* explain_options */ - case 478: /* insert_query */ - case 483: /* full_view_name */ - case 486: /* stream_options */ - case 489: /* subtable_opt */ - case 492: /* column_stream_def */ - case 493: /* stream_col_options */ - case 494: /* expression */ - case 497: /* literal_func */ - case 498: /* signed_literal */ - case 501: /* expr_or_subquery */ - case 502: /* pseudo_column */ - case 503: /* column_reference */ - case 504: /* function_expression */ - case 505: /* case_when_expression */ - case 510: /* rand_func */ - case 513: /* star_func_para */ - case 515: /* case_when_else_opt */ - case 516: /* common_expression */ - case 517: /* when_then_expr */ - case 518: /* predicate */ - case 521: /* in_predicate_value */ - case 522: /* boolean_value_expression */ - case 523: /* boolean_primary */ - case 524: /* from_clause_opt */ - case 525: /* table_reference_list */ - case 526: /* table_reference */ - case 527: /* table_primary */ - case 528: /* joined_table */ - case 530: /* subquery */ - case 531: /* parenthesized_joined_table */ - case 534: /* join_on_clause_opt */ - case 535: /* window_offset_clause_opt */ - case 536: /* jlimit_clause_opt */ - case 537: /* window_offset_literal */ - case 538: /* query_specification */ - case 544: /* range_opt */ - case 545: /* every_opt */ - case 546: /* fill_opt */ - case 547: /* twindow_clause_opt */ - case 549: /* having_clause_opt */ - case 550: /* select_item */ - case 552: /* partition_item */ - case 553: /* interval_sliding_duration_literal */ - case 556: /* query_expression */ - case 557: /* query_simple */ - case 559: /* slimit_clause_opt */ - case 560: /* limit_clause_opt */ - case 561: /* union_query_expression */ - case 562: /* query_simple_or_subquery */ - case 564: /* sort_specification */ + case 389: /* cmd */ + case 392: /* literal */ + case 403: /* with_clause_opt */ + case 409: /* search_condition */ + case 414: /* db_options */ + case 416: /* alter_db_options */ + case 418: /* start_opt */ + case 419: /* end_opt */ + case 423: /* signed */ + case 425: /* retention */ + case 426: /* full_table_name */ + case 429: /* table_options */ + case 435: /* alter_table_clause */ + case 436: /* alter_table_options */ + case 439: /* column_options */ + case 440: /* tags_literal */ + case 441: /* create_subtable_clause */ + case 444: /* drop_table_clause */ + case 447: /* tag_def */ + case 448: /* column_def */ + case 453: /* duration_literal */ + case 454: /* rollup_func_name */ + case 456: /* col_name */ + case 459: /* like_pattern_opt */ + case 460: /* db_name_cond_opt */ + case 461: /* table_name_cond */ + case 462: /* from_db_opt */ + case 464: /* tag_item */ + case 468: /* full_tsma_name */ + case 470: /* index_options */ + case 471: /* full_index_name */ + case 473: /* sliding_opt */ + case 474: /* sma_stream_opt */ + case 475: /* func */ + case 479: /* query_or_subquery */ + case 480: /* where_clause_opt */ + case 483: /* explain_options */ + case 484: /* insert_query */ + case 489: /* full_view_name */ + case 492: /* stream_options */ + case 495: /* subtable_opt */ + case 498: /* column_stream_def */ + case 499: /* stream_col_options */ + case 500: /* expression */ + case 503: /* literal_func */ + case 504: /* signed_literal */ + case 507: /* expr_or_subquery */ + case 508: /* pseudo_column */ + case 509: /* column_reference */ + case 510: /* function_expression */ + case 511: /* case_when_expression */ + case 516: /* rand_func */ + case 519: /* star_func_para */ + case 521: /* case_when_else_opt */ + case 522: /* common_expression */ + case 523: /* when_then_expr */ + case 524: /* predicate */ + case 527: /* in_predicate_value */ + case 528: /* boolean_value_expression */ + case 529: /* boolean_primary */ + case 530: /* from_clause_opt */ + case 531: /* table_reference_list */ + case 532: /* table_reference */ + case 533: /* table_primary */ + case 534: /* joined_table */ + case 536: /* subquery */ + case 537: /* parenthesized_joined_table */ + case 540: /* join_on_clause_opt */ + case 541: /* window_offset_clause_opt */ + case 542: /* jlimit_clause_opt */ + case 543: /* window_offset_literal */ + case 544: /* query_specification */ + case 550: /* range_opt */ + case 551: /* every_opt */ + case 552: /* fill_opt */ + case 553: /* twindow_clause_opt */ + case 555: /* having_clause_opt */ + case 556: /* select_item */ + case 558: /* partition_item */ + case 559: /* interval_sliding_duration_literal */ + case 562: /* query_expression */ + case 563: /* query_simple */ + case 565: /* slimit_clause_opt */ + case 566: /* limit_clause_opt */ + case 567: /* union_query_expression */ + case 568: /* query_simple_or_subquery */ + case 570: /* sort_specification */ { - nodesDestroyNode((yypminor->yy560)); + nodesDestroyNode((yypminor->yy974)); } break; - case 384: /* account_options */ - case 385: /* alter_account_options */ - case 387: /* alter_account_option */ - case 411: /* speed_opt */ - case 472: /* with_meta */ - case 481: /* bufsize_opt */ + case 390: /* account_options */ + case 391: /* alter_account_options */ + case 393: /* alter_account_option */ + case 417: /* speed_opt */ + case 478: /* with_meta */ + case 487: /* bufsize_opt */ { } break; - case 388: /* ip_range_list */ - case 389: /* white_list */ - case 390: /* white_list_opt */ - case 414: /* integer_list */ - case 415: /* variable_list */ - case 416: /* retention_list */ - case 421: /* column_def_list */ - case 422: /* tags_def_opt */ - case 424: /* multi_create_clause */ - case 425: /* tag_list_opt */ - case 426: /* tags_def */ - case 428: /* multi_drop_clause */ - case 436: /* specific_cols_opt */ - case 437: /* tags_literal_list */ - case 439: /* col_name_list */ - case 440: /* tag_def_list */ - case 444: /* duration_list */ - case 445: /* rollup_func_list */ - case 463: /* func_list */ - case 471: /* expression_list */ - case 487: /* col_list_opt */ - case 488: /* tag_def_or_ref_opt */ - case 491: /* column_stream_def_list */ - case 496: /* dnode_list */ - case 499: /* literal_list */ - case 507: /* star_func_para_list */ - case 512: /* other_para_list */ - case 514: /* when_then_list */ - case 539: /* hint_list */ - case 542: /* select_list */ - case 543: /* partition_by_clause_opt */ - case 548: /* group_by_clause_opt */ - case 551: /* partition_list */ - case 555: /* group_by_list */ - case 558: /* order_by_clause_opt */ - case 563: /* sort_specification_list */ + case 394: /* ip_range_list */ + case 395: /* white_list */ + case 396: /* white_list_opt */ + case 420: /* integer_list */ + case 421: /* variable_list */ + case 422: /* retention_list */ + case 427: /* column_def_list */ + case 428: /* tags_def_opt */ + case 430: /* multi_create_clause */ + case 431: /* tag_list_opt */ + case 432: /* tags_def */ + case 434: /* multi_drop_clause */ + case 442: /* specific_cols_opt */ + case 443: /* tags_literal_list */ + case 445: /* col_name_list */ + case 446: /* tag_def_list */ + case 450: /* duration_list */ + case 451: /* rollup_func_list */ + case 469: /* func_list */ + case 477: /* expression_list */ + case 493: /* col_list_opt */ + case 494: /* tag_def_or_ref_opt */ + case 497: /* column_stream_def_list */ + case 502: /* dnode_list */ + case 505: /* literal_list */ + case 513: /* star_func_para_list */ + case 518: /* other_para_list */ + case 520: /* when_then_list */ + case 545: /* hint_list */ + case 548: /* select_list */ + case 549: /* partition_by_clause_opt */ + case 554: /* group_by_clause_opt */ + case 557: /* partition_list */ + case 561: /* group_by_list */ + case 564: /* order_by_clause_opt */ + case 569: /* sort_specification_list */ { - nodesDestroyList((yypminor->yy334)); + nodesDestroyList((yypminor->yy946)); } break; - case 391: /* is_import_opt */ - case 392: /* is_createdb_opt */ - case 394: /* sysinfo_opt */ + case 397: /* is_import_opt */ + case 398: /* is_createdb_opt */ + case 400: /* sysinfo_opt */ { } break; - case 393: /* user_name */ - case 400: /* db_name */ - case 401: /* table_name */ - case 402: /* topic_name */ - case 404: /* dnode_endpoint */ - case 431: /* column_name */ - case 449: /* function_name */ - case 459: /* column_alias */ - case 460: /* tsma_name */ - case 466: /* index_name */ - case 470: /* sma_func_name */ - case 475: /* cgroup_name */ - case 482: /* language_opt */ - case 484: /* view_name */ - case 485: /* stream_name */ - case 495: /* on_vgroup_id */ - case 500: /* table_alias */ - case 506: /* star_func */ - case 509: /* substr_func */ - case 511: /* noarg_func */ - case 529: /* alias_opt */ + case 399: /* user_name */ + case 406: /* db_name */ + case 407: /* table_name */ + case 408: /* topic_name */ + case 410: /* dnode_endpoint */ + case 437: /* column_name */ + case 455: /* function_name */ + case 465: /* column_alias */ + case 466: /* tsma_name */ + case 472: /* index_name */ + case 476: /* sma_func_name */ + case 481: /* cgroup_name */ + case 488: /* language_opt */ + case 490: /* view_name */ + case 491: /* stream_name */ + case 501: /* on_vgroup_id */ + case 506: /* table_alias */ + case 512: /* star_func */ + case 515: /* substr_func */ + case 517: /* noarg_func */ + case 535: /* alias_opt */ { } break; - case 395: /* privileges */ - case 398: /* priv_type_list */ - case 399: /* priv_type */ + case 401: /* privileges */ + case 404: /* priv_type_list */ + case 405: /* priv_type */ { } break; - case 396: /* priv_level */ + case 402: /* priv_level */ { } break; - case 405: /* force_opt */ - case 406: /* unsafe_opt */ - case 407: /* not_exists_opt */ - case 409: /* exists_opt */ - case 427: /* with_opt */ - case 476: /* analyze_opt */ - case 479: /* or_replace_opt */ - case 480: /* agg_func_opt */ - case 490: /* ignore_opt */ - case 540: /* set_quantifier_opt */ - case 541: /* tag_mode_opt */ + case 411: /* force_opt */ + case 412: /* unsafe_opt */ + case 413: /* not_exists_opt */ + case 415: /* exists_opt */ + case 433: /* with_opt */ + case 482: /* analyze_opt */ + case 485: /* or_replace_opt */ + case 486: /* agg_func_opt */ + case 496: /* ignore_opt */ + case 546: /* set_quantifier_opt */ + case 547: /* tag_mode_opt */ { } break; - case 418: /* alter_db_option */ - case 446: /* alter_table_option */ + case 424: /* alter_db_option */ + case 452: /* alter_table_option */ { } break; - case 432: /* type_name */ - case 443: /* type_name_default_len */ + case 438: /* type_name */ + case 449: /* type_name_default_len */ { } break; - case 451: /* db_kind_opt */ - case 457: /* table_kind */ + case 457: /* db_kind_opt */ + case 463: /* table_kind */ { } break; - case 452: /* table_kind_db_name_cond_opt */ + case 458: /* table_kind_db_name_cond_opt */ { } break; - case 461: /* tsma_func_list */ + case 467: /* tsma_func_list */ { - nodesDestroyNode((yypminor->yy560)); + nodesDestroyNode((yypminor->yy974)); } break; - case 508: /* trim_specification_type */ + case 514: /* trim_specification_type */ { } break; - case 519: /* compare_op */ - case 520: /* in_op */ + case 525: /* compare_op */ + case 526: /* in_op */ { } break; - case 532: /* join_type */ + case 538: /* join_type */ { } break; - case 533: /* join_subtype */ + case 539: /* join_subtype */ { } break; - case 554: /* fill_mode */ + case 560: /* fill_mode */ { } break; - case 565: /* ordering_specification_opt */ + case 571: /* ordering_specification_opt */ { } break; - case 566: /* null_ordering_opt */ + case 572: /* null_ordering_opt */ { } @@ -3909,779 +3955,790 @@ static void yy_shift( /* For rule J, yyRuleInfoLhs[J] contains the symbol on the left-hand side ** of that rule */ static const YYCODETYPE yyRuleInfoLhs[] = { - 383, /* (0) cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ - 383, /* (1) cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ - 384, /* (2) account_options ::= */ - 384, /* (3) account_options ::= account_options PPS literal */ - 384, /* (4) account_options ::= account_options TSERIES literal */ - 384, /* (5) account_options ::= account_options STORAGE literal */ - 384, /* (6) account_options ::= account_options STREAMS literal */ - 384, /* (7) account_options ::= account_options QTIME literal */ - 384, /* (8) account_options ::= account_options DBS literal */ - 384, /* (9) account_options ::= account_options USERS literal */ - 384, /* (10) account_options ::= account_options CONNS literal */ - 384, /* (11) account_options ::= account_options STATE literal */ - 385, /* (12) alter_account_options ::= alter_account_option */ - 385, /* (13) alter_account_options ::= alter_account_options alter_account_option */ - 387, /* (14) alter_account_option ::= PASS literal */ - 387, /* (15) alter_account_option ::= PPS literal */ - 387, /* (16) alter_account_option ::= TSERIES literal */ - 387, /* (17) alter_account_option ::= STORAGE literal */ - 387, /* (18) alter_account_option ::= STREAMS literal */ - 387, /* (19) alter_account_option ::= QTIME literal */ - 387, /* (20) alter_account_option ::= DBS literal */ - 387, /* (21) alter_account_option ::= USERS literal */ - 387, /* (22) alter_account_option ::= CONNS literal */ - 387, /* (23) alter_account_option ::= STATE literal */ - 388, /* (24) ip_range_list ::= NK_STRING */ - 388, /* (25) ip_range_list ::= ip_range_list NK_COMMA NK_STRING */ - 389, /* (26) white_list ::= HOST ip_range_list */ - 390, /* (27) white_list_opt ::= */ - 390, /* (28) white_list_opt ::= white_list */ - 391, /* (29) is_import_opt ::= */ - 391, /* (30) is_import_opt ::= IS_IMPORT NK_INTEGER */ - 392, /* (31) is_createdb_opt ::= */ - 392, /* (32) is_createdb_opt ::= CREATEDB NK_INTEGER */ - 383, /* (33) cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt is_createdb_opt is_import_opt white_list_opt */ - 383, /* (34) cmd ::= ALTER USER user_name PASS NK_STRING */ - 383, /* (35) cmd ::= ALTER USER user_name ENABLE NK_INTEGER */ - 383, /* (36) cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */ - 383, /* (37) cmd ::= ALTER USER user_name CREATEDB NK_INTEGER */ - 383, /* (38) cmd ::= ALTER USER user_name ADD white_list */ - 383, /* (39) cmd ::= ALTER USER user_name DROP white_list */ - 383, /* (40) cmd ::= DROP USER user_name */ - 394, /* (41) sysinfo_opt ::= */ - 394, /* (42) sysinfo_opt ::= SYSINFO NK_INTEGER */ - 383, /* (43) cmd ::= GRANT privileges ON priv_level with_clause_opt TO user_name */ - 383, /* (44) cmd ::= REVOKE privileges ON priv_level with_clause_opt FROM user_name */ - 395, /* (45) privileges ::= ALL */ - 395, /* (46) privileges ::= priv_type_list */ - 395, /* (47) privileges ::= SUBSCRIBE */ - 398, /* (48) priv_type_list ::= priv_type */ - 398, /* (49) priv_type_list ::= priv_type_list NK_COMMA priv_type */ - 399, /* (50) priv_type ::= READ */ - 399, /* (51) priv_type ::= WRITE */ - 399, /* (52) priv_type ::= ALTER */ - 396, /* (53) priv_level ::= NK_STAR NK_DOT NK_STAR */ - 396, /* (54) priv_level ::= db_name NK_DOT NK_STAR */ - 396, /* (55) priv_level ::= db_name NK_DOT table_name */ - 396, /* (56) priv_level ::= topic_name */ - 397, /* (57) with_clause_opt ::= */ - 397, /* (58) with_clause_opt ::= WITH search_condition */ - 383, /* (59) cmd ::= CREATE ENCRYPT_KEY NK_STRING */ - 383, /* (60) cmd ::= CREATE DNODE dnode_endpoint */ - 383, /* (61) cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */ - 383, /* (62) cmd ::= DROP DNODE NK_INTEGER force_opt */ - 383, /* (63) cmd ::= DROP DNODE dnode_endpoint force_opt */ - 383, /* (64) cmd ::= DROP DNODE NK_INTEGER unsafe_opt */ - 383, /* (65) cmd ::= DROP DNODE dnode_endpoint unsafe_opt */ - 383, /* (66) cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ - 383, /* (67) cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ - 383, /* (68) cmd ::= ALTER ALL DNODES NK_STRING */ - 383, /* (69) cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ - 383, /* (70) cmd ::= RESTORE DNODE NK_INTEGER */ - 404, /* (71) dnode_endpoint ::= NK_STRING */ - 404, /* (72) dnode_endpoint ::= NK_ID */ - 404, /* (73) dnode_endpoint ::= NK_IPTOKEN */ - 405, /* (74) force_opt ::= */ - 405, /* (75) force_opt ::= FORCE */ - 406, /* (76) unsafe_opt ::= UNSAFE */ - 383, /* (77) cmd ::= ALTER CLUSTER NK_STRING */ - 383, /* (78) cmd ::= ALTER CLUSTER NK_STRING NK_STRING */ - 383, /* (79) cmd ::= ALTER LOCAL NK_STRING */ - 383, /* (80) cmd ::= ALTER LOCAL NK_STRING NK_STRING */ - 383, /* (81) cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ - 383, /* (82) cmd ::= DROP QNODE ON DNODE NK_INTEGER */ - 383, /* (83) cmd ::= RESTORE QNODE ON DNODE NK_INTEGER */ - 383, /* (84) cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ - 383, /* (85) cmd ::= DROP BNODE ON DNODE NK_INTEGER */ - 383, /* (86) cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ - 383, /* (87) cmd ::= DROP SNODE ON DNODE NK_INTEGER */ - 383, /* (88) cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ - 383, /* (89) cmd ::= DROP MNODE ON DNODE NK_INTEGER */ - 383, /* (90) cmd ::= RESTORE MNODE ON DNODE NK_INTEGER */ - 383, /* (91) cmd ::= RESTORE VNODE ON DNODE NK_INTEGER */ - 383, /* (92) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ - 383, /* (93) cmd ::= DROP DATABASE exists_opt db_name */ - 383, /* (94) cmd ::= USE db_name */ - 383, /* (95) cmd ::= ALTER DATABASE db_name alter_db_options */ - 383, /* (96) cmd ::= FLUSH DATABASE db_name */ - 383, /* (97) cmd ::= TRIM DATABASE db_name speed_opt */ - 383, /* (98) cmd ::= S3MIGRATE DATABASE db_name */ - 383, /* (99) cmd ::= COMPACT DATABASE db_name start_opt end_opt */ - 407, /* (100) not_exists_opt ::= IF NOT EXISTS */ - 407, /* (101) not_exists_opt ::= */ - 409, /* (102) exists_opt ::= IF EXISTS */ - 409, /* (103) exists_opt ::= */ - 408, /* (104) db_options ::= */ - 408, /* (105) db_options ::= db_options BUFFER NK_INTEGER */ - 408, /* (106) db_options ::= db_options CACHEMODEL NK_STRING */ - 408, /* (107) db_options ::= db_options CACHESIZE NK_INTEGER */ - 408, /* (108) db_options ::= db_options COMP NK_INTEGER */ - 408, /* (109) db_options ::= db_options DURATION NK_INTEGER */ - 408, /* (110) db_options ::= db_options DURATION NK_VARIABLE */ - 408, /* (111) db_options ::= db_options MAXROWS NK_INTEGER */ - 408, /* (112) db_options ::= db_options MINROWS NK_INTEGER */ - 408, /* (113) db_options ::= db_options KEEP integer_list */ - 408, /* (114) db_options ::= db_options KEEP variable_list */ - 408, /* (115) db_options ::= db_options PAGES NK_INTEGER */ - 408, /* (116) db_options ::= db_options PAGESIZE NK_INTEGER */ - 408, /* (117) db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ - 408, /* (118) db_options ::= db_options PRECISION NK_STRING */ - 408, /* (119) db_options ::= db_options REPLICA NK_INTEGER */ - 408, /* (120) db_options ::= db_options VGROUPS NK_INTEGER */ - 408, /* (121) db_options ::= db_options SINGLE_STABLE NK_INTEGER */ - 408, /* (122) db_options ::= db_options RETENTIONS retention_list */ - 408, /* (123) db_options ::= db_options SCHEMALESS NK_INTEGER */ - 408, /* (124) db_options ::= db_options WAL_LEVEL NK_INTEGER */ - 408, /* (125) db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ - 408, /* (126) db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ - 408, /* (127) db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ - 408, /* (128) db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ - 408, /* (129) db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ - 408, /* (130) db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ - 408, /* (131) db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ - 408, /* (132) db_options ::= db_options STT_TRIGGER NK_INTEGER */ - 408, /* (133) db_options ::= db_options TABLE_PREFIX signed */ - 408, /* (134) db_options ::= db_options TABLE_SUFFIX signed */ - 408, /* (135) db_options ::= db_options S3_CHUNKSIZE NK_INTEGER */ - 408, /* (136) db_options ::= db_options S3_KEEPLOCAL NK_INTEGER */ - 408, /* (137) db_options ::= db_options S3_KEEPLOCAL NK_VARIABLE */ - 408, /* (138) db_options ::= db_options S3_COMPACT NK_INTEGER */ - 408, /* (139) db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER */ - 408, /* (140) db_options ::= db_options ENCRYPT_ALGORITHM NK_STRING */ - 410, /* (141) alter_db_options ::= alter_db_option */ - 410, /* (142) alter_db_options ::= alter_db_options alter_db_option */ - 418, /* (143) alter_db_option ::= BUFFER NK_INTEGER */ - 418, /* (144) alter_db_option ::= CACHEMODEL NK_STRING */ - 418, /* (145) alter_db_option ::= CACHESIZE NK_INTEGER */ - 418, /* (146) alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ - 418, /* (147) alter_db_option ::= KEEP integer_list */ - 418, /* (148) alter_db_option ::= KEEP variable_list */ - 418, /* (149) alter_db_option ::= PAGES NK_INTEGER */ - 418, /* (150) alter_db_option ::= REPLICA NK_INTEGER */ - 418, /* (151) alter_db_option ::= WAL_LEVEL NK_INTEGER */ - 418, /* (152) alter_db_option ::= STT_TRIGGER NK_INTEGER */ - 418, /* (153) alter_db_option ::= MINROWS NK_INTEGER */ - 418, /* (154) alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER */ - 418, /* (155) alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ - 418, /* (156) alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER */ - 418, /* (157) alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ - 418, /* (158) alter_db_option ::= S3_KEEPLOCAL NK_INTEGER */ - 418, /* (159) alter_db_option ::= S3_KEEPLOCAL NK_VARIABLE */ - 418, /* (160) alter_db_option ::= S3_COMPACT NK_INTEGER */ - 418, /* (161) alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER */ - 418, /* (162) alter_db_option ::= ENCRYPT_ALGORITHM NK_STRING */ - 414, /* (163) integer_list ::= NK_INTEGER */ - 414, /* (164) integer_list ::= integer_list NK_COMMA NK_INTEGER */ - 415, /* (165) variable_list ::= NK_VARIABLE */ - 415, /* (166) variable_list ::= variable_list NK_COMMA NK_VARIABLE */ - 416, /* (167) retention_list ::= retention */ - 416, /* (168) retention_list ::= retention_list NK_COMMA retention */ - 419, /* (169) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ - 419, /* (170) retention ::= NK_MINUS NK_COLON NK_VARIABLE */ - 411, /* (171) speed_opt ::= */ - 411, /* (172) speed_opt ::= BWLIMIT NK_INTEGER */ - 412, /* (173) start_opt ::= */ - 412, /* (174) start_opt ::= START WITH NK_INTEGER */ - 412, /* (175) start_opt ::= START WITH NK_STRING */ - 412, /* (176) start_opt ::= START WITH TIMESTAMP NK_STRING */ - 413, /* (177) end_opt ::= */ - 413, /* (178) end_opt ::= END WITH NK_INTEGER */ - 413, /* (179) end_opt ::= END WITH NK_STRING */ - 413, /* (180) end_opt ::= END WITH TIMESTAMP NK_STRING */ - 383, /* (181) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ - 383, /* (182) cmd ::= CREATE TABLE multi_create_clause */ - 383, /* (183) cmd ::= CREATE TABLE not_exists_opt USING full_table_name NK_LP tag_list_opt NK_RP FILE NK_STRING */ - 383, /* (184) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ - 383, /* (185) cmd ::= DROP TABLE with_opt multi_drop_clause */ - 383, /* (186) cmd ::= DROP STABLE with_opt exists_opt full_table_name */ - 383, /* (187) cmd ::= ALTER TABLE alter_table_clause */ - 383, /* (188) cmd ::= ALTER STABLE alter_table_clause */ - 429, /* (189) alter_table_clause ::= full_table_name alter_table_options */ - 429, /* (190) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name column_options */ - 429, /* (191) alter_table_clause ::= full_table_name DROP COLUMN column_name */ - 429, /* (192) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ - 429, /* (193) alter_table_clause ::= full_table_name MODIFY COLUMN column_name column_options */ - 429, /* (194) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ - 429, /* (195) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ - 429, /* (196) alter_table_clause ::= full_table_name DROP TAG column_name */ - 429, /* (197) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ - 429, /* (198) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ - 429, /* (199) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ tags_literal */ - 424, /* (200) multi_create_clause ::= create_subtable_clause */ - 424, /* (201) multi_create_clause ::= multi_create_clause create_subtable_clause */ - 435, /* (202) 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 */ - 428, /* (203) multi_drop_clause ::= drop_table_clause */ - 428, /* (204) multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */ - 438, /* (205) drop_table_clause ::= exists_opt full_table_name */ - 427, /* (206) with_opt ::= */ - 427, /* (207) with_opt ::= WITH */ - 436, /* (208) specific_cols_opt ::= */ - 436, /* (209) specific_cols_opt ::= NK_LP col_name_list NK_RP */ - 420, /* (210) full_table_name ::= table_name */ - 420, /* (211) full_table_name ::= db_name NK_DOT table_name */ - 440, /* (212) tag_def_list ::= tag_def */ - 440, /* (213) tag_def_list ::= tag_def_list NK_COMMA tag_def */ - 441, /* (214) tag_def ::= column_name type_name */ - 421, /* (215) column_def_list ::= column_def */ - 421, /* (216) column_def_list ::= column_def_list NK_COMMA column_def */ - 442, /* (217) column_def ::= column_name type_name column_options */ - 432, /* (218) type_name ::= BOOL */ - 432, /* (219) type_name ::= TINYINT */ - 432, /* (220) type_name ::= SMALLINT */ - 432, /* (221) type_name ::= INT */ - 432, /* (222) type_name ::= INTEGER */ - 432, /* (223) type_name ::= BIGINT */ - 432, /* (224) type_name ::= FLOAT */ - 432, /* (225) type_name ::= DOUBLE */ - 432, /* (226) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ - 432, /* (227) type_name ::= TIMESTAMP */ - 432, /* (228) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ - 432, /* (229) type_name ::= TINYINT UNSIGNED */ - 432, /* (230) type_name ::= SMALLINT UNSIGNED */ - 432, /* (231) type_name ::= INT UNSIGNED */ - 432, /* (232) type_name ::= BIGINT UNSIGNED */ - 432, /* (233) type_name ::= JSON */ - 432, /* (234) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ - 432, /* (235) type_name ::= MEDIUMBLOB */ - 432, /* (236) type_name ::= BLOB */ - 432, /* (237) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ - 432, /* (238) type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP */ - 432, /* (239) type_name ::= DECIMAL */ - 432, /* (240) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ - 432, /* (241) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ - 443, /* (242) type_name_default_len ::= BINARY */ - 443, /* (243) type_name_default_len ::= NCHAR */ - 443, /* (244) type_name_default_len ::= VARCHAR */ - 443, /* (245) type_name_default_len ::= VARBINARY */ - 422, /* (246) tags_def_opt ::= */ - 422, /* (247) tags_def_opt ::= tags_def */ - 426, /* (248) tags_def ::= TAGS NK_LP tag_def_list NK_RP */ - 423, /* (249) table_options ::= */ - 423, /* (250) table_options ::= table_options COMMENT NK_STRING */ - 423, /* (251) table_options ::= table_options MAX_DELAY duration_list */ - 423, /* (252) table_options ::= table_options WATERMARK duration_list */ - 423, /* (253) table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ - 423, /* (254) table_options ::= table_options TTL NK_INTEGER */ - 423, /* (255) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ - 423, /* (256) table_options ::= table_options DELETE_MARK duration_list */ - 430, /* (257) alter_table_options ::= alter_table_option */ - 430, /* (258) alter_table_options ::= alter_table_options alter_table_option */ - 446, /* (259) alter_table_option ::= COMMENT NK_STRING */ - 446, /* (260) alter_table_option ::= TTL NK_INTEGER */ - 444, /* (261) duration_list ::= duration_literal */ - 444, /* (262) duration_list ::= duration_list NK_COMMA duration_literal */ - 445, /* (263) rollup_func_list ::= rollup_func_name */ - 445, /* (264) rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ - 448, /* (265) rollup_func_name ::= function_name */ - 448, /* (266) rollup_func_name ::= FIRST */ - 448, /* (267) rollup_func_name ::= LAST */ - 439, /* (268) col_name_list ::= col_name */ - 439, /* (269) col_name_list ::= col_name_list NK_COMMA col_name */ - 450, /* (270) col_name ::= column_name */ - 383, /* (271) cmd ::= SHOW DNODES */ - 383, /* (272) cmd ::= SHOW USERS */ - 383, /* (273) cmd ::= SHOW USERS FULL */ - 383, /* (274) cmd ::= SHOW USER PRIVILEGES */ - 383, /* (275) cmd ::= SHOW db_kind_opt DATABASES */ - 383, /* (276) cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt */ - 383, /* (277) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ - 383, /* (278) cmd ::= SHOW db_name_cond_opt VGROUPS */ - 383, /* (279) cmd ::= SHOW MNODES */ - 383, /* (280) cmd ::= SHOW QNODES */ - 383, /* (281) cmd ::= SHOW ARBGROUPS */ - 383, /* (282) cmd ::= SHOW FUNCTIONS */ - 383, /* (283) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ - 383, /* (284) cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name */ - 383, /* (285) cmd ::= SHOW STREAMS */ - 383, /* (286) cmd ::= SHOW ACCOUNTS */ - 383, /* (287) cmd ::= SHOW APPS */ - 383, /* (288) cmd ::= SHOW CONNECTIONS */ - 383, /* (289) cmd ::= SHOW LICENCES */ - 383, /* (290) cmd ::= SHOW GRANTS */ - 383, /* (291) cmd ::= SHOW GRANTS FULL */ - 383, /* (292) cmd ::= SHOW GRANTS LOGS */ - 383, /* (293) cmd ::= SHOW CLUSTER MACHINES */ - 383, /* (294) cmd ::= SHOW CREATE DATABASE db_name */ - 383, /* (295) cmd ::= SHOW CREATE TABLE full_table_name */ - 383, /* (296) cmd ::= SHOW CREATE STABLE full_table_name */ - 383, /* (297) cmd ::= SHOW ENCRYPTIONS */ - 383, /* (298) cmd ::= SHOW QUERIES */ - 383, /* (299) cmd ::= SHOW SCORES */ - 383, /* (300) cmd ::= SHOW TOPICS */ - 383, /* (301) cmd ::= SHOW VARIABLES */ - 383, /* (302) cmd ::= SHOW CLUSTER VARIABLES */ - 383, /* (303) cmd ::= SHOW LOCAL VARIABLES */ - 383, /* (304) cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ - 383, /* (305) cmd ::= SHOW BNODES */ - 383, /* (306) cmd ::= SHOW SNODES */ - 383, /* (307) cmd ::= SHOW CLUSTER */ - 383, /* (308) cmd ::= SHOW TRANSACTIONS */ - 383, /* (309) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ - 383, /* (310) cmd ::= SHOW CONSUMERS */ - 383, /* (311) cmd ::= SHOW SUBSCRIPTIONS */ - 383, /* (312) cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ - 383, /* (313) cmd ::= SHOW TAGS FROM db_name NK_DOT table_name */ - 383, /* (314) cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ - 383, /* (315) cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name */ - 383, /* (316) cmd ::= SHOW VNODES ON DNODE NK_INTEGER */ - 383, /* (317) cmd ::= SHOW VNODES */ - 383, /* (318) cmd ::= SHOW db_name_cond_opt ALIVE */ - 383, /* (319) cmd ::= SHOW CLUSTER ALIVE */ - 383, /* (320) cmd ::= SHOW db_name_cond_opt VIEWS like_pattern_opt */ - 383, /* (321) cmd ::= SHOW CREATE VIEW full_table_name */ - 383, /* (322) cmd ::= SHOW COMPACTS */ - 383, /* (323) cmd ::= SHOW COMPACT NK_INTEGER */ - 452, /* (324) table_kind_db_name_cond_opt ::= */ - 452, /* (325) table_kind_db_name_cond_opt ::= table_kind */ - 452, /* (326) table_kind_db_name_cond_opt ::= db_name NK_DOT */ - 452, /* (327) table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT */ - 457, /* (328) table_kind ::= NORMAL */ - 457, /* (329) table_kind ::= CHILD */ - 454, /* (330) db_name_cond_opt ::= */ - 454, /* (331) db_name_cond_opt ::= db_name NK_DOT */ - 453, /* (332) like_pattern_opt ::= */ - 453, /* (333) like_pattern_opt ::= LIKE NK_STRING */ - 455, /* (334) table_name_cond ::= table_name */ - 456, /* (335) from_db_opt ::= */ - 456, /* (336) from_db_opt ::= FROM db_name */ - 425, /* (337) tag_list_opt ::= */ - 425, /* (338) tag_list_opt ::= tag_item */ - 425, /* (339) tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ - 458, /* (340) tag_item ::= TBNAME */ - 458, /* (341) tag_item ::= QTAGS */ - 458, /* (342) tag_item ::= column_name */ - 458, /* (343) tag_item ::= column_name column_alias */ - 458, /* (344) tag_item ::= column_name AS column_alias */ - 451, /* (345) db_kind_opt ::= */ - 451, /* (346) db_kind_opt ::= USER */ - 451, /* (347) db_kind_opt ::= SYSTEM */ - 383, /* (348) cmd ::= CREATE TSMA not_exists_opt tsma_name ON full_table_name tsma_func_list INTERVAL NK_LP duration_literal NK_RP */ - 383, /* (349) cmd ::= CREATE RECURSIVE TSMA not_exists_opt tsma_name ON full_table_name INTERVAL NK_LP duration_literal NK_RP */ - 383, /* (350) cmd ::= DROP TSMA exists_opt full_tsma_name */ - 383, /* (351) cmd ::= SHOW db_name_cond_opt TSMAS */ - 462, /* (352) full_tsma_name ::= tsma_name */ - 462, /* (353) full_tsma_name ::= db_name NK_DOT tsma_name */ - 461, /* (354) tsma_func_list ::= FUNCTION NK_LP func_list NK_RP */ - 383, /* (355) cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options */ - 383, /* (356) cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP */ - 383, /* (357) cmd ::= DROP INDEX exists_opt full_index_name */ - 465, /* (358) full_index_name ::= index_name */ - 465, /* (359) full_index_name ::= db_name NK_DOT index_name */ - 464, /* (360) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ - 464, /* (361) 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 */ - 463, /* (362) func_list ::= func */ - 463, /* (363) func_list ::= func_list NK_COMMA func */ - 469, /* (364) func ::= sma_func_name NK_LP expression_list NK_RP */ - 470, /* (365) sma_func_name ::= function_name */ - 470, /* (366) sma_func_name ::= COUNT */ - 470, /* (367) sma_func_name ::= FIRST */ - 470, /* (368) sma_func_name ::= LAST */ - 470, /* (369) sma_func_name ::= LAST_ROW */ - 468, /* (370) sma_stream_opt ::= */ - 468, /* (371) sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ - 468, /* (372) sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ - 468, /* (373) sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ - 472, /* (374) with_meta ::= AS */ - 472, /* (375) with_meta ::= WITH META AS */ - 472, /* (376) with_meta ::= ONLY META AS */ - 383, /* (377) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ - 383, /* (378) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */ - 383, /* (379) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */ - 383, /* (380) cmd ::= DROP TOPIC exists_opt topic_name */ - 383, /* (381) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ - 383, /* (382) cmd ::= DESC full_table_name */ - 383, /* (383) cmd ::= DESCRIBE full_table_name */ - 383, /* (384) cmd ::= RESET QUERY CACHE */ - 383, /* (385) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ - 383, /* (386) cmd ::= EXPLAIN analyze_opt explain_options insert_query */ - 476, /* (387) analyze_opt ::= */ - 476, /* (388) analyze_opt ::= ANALYZE */ - 477, /* (389) explain_options ::= */ - 477, /* (390) explain_options ::= explain_options VERBOSE NK_BOOL */ - 477, /* (391) explain_options ::= explain_options RATIO NK_FLOAT */ - 383, /* (392) cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt */ - 383, /* (393) cmd ::= DROP FUNCTION exists_opt function_name */ - 480, /* (394) agg_func_opt ::= */ - 480, /* (395) agg_func_opt ::= AGGREGATE */ - 481, /* (396) bufsize_opt ::= */ - 481, /* (397) bufsize_opt ::= BUFSIZE NK_INTEGER */ - 482, /* (398) language_opt ::= */ - 482, /* (399) language_opt ::= LANGUAGE NK_STRING */ - 479, /* (400) or_replace_opt ::= */ - 479, /* (401) or_replace_opt ::= OR REPLACE */ - 383, /* (402) cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery */ - 383, /* (403) cmd ::= DROP VIEW exists_opt full_view_name */ - 483, /* (404) full_view_name ::= view_name */ - 483, /* (405) full_view_name ::= db_name NK_DOT view_name */ - 383, /* (406) 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 */ - 383, /* (407) cmd ::= DROP STREAM exists_opt stream_name */ - 383, /* (408) cmd ::= PAUSE STREAM exists_opt stream_name */ - 383, /* (409) cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */ - 487, /* (410) col_list_opt ::= */ - 487, /* (411) col_list_opt ::= NK_LP column_stream_def_list NK_RP */ - 491, /* (412) column_stream_def_list ::= column_stream_def */ - 491, /* (413) column_stream_def_list ::= column_stream_def_list NK_COMMA column_stream_def */ - 492, /* (414) column_stream_def ::= column_name stream_col_options */ - 493, /* (415) stream_col_options ::= */ - 493, /* (416) stream_col_options ::= stream_col_options PRIMARY KEY */ - 488, /* (417) tag_def_or_ref_opt ::= */ - 488, /* (418) tag_def_or_ref_opt ::= tags_def */ - 488, /* (419) tag_def_or_ref_opt ::= TAGS NK_LP column_stream_def_list NK_RP */ - 486, /* (420) stream_options ::= */ - 486, /* (421) stream_options ::= stream_options TRIGGER AT_ONCE */ - 486, /* (422) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ - 486, /* (423) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ - 486, /* (424) stream_options ::= stream_options WATERMARK duration_literal */ - 486, /* (425) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ - 486, /* (426) stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ - 486, /* (427) stream_options ::= stream_options DELETE_MARK duration_literal */ - 486, /* (428) stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ - 489, /* (429) subtable_opt ::= */ - 489, /* (430) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ - 490, /* (431) ignore_opt ::= */ - 490, /* (432) ignore_opt ::= IGNORE UNTREATED */ - 383, /* (433) cmd ::= KILL CONNECTION NK_INTEGER */ - 383, /* (434) cmd ::= KILL QUERY NK_STRING */ - 383, /* (435) cmd ::= KILL TRANSACTION NK_INTEGER */ - 383, /* (436) cmd ::= KILL COMPACT NK_INTEGER */ - 383, /* (437) cmd ::= BALANCE VGROUP */ - 383, /* (438) cmd ::= BALANCE VGROUP LEADER on_vgroup_id */ - 383, /* (439) cmd ::= BALANCE VGROUP LEADER DATABASE db_name */ - 383, /* (440) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ - 383, /* (441) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ - 383, /* (442) cmd ::= SPLIT VGROUP NK_INTEGER */ - 495, /* (443) on_vgroup_id ::= */ - 495, /* (444) on_vgroup_id ::= ON NK_INTEGER */ - 496, /* (445) dnode_list ::= DNODE NK_INTEGER */ - 496, /* (446) dnode_list ::= dnode_list DNODE NK_INTEGER */ - 383, /* (447) cmd ::= DELETE FROM full_table_name where_clause_opt */ - 383, /* (448) cmd ::= query_or_subquery */ - 383, /* (449) cmd ::= insert_query */ - 478, /* (450) insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ - 478, /* (451) insert_query ::= INSERT INTO full_table_name query_or_subquery */ - 434, /* (452) tags_literal ::= NK_INTEGER */ - 434, /* (453) tags_literal ::= NK_INTEGER NK_PLUS duration_literal */ - 434, /* (454) tags_literal ::= NK_INTEGER NK_MINUS duration_literal */ - 434, /* (455) tags_literal ::= NK_PLUS NK_INTEGER */ - 434, /* (456) tags_literal ::= NK_PLUS NK_INTEGER NK_PLUS duration_literal */ - 434, /* (457) tags_literal ::= NK_PLUS NK_INTEGER NK_MINUS duration_literal */ - 434, /* (458) tags_literal ::= NK_MINUS NK_INTEGER */ - 434, /* (459) tags_literal ::= NK_MINUS NK_INTEGER NK_PLUS duration_literal */ - 434, /* (460) tags_literal ::= NK_MINUS NK_INTEGER NK_MINUS duration_literal */ - 434, /* (461) tags_literal ::= NK_FLOAT */ - 434, /* (462) tags_literal ::= NK_PLUS NK_FLOAT */ - 434, /* (463) tags_literal ::= NK_MINUS NK_FLOAT */ - 434, /* (464) tags_literal ::= NK_BIN */ - 434, /* (465) tags_literal ::= NK_BIN NK_PLUS duration_literal */ - 434, /* (466) tags_literal ::= NK_BIN NK_MINUS duration_literal */ - 434, /* (467) tags_literal ::= NK_PLUS NK_BIN */ - 434, /* (468) tags_literal ::= NK_PLUS NK_BIN NK_PLUS duration_literal */ - 434, /* (469) tags_literal ::= NK_PLUS NK_BIN NK_MINUS duration_literal */ - 434, /* (470) tags_literal ::= NK_MINUS NK_BIN */ - 434, /* (471) tags_literal ::= NK_MINUS NK_BIN NK_PLUS duration_literal */ - 434, /* (472) tags_literal ::= NK_MINUS NK_BIN NK_MINUS duration_literal */ - 434, /* (473) tags_literal ::= NK_HEX */ - 434, /* (474) tags_literal ::= NK_HEX NK_PLUS duration_literal */ - 434, /* (475) tags_literal ::= NK_HEX NK_MINUS duration_literal */ - 434, /* (476) tags_literal ::= NK_PLUS NK_HEX */ - 434, /* (477) tags_literal ::= NK_PLUS NK_HEX NK_PLUS duration_literal */ - 434, /* (478) tags_literal ::= NK_PLUS NK_HEX NK_MINUS duration_literal */ - 434, /* (479) tags_literal ::= NK_MINUS NK_HEX */ - 434, /* (480) tags_literal ::= NK_MINUS NK_HEX NK_PLUS duration_literal */ - 434, /* (481) tags_literal ::= NK_MINUS NK_HEX NK_MINUS duration_literal */ - 434, /* (482) tags_literal ::= NK_STRING */ - 434, /* (483) tags_literal ::= NK_STRING NK_PLUS duration_literal */ - 434, /* (484) tags_literal ::= NK_STRING NK_MINUS duration_literal */ - 434, /* (485) tags_literal ::= NK_BOOL */ - 434, /* (486) tags_literal ::= NULL */ - 434, /* (487) tags_literal ::= literal_func */ - 434, /* (488) tags_literal ::= literal_func NK_PLUS duration_literal */ - 434, /* (489) tags_literal ::= literal_func NK_MINUS duration_literal */ - 437, /* (490) tags_literal_list ::= tags_literal */ - 437, /* (491) tags_literal_list ::= tags_literal_list NK_COMMA tags_literal */ - 386, /* (492) literal ::= NK_INTEGER */ - 386, /* (493) literal ::= NK_FLOAT */ - 386, /* (494) literal ::= NK_STRING */ - 386, /* (495) literal ::= NK_BOOL */ - 386, /* (496) literal ::= TIMESTAMP NK_STRING */ - 386, /* (497) literal ::= duration_literal */ - 386, /* (498) literal ::= NULL */ - 386, /* (499) literal ::= NK_QUESTION */ - 447, /* (500) duration_literal ::= NK_VARIABLE */ - 417, /* (501) signed ::= NK_INTEGER */ - 417, /* (502) signed ::= NK_PLUS NK_INTEGER */ - 417, /* (503) signed ::= NK_MINUS NK_INTEGER */ - 417, /* (504) signed ::= NK_FLOAT */ - 417, /* (505) signed ::= NK_PLUS NK_FLOAT */ - 417, /* (506) signed ::= NK_MINUS NK_FLOAT */ - 498, /* (507) signed_literal ::= signed */ - 498, /* (508) signed_literal ::= NK_STRING */ - 498, /* (509) signed_literal ::= NK_BOOL */ - 498, /* (510) signed_literal ::= TIMESTAMP NK_STRING */ - 498, /* (511) signed_literal ::= duration_literal */ - 498, /* (512) signed_literal ::= NULL */ - 498, /* (513) signed_literal ::= literal_func */ - 498, /* (514) signed_literal ::= NK_QUESTION */ - 499, /* (515) literal_list ::= signed_literal */ - 499, /* (516) literal_list ::= literal_list NK_COMMA signed_literal */ - 400, /* (517) db_name ::= NK_ID */ - 401, /* (518) table_name ::= NK_ID */ - 431, /* (519) column_name ::= NK_ID */ - 449, /* (520) function_name ::= NK_ID */ - 484, /* (521) view_name ::= NK_ID */ - 500, /* (522) table_alias ::= NK_ID */ - 459, /* (523) column_alias ::= NK_ID */ - 459, /* (524) column_alias ::= NK_ALIAS */ - 393, /* (525) user_name ::= NK_ID */ - 402, /* (526) topic_name ::= NK_ID */ - 485, /* (527) stream_name ::= NK_ID */ - 475, /* (528) cgroup_name ::= NK_ID */ - 466, /* (529) index_name ::= NK_ID */ - 460, /* (530) tsma_name ::= NK_ID */ - 501, /* (531) expr_or_subquery ::= expression */ - 494, /* (532) expression ::= literal */ - 494, /* (533) expression ::= pseudo_column */ - 494, /* (534) expression ::= column_reference */ - 494, /* (535) expression ::= function_expression */ - 494, /* (536) expression ::= case_when_expression */ - 494, /* (537) expression ::= NK_LP expression NK_RP */ - 494, /* (538) expression ::= NK_PLUS expr_or_subquery */ - 494, /* (539) expression ::= NK_MINUS expr_or_subquery */ - 494, /* (540) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ - 494, /* (541) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ - 494, /* (542) expression ::= expr_or_subquery NK_STAR expr_or_subquery */ - 494, /* (543) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ - 494, /* (544) expression ::= expr_or_subquery NK_REM expr_or_subquery */ - 494, /* (545) expression ::= column_reference NK_ARROW NK_STRING */ - 494, /* (546) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ - 494, /* (547) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ - 471, /* (548) expression_list ::= expr_or_subquery */ - 471, /* (549) expression_list ::= expression_list NK_COMMA expr_or_subquery */ - 503, /* (550) column_reference ::= column_name */ - 503, /* (551) column_reference ::= table_name NK_DOT column_name */ - 503, /* (552) column_reference ::= NK_ALIAS */ - 503, /* (553) column_reference ::= table_name NK_DOT NK_ALIAS */ - 502, /* (554) pseudo_column ::= ROWTS */ - 502, /* (555) pseudo_column ::= TBNAME */ - 502, /* (556) pseudo_column ::= table_name NK_DOT TBNAME */ - 502, /* (557) pseudo_column ::= QSTART */ - 502, /* (558) pseudo_column ::= QEND */ - 502, /* (559) pseudo_column ::= QDURATION */ - 502, /* (560) pseudo_column ::= WSTART */ - 502, /* (561) pseudo_column ::= WEND */ - 502, /* (562) pseudo_column ::= WDURATION */ - 502, /* (563) pseudo_column ::= IROWTS */ - 502, /* (564) pseudo_column ::= ISFILLED */ - 502, /* (565) pseudo_column ::= QTAGS */ - 504, /* (566) function_expression ::= function_name NK_LP expression_list NK_RP */ - 504, /* (567) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ - 504, /* (568) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ - 504, /* (569) function_expression ::= CAST NK_LP expr_or_subquery AS type_name_default_len NK_RP */ - 504, /* (570) function_expression ::= POSITION NK_LP expr_or_subquery IN expr_or_subquery NK_RP */ - 504, /* (571) function_expression ::= TRIM NK_LP expr_or_subquery NK_RP */ - 504, /* (572) function_expression ::= TRIM NK_LP trim_specification_type FROM expr_or_subquery NK_RP */ - 504, /* (573) function_expression ::= TRIM NK_LP expr_or_subquery FROM expr_or_subquery NK_RP */ - 504, /* (574) function_expression ::= TRIM NK_LP trim_specification_type expr_or_subquery FROM expr_or_subquery NK_RP */ - 504, /* (575) function_expression ::= substr_func NK_LP expression_list NK_RP */ - 504, /* (576) function_expression ::= substr_func NK_LP expr_or_subquery FROM expr_or_subquery NK_RP */ - 504, /* (577) function_expression ::= substr_func NK_LP expr_or_subquery FROM expr_or_subquery FOR expr_or_subquery NK_RP */ - 504, /* (578) function_expression ::= REPLACE NK_LP expression_list NK_RP */ - 504, /* (579) function_expression ::= literal_func */ - 504, /* (580) function_expression ::= rand_func */ - 497, /* (581) literal_func ::= noarg_func NK_LP NK_RP */ - 497, /* (582) literal_func ::= NOW */ - 497, /* (583) literal_func ::= TODAY */ - 510, /* (584) rand_func ::= RAND NK_LP NK_RP */ - 510, /* (585) rand_func ::= RAND NK_LP expression_list NK_RP */ - 509, /* (586) substr_func ::= SUBSTR */ - 509, /* (587) substr_func ::= SUBSTRING */ - 508, /* (588) trim_specification_type ::= BOTH */ - 508, /* (589) trim_specification_type ::= TRAILING */ - 508, /* (590) trim_specification_type ::= LEADING */ - 511, /* (591) noarg_func ::= NOW */ - 511, /* (592) noarg_func ::= TODAY */ - 511, /* (593) noarg_func ::= TIMEZONE */ - 511, /* (594) noarg_func ::= DATABASE */ - 511, /* (595) noarg_func ::= CLIENT_VERSION */ - 511, /* (596) noarg_func ::= SERVER_VERSION */ - 511, /* (597) noarg_func ::= SERVER_STATUS */ - 511, /* (598) noarg_func ::= CURRENT_USER */ - 511, /* (599) noarg_func ::= USER */ - 511, /* (600) noarg_func ::= PI */ - 506, /* (601) star_func ::= COUNT */ - 506, /* (602) star_func ::= FIRST */ - 506, /* (603) star_func ::= LAST */ - 506, /* (604) star_func ::= LAST_ROW */ - 507, /* (605) star_func_para_list ::= NK_STAR */ - 507, /* (606) star_func_para_list ::= other_para_list */ - 512, /* (607) other_para_list ::= star_func_para */ - 512, /* (608) other_para_list ::= other_para_list NK_COMMA star_func_para */ - 513, /* (609) star_func_para ::= expr_or_subquery */ - 513, /* (610) star_func_para ::= table_name NK_DOT NK_STAR */ - 505, /* (611) case_when_expression ::= CASE when_then_list case_when_else_opt END */ - 505, /* (612) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ - 514, /* (613) when_then_list ::= when_then_expr */ - 514, /* (614) when_then_list ::= when_then_list when_then_expr */ - 517, /* (615) when_then_expr ::= WHEN common_expression THEN common_expression */ - 515, /* (616) case_when_else_opt ::= */ - 515, /* (617) case_when_else_opt ::= ELSE common_expression */ - 518, /* (618) predicate ::= expr_or_subquery compare_op expr_or_subquery */ - 518, /* (619) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ - 518, /* (620) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ - 518, /* (621) predicate ::= expr_or_subquery IS NULL */ - 518, /* (622) predicate ::= expr_or_subquery IS NOT NULL */ - 518, /* (623) predicate ::= expr_or_subquery in_op in_predicate_value */ - 519, /* (624) compare_op ::= NK_LT */ - 519, /* (625) compare_op ::= NK_GT */ - 519, /* (626) compare_op ::= NK_LE */ - 519, /* (627) compare_op ::= NK_GE */ - 519, /* (628) compare_op ::= NK_NE */ - 519, /* (629) compare_op ::= NK_EQ */ - 519, /* (630) compare_op ::= LIKE */ - 519, /* (631) compare_op ::= NOT LIKE */ - 519, /* (632) compare_op ::= MATCH */ - 519, /* (633) compare_op ::= NMATCH */ - 519, /* (634) compare_op ::= CONTAINS */ - 520, /* (635) in_op ::= IN */ - 520, /* (636) in_op ::= NOT IN */ - 521, /* (637) in_predicate_value ::= NK_LP literal_list NK_RP */ - 522, /* (638) boolean_value_expression ::= boolean_primary */ - 522, /* (639) boolean_value_expression ::= NOT boolean_primary */ - 522, /* (640) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ - 522, /* (641) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ - 523, /* (642) boolean_primary ::= predicate */ - 523, /* (643) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ - 516, /* (644) common_expression ::= expr_or_subquery */ - 516, /* (645) common_expression ::= boolean_value_expression */ - 524, /* (646) from_clause_opt ::= */ - 524, /* (647) from_clause_opt ::= FROM table_reference_list */ - 525, /* (648) table_reference_list ::= table_reference */ - 525, /* (649) table_reference_list ::= table_reference_list NK_COMMA table_reference */ - 526, /* (650) table_reference ::= table_primary */ - 526, /* (651) table_reference ::= joined_table */ - 527, /* (652) table_primary ::= table_name alias_opt */ - 527, /* (653) table_primary ::= db_name NK_DOT table_name alias_opt */ - 527, /* (654) table_primary ::= subquery alias_opt */ - 527, /* (655) table_primary ::= parenthesized_joined_table */ - 529, /* (656) alias_opt ::= */ - 529, /* (657) alias_opt ::= table_alias */ - 529, /* (658) alias_opt ::= AS table_alias */ - 531, /* (659) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - 531, /* (660) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ - 528, /* (661) joined_table ::= table_reference join_type join_subtype JOIN table_reference join_on_clause_opt window_offset_clause_opt jlimit_clause_opt */ - 532, /* (662) join_type ::= */ - 532, /* (663) join_type ::= INNER */ - 532, /* (664) join_type ::= LEFT */ - 532, /* (665) join_type ::= RIGHT */ - 532, /* (666) join_type ::= FULL */ - 533, /* (667) join_subtype ::= */ - 533, /* (668) join_subtype ::= OUTER */ - 533, /* (669) join_subtype ::= SEMI */ - 533, /* (670) join_subtype ::= ANTI */ - 533, /* (671) join_subtype ::= ASOF */ - 533, /* (672) join_subtype ::= WINDOW */ - 534, /* (673) join_on_clause_opt ::= */ - 534, /* (674) join_on_clause_opt ::= ON search_condition */ - 535, /* (675) window_offset_clause_opt ::= */ - 535, /* (676) window_offset_clause_opt ::= WINDOW_OFFSET NK_LP window_offset_literal NK_COMMA window_offset_literal NK_RP */ - 537, /* (677) window_offset_literal ::= NK_VARIABLE */ - 537, /* (678) window_offset_literal ::= NK_MINUS NK_VARIABLE */ - 536, /* (679) jlimit_clause_opt ::= */ - 536, /* (680) jlimit_clause_opt ::= JLIMIT NK_INTEGER */ - 538, /* (681) 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 */ - 539, /* (682) hint_list ::= */ - 539, /* (683) hint_list ::= NK_HINT */ - 541, /* (684) tag_mode_opt ::= */ - 541, /* (685) tag_mode_opt ::= TAGS */ - 540, /* (686) set_quantifier_opt ::= */ - 540, /* (687) set_quantifier_opt ::= DISTINCT */ - 540, /* (688) set_quantifier_opt ::= ALL */ - 542, /* (689) select_list ::= select_item */ - 542, /* (690) select_list ::= select_list NK_COMMA select_item */ - 550, /* (691) select_item ::= NK_STAR */ - 550, /* (692) select_item ::= common_expression */ - 550, /* (693) select_item ::= common_expression column_alias */ - 550, /* (694) select_item ::= common_expression AS column_alias */ - 550, /* (695) select_item ::= table_name NK_DOT NK_STAR */ - 474, /* (696) where_clause_opt ::= */ - 474, /* (697) where_clause_opt ::= WHERE search_condition */ - 543, /* (698) partition_by_clause_opt ::= */ - 543, /* (699) partition_by_clause_opt ::= PARTITION BY partition_list */ - 551, /* (700) partition_list ::= partition_item */ - 551, /* (701) partition_list ::= partition_list NK_COMMA partition_item */ - 552, /* (702) partition_item ::= expr_or_subquery */ - 552, /* (703) partition_item ::= expr_or_subquery column_alias */ - 552, /* (704) partition_item ::= expr_or_subquery AS column_alias */ - 547, /* (705) twindow_clause_opt ::= */ - 547, /* (706) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP */ - 547, /* (707) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ - 547, /* (708) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ - 547, /* (709) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ - 547, /* (710) twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ - 547, /* (711) twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP */ - 547, /* (712) twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ - 467, /* (713) sliding_opt ::= */ - 467, /* (714) sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ - 553, /* (715) interval_sliding_duration_literal ::= NK_VARIABLE */ - 553, /* (716) interval_sliding_duration_literal ::= NK_STRING */ - 553, /* (717) interval_sliding_duration_literal ::= NK_INTEGER */ - 546, /* (718) fill_opt ::= */ - 546, /* (719) fill_opt ::= FILL NK_LP fill_mode NK_RP */ - 546, /* (720) fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ - 546, /* (721) fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ - 554, /* (722) fill_mode ::= NONE */ - 554, /* (723) fill_mode ::= PREV */ - 554, /* (724) fill_mode ::= NULL */ - 554, /* (725) fill_mode ::= NULL_F */ - 554, /* (726) fill_mode ::= LINEAR */ - 554, /* (727) fill_mode ::= NEXT */ - 548, /* (728) group_by_clause_opt ::= */ - 548, /* (729) group_by_clause_opt ::= GROUP BY group_by_list */ - 555, /* (730) group_by_list ::= expr_or_subquery */ - 555, /* (731) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ - 549, /* (732) having_clause_opt ::= */ - 549, /* (733) having_clause_opt ::= HAVING search_condition */ - 544, /* (734) range_opt ::= */ - 544, /* (735) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ - 544, /* (736) range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ - 545, /* (737) every_opt ::= */ - 545, /* (738) every_opt ::= EVERY NK_LP duration_literal NK_RP */ - 556, /* (739) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ - 557, /* (740) query_simple ::= query_specification */ - 557, /* (741) query_simple ::= union_query_expression */ - 561, /* (742) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ - 561, /* (743) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ - 562, /* (744) query_simple_or_subquery ::= query_simple */ - 562, /* (745) query_simple_or_subquery ::= subquery */ - 473, /* (746) query_or_subquery ::= query_expression */ - 473, /* (747) query_or_subquery ::= subquery */ - 558, /* (748) order_by_clause_opt ::= */ - 558, /* (749) order_by_clause_opt ::= ORDER BY sort_specification_list */ - 559, /* (750) slimit_clause_opt ::= */ - 559, /* (751) slimit_clause_opt ::= SLIMIT NK_INTEGER */ - 559, /* (752) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - 559, /* (753) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - 560, /* (754) limit_clause_opt ::= */ - 560, /* (755) limit_clause_opt ::= LIMIT NK_INTEGER */ - 560, /* (756) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ - 560, /* (757) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - 530, /* (758) subquery ::= NK_LP query_expression NK_RP */ - 530, /* (759) subquery ::= NK_LP subquery NK_RP */ - 403, /* (760) search_condition ::= common_expression */ - 563, /* (761) sort_specification_list ::= sort_specification */ - 563, /* (762) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ - 564, /* (763) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ - 565, /* (764) ordering_specification_opt ::= */ - 565, /* (765) ordering_specification_opt ::= ASC */ - 565, /* (766) ordering_specification_opt ::= DESC */ - 566, /* (767) null_ordering_opt ::= */ - 566, /* (768) null_ordering_opt ::= NULLS FIRST */ - 566, /* (769) null_ordering_opt ::= NULLS LAST */ - 433, /* (770) column_options ::= */ - 433, /* (771) column_options ::= column_options PRIMARY KEY */ - 433, /* (772) column_options ::= column_options NK_ID NK_STRING */ + 389, /* (0) cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ + 389, /* (1) cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ + 390, /* (2) account_options ::= */ + 390, /* (3) account_options ::= account_options PPS literal */ + 390, /* (4) account_options ::= account_options TSERIES literal */ + 390, /* (5) account_options ::= account_options STORAGE literal */ + 390, /* (6) account_options ::= account_options STREAMS literal */ + 390, /* (7) account_options ::= account_options QTIME literal */ + 390, /* (8) account_options ::= account_options DBS literal */ + 390, /* (9) account_options ::= account_options USERS literal */ + 390, /* (10) account_options ::= account_options CONNS literal */ + 390, /* (11) account_options ::= account_options STATE literal */ + 391, /* (12) alter_account_options ::= alter_account_option */ + 391, /* (13) alter_account_options ::= alter_account_options alter_account_option */ + 393, /* (14) alter_account_option ::= PASS literal */ + 393, /* (15) alter_account_option ::= PPS literal */ + 393, /* (16) alter_account_option ::= TSERIES literal */ + 393, /* (17) alter_account_option ::= STORAGE literal */ + 393, /* (18) alter_account_option ::= STREAMS literal */ + 393, /* (19) alter_account_option ::= QTIME literal */ + 393, /* (20) alter_account_option ::= DBS literal */ + 393, /* (21) alter_account_option ::= USERS literal */ + 393, /* (22) alter_account_option ::= CONNS literal */ + 393, /* (23) alter_account_option ::= STATE literal */ + 394, /* (24) ip_range_list ::= NK_STRING */ + 394, /* (25) ip_range_list ::= ip_range_list NK_COMMA NK_STRING */ + 395, /* (26) white_list ::= HOST ip_range_list */ + 396, /* (27) white_list_opt ::= */ + 396, /* (28) white_list_opt ::= white_list */ + 397, /* (29) is_import_opt ::= */ + 397, /* (30) is_import_opt ::= IS_IMPORT NK_INTEGER */ + 398, /* (31) is_createdb_opt ::= */ + 398, /* (32) is_createdb_opt ::= CREATEDB NK_INTEGER */ + 389, /* (33) cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt is_createdb_opt is_import_opt white_list_opt */ + 389, /* (34) cmd ::= ALTER USER user_name PASS NK_STRING */ + 389, /* (35) cmd ::= ALTER USER user_name ENABLE NK_INTEGER */ + 389, /* (36) cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */ + 389, /* (37) cmd ::= ALTER USER user_name CREATEDB NK_INTEGER */ + 389, /* (38) cmd ::= ALTER USER user_name ADD white_list */ + 389, /* (39) cmd ::= ALTER USER user_name DROP white_list */ + 389, /* (40) cmd ::= DROP USER user_name */ + 400, /* (41) sysinfo_opt ::= */ + 400, /* (42) sysinfo_opt ::= SYSINFO NK_INTEGER */ + 389, /* (43) cmd ::= GRANT privileges ON priv_level with_clause_opt TO user_name */ + 389, /* (44) cmd ::= REVOKE privileges ON priv_level with_clause_opt FROM user_name */ + 401, /* (45) privileges ::= ALL */ + 401, /* (46) privileges ::= priv_type_list */ + 401, /* (47) privileges ::= SUBSCRIBE */ + 404, /* (48) priv_type_list ::= priv_type */ + 404, /* (49) priv_type_list ::= priv_type_list NK_COMMA priv_type */ + 405, /* (50) priv_type ::= READ */ + 405, /* (51) priv_type ::= WRITE */ + 405, /* (52) priv_type ::= ALTER */ + 402, /* (53) priv_level ::= NK_STAR NK_DOT NK_STAR */ + 402, /* (54) priv_level ::= db_name NK_DOT NK_STAR */ + 402, /* (55) priv_level ::= db_name NK_DOT table_name */ + 402, /* (56) priv_level ::= topic_name */ + 403, /* (57) with_clause_opt ::= */ + 403, /* (58) with_clause_opt ::= WITH search_condition */ + 389, /* (59) cmd ::= CREATE ENCRYPT_KEY NK_STRING */ + 389, /* (60) cmd ::= CREATE ANODE NK_STRING */ + 389, /* (61) cmd ::= UPDATE ANODE NK_INTEGER */ + 389, /* (62) cmd ::= UPDATE ALL ANODES */ + 389, /* (63) cmd ::= DROP ANODE NK_INTEGER */ + 389, /* (64) cmd ::= CREATE DNODE dnode_endpoint */ + 389, /* (65) cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */ + 389, /* (66) cmd ::= DROP DNODE NK_INTEGER force_opt */ + 389, /* (67) cmd ::= DROP DNODE dnode_endpoint force_opt */ + 389, /* (68) cmd ::= DROP DNODE NK_INTEGER unsafe_opt */ + 389, /* (69) cmd ::= DROP DNODE dnode_endpoint unsafe_opt */ + 389, /* (70) cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ + 389, /* (71) cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ + 389, /* (72) cmd ::= ALTER ALL DNODES NK_STRING */ + 389, /* (73) cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ + 389, /* (74) cmd ::= RESTORE DNODE NK_INTEGER */ + 410, /* (75) dnode_endpoint ::= NK_STRING */ + 410, /* (76) dnode_endpoint ::= NK_ID */ + 410, /* (77) dnode_endpoint ::= NK_IPTOKEN */ + 411, /* (78) force_opt ::= */ + 411, /* (79) force_opt ::= FORCE */ + 412, /* (80) unsafe_opt ::= UNSAFE */ + 389, /* (81) cmd ::= ALTER CLUSTER NK_STRING */ + 389, /* (82) cmd ::= ALTER CLUSTER NK_STRING NK_STRING */ + 389, /* (83) cmd ::= ALTER LOCAL NK_STRING */ + 389, /* (84) cmd ::= ALTER LOCAL NK_STRING NK_STRING */ + 389, /* (85) cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ + 389, /* (86) cmd ::= DROP QNODE ON DNODE NK_INTEGER */ + 389, /* (87) cmd ::= RESTORE QNODE ON DNODE NK_INTEGER */ + 389, /* (88) cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ + 389, /* (89) cmd ::= DROP BNODE ON DNODE NK_INTEGER */ + 389, /* (90) cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ + 389, /* (91) cmd ::= DROP SNODE ON DNODE NK_INTEGER */ + 389, /* (92) cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ + 389, /* (93) cmd ::= DROP MNODE ON DNODE NK_INTEGER */ + 389, /* (94) cmd ::= RESTORE MNODE ON DNODE NK_INTEGER */ + 389, /* (95) cmd ::= RESTORE VNODE ON DNODE NK_INTEGER */ + 389, /* (96) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ + 389, /* (97) cmd ::= DROP DATABASE exists_opt db_name */ + 389, /* (98) cmd ::= USE db_name */ + 389, /* (99) cmd ::= ALTER DATABASE db_name alter_db_options */ + 389, /* (100) cmd ::= FLUSH DATABASE db_name */ + 389, /* (101) cmd ::= TRIM DATABASE db_name speed_opt */ + 389, /* (102) cmd ::= S3MIGRATE DATABASE db_name */ + 389, /* (103) cmd ::= COMPACT DATABASE db_name start_opt end_opt */ + 413, /* (104) not_exists_opt ::= IF NOT EXISTS */ + 413, /* (105) not_exists_opt ::= */ + 415, /* (106) exists_opt ::= IF EXISTS */ + 415, /* (107) exists_opt ::= */ + 414, /* (108) db_options ::= */ + 414, /* (109) db_options ::= db_options BUFFER NK_INTEGER */ + 414, /* (110) db_options ::= db_options CACHEMODEL NK_STRING */ + 414, /* (111) db_options ::= db_options CACHESIZE NK_INTEGER */ + 414, /* (112) db_options ::= db_options COMP NK_INTEGER */ + 414, /* (113) db_options ::= db_options DURATION NK_INTEGER */ + 414, /* (114) db_options ::= db_options DURATION NK_VARIABLE */ + 414, /* (115) db_options ::= db_options MAXROWS NK_INTEGER */ + 414, /* (116) db_options ::= db_options MINROWS NK_INTEGER */ + 414, /* (117) db_options ::= db_options KEEP integer_list */ + 414, /* (118) db_options ::= db_options KEEP variable_list */ + 414, /* (119) db_options ::= db_options PAGES NK_INTEGER */ + 414, /* (120) db_options ::= db_options PAGESIZE NK_INTEGER */ + 414, /* (121) db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ + 414, /* (122) db_options ::= db_options PRECISION NK_STRING */ + 414, /* (123) db_options ::= db_options REPLICA NK_INTEGER */ + 414, /* (124) db_options ::= db_options VGROUPS NK_INTEGER */ + 414, /* (125) db_options ::= db_options SINGLE_STABLE NK_INTEGER */ + 414, /* (126) db_options ::= db_options RETENTIONS retention_list */ + 414, /* (127) db_options ::= db_options SCHEMALESS NK_INTEGER */ + 414, /* (128) db_options ::= db_options WAL_LEVEL NK_INTEGER */ + 414, /* (129) db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ + 414, /* (130) db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ + 414, /* (131) db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ + 414, /* (132) db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ + 414, /* (133) db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ + 414, /* (134) db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ + 414, /* (135) db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ + 414, /* (136) db_options ::= db_options STT_TRIGGER NK_INTEGER */ + 414, /* (137) db_options ::= db_options TABLE_PREFIX signed */ + 414, /* (138) db_options ::= db_options TABLE_SUFFIX signed */ + 414, /* (139) db_options ::= db_options S3_CHUNKSIZE NK_INTEGER */ + 414, /* (140) db_options ::= db_options S3_KEEPLOCAL NK_INTEGER */ + 414, /* (141) db_options ::= db_options S3_KEEPLOCAL NK_VARIABLE */ + 414, /* (142) db_options ::= db_options S3_COMPACT NK_INTEGER */ + 414, /* (143) db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER */ + 414, /* (144) db_options ::= db_options ENCRYPT_ALGORITHM NK_STRING */ + 416, /* (145) alter_db_options ::= alter_db_option */ + 416, /* (146) alter_db_options ::= alter_db_options alter_db_option */ + 424, /* (147) alter_db_option ::= BUFFER NK_INTEGER */ + 424, /* (148) alter_db_option ::= CACHEMODEL NK_STRING */ + 424, /* (149) alter_db_option ::= CACHESIZE NK_INTEGER */ + 424, /* (150) alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ + 424, /* (151) alter_db_option ::= KEEP integer_list */ + 424, /* (152) alter_db_option ::= KEEP variable_list */ + 424, /* (153) alter_db_option ::= PAGES NK_INTEGER */ + 424, /* (154) alter_db_option ::= REPLICA NK_INTEGER */ + 424, /* (155) alter_db_option ::= WAL_LEVEL NK_INTEGER */ + 424, /* (156) alter_db_option ::= STT_TRIGGER NK_INTEGER */ + 424, /* (157) alter_db_option ::= MINROWS NK_INTEGER */ + 424, /* (158) alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER */ + 424, /* (159) alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ + 424, /* (160) alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER */ + 424, /* (161) alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ + 424, /* (162) alter_db_option ::= S3_KEEPLOCAL NK_INTEGER */ + 424, /* (163) alter_db_option ::= S3_KEEPLOCAL NK_VARIABLE */ + 424, /* (164) alter_db_option ::= S3_COMPACT NK_INTEGER */ + 424, /* (165) alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER */ + 424, /* (166) alter_db_option ::= ENCRYPT_ALGORITHM NK_STRING */ + 420, /* (167) integer_list ::= NK_INTEGER */ + 420, /* (168) integer_list ::= integer_list NK_COMMA NK_INTEGER */ + 421, /* (169) variable_list ::= NK_VARIABLE */ + 421, /* (170) variable_list ::= variable_list NK_COMMA NK_VARIABLE */ + 422, /* (171) retention_list ::= retention */ + 422, /* (172) retention_list ::= retention_list NK_COMMA retention */ + 425, /* (173) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ + 425, /* (174) retention ::= NK_MINUS NK_COLON NK_VARIABLE */ + 417, /* (175) speed_opt ::= */ + 417, /* (176) speed_opt ::= BWLIMIT NK_INTEGER */ + 418, /* (177) start_opt ::= */ + 418, /* (178) start_opt ::= START WITH NK_INTEGER */ + 418, /* (179) start_opt ::= START WITH NK_STRING */ + 418, /* (180) start_opt ::= START WITH TIMESTAMP NK_STRING */ + 419, /* (181) end_opt ::= */ + 419, /* (182) end_opt ::= END WITH NK_INTEGER */ + 419, /* (183) end_opt ::= END WITH NK_STRING */ + 419, /* (184) end_opt ::= END WITH TIMESTAMP NK_STRING */ + 389, /* (185) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ + 389, /* (186) cmd ::= CREATE TABLE multi_create_clause */ + 389, /* (187) cmd ::= CREATE TABLE not_exists_opt USING full_table_name NK_LP tag_list_opt NK_RP FILE NK_STRING */ + 389, /* (188) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ + 389, /* (189) cmd ::= DROP TABLE with_opt multi_drop_clause */ + 389, /* (190) cmd ::= DROP STABLE with_opt exists_opt full_table_name */ + 389, /* (191) cmd ::= ALTER TABLE alter_table_clause */ + 389, /* (192) cmd ::= ALTER STABLE alter_table_clause */ + 435, /* (193) alter_table_clause ::= full_table_name alter_table_options */ + 435, /* (194) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name column_options */ + 435, /* (195) alter_table_clause ::= full_table_name DROP COLUMN column_name */ + 435, /* (196) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ + 435, /* (197) alter_table_clause ::= full_table_name MODIFY COLUMN column_name column_options */ + 435, /* (198) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ + 435, /* (199) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ + 435, /* (200) alter_table_clause ::= full_table_name DROP TAG column_name */ + 435, /* (201) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ + 435, /* (202) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ + 435, /* (203) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ tags_literal */ + 430, /* (204) multi_create_clause ::= create_subtable_clause */ + 430, /* (205) multi_create_clause ::= multi_create_clause create_subtable_clause */ + 441, /* (206) create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP tags_literal_list NK_RP table_options */ + 434, /* (207) multi_drop_clause ::= drop_table_clause */ + 434, /* (208) multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */ + 444, /* (209) drop_table_clause ::= exists_opt full_table_name */ + 433, /* (210) with_opt ::= */ + 433, /* (211) with_opt ::= WITH */ + 442, /* (212) specific_cols_opt ::= */ + 442, /* (213) specific_cols_opt ::= NK_LP col_name_list NK_RP */ + 426, /* (214) full_table_name ::= table_name */ + 426, /* (215) full_table_name ::= db_name NK_DOT table_name */ + 446, /* (216) tag_def_list ::= tag_def */ + 446, /* (217) tag_def_list ::= tag_def_list NK_COMMA tag_def */ + 447, /* (218) tag_def ::= column_name type_name */ + 427, /* (219) column_def_list ::= column_def */ + 427, /* (220) column_def_list ::= column_def_list NK_COMMA column_def */ + 448, /* (221) column_def ::= column_name type_name column_options */ + 438, /* (222) type_name ::= BOOL */ + 438, /* (223) type_name ::= TINYINT */ + 438, /* (224) type_name ::= SMALLINT */ + 438, /* (225) type_name ::= INT */ + 438, /* (226) type_name ::= INTEGER */ + 438, /* (227) type_name ::= BIGINT */ + 438, /* (228) type_name ::= FLOAT */ + 438, /* (229) type_name ::= DOUBLE */ + 438, /* (230) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ + 438, /* (231) type_name ::= TIMESTAMP */ + 438, /* (232) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ + 438, /* (233) type_name ::= TINYINT UNSIGNED */ + 438, /* (234) type_name ::= SMALLINT UNSIGNED */ + 438, /* (235) type_name ::= INT UNSIGNED */ + 438, /* (236) type_name ::= BIGINT UNSIGNED */ + 438, /* (237) type_name ::= JSON */ + 438, /* (238) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ + 438, /* (239) type_name ::= MEDIUMBLOB */ + 438, /* (240) type_name ::= BLOB */ + 438, /* (241) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ + 438, /* (242) type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP */ + 438, /* (243) type_name ::= DECIMAL */ + 438, /* (244) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ + 438, /* (245) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ + 449, /* (246) type_name_default_len ::= BINARY */ + 449, /* (247) type_name_default_len ::= NCHAR */ + 449, /* (248) type_name_default_len ::= VARCHAR */ + 449, /* (249) type_name_default_len ::= VARBINARY */ + 428, /* (250) tags_def_opt ::= */ + 428, /* (251) tags_def_opt ::= tags_def */ + 432, /* (252) tags_def ::= TAGS NK_LP tag_def_list NK_RP */ + 429, /* (253) table_options ::= */ + 429, /* (254) table_options ::= table_options COMMENT NK_STRING */ + 429, /* (255) table_options ::= table_options MAX_DELAY duration_list */ + 429, /* (256) table_options ::= table_options WATERMARK duration_list */ + 429, /* (257) table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ + 429, /* (258) table_options ::= table_options TTL NK_INTEGER */ + 429, /* (259) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ + 429, /* (260) table_options ::= table_options DELETE_MARK duration_list */ + 436, /* (261) alter_table_options ::= alter_table_option */ + 436, /* (262) alter_table_options ::= alter_table_options alter_table_option */ + 452, /* (263) alter_table_option ::= COMMENT NK_STRING */ + 452, /* (264) alter_table_option ::= TTL NK_INTEGER */ + 450, /* (265) duration_list ::= duration_literal */ + 450, /* (266) duration_list ::= duration_list NK_COMMA duration_literal */ + 451, /* (267) rollup_func_list ::= rollup_func_name */ + 451, /* (268) rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ + 454, /* (269) rollup_func_name ::= function_name */ + 454, /* (270) rollup_func_name ::= FIRST */ + 454, /* (271) rollup_func_name ::= LAST */ + 445, /* (272) col_name_list ::= col_name */ + 445, /* (273) col_name_list ::= col_name_list NK_COMMA col_name */ + 456, /* (274) col_name ::= column_name */ + 389, /* (275) cmd ::= SHOW DNODES */ + 389, /* (276) cmd ::= SHOW USERS */ + 389, /* (277) cmd ::= SHOW USERS FULL */ + 389, /* (278) cmd ::= SHOW USER PRIVILEGES */ + 389, /* (279) cmd ::= SHOW db_kind_opt DATABASES */ + 389, /* (280) cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt */ + 389, /* (281) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ + 389, /* (282) cmd ::= SHOW db_name_cond_opt VGROUPS */ + 389, /* (283) cmd ::= SHOW MNODES */ + 389, /* (284) cmd ::= SHOW QNODES */ + 389, /* (285) cmd ::= SHOW ANODES */ + 389, /* (286) cmd ::= SHOW ANODES FULL */ + 389, /* (287) cmd ::= SHOW ARBGROUPS */ + 389, /* (288) cmd ::= SHOW FUNCTIONS */ + 389, /* (289) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ + 389, /* (290) cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name */ + 389, /* (291) cmd ::= SHOW STREAMS */ + 389, /* (292) cmd ::= SHOW ACCOUNTS */ + 389, /* (293) cmd ::= SHOW APPS */ + 389, /* (294) cmd ::= SHOW CONNECTIONS */ + 389, /* (295) cmd ::= SHOW LICENCES */ + 389, /* (296) cmd ::= SHOW GRANTS */ + 389, /* (297) cmd ::= SHOW GRANTS FULL */ + 389, /* (298) cmd ::= SHOW GRANTS LOGS */ + 389, /* (299) cmd ::= SHOW CLUSTER MACHINES */ + 389, /* (300) cmd ::= SHOW CREATE DATABASE db_name */ + 389, /* (301) cmd ::= SHOW CREATE TABLE full_table_name */ + 389, /* (302) cmd ::= SHOW CREATE STABLE full_table_name */ + 389, /* (303) cmd ::= SHOW ENCRYPTIONS */ + 389, /* (304) cmd ::= SHOW QUERIES */ + 389, /* (305) cmd ::= SHOW SCORES */ + 389, /* (306) cmd ::= SHOW TOPICS */ + 389, /* (307) cmd ::= SHOW VARIABLES */ + 389, /* (308) cmd ::= SHOW CLUSTER VARIABLES */ + 389, /* (309) cmd ::= SHOW LOCAL VARIABLES */ + 389, /* (310) cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ + 389, /* (311) cmd ::= SHOW BNODES */ + 389, /* (312) cmd ::= SHOW SNODES */ + 389, /* (313) cmd ::= SHOW CLUSTER */ + 389, /* (314) cmd ::= SHOW TRANSACTIONS */ + 389, /* (315) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ + 389, /* (316) cmd ::= SHOW CONSUMERS */ + 389, /* (317) cmd ::= SHOW SUBSCRIPTIONS */ + 389, /* (318) cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ + 389, /* (319) cmd ::= SHOW TAGS FROM db_name NK_DOT table_name */ + 389, /* (320) cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ + 389, /* (321) cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name */ + 389, /* (322) cmd ::= SHOW VNODES ON DNODE NK_INTEGER */ + 389, /* (323) cmd ::= SHOW VNODES */ + 389, /* (324) cmd ::= SHOW db_name_cond_opt ALIVE */ + 389, /* (325) cmd ::= SHOW CLUSTER ALIVE */ + 389, /* (326) cmd ::= SHOW db_name_cond_opt VIEWS like_pattern_opt */ + 389, /* (327) cmd ::= SHOW CREATE VIEW full_table_name */ + 389, /* (328) cmd ::= SHOW COMPACTS */ + 389, /* (329) cmd ::= SHOW COMPACT NK_INTEGER */ + 458, /* (330) table_kind_db_name_cond_opt ::= */ + 458, /* (331) table_kind_db_name_cond_opt ::= table_kind */ + 458, /* (332) table_kind_db_name_cond_opt ::= db_name NK_DOT */ + 458, /* (333) table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT */ + 463, /* (334) table_kind ::= NORMAL */ + 463, /* (335) table_kind ::= CHILD */ + 460, /* (336) db_name_cond_opt ::= */ + 460, /* (337) db_name_cond_opt ::= db_name NK_DOT */ + 459, /* (338) like_pattern_opt ::= */ + 459, /* (339) like_pattern_opt ::= LIKE NK_STRING */ + 461, /* (340) table_name_cond ::= table_name */ + 462, /* (341) from_db_opt ::= */ + 462, /* (342) from_db_opt ::= FROM db_name */ + 431, /* (343) tag_list_opt ::= */ + 431, /* (344) tag_list_opt ::= tag_item */ + 431, /* (345) tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ + 464, /* (346) tag_item ::= TBNAME */ + 464, /* (347) tag_item ::= QTAGS */ + 464, /* (348) tag_item ::= column_name */ + 464, /* (349) tag_item ::= column_name column_alias */ + 464, /* (350) tag_item ::= column_name AS column_alias */ + 457, /* (351) db_kind_opt ::= */ + 457, /* (352) db_kind_opt ::= USER */ + 457, /* (353) db_kind_opt ::= SYSTEM */ + 389, /* (354) cmd ::= CREATE TSMA not_exists_opt tsma_name ON full_table_name tsma_func_list INTERVAL NK_LP duration_literal NK_RP */ + 389, /* (355) cmd ::= CREATE RECURSIVE TSMA not_exists_opt tsma_name ON full_table_name INTERVAL NK_LP duration_literal NK_RP */ + 389, /* (356) cmd ::= DROP TSMA exists_opt full_tsma_name */ + 389, /* (357) cmd ::= SHOW db_name_cond_opt TSMAS */ + 468, /* (358) full_tsma_name ::= tsma_name */ + 468, /* (359) full_tsma_name ::= db_name NK_DOT tsma_name */ + 467, /* (360) tsma_func_list ::= FUNCTION NK_LP func_list NK_RP */ + 389, /* (361) cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options */ + 389, /* (362) cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP */ + 389, /* (363) cmd ::= DROP INDEX exists_opt full_index_name */ + 471, /* (364) full_index_name ::= index_name */ + 471, /* (365) full_index_name ::= db_name NK_DOT index_name */ + 470, /* (366) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ + 470, /* (367) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt sma_stream_opt */ + 469, /* (368) func_list ::= func */ + 469, /* (369) func_list ::= func_list NK_COMMA func */ + 475, /* (370) func ::= sma_func_name NK_LP expression_list NK_RP */ + 476, /* (371) sma_func_name ::= function_name */ + 476, /* (372) sma_func_name ::= COUNT */ + 476, /* (373) sma_func_name ::= FIRST */ + 476, /* (374) sma_func_name ::= LAST */ + 476, /* (375) sma_func_name ::= LAST_ROW */ + 474, /* (376) sma_stream_opt ::= */ + 474, /* (377) sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ + 474, /* (378) sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ + 474, /* (379) sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ + 478, /* (380) with_meta ::= AS */ + 478, /* (381) with_meta ::= WITH META AS */ + 478, /* (382) with_meta ::= ONLY META AS */ + 389, /* (383) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ + 389, /* (384) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */ + 389, /* (385) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */ + 389, /* (386) cmd ::= DROP TOPIC exists_opt topic_name */ + 389, /* (387) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ + 389, /* (388) cmd ::= DESC full_table_name */ + 389, /* (389) cmd ::= DESCRIBE full_table_name */ + 389, /* (390) cmd ::= RESET QUERY CACHE */ + 389, /* (391) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ + 389, /* (392) cmd ::= EXPLAIN analyze_opt explain_options insert_query */ + 482, /* (393) analyze_opt ::= */ + 482, /* (394) analyze_opt ::= ANALYZE */ + 483, /* (395) explain_options ::= */ + 483, /* (396) explain_options ::= explain_options VERBOSE NK_BOOL */ + 483, /* (397) explain_options ::= explain_options RATIO NK_FLOAT */ + 389, /* (398) cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt */ + 389, /* (399) cmd ::= DROP FUNCTION exists_opt function_name */ + 486, /* (400) agg_func_opt ::= */ + 486, /* (401) agg_func_opt ::= AGGREGATE */ + 487, /* (402) bufsize_opt ::= */ + 487, /* (403) bufsize_opt ::= BUFSIZE NK_INTEGER */ + 488, /* (404) language_opt ::= */ + 488, /* (405) language_opt ::= LANGUAGE NK_STRING */ + 485, /* (406) or_replace_opt ::= */ + 485, /* (407) or_replace_opt ::= OR REPLACE */ + 389, /* (408) cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery */ + 389, /* (409) cmd ::= DROP VIEW exists_opt full_view_name */ + 489, /* (410) full_view_name ::= view_name */ + 489, /* (411) full_view_name ::= db_name NK_DOT view_name */ + 389, /* (412) cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery */ + 389, /* (413) cmd ::= DROP STREAM exists_opt stream_name */ + 389, /* (414) cmd ::= PAUSE STREAM exists_opt stream_name */ + 389, /* (415) cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */ + 493, /* (416) col_list_opt ::= */ + 493, /* (417) col_list_opt ::= NK_LP column_stream_def_list NK_RP */ + 497, /* (418) column_stream_def_list ::= column_stream_def */ + 497, /* (419) column_stream_def_list ::= column_stream_def_list NK_COMMA column_stream_def */ + 498, /* (420) column_stream_def ::= column_name stream_col_options */ + 499, /* (421) stream_col_options ::= */ + 499, /* (422) stream_col_options ::= stream_col_options PRIMARY KEY */ + 494, /* (423) tag_def_or_ref_opt ::= */ + 494, /* (424) tag_def_or_ref_opt ::= tags_def */ + 494, /* (425) tag_def_or_ref_opt ::= TAGS NK_LP column_stream_def_list NK_RP */ + 492, /* (426) stream_options ::= */ + 492, /* (427) stream_options ::= stream_options TRIGGER AT_ONCE */ + 492, /* (428) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ + 492, /* (429) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ + 492, /* (430) stream_options ::= stream_options WATERMARK duration_literal */ + 492, /* (431) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ + 492, /* (432) stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ + 492, /* (433) stream_options ::= stream_options DELETE_MARK duration_literal */ + 492, /* (434) stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ + 495, /* (435) subtable_opt ::= */ + 495, /* (436) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ + 496, /* (437) ignore_opt ::= */ + 496, /* (438) ignore_opt ::= IGNORE UNTREATED */ + 389, /* (439) cmd ::= KILL CONNECTION NK_INTEGER */ + 389, /* (440) cmd ::= KILL QUERY NK_STRING */ + 389, /* (441) cmd ::= KILL TRANSACTION NK_INTEGER */ + 389, /* (442) cmd ::= KILL COMPACT NK_INTEGER */ + 389, /* (443) cmd ::= BALANCE VGROUP */ + 389, /* (444) cmd ::= BALANCE VGROUP LEADER on_vgroup_id */ + 389, /* (445) cmd ::= BALANCE VGROUP LEADER DATABASE db_name */ + 389, /* (446) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ + 389, /* (447) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ + 389, /* (448) cmd ::= SPLIT VGROUP NK_INTEGER */ + 501, /* (449) on_vgroup_id ::= */ + 501, /* (450) on_vgroup_id ::= ON NK_INTEGER */ + 502, /* (451) dnode_list ::= DNODE NK_INTEGER */ + 502, /* (452) dnode_list ::= dnode_list DNODE NK_INTEGER */ + 389, /* (453) cmd ::= DELETE FROM full_table_name where_clause_opt */ + 389, /* (454) cmd ::= query_or_subquery */ + 389, /* (455) cmd ::= insert_query */ + 484, /* (456) insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ + 484, /* (457) insert_query ::= INSERT INTO full_table_name query_or_subquery */ + 440, /* (458) tags_literal ::= NK_INTEGER */ + 440, /* (459) tags_literal ::= NK_INTEGER NK_PLUS duration_literal */ + 440, /* (460) tags_literal ::= NK_INTEGER NK_MINUS duration_literal */ + 440, /* (461) tags_literal ::= NK_PLUS NK_INTEGER */ + 440, /* (462) tags_literal ::= NK_PLUS NK_INTEGER NK_PLUS duration_literal */ + 440, /* (463) tags_literal ::= NK_PLUS NK_INTEGER NK_MINUS duration_literal */ + 440, /* (464) tags_literal ::= NK_MINUS NK_INTEGER */ + 440, /* (465) tags_literal ::= NK_MINUS NK_INTEGER NK_PLUS duration_literal */ + 440, /* (466) tags_literal ::= NK_MINUS NK_INTEGER NK_MINUS duration_literal */ + 440, /* (467) tags_literal ::= NK_FLOAT */ + 440, /* (468) tags_literal ::= NK_PLUS NK_FLOAT */ + 440, /* (469) tags_literal ::= NK_MINUS NK_FLOAT */ + 440, /* (470) tags_literal ::= NK_BIN */ + 440, /* (471) tags_literal ::= NK_BIN NK_PLUS duration_literal */ + 440, /* (472) tags_literal ::= NK_BIN NK_MINUS duration_literal */ + 440, /* (473) tags_literal ::= NK_PLUS NK_BIN */ + 440, /* (474) tags_literal ::= NK_PLUS NK_BIN NK_PLUS duration_literal */ + 440, /* (475) tags_literal ::= NK_PLUS NK_BIN NK_MINUS duration_literal */ + 440, /* (476) tags_literal ::= NK_MINUS NK_BIN */ + 440, /* (477) tags_literal ::= NK_MINUS NK_BIN NK_PLUS duration_literal */ + 440, /* (478) tags_literal ::= NK_MINUS NK_BIN NK_MINUS duration_literal */ + 440, /* (479) tags_literal ::= NK_HEX */ + 440, /* (480) tags_literal ::= NK_HEX NK_PLUS duration_literal */ + 440, /* (481) tags_literal ::= NK_HEX NK_MINUS duration_literal */ + 440, /* (482) tags_literal ::= NK_PLUS NK_HEX */ + 440, /* (483) tags_literal ::= NK_PLUS NK_HEX NK_PLUS duration_literal */ + 440, /* (484) tags_literal ::= NK_PLUS NK_HEX NK_MINUS duration_literal */ + 440, /* (485) tags_literal ::= NK_MINUS NK_HEX */ + 440, /* (486) tags_literal ::= NK_MINUS NK_HEX NK_PLUS duration_literal */ + 440, /* (487) tags_literal ::= NK_MINUS NK_HEX NK_MINUS duration_literal */ + 440, /* (488) tags_literal ::= NK_STRING */ + 440, /* (489) tags_literal ::= NK_STRING NK_PLUS duration_literal */ + 440, /* (490) tags_literal ::= NK_STRING NK_MINUS duration_literal */ + 440, /* (491) tags_literal ::= NK_BOOL */ + 440, /* (492) tags_literal ::= NULL */ + 440, /* (493) tags_literal ::= literal_func */ + 440, /* (494) tags_literal ::= literal_func NK_PLUS duration_literal */ + 440, /* (495) tags_literal ::= literal_func NK_MINUS duration_literal */ + 443, /* (496) tags_literal_list ::= tags_literal */ + 443, /* (497) tags_literal_list ::= tags_literal_list NK_COMMA tags_literal */ + 392, /* (498) literal ::= NK_INTEGER */ + 392, /* (499) literal ::= NK_FLOAT */ + 392, /* (500) literal ::= NK_STRING */ + 392, /* (501) literal ::= NK_BOOL */ + 392, /* (502) literal ::= TIMESTAMP NK_STRING */ + 392, /* (503) literal ::= duration_literal */ + 392, /* (504) literal ::= NULL */ + 392, /* (505) literal ::= NK_QUESTION */ + 453, /* (506) duration_literal ::= NK_VARIABLE */ + 423, /* (507) signed ::= NK_INTEGER */ + 423, /* (508) signed ::= NK_PLUS NK_INTEGER */ + 423, /* (509) signed ::= NK_MINUS NK_INTEGER */ + 423, /* (510) signed ::= NK_FLOAT */ + 423, /* (511) signed ::= NK_PLUS NK_FLOAT */ + 423, /* (512) signed ::= NK_MINUS NK_FLOAT */ + 504, /* (513) signed_literal ::= signed */ + 504, /* (514) signed_literal ::= NK_STRING */ + 504, /* (515) signed_literal ::= NK_BOOL */ + 504, /* (516) signed_literal ::= TIMESTAMP NK_STRING */ + 504, /* (517) signed_literal ::= duration_literal */ + 504, /* (518) signed_literal ::= NULL */ + 504, /* (519) signed_literal ::= literal_func */ + 504, /* (520) signed_literal ::= NK_QUESTION */ + 505, /* (521) literal_list ::= signed_literal */ + 505, /* (522) literal_list ::= literal_list NK_COMMA signed_literal */ + 406, /* (523) db_name ::= NK_ID */ + 407, /* (524) table_name ::= NK_ID */ + 437, /* (525) column_name ::= NK_ID */ + 455, /* (526) function_name ::= NK_ID */ + 490, /* (527) view_name ::= NK_ID */ + 506, /* (528) table_alias ::= NK_ID */ + 465, /* (529) column_alias ::= NK_ID */ + 465, /* (530) column_alias ::= NK_ALIAS */ + 399, /* (531) user_name ::= NK_ID */ + 408, /* (532) topic_name ::= NK_ID */ + 491, /* (533) stream_name ::= NK_ID */ + 481, /* (534) cgroup_name ::= NK_ID */ + 472, /* (535) index_name ::= NK_ID */ + 466, /* (536) tsma_name ::= NK_ID */ + 507, /* (537) expr_or_subquery ::= expression */ + 500, /* (538) expression ::= literal */ + 500, /* (539) expression ::= pseudo_column */ + 500, /* (540) expression ::= column_reference */ + 500, /* (541) expression ::= function_expression */ + 500, /* (542) expression ::= case_when_expression */ + 500, /* (543) expression ::= NK_LP expression NK_RP */ + 500, /* (544) expression ::= NK_PLUS expr_or_subquery */ + 500, /* (545) expression ::= NK_MINUS expr_or_subquery */ + 500, /* (546) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ + 500, /* (547) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ + 500, /* (548) expression ::= expr_or_subquery NK_STAR expr_or_subquery */ + 500, /* (549) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ + 500, /* (550) expression ::= expr_or_subquery NK_REM expr_or_subquery */ + 500, /* (551) expression ::= column_reference NK_ARROW NK_STRING */ + 500, /* (552) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ + 500, /* (553) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ + 477, /* (554) expression_list ::= expr_or_subquery */ + 477, /* (555) expression_list ::= expression_list NK_COMMA expr_or_subquery */ + 509, /* (556) column_reference ::= column_name */ + 509, /* (557) column_reference ::= table_name NK_DOT column_name */ + 509, /* (558) column_reference ::= NK_ALIAS */ + 509, /* (559) column_reference ::= table_name NK_DOT NK_ALIAS */ + 508, /* (560) pseudo_column ::= ROWTS */ + 508, /* (561) pseudo_column ::= TBNAME */ + 508, /* (562) pseudo_column ::= table_name NK_DOT TBNAME */ + 508, /* (563) pseudo_column ::= QSTART */ + 508, /* (564) pseudo_column ::= QEND */ + 508, /* (565) pseudo_column ::= QDURATION */ + 508, /* (566) pseudo_column ::= WSTART */ + 508, /* (567) pseudo_column ::= WEND */ + 508, /* (568) pseudo_column ::= WDURATION */ + 508, /* (569) pseudo_column ::= IROWTS */ + 508, /* (570) pseudo_column ::= ISFILLED */ + 508, /* (571) pseudo_column ::= QTAGS */ + 508, /* (572) pseudo_column ::= FLOW */ + 508, /* (573) pseudo_column ::= FHIGH */ + 508, /* (574) pseudo_column ::= FROWTS */ + 510, /* (575) function_expression ::= function_name NK_LP expression_list NK_RP */ + 510, /* (576) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ + 510, /* (577) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ + 510, /* (578) function_expression ::= CAST NK_LP expr_or_subquery AS type_name_default_len NK_RP */ + 510, /* (579) function_expression ::= POSITION NK_LP expr_or_subquery IN expr_or_subquery NK_RP */ + 510, /* (580) function_expression ::= TRIM NK_LP expr_or_subquery NK_RP */ + 510, /* (581) function_expression ::= TRIM NK_LP trim_specification_type FROM expr_or_subquery NK_RP */ + 510, /* (582) function_expression ::= TRIM NK_LP expr_or_subquery FROM expr_or_subquery NK_RP */ + 510, /* (583) function_expression ::= TRIM NK_LP trim_specification_type expr_or_subquery FROM expr_or_subquery NK_RP */ + 510, /* (584) function_expression ::= substr_func NK_LP expression_list NK_RP */ + 510, /* (585) function_expression ::= substr_func NK_LP expr_or_subquery FROM expr_or_subquery NK_RP */ + 510, /* (586) function_expression ::= substr_func NK_LP expr_or_subquery FROM expr_or_subquery FOR expr_or_subquery NK_RP */ + 510, /* (587) function_expression ::= REPLACE NK_LP expression_list NK_RP */ + 510, /* (588) function_expression ::= literal_func */ + 510, /* (589) function_expression ::= rand_func */ + 503, /* (590) literal_func ::= noarg_func NK_LP NK_RP */ + 503, /* (591) literal_func ::= NOW */ + 503, /* (592) literal_func ::= TODAY */ + 516, /* (593) rand_func ::= RAND NK_LP NK_RP */ + 516, /* (594) rand_func ::= RAND NK_LP expression_list NK_RP */ + 515, /* (595) substr_func ::= SUBSTR */ + 515, /* (596) substr_func ::= SUBSTRING */ + 514, /* (597) trim_specification_type ::= BOTH */ + 514, /* (598) trim_specification_type ::= TRAILING */ + 514, /* (599) trim_specification_type ::= LEADING */ + 517, /* (600) noarg_func ::= NOW */ + 517, /* (601) noarg_func ::= TODAY */ + 517, /* (602) noarg_func ::= TIMEZONE */ + 517, /* (603) noarg_func ::= DATABASE */ + 517, /* (604) noarg_func ::= CLIENT_VERSION */ + 517, /* (605) noarg_func ::= SERVER_VERSION */ + 517, /* (606) noarg_func ::= SERVER_STATUS */ + 517, /* (607) noarg_func ::= CURRENT_USER */ + 517, /* (608) noarg_func ::= USER */ + 517, /* (609) noarg_func ::= PI */ + 512, /* (610) star_func ::= COUNT */ + 512, /* (611) star_func ::= FIRST */ + 512, /* (612) star_func ::= LAST */ + 512, /* (613) star_func ::= LAST_ROW */ + 513, /* (614) star_func_para_list ::= NK_STAR */ + 513, /* (615) star_func_para_list ::= other_para_list */ + 518, /* (616) other_para_list ::= star_func_para */ + 518, /* (617) other_para_list ::= other_para_list NK_COMMA star_func_para */ + 519, /* (618) star_func_para ::= expr_or_subquery */ + 519, /* (619) star_func_para ::= table_name NK_DOT NK_STAR */ + 511, /* (620) case_when_expression ::= CASE when_then_list case_when_else_opt END */ + 511, /* (621) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ + 520, /* (622) when_then_list ::= when_then_expr */ + 520, /* (623) when_then_list ::= when_then_list when_then_expr */ + 523, /* (624) when_then_expr ::= WHEN common_expression THEN common_expression */ + 521, /* (625) case_when_else_opt ::= */ + 521, /* (626) case_when_else_opt ::= ELSE common_expression */ + 524, /* (627) predicate ::= expr_or_subquery compare_op expr_or_subquery */ + 524, /* (628) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ + 524, /* (629) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ + 524, /* (630) predicate ::= expr_or_subquery IS NULL */ + 524, /* (631) predicate ::= expr_or_subquery IS NOT NULL */ + 524, /* (632) predicate ::= expr_or_subquery in_op in_predicate_value */ + 525, /* (633) compare_op ::= NK_LT */ + 525, /* (634) compare_op ::= NK_GT */ + 525, /* (635) compare_op ::= NK_LE */ + 525, /* (636) compare_op ::= NK_GE */ + 525, /* (637) compare_op ::= NK_NE */ + 525, /* (638) compare_op ::= NK_EQ */ + 525, /* (639) compare_op ::= LIKE */ + 525, /* (640) compare_op ::= NOT LIKE */ + 525, /* (641) compare_op ::= MATCH */ + 525, /* (642) compare_op ::= NMATCH */ + 525, /* (643) compare_op ::= CONTAINS */ + 526, /* (644) in_op ::= IN */ + 526, /* (645) in_op ::= NOT IN */ + 527, /* (646) in_predicate_value ::= NK_LP literal_list NK_RP */ + 528, /* (647) boolean_value_expression ::= boolean_primary */ + 528, /* (648) boolean_value_expression ::= NOT boolean_primary */ + 528, /* (649) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + 528, /* (650) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + 529, /* (651) boolean_primary ::= predicate */ + 529, /* (652) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ + 522, /* (653) common_expression ::= expr_or_subquery */ + 522, /* (654) common_expression ::= boolean_value_expression */ + 530, /* (655) from_clause_opt ::= */ + 530, /* (656) from_clause_opt ::= FROM table_reference_list */ + 531, /* (657) table_reference_list ::= table_reference */ + 531, /* (658) table_reference_list ::= table_reference_list NK_COMMA table_reference */ + 532, /* (659) table_reference ::= table_primary */ + 532, /* (660) table_reference ::= joined_table */ + 533, /* (661) table_primary ::= table_name alias_opt */ + 533, /* (662) table_primary ::= db_name NK_DOT table_name alias_opt */ + 533, /* (663) table_primary ::= subquery alias_opt */ + 533, /* (664) table_primary ::= parenthesized_joined_table */ + 535, /* (665) alias_opt ::= */ + 535, /* (666) alias_opt ::= table_alias */ + 535, /* (667) alias_opt ::= AS table_alias */ + 537, /* (668) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + 537, /* (669) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ + 534, /* (670) joined_table ::= table_reference join_type join_subtype JOIN table_reference join_on_clause_opt window_offset_clause_opt jlimit_clause_opt */ + 538, /* (671) join_type ::= */ + 538, /* (672) join_type ::= INNER */ + 538, /* (673) join_type ::= LEFT */ + 538, /* (674) join_type ::= RIGHT */ + 538, /* (675) join_type ::= FULL */ + 539, /* (676) join_subtype ::= */ + 539, /* (677) join_subtype ::= OUTER */ + 539, /* (678) join_subtype ::= SEMI */ + 539, /* (679) join_subtype ::= ANTI */ + 539, /* (680) join_subtype ::= ASOF */ + 539, /* (681) join_subtype ::= WINDOW */ + 540, /* (682) join_on_clause_opt ::= */ + 540, /* (683) join_on_clause_opt ::= ON search_condition */ + 541, /* (684) window_offset_clause_opt ::= */ + 541, /* (685) window_offset_clause_opt ::= WINDOW_OFFSET NK_LP window_offset_literal NK_COMMA window_offset_literal NK_RP */ + 543, /* (686) window_offset_literal ::= NK_VARIABLE */ + 543, /* (687) window_offset_literal ::= NK_MINUS NK_VARIABLE */ + 542, /* (688) jlimit_clause_opt ::= */ + 542, /* (689) jlimit_clause_opt ::= JLIMIT NK_INTEGER */ + 544, /* (690) query_specification ::= SELECT hint_list set_quantifier_opt tag_mode_opt select_list from_clause_opt where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ + 545, /* (691) hint_list ::= */ + 545, /* (692) hint_list ::= NK_HINT */ + 547, /* (693) tag_mode_opt ::= */ + 547, /* (694) tag_mode_opt ::= TAGS */ + 546, /* (695) set_quantifier_opt ::= */ + 546, /* (696) set_quantifier_opt ::= DISTINCT */ + 546, /* (697) set_quantifier_opt ::= ALL */ + 548, /* (698) select_list ::= select_item */ + 548, /* (699) select_list ::= select_list NK_COMMA select_item */ + 556, /* (700) select_item ::= NK_STAR */ + 556, /* (701) select_item ::= common_expression */ + 556, /* (702) select_item ::= common_expression column_alias */ + 556, /* (703) select_item ::= common_expression AS column_alias */ + 556, /* (704) select_item ::= table_name NK_DOT NK_STAR */ + 480, /* (705) where_clause_opt ::= */ + 480, /* (706) where_clause_opt ::= WHERE search_condition */ + 549, /* (707) partition_by_clause_opt ::= */ + 549, /* (708) partition_by_clause_opt ::= PARTITION BY partition_list */ + 557, /* (709) partition_list ::= partition_item */ + 557, /* (710) partition_list ::= partition_list NK_COMMA partition_item */ + 558, /* (711) partition_item ::= expr_or_subquery */ + 558, /* (712) partition_item ::= expr_or_subquery column_alias */ + 558, /* (713) partition_item ::= expr_or_subquery AS column_alias */ + 553, /* (714) twindow_clause_opt ::= */ + 553, /* (715) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP */ + 553, /* (716) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ + 553, /* (717) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ + 553, /* (718) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ + 553, /* (719) twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ + 553, /* (720) twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP */ + 553, /* (721) twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ + 553, /* (722) twindow_clause_opt ::= ANOMALY_WINDOW NK_LP expr_or_subquery NK_RP */ + 553, /* (723) twindow_clause_opt ::= ANOMALY_WINDOW NK_LP expr_or_subquery NK_COMMA NK_STRING NK_RP */ + 473, /* (724) sliding_opt ::= */ + 473, /* (725) sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ + 559, /* (726) interval_sliding_duration_literal ::= NK_VARIABLE */ + 559, /* (727) interval_sliding_duration_literal ::= NK_STRING */ + 559, /* (728) interval_sliding_duration_literal ::= NK_INTEGER */ + 552, /* (729) fill_opt ::= */ + 552, /* (730) fill_opt ::= FILL NK_LP fill_mode NK_RP */ + 552, /* (731) fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ + 552, /* (732) fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ + 560, /* (733) fill_mode ::= NONE */ + 560, /* (734) fill_mode ::= PREV */ + 560, /* (735) fill_mode ::= NULL */ + 560, /* (736) fill_mode ::= NULL_F */ + 560, /* (737) fill_mode ::= LINEAR */ + 560, /* (738) fill_mode ::= NEXT */ + 554, /* (739) group_by_clause_opt ::= */ + 554, /* (740) group_by_clause_opt ::= GROUP BY group_by_list */ + 561, /* (741) group_by_list ::= expr_or_subquery */ + 561, /* (742) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ + 555, /* (743) having_clause_opt ::= */ + 555, /* (744) having_clause_opt ::= HAVING search_condition */ + 550, /* (745) range_opt ::= */ + 550, /* (746) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ + 550, /* (747) range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ + 551, /* (748) every_opt ::= */ + 551, /* (749) every_opt ::= EVERY NK_LP duration_literal NK_RP */ + 562, /* (750) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ + 563, /* (751) query_simple ::= query_specification */ + 563, /* (752) query_simple ::= union_query_expression */ + 567, /* (753) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ + 567, /* (754) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ + 568, /* (755) query_simple_or_subquery ::= query_simple */ + 568, /* (756) query_simple_or_subquery ::= subquery */ + 479, /* (757) query_or_subquery ::= query_expression */ + 479, /* (758) query_or_subquery ::= subquery */ + 564, /* (759) order_by_clause_opt ::= */ + 564, /* (760) order_by_clause_opt ::= ORDER BY sort_specification_list */ + 565, /* (761) slimit_clause_opt ::= */ + 565, /* (762) slimit_clause_opt ::= SLIMIT NK_INTEGER */ + 565, /* (763) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + 565, /* (764) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + 566, /* (765) limit_clause_opt ::= */ + 566, /* (766) limit_clause_opt ::= LIMIT NK_INTEGER */ + 566, /* (767) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ + 566, /* (768) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + 536, /* (769) subquery ::= NK_LP query_expression NK_RP */ + 536, /* (770) subquery ::= NK_LP subquery NK_RP */ + 409, /* (771) search_condition ::= common_expression */ + 569, /* (772) sort_specification_list ::= sort_specification */ + 569, /* (773) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ + 570, /* (774) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ + 571, /* (775) ordering_specification_opt ::= */ + 571, /* (776) ordering_specification_opt ::= ASC */ + 571, /* (777) ordering_specification_opt ::= DESC */ + 572, /* (778) null_ordering_opt ::= */ + 572, /* (779) null_ordering_opt ::= NULLS FIRST */ + 572, /* (780) null_ordering_opt ::= NULLS LAST */ + 439, /* (781) column_options ::= */ + 439, /* (782) column_options ::= column_options PRIMARY KEY */ + 439, /* (783) column_options ::= column_options NK_ID NK_STRING */ }; /* For rule J, yyRuleInfoNRhs[J] contains the negative of the number @@ -4747,719 +4804,730 @@ static const signed char yyRuleInfoNRhs[] = { 0, /* (57) with_clause_opt ::= */ -2, /* (58) with_clause_opt ::= WITH search_condition */ -3, /* (59) cmd ::= CREATE ENCRYPT_KEY NK_STRING */ - -3, /* (60) cmd ::= CREATE DNODE dnode_endpoint */ - -5, /* (61) cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */ - -4, /* (62) cmd ::= DROP DNODE NK_INTEGER force_opt */ - -4, /* (63) cmd ::= DROP DNODE dnode_endpoint force_opt */ - -4, /* (64) cmd ::= DROP DNODE NK_INTEGER unsafe_opt */ - -4, /* (65) cmd ::= DROP DNODE dnode_endpoint unsafe_opt */ - -4, /* (66) cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ - -5, /* (67) cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ - -4, /* (68) cmd ::= ALTER ALL DNODES NK_STRING */ - -5, /* (69) cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ - -3, /* (70) cmd ::= RESTORE DNODE NK_INTEGER */ - -1, /* (71) dnode_endpoint ::= NK_STRING */ - -1, /* (72) dnode_endpoint ::= NK_ID */ - -1, /* (73) dnode_endpoint ::= NK_IPTOKEN */ - 0, /* (74) force_opt ::= */ - -1, /* (75) force_opt ::= FORCE */ - -1, /* (76) unsafe_opt ::= UNSAFE */ - -3, /* (77) cmd ::= ALTER CLUSTER NK_STRING */ - -4, /* (78) cmd ::= ALTER CLUSTER NK_STRING NK_STRING */ - -3, /* (79) cmd ::= ALTER LOCAL NK_STRING */ - -4, /* (80) cmd ::= ALTER LOCAL NK_STRING NK_STRING */ - -5, /* (81) cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ - -5, /* (82) cmd ::= DROP QNODE ON DNODE NK_INTEGER */ - -5, /* (83) cmd ::= RESTORE QNODE ON DNODE NK_INTEGER */ - -5, /* (84) cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ - -5, /* (85) cmd ::= DROP BNODE ON DNODE NK_INTEGER */ - -5, /* (86) cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ - -5, /* (87) cmd ::= DROP SNODE ON DNODE NK_INTEGER */ - -5, /* (88) cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ - -5, /* (89) cmd ::= DROP MNODE ON DNODE NK_INTEGER */ - -5, /* (90) cmd ::= RESTORE MNODE ON DNODE NK_INTEGER */ - -5, /* (91) cmd ::= RESTORE VNODE ON DNODE NK_INTEGER */ - -5, /* (92) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ - -4, /* (93) cmd ::= DROP DATABASE exists_opt db_name */ - -2, /* (94) cmd ::= USE db_name */ - -4, /* (95) cmd ::= ALTER DATABASE db_name alter_db_options */ - -3, /* (96) cmd ::= FLUSH DATABASE db_name */ - -4, /* (97) cmd ::= TRIM DATABASE db_name speed_opt */ - -3, /* (98) cmd ::= S3MIGRATE DATABASE db_name */ - -5, /* (99) cmd ::= COMPACT DATABASE db_name start_opt end_opt */ - -3, /* (100) not_exists_opt ::= IF NOT EXISTS */ - 0, /* (101) not_exists_opt ::= */ - -2, /* (102) exists_opt ::= IF EXISTS */ - 0, /* (103) exists_opt ::= */ - 0, /* (104) db_options ::= */ - -3, /* (105) db_options ::= db_options BUFFER NK_INTEGER */ - -3, /* (106) db_options ::= db_options CACHEMODEL NK_STRING */ - -3, /* (107) db_options ::= db_options CACHESIZE NK_INTEGER */ - -3, /* (108) db_options ::= db_options COMP NK_INTEGER */ - -3, /* (109) db_options ::= db_options DURATION NK_INTEGER */ - -3, /* (110) db_options ::= db_options DURATION NK_VARIABLE */ - -3, /* (111) db_options ::= db_options MAXROWS NK_INTEGER */ - -3, /* (112) db_options ::= db_options MINROWS NK_INTEGER */ - -3, /* (113) db_options ::= db_options KEEP integer_list */ - -3, /* (114) db_options ::= db_options KEEP variable_list */ - -3, /* (115) db_options ::= db_options PAGES NK_INTEGER */ - -3, /* (116) db_options ::= db_options PAGESIZE NK_INTEGER */ - -3, /* (117) db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ - -3, /* (118) db_options ::= db_options PRECISION NK_STRING */ - -3, /* (119) db_options ::= db_options REPLICA NK_INTEGER */ - -3, /* (120) db_options ::= db_options VGROUPS NK_INTEGER */ - -3, /* (121) db_options ::= db_options SINGLE_STABLE NK_INTEGER */ - -3, /* (122) db_options ::= db_options RETENTIONS retention_list */ - -3, /* (123) db_options ::= db_options SCHEMALESS NK_INTEGER */ - -3, /* (124) db_options ::= db_options WAL_LEVEL NK_INTEGER */ - -3, /* (125) db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ - -3, /* (126) db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ - -4, /* (127) db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ - -3, /* (128) db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ - -4, /* (129) db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ - -3, /* (130) db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ - -3, /* (131) db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ - -3, /* (132) db_options ::= db_options STT_TRIGGER NK_INTEGER */ - -3, /* (133) db_options ::= db_options TABLE_PREFIX signed */ - -3, /* (134) db_options ::= db_options TABLE_SUFFIX signed */ - -3, /* (135) db_options ::= db_options S3_CHUNKSIZE NK_INTEGER */ - -3, /* (136) db_options ::= db_options S3_KEEPLOCAL NK_INTEGER */ - -3, /* (137) db_options ::= db_options S3_KEEPLOCAL NK_VARIABLE */ - -3, /* (138) db_options ::= db_options S3_COMPACT NK_INTEGER */ - -3, /* (139) db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER */ - -3, /* (140) db_options ::= db_options ENCRYPT_ALGORITHM NK_STRING */ - -1, /* (141) alter_db_options ::= alter_db_option */ - -2, /* (142) alter_db_options ::= alter_db_options alter_db_option */ - -2, /* (143) alter_db_option ::= BUFFER NK_INTEGER */ - -2, /* (144) alter_db_option ::= CACHEMODEL NK_STRING */ - -2, /* (145) alter_db_option ::= CACHESIZE NK_INTEGER */ - -2, /* (146) alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ - -2, /* (147) alter_db_option ::= KEEP integer_list */ - -2, /* (148) alter_db_option ::= KEEP variable_list */ - -2, /* (149) alter_db_option ::= PAGES NK_INTEGER */ - -2, /* (150) alter_db_option ::= REPLICA NK_INTEGER */ - -2, /* (151) alter_db_option ::= WAL_LEVEL NK_INTEGER */ - -2, /* (152) alter_db_option ::= STT_TRIGGER NK_INTEGER */ - -2, /* (153) alter_db_option ::= MINROWS NK_INTEGER */ - -2, /* (154) alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER */ - -3, /* (155) alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ - -2, /* (156) alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER */ - -3, /* (157) alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ - -2, /* (158) alter_db_option ::= S3_KEEPLOCAL NK_INTEGER */ - -2, /* (159) alter_db_option ::= S3_KEEPLOCAL NK_VARIABLE */ - -2, /* (160) alter_db_option ::= S3_COMPACT NK_INTEGER */ - -2, /* (161) alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER */ - -2, /* (162) alter_db_option ::= ENCRYPT_ALGORITHM NK_STRING */ - -1, /* (163) integer_list ::= NK_INTEGER */ - -3, /* (164) integer_list ::= integer_list NK_COMMA NK_INTEGER */ - -1, /* (165) variable_list ::= NK_VARIABLE */ - -3, /* (166) variable_list ::= variable_list NK_COMMA NK_VARIABLE */ - -1, /* (167) retention_list ::= retention */ - -3, /* (168) retention_list ::= retention_list NK_COMMA retention */ - -3, /* (169) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ - -3, /* (170) retention ::= NK_MINUS NK_COLON NK_VARIABLE */ - 0, /* (171) speed_opt ::= */ - -2, /* (172) speed_opt ::= BWLIMIT NK_INTEGER */ - 0, /* (173) start_opt ::= */ - -3, /* (174) start_opt ::= START WITH NK_INTEGER */ - -3, /* (175) start_opt ::= START WITH NK_STRING */ - -4, /* (176) start_opt ::= START WITH TIMESTAMP NK_STRING */ - 0, /* (177) end_opt ::= */ - -3, /* (178) end_opt ::= END WITH NK_INTEGER */ - -3, /* (179) end_opt ::= END WITH NK_STRING */ - -4, /* (180) end_opt ::= END WITH TIMESTAMP NK_STRING */ - -9, /* (181) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ - -3, /* (182) cmd ::= CREATE TABLE multi_create_clause */ - -10, /* (183) cmd ::= CREATE TABLE not_exists_opt USING full_table_name NK_LP tag_list_opt NK_RP FILE NK_STRING */ - -9, /* (184) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ - -4, /* (185) cmd ::= DROP TABLE with_opt multi_drop_clause */ - -5, /* (186) cmd ::= DROP STABLE with_opt exists_opt full_table_name */ - -3, /* (187) cmd ::= ALTER TABLE alter_table_clause */ - -3, /* (188) cmd ::= ALTER STABLE alter_table_clause */ - -2, /* (189) alter_table_clause ::= full_table_name alter_table_options */ - -6, /* (190) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name column_options */ - -4, /* (191) alter_table_clause ::= full_table_name DROP COLUMN column_name */ - -5, /* (192) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ - -5, /* (193) alter_table_clause ::= full_table_name MODIFY COLUMN column_name column_options */ - -5, /* (194) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ - -5, /* (195) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ - -4, /* (196) alter_table_clause ::= full_table_name DROP TAG column_name */ - -5, /* (197) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ - -5, /* (198) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ - -6, /* (199) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ tags_literal */ - -1, /* (200) multi_create_clause ::= create_subtable_clause */ - -2, /* (201) multi_create_clause ::= multi_create_clause create_subtable_clause */ - -10, /* (202) create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP tags_literal_list NK_RP table_options */ - -1, /* (203) multi_drop_clause ::= drop_table_clause */ - -3, /* (204) multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */ - -2, /* (205) drop_table_clause ::= exists_opt full_table_name */ - 0, /* (206) with_opt ::= */ - -1, /* (207) with_opt ::= WITH */ - 0, /* (208) specific_cols_opt ::= */ - -3, /* (209) specific_cols_opt ::= NK_LP col_name_list NK_RP */ - -1, /* (210) full_table_name ::= table_name */ - -3, /* (211) full_table_name ::= db_name NK_DOT table_name */ - -1, /* (212) tag_def_list ::= tag_def */ - -3, /* (213) tag_def_list ::= tag_def_list NK_COMMA tag_def */ - -2, /* (214) tag_def ::= column_name type_name */ - -1, /* (215) column_def_list ::= column_def */ - -3, /* (216) column_def_list ::= column_def_list NK_COMMA column_def */ - -3, /* (217) column_def ::= column_name type_name column_options */ - -1, /* (218) type_name ::= BOOL */ - -1, /* (219) type_name ::= TINYINT */ - -1, /* (220) type_name ::= SMALLINT */ - -1, /* (221) type_name ::= INT */ - -1, /* (222) type_name ::= INTEGER */ - -1, /* (223) type_name ::= BIGINT */ - -1, /* (224) type_name ::= FLOAT */ - -1, /* (225) type_name ::= DOUBLE */ - -4, /* (226) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ - -1, /* (227) type_name ::= TIMESTAMP */ - -4, /* (228) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ - -2, /* (229) type_name ::= TINYINT UNSIGNED */ - -2, /* (230) type_name ::= SMALLINT UNSIGNED */ - -2, /* (231) type_name ::= INT UNSIGNED */ - -2, /* (232) type_name ::= BIGINT UNSIGNED */ - -1, /* (233) type_name ::= JSON */ - -4, /* (234) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ - -1, /* (235) type_name ::= MEDIUMBLOB */ - -1, /* (236) type_name ::= BLOB */ - -4, /* (237) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ - -4, /* (238) type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP */ - -1, /* (239) type_name ::= DECIMAL */ - -4, /* (240) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ - -6, /* (241) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ - -1, /* (242) type_name_default_len ::= BINARY */ - -1, /* (243) type_name_default_len ::= NCHAR */ - -1, /* (244) type_name_default_len ::= VARCHAR */ - -1, /* (245) type_name_default_len ::= VARBINARY */ - 0, /* (246) tags_def_opt ::= */ - -1, /* (247) tags_def_opt ::= tags_def */ - -4, /* (248) tags_def ::= TAGS NK_LP tag_def_list NK_RP */ - 0, /* (249) table_options ::= */ - -3, /* (250) table_options ::= table_options COMMENT NK_STRING */ - -3, /* (251) table_options ::= table_options MAX_DELAY duration_list */ - -3, /* (252) table_options ::= table_options WATERMARK duration_list */ - -5, /* (253) table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ - -3, /* (254) table_options ::= table_options TTL NK_INTEGER */ - -5, /* (255) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ - -3, /* (256) table_options ::= table_options DELETE_MARK duration_list */ - -1, /* (257) alter_table_options ::= alter_table_option */ - -2, /* (258) alter_table_options ::= alter_table_options alter_table_option */ - -2, /* (259) alter_table_option ::= COMMENT NK_STRING */ - -2, /* (260) alter_table_option ::= TTL NK_INTEGER */ - -1, /* (261) duration_list ::= duration_literal */ - -3, /* (262) duration_list ::= duration_list NK_COMMA duration_literal */ - -1, /* (263) rollup_func_list ::= rollup_func_name */ - -3, /* (264) rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ - -1, /* (265) rollup_func_name ::= function_name */ - -1, /* (266) rollup_func_name ::= FIRST */ - -1, /* (267) rollup_func_name ::= LAST */ - -1, /* (268) col_name_list ::= col_name */ - -3, /* (269) col_name_list ::= col_name_list NK_COMMA col_name */ - -1, /* (270) col_name ::= column_name */ - -2, /* (271) cmd ::= SHOW DNODES */ - -2, /* (272) cmd ::= SHOW USERS */ - -3, /* (273) cmd ::= SHOW USERS FULL */ - -3, /* (274) cmd ::= SHOW USER PRIVILEGES */ - -3, /* (275) cmd ::= SHOW db_kind_opt DATABASES */ - -4, /* (276) cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt */ - -4, /* (277) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ - -3, /* (278) cmd ::= SHOW db_name_cond_opt VGROUPS */ - -2, /* (279) cmd ::= SHOW MNODES */ - -2, /* (280) cmd ::= SHOW QNODES */ - -2, /* (281) cmd ::= SHOW ARBGROUPS */ - -2, /* (282) cmd ::= SHOW FUNCTIONS */ - -5, /* (283) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ - -6, /* (284) cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name */ - -2, /* (285) cmd ::= SHOW STREAMS */ - -2, /* (286) cmd ::= SHOW ACCOUNTS */ - -2, /* (287) cmd ::= SHOW APPS */ - -2, /* (288) cmd ::= SHOW CONNECTIONS */ - -2, /* (289) cmd ::= SHOW LICENCES */ - -2, /* (290) cmd ::= SHOW GRANTS */ - -3, /* (291) cmd ::= SHOW GRANTS FULL */ - -3, /* (292) cmd ::= SHOW GRANTS LOGS */ - -3, /* (293) cmd ::= SHOW CLUSTER MACHINES */ - -4, /* (294) cmd ::= SHOW CREATE DATABASE db_name */ - -4, /* (295) cmd ::= SHOW CREATE TABLE full_table_name */ - -4, /* (296) cmd ::= SHOW CREATE STABLE full_table_name */ - -2, /* (297) cmd ::= SHOW ENCRYPTIONS */ - -2, /* (298) cmd ::= SHOW QUERIES */ - -2, /* (299) cmd ::= SHOW SCORES */ - -2, /* (300) cmd ::= SHOW TOPICS */ - -2, /* (301) cmd ::= SHOW VARIABLES */ - -3, /* (302) cmd ::= SHOW CLUSTER VARIABLES */ - -3, /* (303) cmd ::= SHOW LOCAL VARIABLES */ - -5, /* (304) cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ - -2, /* (305) cmd ::= SHOW BNODES */ - -2, /* (306) cmd ::= SHOW SNODES */ - -2, /* (307) cmd ::= SHOW CLUSTER */ - -2, /* (308) cmd ::= SHOW TRANSACTIONS */ - -4, /* (309) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ - -2, /* (310) cmd ::= SHOW CONSUMERS */ - -2, /* (311) cmd ::= SHOW SUBSCRIPTIONS */ - -5, /* (312) cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ - -6, /* (313) cmd ::= SHOW TAGS FROM db_name NK_DOT table_name */ - -7, /* (314) cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ - -8, /* (315) cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name */ - -5, /* (316) cmd ::= SHOW VNODES ON DNODE NK_INTEGER */ - -2, /* (317) cmd ::= SHOW VNODES */ - -3, /* (318) cmd ::= SHOW db_name_cond_opt ALIVE */ - -3, /* (319) cmd ::= SHOW CLUSTER ALIVE */ - -4, /* (320) cmd ::= SHOW db_name_cond_opt VIEWS like_pattern_opt */ - -4, /* (321) cmd ::= SHOW CREATE VIEW full_table_name */ - -2, /* (322) cmd ::= SHOW COMPACTS */ - -3, /* (323) cmd ::= SHOW COMPACT NK_INTEGER */ - 0, /* (324) table_kind_db_name_cond_opt ::= */ - -1, /* (325) table_kind_db_name_cond_opt ::= table_kind */ - -2, /* (326) table_kind_db_name_cond_opt ::= db_name NK_DOT */ - -3, /* (327) table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT */ - -1, /* (328) table_kind ::= NORMAL */ - -1, /* (329) table_kind ::= CHILD */ - 0, /* (330) db_name_cond_opt ::= */ - -2, /* (331) db_name_cond_opt ::= db_name NK_DOT */ - 0, /* (332) like_pattern_opt ::= */ - -2, /* (333) like_pattern_opt ::= LIKE NK_STRING */ - -1, /* (334) table_name_cond ::= table_name */ - 0, /* (335) from_db_opt ::= */ - -2, /* (336) from_db_opt ::= FROM db_name */ - 0, /* (337) tag_list_opt ::= */ - -1, /* (338) tag_list_opt ::= tag_item */ - -3, /* (339) tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ - -1, /* (340) tag_item ::= TBNAME */ - -1, /* (341) tag_item ::= QTAGS */ - -1, /* (342) tag_item ::= column_name */ - -2, /* (343) tag_item ::= column_name column_alias */ - -3, /* (344) tag_item ::= column_name AS column_alias */ - 0, /* (345) db_kind_opt ::= */ - -1, /* (346) db_kind_opt ::= USER */ - -1, /* (347) db_kind_opt ::= SYSTEM */ - -11, /* (348) cmd ::= CREATE TSMA not_exists_opt tsma_name ON full_table_name tsma_func_list INTERVAL NK_LP duration_literal NK_RP */ - -11, /* (349) cmd ::= CREATE RECURSIVE TSMA not_exists_opt tsma_name ON full_table_name INTERVAL NK_LP duration_literal NK_RP */ - -4, /* (350) cmd ::= DROP TSMA exists_opt full_tsma_name */ - -3, /* (351) cmd ::= SHOW db_name_cond_opt TSMAS */ - -1, /* (352) full_tsma_name ::= tsma_name */ - -3, /* (353) full_tsma_name ::= db_name NK_DOT tsma_name */ - -4, /* (354) tsma_func_list ::= FUNCTION NK_LP func_list NK_RP */ - -8, /* (355) cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options */ - -9, /* (356) cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP */ - -4, /* (357) cmd ::= DROP INDEX exists_opt full_index_name */ - -1, /* (358) full_index_name ::= index_name */ - -3, /* (359) full_index_name ::= db_name NK_DOT index_name */ - -10, /* (360) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ - -12, /* (361) 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, /* (362) func_list ::= func */ - -3, /* (363) func_list ::= func_list NK_COMMA func */ - -4, /* (364) func ::= sma_func_name NK_LP expression_list NK_RP */ - -1, /* (365) sma_func_name ::= function_name */ - -1, /* (366) sma_func_name ::= COUNT */ - -1, /* (367) sma_func_name ::= FIRST */ - -1, /* (368) sma_func_name ::= LAST */ - -1, /* (369) sma_func_name ::= LAST_ROW */ - 0, /* (370) sma_stream_opt ::= */ - -3, /* (371) sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ - -3, /* (372) sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ - -3, /* (373) sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ - -1, /* (374) with_meta ::= AS */ - -3, /* (375) with_meta ::= WITH META AS */ - -3, /* (376) with_meta ::= ONLY META AS */ - -6, /* (377) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ - -7, /* (378) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */ - -8, /* (379) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */ - -4, /* (380) cmd ::= DROP TOPIC exists_opt topic_name */ - -7, /* (381) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ - -2, /* (382) cmd ::= DESC full_table_name */ - -2, /* (383) cmd ::= DESCRIBE full_table_name */ - -3, /* (384) cmd ::= RESET QUERY CACHE */ - -4, /* (385) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ - -4, /* (386) cmd ::= EXPLAIN analyze_opt explain_options insert_query */ - 0, /* (387) analyze_opt ::= */ - -1, /* (388) analyze_opt ::= ANALYZE */ - 0, /* (389) explain_options ::= */ - -3, /* (390) explain_options ::= explain_options VERBOSE NK_BOOL */ - -3, /* (391) explain_options ::= explain_options RATIO NK_FLOAT */ - -12, /* (392) 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, /* (393) cmd ::= DROP FUNCTION exists_opt function_name */ - 0, /* (394) agg_func_opt ::= */ - -1, /* (395) agg_func_opt ::= AGGREGATE */ - 0, /* (396) bufsize_opt ::= */ - -2, /* (397) bufsize_opt ::= BUFSIZE NK_INTEGER */ - 0, /* (398) language_opt ::= */ - -2, /* (399) language_opt ::= LANGUAGE NK_STRING */ - 0, /* (400) or_replace_opt ::= */ - -2, /* (401) or_replace_opt ::= OR REPLACE */ - -6, /* (402) cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery */ - -4, /* (403) cmd ::= DROP VIEW exists_opt full_view_name */ - -1, /* (404) full_view_name ::= view_name */ - -3, /* (405) full_view_name ::= db_name NK_DOT view_name */ - -12, /* (406) 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, /* (407) cmd ::= DROP STREAM exists_opt stream_name */ - -4, /* (408) cmd ::= PAUSE STREAM exists_opt stream_name */ - -5, /* (409) cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */ - 0, /* (410) col_list_opt ::= */ - -3, /* (411) col_list_opt ::= NK_LP column_stream_def_list NK_RP */ - -1, /* (412) column_stream_def_list ::= column_stream_def */ - -3, /* (413) column_stream_def_list ::= column_stream_def_list NK_COMMA column_stream_def */ - -2, /* (414) column_stream_def ::= column_name stream_col_options */ - 0, /* (415) stream_col_options ::= */ - -3, /* (416) stream_col_options ::= stream_col_options PRIMARY KEY */ - 0, /* (417) tag_def_or_ref_opt ::= */ - -1, /* (418) tag_def_or_ref_opt ::= tags_def */ - -4, /* (419) tag_def_or_ref_opt ::= TAGS NK_LP column_stream_def_list NK_RP */ - 0, /* (420) stream_options ::= */ - -3, /* (421) stream_options ::= stream_options TRIGGER AT_ONCE */ - -3, /* (422) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ - -4, /* (423) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ - -3, /* (424) stream_options ::= stream_options WATERMARK duration_literal */ - -4, /* (425) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ - -3, /* (426) stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ - -3, /* (427) stream_options ::= stream_options DELETE_MARK duration_literal */ - -4, /* (428) stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ - 0, /* (429) subtable_opt ::= */ - -4, /* (430) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ - 0, /* (431) ignore_opt ::= */ - -2, /* (432) ignore_opt ::= IGNORE UNTREATED */ - -3, /* (433) cmd ::= KILL CONNECTION NK_INTEGER */ - -3, /* (434) cmd ::= KILL QUERY NK_STRING */ - -3, /* (435) cmd ::= KILL TRANSACTION NK_INTEGER */ - -3, /* (436) cmd ::= KILL COMPACT NK_INTEGER */ - -2, /* (437) cmd ::= BALANCE VGROUP */ - -4, /* (438) cmd ::= BALANCE VGROUP LEADER on_vgroup_id */ - -5, /* (439) cmd ::= BALANCE VGROUP LEADER DATABASE db_name */ - -4, /* (440) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ - -4, /* (441) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ - -3, /* (442) cmd ::= SPLIT VGROUP NK_INTEGER */ - 0, /* (443) on_vgroup_id ::= */ - -2, /* (444) on_vgroup_id ::= ON NK_INTEGER */ - -2, /* (445) dnode_list ::= DNODE NK_INTEGER */ - -3, /* (446) dnode_list ::= dnode_list DNODE NK_INTEGER */ - -4, /* (447) cmd ::= DELETE FROM full_table_name where_clause_opt */ - -1, /* (448) cmd ::= query_or_subquery */ - -1, /* (449) cmd ::= insert_query */ - -7, /* (450) insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ - -4, /* (451) insert_query ::= INSERT INTO full_table_name query_or_subquery */ - -1, /* (452) tags_literal ::= NK_INTEGER */ - -3, /* (453) tags_literal ::= NK_INTEGER NK_PLUS duration_literal */ - -3, /* (454) tags_literal ::= NK_INTEGER NK_MINUS duration_literal */ - -2, /* (455) tags_literal ::= NK_PLUS NK_INTEGER */ - -4, /* (456) tags_literal ::= NK_PLUS NK_INTEGER NK_PLUS duration_literal */ - -4, /* (457) tags_literal ::= NK_PLUS NK_INTEGER NK_MINUS duration_literal */ - -2, /* (458) tags_literal ::= NK_MINUS NK_INTEGER */ - -4, /* (459) tags_literal ::= NK_MINUS NK_INTEGER NK_PLUS duration_literal */ - -4, /* (460) tags_literal ::= NK_MINUS NK_INTEGER NK_MINUS duration_literal */ - -1, /* (461) tags_literal ::= NK_FLOAT */ - -2, /* (462) tags_literal ::= NK_PLUS NK_FLOAT */ - -2, /* (463) tags_literal ::= NK_MINUS NK_FLOAT */ - -1, /* (464) tags_literal ::= NK_BIN */ - -3, /* (465) tags_literal ::= NK_BIN NK_PLUS duration_literal */ - -3, /* (466) tags_literal ::= NK_BIN NK_MINUS duration_literal */ - -2, /* (467) tags_literal ::= NK_PLUS NK_BIN */ - -4, /* (468) tags_literal ::= NK_PLUS NK_BIN NK_PLUS duration_literal */ - -4, /* (469) tags_literal ::= NK_PLUS NK_BIN NK_MINUS duration_literal */ - -2, /* (470) tags_literal ::= NK_MINUS NK_BIN */ - -4, /* (471) tags_literal ::= NK_MINUS NK_BIN NK_PLUS duration_literal */ - -4, /* (472) tags_literal ::= NK_MINUS NK_BIN NK_MINUS duration_literal */ - -1, /* (473) tags_literal ::= NK_HEX */ - -3, /* (474) tags_literal ::= NK_HEX NK_PLUS duration_literal */ - -3, /* (475) tags_literal ::= NK_HEX NK_MINUS duration_literal */ - -2, /* (476) tags_literal ::= NK_PLUS NK_HEX */ - -4, /* (477) tags_literal ::= NK_PLUS NK_HEX NK_PLUS duration_literal */ - -4, /* (478) tags_literal ::= NK_PLUS NK_HEX NK_MINUS duration_literal */ - -2, /* (479) tags_literal ::= NK_MINUS NK_HEX */ - -4, /* (480) tags_literal ::= NK_MINUS NK_HEX NK_PLUS duration_literal */ - -4, /* (481) tags_literal ::= NK_MINUS NK_HEX NK_MINUS duration_literal */ - -1, /* (482) tags_literal ::= NK_STRING */ - -3, /* (483) tags_literal ::= NK_STRING NK_PLUS duration_literal */ - -3, /* (484) tags_literal ::= NK_STRING NK_MINUS duration_literal */ - -1, /* (485) tags_literal ::= NK_BOOL */ - -1, /* (486) tags_literal ::= NULL */ - -1, /* (487) tags_literal ::= literal_func */ - -3, /* (488) tags_literal ::= literal_func NK_PLUS duration_literal */ - -3, /* (489) tags_literal ::= literal_func NK_MINUS duration_literal */ - -1, /* (490) tags_literal_list ::= tags_literal */ - -3, /* (491) tags_literal_list ::= tags_literal_list NK_COMMA tags_literal */ - -1, /* (492) literal ::= NK_INTEGER */ - -1, /* (493) literal ::= NK_FLOAT */ - -1, /* (494) literal ::= NK_STRING */ - -1, /* (495) literal ::= NK_BOOL */ - -2, /* (496) literal ::= TIMESTAMP NK_STRING */ - -1, /* (497) literal ::= duration_literal */ - -1, /* (498) literal ::= NULL */ - -1, /* (499) literal ::= NK_QUESTION */ - -1, /* (500) duration_literal ::= NK_VARIABLE */ - -1, /* (501) signed ::= NK_INTEGER */ - -2, /* (502) signed ::= NK_PLUS NK_INTEGER */ - -2, /* (503) signed ::= NK_MINUS NK_INTEGER */ - -1, /* (504) signed ::= NK_FLOAT */ - -2, /* (505) signed ::= NK_PLUS NK_FLOAT */ - -2, /* (506) signed ::= NK_MINUS NK_FLOAT */ - -1, /* (507) signed_literal ::= signed */ - -1, /* (508) signed_literal ::= NK_STRING */ - -1, /* (509) signed_literal ::= NK_BOOL */ - -2, /* (510) signed_literal ::= TIMESTAMP NK_STRING */ - -1, /* (511) signed_literal ::= duration_literal */ - -1, /* (512) signed_literal ::= NULL */ - -1, /* (513) signed_literal ::= literal_func */ - -1, /* (514) signed_literal ::= NK_QUESTION */ - -1, /* (515) literal_list ::= signed_literal */ - -3, /* (516) literal_list ::= literal_list NK_COMMA signed_literal */ - -1, /* (517) db_name ::= NK_ID */ - -1, /* (518) table_name ::= NK_ID */ - -1, /* (519) column_name ::= NK_ID */ - -1, /* (520) function_name ::= NK_ID */ - -1, /* (521) view_name ::= NK_ID */ - -1, /* (522) table_alias ::= NK_ID */ - -1, /* (523) column_alias ::= NK_ID */ - -1, /* (524) column_alias ::= NK_ALIAS */ - -1, /* (525) user_name ::= NK_ID */ - -1, /* (526) topic_name ::= NK_ID */ - -1, /* (527) stream_name ::= NK_ID */ - -1, /* (528) cgroup_name ::= NK_ID */ - -1, /* (529) index_name ::= NK_ID */ - -1, /* (530) tsma_name ::= NK_ID */ - -1, /* (531) expr_or_subquery ::= expression */ - -1, /* (532) expression ::= literal */ - -1, /* (533) expression ::= pseudo_column */ - -1, /* (534) expression ::= column_reference */ - -1, /* (535) expression ::= function_expression */ - -1, /* (536) expression ::= case_when_expression */ - -3, /* (537) expression ::= NK_LP expression NK_RP */ - -2, /* (538) expression ::= NK_PLUS expr_or_subquery */ - -2, /* (539) expression ::= NK_MINUS expr_or_subquery */ - -3, /* (540) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ - -3, /* (541) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ - -3, /* (542) expression ::= expr_or_subquery NK_STAR expr_or_subquery */ - -3, /* (543) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ - -3, /* (544) expression ::= expr_or_subquery NK_REM expr_or_subquery */ - -3, /* (545) expression ::= column_reference NK_ARROW NK_STRING */ - -3, /* (546) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ - -3, /* (547) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ - -1, /* (548) expression_list ::= expr_or_subquery */ - -3, /* (549) expression_list ::= expression_list NK_COMMA expr_or_subquery */ - -1, /* (550) column_reference ::= column_name */ - -3, /* (551) column_reference ::= table_name NK_DOT column_name */ - -1, /* (552) column_reference ::= NK_ALIAS */ - -3, /* (553) column_reference ::= table_name NK_DOT NK_ALIAS */ - -1, /* (554) pseudo_column ::= ROWTS */ - -1, /* (555) pseudo_column ::= TBNAME */ - -3, /* (556) pseudo_column ::= table_name NK_DOT TBNAME */ - -1, /* (557) pseudo_column ::= QSTART */ - -1, /* (558) pseudo_column ::= QEND */ - -1, /* (559) pseudo_column ::= QDURATION */ - -1, /* (560) pseudo_column ::= WSTART */ - -1, /* (561) pseudo_column ::= WEND */ - -1, /* (562) pseudo_column ::= WDURATION */ - -1, /* (563) pseudo_column ::= IROWTS */ - -1, /* (564) pseudo_column ::= ISFILLED */ - -1, /* (565) pseudo_column ::= QTAGS */ - -4, /* (566) function_expression ::= function_name NK_LP expression_list NK_RP */ - -4, /* (567) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ - -6, /* (568) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ - -6, /* (569) function_expression ::= CAST NK_LP expr_or_subquery AS type_name_default_len NK_RP */ - -6, /* (570) function_expression ::= POSITION NK_LP expr_or_subquery IN expr_or_subquery NK_RP */ - -4, /* (571) function_expression ::= TRIM NK_LP expr_or_subquery NK_RP */ - -6, /* (572) function_expression ::= TRIM NK_LP trim_specification_type FROM expr_or_subquery NK_RP */ - -6, /* (573) function_expression ::= TRIM NK_LP expr_or_subquery FROM expr_or_subquery NK_RP */ - -7, /* (574) function_expression ::= TRIM NK_LP trim_specification_type expr_or_subquery FROM expr_or_subquery NK_RP */ - -4, /* (575) function_expression ::= substr_func NK_LP expression_list NK_RP */ - -6, /* (576) function_expression ::= substr_func NK_LP expr_or_subquery FROM expr_or_subquery NK_RP */ - -8, /* (577) function_expression ::= substr_func NK_LP expr_or_subquery FROM expr_or_subquery FOR expr_or_subquery NK_RP */ - -4, /* (578) function_expression ::= REPLACE NK_LP expression_list NK_RP */ - -1, /* (579) function_expression ::= literal_func */ - -1, /* (580) function_expression ::= rand_func */ - -3, /* (581) literal_func ::= noarg_func NK_LP NK_RP */ - -1, /* (582) literal_func ::= NOW */ - -1, /* (583) literal_func ::= TODAY */ - -3, /* (584) rand_func ::= RAND NK_LP NK_RP */ - -4, /* (585) rand_func ::= RAND NK_LP expression_list NK_RP */ - -1, /* (586) substr_func ::= SUBSTR */ - -1, /* (587) substr_func ::= SUBSTRING */ - -1, /* (588) trim_specification_type ::= BOTH */ - -1, /* (589) trim_specification_type ::= TRAILING */ - -1, /* (590) trim_specification_type ::= LEADING */ - -1, /* (591) noarg_func ::= NOW */ - -1, /* (592) noarg_func ::= TODAY */ - -1, /* (593) noarg_func ::= TIMEZONE */ - -1, /* (594) noarg_func ::= DATABASE */ - -1, /* (595) noarg_func ::= CLIENT_VERSION */ - -1, /* (596) noarg_func ::= SERVER_VERSION */ - -1, /* (597) noarg_func ::= SERVER_STATUS */ - -1, /* (598) noarg_func ::= CURRENT_USER */ - -1, /* (599) noarg_func ::= USER */ - -1, /* (600) noarg_func ::= PI */ - -1, /* (601) star_func ::= COUNT */ - -1, /* (602) star_func ::= FIRST */ - -1, /* (603) star_func ::= LAST */ - -1, /* (604) star_func ::= LAST_ROW */ - -1, /* (605) star_func_para_list ::= NK_STAR */ - -1, /* (606) star_func_para_list ::= other_para_list */ - -1, /* (607) other_para_list ::= star_func_para */ - -3, /* (608) other_para_list ::= other_para_list NK_COMMA star_func_para */ - -1, /* (609) star_func_para ::= expr_or_subquery */ - -3, /* (610) star_func_para ::= table_name NK_DOT NK_STAR */ - -4, /* (611) case_when_expression ::= CASE when_then_list case_when_else_opt END */ - -5, /* (612) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ - -1, /* (613) when_then_list ::= when_then_expr */ - -2, /* (614) when_then_list ::= when_then_list when_then_expr */ - -4, /* (615) when_then_expr ::= WHEN common_expression THEN common_expression */ - 0, /* (616) case_when_else_opt ::= */ - -2, /* (617) case_when_else_opt ::= ELSE common_expression */ - -3, /* (618) predicate ::= expr_or_subquery compare_op expr_or_subquery */ - -5, /* (619) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ - -6, /* (620) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ - -3, /* (621) predicate ::= expr_or_subquery IS NULL */ - -4, /* (622) predicate ::= expr_or_subquery IS NOT NULL */ - -3, /* (623) predicate ::= expr_or_subquery in_op in_predicate_value */ - -1, /* (624) compare_op ::= NK_LT */ - -1, /* (625) compare_op ::= NK_GT */ - -1, /* (626) compare_op ::= NK_LE */ - -1, /* (627) compare_op ::= NK_GE */ - -1, /* (628) compare_op ::= NK_NE */ - -1, /* (629) compare_op ::= NK_EQ */ - -1, /* (630) compare_op ::= LIKE */ - -2, /* (631) compare_op ::= NOT LIKE */ - -1, /* (632) compare_op ::= MATCH */ - -1, /* (633) compare_op ::= NMATCH */ - -1, /* (634) compare_op ::= CONTAINS */ - -1, /* (635) in_op ::= IN */ - -2, /* (636) in_op ::= NOT IN */ - -3, /* (637) in_predicate_value ::= NK_LP literal_list NK_RP */ - -1, /* (638) boolean_value_expression ::= boolean_primary */ - -2, /* (639) boolean_value_expression ::= NOT boolean_primary */ - -3, /* (640) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ - -3, /* (641) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ - -1, /* (642) boolean_primary ::= predicate */ - -3, /* (643) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ - -1, /* (644) common_expression ::= expr_or_subquery */ - -1, /* (645) common_expression ::= boolean_value_expression */ - 0, /* (646) from_clause_opt ::= */ - -2, /* (647) from_clause_opt ::= FROM table_reference_list */ - -1, /* (648) table_reference_list ::= table_reference */ - -3, /* (649) table_reference_list ::= table_reference_list NK_COMMA table_reference */ - -1, /* (650) table_reference ::= table_primary */ - -1, /* (651) table_reference ::= joined_table */ - -2, /* (652) table_primary ::= table_name alias_opt */ - -4, /* (653) table_primary ::= db_name NK_DOT table_name alias_opt */ - -2, /* (654) table_primary ::= subquery alias_opt */ - -1, /* (655) table_primary ::= parenthesized_joined_table */ - 0, /* (656) alias_opt ::= */ - -1, /* (657) alias_opt ::= table_alias */ - -2, /* (658) alias_opt ::= AS table_alias */ - -3, /* (659) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - -3, /* (660) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ - -8, /* (661) joined_table ::= table_reference join_type join_subtype JOIN table_reference join_on_clause_opt window_offset_clause_opt jlimit_clause_opt */ - 0, /* (662) join_type ::= */ - -1, /* (663) join_type ::= INNER */ - -1, /* (664) join_type ::= LEFT */ - -1, /* (665) join_type ::= RIGHT */ - -1, /* (666) join_type ::= FULL */ - 0, /* (667) join_subtype ::= */ - -1, /* (668) join_subtype ::= OUTER */ - -1, /* (669) join_subtype ::= SEMI */ - -1, /* (670) join_subtype ::= ANTI */ - -1, /* (671) join_subtype ::= ASOF */ - -1, /* (672) join_subtype ::= WINDOW */ - 0, /* (673) join_on_clause_opt ::= */ - -2, /* (674) join_on_clause_opt ::= ON search_condition */ - 0, /* (675) window_offset_clause_opt ::= */ - -6, /* (676) window_offset_clause_opt ::= WINDOW_OFFSET NK_LP window_offset_literal NK_COMMA window_offset_literal NK_RP */ - -1, /* (677) window_offset_literal ::= NK_VARIABLE */ - -2, /* (678) window_offset_literal ::= NK_MINUS NK_VARIABLE */ - 0, /* (679) jlimit_clause_opt ::= */ - -2, /* (680) jlimit_clause_opt ::= JLIMIT NK_INTEGER */ - -14, /* (681) 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, /* (682) hint_list ::= */ - -1, /* (683) hint_list ::= NK_HINT */ - 0, /* (684) tag_mode_opt ::= */ - -1, /* (685) tag_mode_opt ::= TAGS */ - 0, /* (686) set_quantifier_opt ::= */ - -1, /* (687) set_quantifier_opt ::= DISTINCT */ - -1, /* (688) set_quantifier_opt ::= ALL */ - -1, /* (689) select_list ::= select_item */ - -3, /* (690) select_list ::= select_list NK_COMMA select_item */ - -1, /* (691) select_item ::= NK_STAR */ - -1, /* (692) select_item ::= common_expression */ - -2, /* (693) select_item ::= common_expression column_alias */ - -3, /* (694) select_item ::= common_expression AS column_alias */ - -3, /* (695) select_item ::= table_name NK_DOT NK_STAR */ - 0, /* (696) where_clause_opt ::= */ - -2, /* (697) where_clause_opt ::= WHERE search_condition */ - 0, /* (698) partition_by_clause_opt ::= */ - -3, /* (699) partition_by_clause_opt ::= PARTITION BY partition_list */ - -1, /* (700) partition_list ::= partition_item */ - -3, /* (701) partition_list ::= partition_list NK_COMMA partition_item */ - -1, /* (702) partition_item ::= expr_or_subquery */ - -2, /* (703) partition_item ::= expr_or_subquery column_alias */ - -3, /* (704) partition_item ::= expr_or_subquery AS column_alias */ - 0, /* (705) twindow_clause_opt ::= */ - -6, /* (706) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP */ - -4, /* (707) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ - -6, /* (708) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ - -8, /* (709) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ - -7, /* (710) twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ - -4, /* (711) twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP */ - -6, /* (712) twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ - 0, /* (713) sliding_opt ::= */ - -4, /* (714) sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ - -1, /* (715) interval_sliding_duration_literal ::= NK_VARIABLE */ - -1, /* (716) interval_sliding_duration_literal ::= NK_STRING */ - -1, /* (717) interval_sliding_duration_literal ::= NK_INTEGER */ - 0, /* (718) fill_opt ::= */ - -4, /* (719) fill_opt ::= FILL NK_LP fill_mode NK_RP */ - -6, /* (720) fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ - -6, /* (721) fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ - -1, /* (722) fill_mode ::= NONE */ - -1, /* (723) fill_mode ::= PREV */ - -1, /* (724) fill_mode ::= NULL */ - -1, /* (725) fill_mode ::= NULL_F */ - -1, /* (726) fill_mode ::= LINEAR */ - -1, /* (727) fill_mode ::= NEXT */ - 0, /* (728) group_by_clause_opt ::= */ - -3, /* (729) group_by_clause_opt ::= GROUP BY group_by_list */ - -1, /* (730) group_by_list ::= expr_or_subquery */ - -3, /* (731) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ - 0, /* (732) having_clause_opt ::= */ - -2, /* (733) having_clause_opt ::= HAVING search_condition */ - 0, /* (734) range_opt ::= */ - -6, /* (735) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ - -4, /* (736) range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ - 0, /* (737) every_opt ::= */ - -4, /* (738) every_opt ::= EVERY NK_LP duration_literal NK_RP */ - -4, /* (739) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ - -1, /* (740) query_simple ::= query_specification */ - -1, /* (741) query_simple ::= union_query_expression */ - -4, /* (742) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ - -3, /* (743) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ - -1, /* (744) query_simple_or_subquery ::= query_simple */ - -1, /* (745) query_simple_or_subquery ::= subquery */ - -1, /* (746) query_or_subquery ::= query_expression */ - -1, /* (747) query_or_subquery ::= subquery */ - 0, /* (748) order_by_clause_opt ::= */ - -3, /* (749) order_by_clause_opt ::= ORDER BY sort_specification_list */ - 0, /* (750) slimit_clause_opt ::= */ - -2, /* (751) slimit_clause_opt ::= SLIMIT NK_INTEGER */ - -4, /* (752) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - -4, /* (753) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - 0, /* (754) limit_clause_opt ::= */ - -2, /* (755) limit_clause_opt ::= LIMIT NK_INTEGER */ - -4, /* (756) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ - -4, /* (757) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - -3, /* (758) subquery ::= NK_LP query_expression NK_RP */ - -3, /* (759) subquery ::= NK_LP subquery NK_RP */ - -1, /* (760) search_condition ::= common_expression */ - -1, /* (761) sort_specification_list ::= sort_specification */ - -3, /* (762) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ - -3, /* (763) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ - 0, /* (764) ordering_specification_opt ::= */ - -1, /* (765) ordering_specification_opt ::= ASC */ - -1, /* (766) ordering_specification_opt ::= DESC */ - 0, /* (767) null_ordering_opt ::= */ - -2, /* (768) null_ordering_opt ::= NULLS FIRST */ - -2, /* (769) null_ordering_opt ::= NULLS LAST */ - 0, /* (770) column_options ::= */ - -3, /* (771) column_options ::= column_options PRIMARY KEY */ - -3, /* (772) column_options ::= column_options NK_ID NK_STRING */ + -3, /* (60) cmd ::= CREATE ANODE NK_STRING */ + -3, /* (61) cmd ::= UPDATE ANODE NK_INTEGER */ + -3, /* (62) cmd ::= UPDATE ALL ANODES */ + -3, /* (63) cmd ::= DROP ANODE NK_INTEGER */ + -3, /* (64) cmd ::= CREATE DNODE dnode_endpoint */ + -5, /* (65) cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */ + -4, /* (66) cmd ::= DROP DNODE NK_INTEGER force_opt */ + -4, /* (67) cmd ::= DROP DNODE dnode_endpoint force_opt */ + -4, /* (68) cmd ::= DROP DNODE NK_INTEGER unsafe_opt */ + -4, /* (69) cmd ::= DROP DNODE dnode_endpoint unsafe_opt */ + -4, /* (70) cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ + -5, /* (71) cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ + -4, /* (72) cmd ::= ALTER ALL DNODES NK_STRING */ + -5, /* (73) cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ + -3, /* (74) cmd ::= RESTORE DNODE NK_INTEGER */ + -1, /* (75) dnode_endpoint ::= NK_STRING */ + -1, /* (76) dnode_endpoint ::= NK_ID */ + -1, /* (77) dnode_endpoint ::= NK_IPTOKEN */ + 0, /* (78) force_opt ::= */ + -1, /* (79) force_opt ::= FORCE */ + -1, /* (80) unsafe_opt ::= UNSAFE */ + -3, /* (81) cmd ::= ALTER CLUSTER NK_STRING */ + -4, /* (82) cmd ::= ALTER CLUSTER NK_STRING NK_STRING */ + -3, /* (83) cmd ::= ALTER LOCAL NK_STRING */ + -4, /* (84) cmd ::= ALTER LOCAL NK_STRING NK_STRING */ + -5, /* (85) cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ + -5, /* (86) cmd ::= DROP QNODE ON DNODE NK_INTEGER */ + -5, /* (87) cmd ::= RESTORE QNODE ON DNODE NK_INTEGER */ + -5, /* (88) cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ + -5, /* (89) cmd ::= DROP BNODE ON DNODE NK_INTEGER */ + -5, /* (90) cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ + -5, /* (91) cmd ::= DROP SNODE ON DNODE NK_INTEGER */ + -5, /* (92) cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ + -5, /* (93) cmd ::= DROP MNODE ON DNODE NK_INTEGER */ + -5, /* (94) cmd ::= RESTORE MNODE ON DNODE NK_INTEGER */ + -5, /* (95) cmd ::= RESTORE VNODE ON DNODE NK_INTEGER */ + -5, /* (96) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ + -4, /* (97) cmd ::= DROP DATABASE exists_opt db_name */ + -2, /* (98) cmd ::= USE db_name */ + -4, /* (99) cmd ::= ALTER DATABASE db_name alter_db_options */ + -3, /* (100) cmd ::= FLUSH DATABASE db_name */ + -4, /* (101) cmd ::= TRIM DATABASE db_name speed_opt */ + -3, /* (102) cmd ::= S3MIGRATE DATABASE db_name */ + -5, /* (103) cmd ::= COMPACT DATABASE db_name start_opt end_opt */ + -3, /* (104) not_exists_opt ::= IF NOT EXISTS */ + 0, /* (105) not_exists_opt ::= */ + -2, /* (106) exists_opt ::= IF EXISTS */ + 0, /* (107) exists_opt ::= */ + 0, /* (108) db_options ::= */ + -3, /* (109) db_options ::= db_options BUFFER NK_INTEGER */ + -3, /* (110) db_options ::= db_options CACHEMODEL NK_STRING */ + -3, /* (111) db_options ::= db_options CACHESIZE NK_INTEGER */ + -3, /* (112) db_options ::= db_options COMP NK_INTEGER */ + -3, /* (113) db_options ::= db_options DURATION NK_INTEGER */ + -3, /* (114) db_options ::= db_options DURATION NK_VARIABLE */ + -3, /* (115) db_options ::= db_options MAXROWS NK_INTEGER */ + -3, /* (116) db_options ::= db_options MINROWS NK_INTEGER */ + -3, /* (117) db_options ::= db_options KEEP integer_list */ + -3, /* (118) db_options ::= db_options KEEP variable_list */ + -3, /* (119) db_options ::= db_options PAGES NK_INTEGER */ + -3, /* (120) db_options ::= db_options PAGESIZE NK_INTEGER */ + -3, /* (121) db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ + -3, /* (122) db_options ::= db_options PRECISION NK_STRING */ + -3, /* (123) db_options ::= db_options REPLICA NK_INTEGER */ + -3, /* (124) db_options ::= db_options VGROUPS NK_INTEGER */ + -3, /* (125) db_options ::= db_options SINGLE_STABLE NK_INTEGER */ + -3, /* (126) db_options ::= db_options RETENTIONS retention_list */ + -3, /* (127) db_options ::= db_options SCHEMALESS NK_INTEGER */ + -3, /* (128) db_options ::= db_options WAL_LEVEL NK_INTEGER */ + -3, /* (129) db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ + -3, /* (130) db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ + -4, /* (131) db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ + -3, /* (132) db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ + -4, /* (133) db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ + -3, /* (134) db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ + -3, /* (135) db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ + -3, /* (136) db_options ::= db_options STT_TRIGGER NK_INTEGER */ + -3, /* (137) db_options ::= db_options TABLE_PREFIX signed */ + -3, /* (138) db_options ::= db_options TABLE_SUFFIX signed */ + -3, /* (139) db_options ::= db_options S3_CHUNKSIZE NK_INTEGER */ + -3, /* (140) db_options ::= db_options S3_KEEPLOCAL NK_INTEGER */ + -3, /* (141) db_options ::= db_options S3_KEEPLOCAL NK_VARIABLE */ + -3, /* (142) db_options ::= db_options S3_COMPACT NK_INTEGER */ + -3, /* (143) db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER */ + -3, /* (144) db_options ::= db_options ENCRYPT_ALGORITHM NK_STRING */ + -1, /* (145) alter_db_options ::= alter_db_option */ + -2, /* (146) alter_db_options ::= alter_db_options alter_db_option */ + -2, /* (147) alter_db_option ::= BUFFER NK_INTEGER */ + -2, /* (148) alter_db_option ::= CACHEMODEL NK_STRING */ + -2, /* (149) alter_db_option ::= CACHESIZE NK_INTEGER */ + -2, /* (150) alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ + -2, /* (151) alter_db_option ::= KEEP integer_list */ + -2, /* (152) alter_db_option ::= KEEP variable_list */ + -2, /* (153) alter_db_option ::= PAGES NK_INTEGER */ + -2, /* (154) alter_db_option ::= REPLICA NK_INTEGER */ + -2, /* (155) alter_db_option ::= WAL_LEVEL NK_INTEGER */ + -2, /* (156) alter_db_option ::= STT_TRIGGER NK_INTEGER */ + -2, /* (157) alter_db_option ::= MINROWS NK_INTEGER */ + -2, /* (158) alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER */ + -3, /* (159) alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ + -2, /* (160) alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER */ + -3, /* (161) alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ + -2, /* (162) alter_db_option ::= S3_KEEPLOCAL NK_INTEGER */ + -2, /* (163) alter_db_option ::= S3_KEEPLOCAL NK_VARIABLE */ + -2, /* (164) alter_db_option ::= S3_COMPACT NK_INTEGER */ + -2, /* (165) alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER */ + -2, /* (166) alter_db_option ::= ENCRYPT_ALGORITHM NK_STRING */ + -1, /* (167) integer_list ::= NK_INTEGER */ + -3, /* (168) integer_list ::= integer_list NK_COMMA NK_INTEGER */ + -1, /* (169) variable_list ::= NK_VARIABLE */ + -3, /* (170) variable_list ::= variable_list NK_COMMA NK_VARIABLE */ + -1, /* (171) retention_list ::= retention */ + -3, /* (172) retention_list ::= retention_list NK_COMMA retention */ + -3, /* (173) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ + -3, /* (174) retention ::= NK_MINUS NK_COLON NK_VARIABLE */ + 0, /* (175) speed_opt ::= */ + -2, /* (176) speed_opt ::= BWLIMIT NK_INTEGER */ + 0, /* (177) start_opt ::= */ + -3, /* (178) start_opt ::= START WITH NK_INTEGER */ + -3, /* (179) start_opt ::= START WITH NK_STRING */ + -4, /* (180) start_opt ::= START WITH TIMESTAMP NK_STRING */ + 0, /* (181) end_opt ::= */ + -3, /* (182) end_opt ::= END WITH NK_INTEGER */ + -3, /* (183) end_opt ::= END WITH NK_STRING */ + -4, /* (184) end_opt ::= END WITH TIMESTAMP NK_STRING */ + -9, /* (185) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ + -3, /* (186) cmd ::= CREATE TABLE multi_create_clause */ + -10, /* (187) cmd ::= CREATE TABLE not_exists_opt USING full_table_name NK_LP tag_list_opt NK_RP FILE NK_STRING */ + -9, /* (188) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ + -4, /* (189) cmd ::= DROP TABLE with_opt multi_drop_clause */ + -5, /* (190) cmd ::= DROP STABLE with_opt exists_opt full_table_name */ + -3, /* (191) cmd ::= ALTER TABLE alter_table_clause */ + -3, /* (192) cmd ::= ALTER STABLE alter_table_clause */ + -2, /* (193) alter_table_clause ::= full_table_name alter_table_options */ + -6, /* (194) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name column_options */ + -4, /* (195) alter_table_clause ::= full_table_name DROP COLUMN column_name */ + -5, /* (196) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ + -5, /* (197) alter_table_clause ::= full_table_name MODIFY COLUMN column_name column_options */ + -5, /* (198) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ + -5, /* (199) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ + -4, /* (200) alter_table_clause ::= full_table_name DROP TAG column_name */ + -5, /* (201) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ + -5, /* (202) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ + -6, /* (203) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ tags_literal */ + -1, /* (204) multi_create_clause ::= create_subtable_clause */ + -2, /* (205) multi_create_clause ::= multi_create_clause create_subtable_clause */ + -10, /* (206) create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP tags_literal_list NK_RP table_options */ + -1, /* (207) multi_drop_clause ::= drop_table_clause */ + -3, /* (208) multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */ + -2, /* (209) drop_table_clause ::= exists_opt full_table_name */ + 0, /* (210) with_opt ::= */ + -1, /* (211) with_opt ::= WITH */ + 0, /* (212) specific_cols_opt ::= */ + -3, /* (213) specific_cols_opt ::= NK_LP col_name_list NK_RP */ + -1, /* (214) full_table_name ::= table_name */ + -3, /* (215) full_table_name ::= db_name NK_DOT table_name */ + -1, /* (216) tag_def_list ::= tag_def */ + -3, /* (217) tag_def_list ::= tag_def_list NK_COMMA tag_def */ + -2, /* (218) tag_def ::= column_name type_name */ + -1, /* (219) column_def_list ::= column_def */ + -3, /* (220) column_def_list ::= column_def_list NK_COMMA column_def */ + -3, /* (221) column_def ::= column_name type_name column_options */ + -1, /* (222) type_name ::= BOOL */ + -1, /* (223) type_name ::= TINYINT */ + -1, /* (224) type_name ::= SMALLINT */ + -1, /* (225) type_name ::= INT */ + -1, /* (226) type_name ::= INTEGER */ + -1, /* (227) type_name ::= BIGINT */ + -1, /* (228) type_name ::= FLOAT */ + -1, /* (229) type_name ::= DOUBLE */ + -4, /* (230) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ + -1, /* (231) type_name ::= TIMESTAMP */ + -4, /* (232) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ + -2, /* (233) type_name ::= TINYINT UNSIGNED */ + -2, /* (234) type_name ::= SMALLINT UNSIGNED */ + -2, /* (235) type_name ::= INT UNSIGNED */ + -2, /* (236) type_name ::= BIGINT UNSIGNED */ + -1, /* (237) type_name ::= JSON */ + -4, /* (238) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ + -1, /* (239) type_name ::= MEDIUMBLOB */ + -1, /* (240) type_name ::= BLOB */ + -4, /* (241) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ + -4, /* (242) type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP */ + -1, /* (243) type_name ::= DECIMAL */ + -4, /* (244) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ + -6, /* (245) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ + -1, /* (246) type_name_default_len ::= BINARY */ + -1, /* (247) type_name_default_len ::= NCHAR */ + -1, /* (248) type_name_default_len ::= VARCHAR */ + -1, /* (249) type_name_default_len ::= VARBINARY */ + 0, /* (250) tags_def_opt ::= */ + -1, /* (251) tags_def_opt ::= tags_def */ + -4, /* (252) tags_def ::= TAGS NK_LP tag_def_list NK_RP */ + 0, /* (253) table_options ::= */ + -3, /* (254) table_options ::= table_options COMMENT NK_STRING */ + -3, /* (255) table_options ::= table_options MAX_DELAY duration_list */ + -3, /* (256) table_options ::= table_options WATERMARK duration_list */ + -5, /* (257) table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ + -3, /* (258) table_options ::= table_options TTL NK_INTEGER */ + -5, /* (259) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ + -3, /* (260) table_options ::= table_options DELETE_MARK duration_list */ + -1, /* (261) alter_table_options ::= alter_table_option */ + -2, /* (262) alter_table_options ::= alter_table_options alter_table_option */ + -2, /* (263) alter_table_option ::= COMMENT NK_STRING */ + -2, /* (264) alter_table_option ::= TTL NK_INTEGER */ + -1, /* (265) duration_list ::= duration_literal */ + -3, /* (266) duration_list ::= duration_list NK_COMMA duration_literal */ + -1, /* (267) rollup_func_list ::= rollup_func_name */ + -3, /* (268) rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ + -1, /* (269) rollup_func_name ::= function_name */ + -1, /* (270) rollup_func_name ::= FIRST */ + -1, /* (271) rollup_func_name ::= LAST */ + -1, /* (272) col_name_list ::= col_name */ + -3, /* (273) col_name_list ::= col_name_list NK_COMMA col_name */ + -1, /* (274) col_name ::= column_name */ + -2, /* (275) cmd ::= SHOW DNODES */ + -2, /* (276) cmd ::= SHOW USERS */ + -3, /* (277) cmd ::= SHOW USERS FULL */ + -3, /* (278) cmd ::= SHOW USER PRIVILEGES */ + -3, /* (279) cmd ::= SHOW db_kind_opt DATABASES */ + -4, /* (280) cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt */ + -4, /* (281) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ + -3, /* (282) cmd ::= SHOW db_name_cond_opt VGROUPS */ + -2, /* (283) cmd ::= SHOW MNODES */ + -2, /* (284) cmd ::= SHOW QNODES */ + -2, /* (285) cmd ::= SHOW ANODES */ + -3, /* (286) cmd ::= SHOW ANODES FULL */ + -2, /* (287) cmd ::= SHOW ARBGROUPS */ + -2, /* (288) cmd ::= SHOW FUNCTIONS */ + -5, /* (289) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ + -6, /* (290) cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name */ + -2, /* (291) cmd ::= SHOW STREAMS */ + -2, /* (292) cmd ::= SHOW ACCOUNTS */ + -2, /* (293) cmd ::= SHOW APPS */ + -2, /* (294) cmd ::= SHOW CONNECTIONS */ + -2, /* (295) cmd ::= SHOW LICENCES */ + -2, /* (296) cmd ::= SHOW GRANTS */ + -3, /* (297) cmd ::= SHOW GRANTS FULL */ + -3, /* (298) cmd ::= SHOW GRANTS LOGS */ + -3, /* (299) cmd ::= SHOW CLUSTER MACHINES */ + -4, /* (300) cmd ::= SHOW CREATE DATABASE db_name */ + -4, /* (301) cmd ::= SHOW CREATE TABLE full_table_name */ + -4, /* (302) cmd ::= SHOW CREATE STABLE full_table_name */ + -2, /* (303) cmd ::= SHOW ENCRYPTIONS */ + -2, /* (304) cmd ::= SHOW QUERIES */ + -2, /* (305) cmd ::= SHOW SCORES */ + -2, /* (306) cmd ::= SHOW TOPICS */ + -2, /* (307) cmd ::= SHOW VARIABLES */ + -3, /* (308) cmd ::= SHOW CLUSTER VARIABLES */ + -3, /* (309) cmd ::= SHOW LOCAL VARIABLES */ + -5, /* (310) cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ + -2, /* (311) cmd ::= SHOW BNODES */ + -2, /* (312) cmd ::= SHOW SNODES */ + -2, /* (313) cmd ::= SHOW CLUSTER */ + -2, /* (314) cmd ::= SHOW TRANSACTIONS */ + -4, /* (315) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ + -2, /* (316) cmd ::= SHOW CONSUMERS */ + -2, /* (317) cmd ::= SHOW SUBSCRIPTIONS */ + -5, /* (318) cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ + -6, /* (319) cmd ::= SHOW TAGS FROM db_name NK_DOT table_name */ + -7, /* (320) cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ + -8, /* (321) cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name */ + -5, /* (322) cmd ::= SHOW VNODES ON DNODE NK_INTEGER */ + -2, /* (323) cmd ::= SHOW VNODES */ + -3, /* (324) cmd ::= SHOW db_name_cond_opt ALIVE */ + -3, /* (325) cmd ::= SHOW CLUSTER ALIVE */ + -4, /* (326) cmd ::= SHOW db_name_cond_opt VIEWS like_pattern_opt */ + -4, /* (327) cmd ::= SHOW CREATE VIEW full_table_name */ + -2, /* (328) cmd ::= SHOW COMPACTS */ + -3, /* (329) cmd ::= SHOW COMPACT NK_INTEGER */ + 0, /* (330) table_kind_db_name_cond_opt ::= */ + -1, /* (331) table_kind_db_name_cond_opt ::= table_kind */ + -2, /* (332) table_kind_db_name_cond_opt ::= db_name NK_DOT */ + -3, /* (333) table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT */ + -1, /* (334) table_kind ::= NORMAL */ + -1, /* (335) table_kind ::= CHILD */ + 0, /* (336) db_name_cond_opt ::= */ + -2, /* (337) db_name_cond_opt ::= db_name NK_DOT */ + 0, /* (338) like_pattern_opt ::= */ + -2, /* (339) like_pattern_opt ::= LIKE NK_STRING */ + -1, /* (340) table_name_cond ::= table_name */ + 0, /* (341) from_db_opt ::= */ + -2, /* (342) from_db_opt ::= FROM db_name */ + 0, /* (343) tag_list_opt ::= */ + -1, /* (344) tag_list_opt ::= tag_item */ + -3, /* (345) tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ + -1, /* (346) tag_item ::= TBNAME */ + -1, /* (347) tag_item ::= QTAGS */ + -1, /* (348) tag_item ::= column_name */ + -2, /* (349) tag_item ::= column_name column_alias */ + -3, /* (350) tag_item ::= column_name AS column_alias */ + 0, /* (351) db_kind_opt ::= */ + -1, /* (352) db_kind_opt ::= USER */ + -1, /* (353) db_kind_opt ::= SYSTEM */ + -11, /* (354) cmd ::= CREATE TSMA not_exists_opt tsma_name ON full_table_name tsma_func_list INTERVAL NK_LP duration_literal NK_RP */ + -11, /* (355) cmd ::= CREATE RECURSIVE TSMA not_exists_opt tsma_name ON full_table_name INTERVAL NK_LP duration_literal NK_RP */ + -4, /* (356) cmd ::= DROP TSMA exists_opt full_tsma_name */ + -3, /* (357) cmd ::= SHOW db_name_cond_opt TSMAS */ + -1, /* (358) full_tsma_name ::= tsma_name */ + -3, /* (359) full_tsma_name ::= db_name NK_DOT tsma_name */ + -4, /* (360) tsma_func_list ::= FUNCTION NK_LP func_list NK_RP */ + -8, /* (361) cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options */ + -9, /* (362) cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP */ + -4, /* (363) cmd ::= DROP INDEX exists_opt full_index_name */ + -1, /* (364) full_index_name ::= index_name */ + -3, /* (365) full_index_name ::= db_name NK_DOT index_name */ + -10, /* (366) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ + -12, /* (367) 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, /* (368) func_list ::= func */ + -3, /* (369) func_list ::= func_list NK_COMMA func */ + -4, /* (370) func ::= sma_func_name NK_LP expression_list NK_RP */ + -1, /* (371) sma_func_name ::= function_name */ + -1, /* (372) sma_func_name ::= COUNT */ + -1, /* (373) sma_func_name ::= FIRST */ + -1, /* (374) sma_func_name ::= LAST */ + -1, /* (375) sma_func_name ::= LAST_ROW */ + 0, /* (376) sma_stream_opt ::= */ + -3, /* (377) sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ + -3, /* (378) sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ + -3, /* (379) sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ + -1, /* (380) with_meta ::= AS */ + -3, /* (381) with_meta ::= WITH META AS */ + -3, /* (382) with_meta ::= ONLY META AS */ + -6, /* (383) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ + -7, /* (384) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */ + -8, /* (385) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */ + -4, /* (386) cmd ::= DROP TOPIC exists_opt topic_name */ + -7, /* (387) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ + -2, /* (388) cmd ::= DESC full_table_name */ + -2, /* (389) cmd ::= DESCRIBE full_table_name */ + -3, /* (390) cmd ::= RESET QUERY CACHE */ + -4, /* (391) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ + -4, /* (392) cmd ::= EXPLAIN analyze_opt explain_options insert_query */ + 0, /* (393) analyze_opt ::= */ + -1, /* (394) analyze_opt ::= ANALYZE */ + 0, /* (395) explain_options ::= */ + -3, /* (396) explain_options ::= explain_options VERBOSE NK_BOOL */ + -3, /* (397) explain_options ::= explain_options RATIO NK_FLOAT */ + -12, /* (398) 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, /* (399) cmd ::= DROP FUNCTION exists_opt function_name */ + 0, /* (400) agg_func_opt ::= */ + -1, /* (401) agg_func_opt ::= AGGREGATE */ + 0, /* (402) bufsize_opt ::= */ + -2, /* (403) bufsize_opt ::= BUFSIZE NK_INTEGER */ + 0, /* (404) language_opt ::= */ + -2, /* (405) language_opt ::= LANGUAGE NK_STRING */ + 0, /* (406) or_replace_opt ::= */ + -2, /* (407) or_replace_opt ::= OR REPLACE */ + -6, /* (408) cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery */ + -4, /* (409) cmd ::= DROP VIEW exists_opt full_view_name */ + -1, /* (410) full_view_name ::= view_name */ + -3, /* (411) full_view_name ::= db_name NK_DOT view_name */ + -12, /* (412) 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, /* (413) cmd ::= DROP STREAM exists_opt stream_name */ + -4, /* (414) cmd ::= PAUSE STREAM exists_opt stream_name */ + -5, /* (415) cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */ + 0, /* (416) col_list_opt ::= */ + -3, /* (417) col_list_opt ::= NK_LP column_stream_def_list NK_RP */ + -1, /* (418) column_stream_def_list ::= column_stream_def */ + -3, /* (419) column_stream_def_list ::= column_stream_def_list NK_COMMA column_stream_def */ + -2, /* (420) column_stream_def ::= column_name stream_col_options */ + 0, /* (421) stream_col_options ::= */ + -3, /* (422) stream_col_options ::= stream_col_options PRIMARY KEY */ + 0, /* (423) tag_def_or_ref_opt ::= */ + -1, /* (424) tag_def_or_ref_opt ::= tags_def */ + -4, /* (425) tag_def_or_ref_opt ::= TAGS NK_LP column_stream_def_list NK_RP */ + 0, /* (426) stream_options ::= */ + -3, /* (427) stream_options ::= stream_options TRIGGER AT_ONCE */ + -3, /* (428) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ + -4, /* (429) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ + -3, /* (430) stream_options ::= stream_options WATERMARK duration_literal */ + -4, /* (431) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ + -3, /* (432) stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ + -3, /* (433) stream_options ::= stream_options DELETE_MARK duration_literal */ + -4, /* (434) stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ + 0, /* (435) subtable_opt ::= */ + -4, /* (436) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ + 0, /* (437) ignore_opt ::= */ + -2, /* (438) ignore_opt ::= IGNORE UNTREATED */ + -3, /* (439) cmd ::= KILL CONNECTION NK_INTEGER */ + -3, /* (440) cmd ::= KILL QUERY NK_STRING */ + -3, /* (441) cmd ::= KILL TRANSACTION NK_INTEGER */ + -3, /* (442) cmd ::= KILL COMPACT NK_INTEGER */ + -2, /* (443) cmd ::= BALANCE VGROUP */ + -4, /* (444) cmd ::= BALANCE VGROUP LEADER on_vgroup_id */ + -5, /* (445) cmd ::= BALANCE VGROUP LEADER DATABASE db_name */ + -4, /* (446) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ + -4, /* (447) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ + -3, /* (448) cmd ::= SPLIT VGROUP NK_INTEGER */ + 0, /* (449) on_vgroup_id ::= */ + -2, /* (450) on_vgroup_id ::= ON NK_INTEGER */ + -2, /* (451) dnode_list ::= DNODE NK_INTEGER */ + -3, /* (452) dnode_list ::= dnode_list DNODE NK_INTEGER */ + -4, /* (453) cmd ::= DELETE FROM full_table_name where_clause_opt */ + -1, /* (454) cmd ::= query_or_subquery */ + -1, /* (455) cmd ::= insert_query */ + -7, /* (456) insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ + -4, /* (457) insert_query ::= INSERT INTO full_table_name query_or_subquery */ + -1, /* (458) tags_literal ::= NK_INTEGER */ + -3, /* (459) tags_literal ::= NK_INTEGER NK_PLUS duration_literal */ + -3, /* (460) tags_literal ::= NK_INTEGER NK_MINUS duration_literal */ + -2, /* (461) tags_literal ::= NK_PLUS NK_INTEGER */ + -4, /* (462) tags_literal ::= NK_PLUS NK_INTEGER NK_PLUS duration_literal */ + -4, /* (463) tags_literal ::= NK_PLUS NK_INTEGER NK_MINUS duration_literal */ + -2, /* (464) tags_literal ::= NK_MINUS NK_INTEGER */ + -4, /* (465) tags_literal ::= NK_MINUS NK_INTEGER NK_PLUS duration_literal */ + -4, /* (466) tags_literal ::= NK_MINUS NK_INTEGER NK_MINUS duration_literal */ + -1, /* (467) tags_literal ::= NK_FLOAT */ + -2, /* (468) tags_literal ::= NK_PLUS NK_FLOAT */ + -2, /* (469) tags_literal ::= NK_MINUS NK_FLOAT */ + -1, /* (470) tags_literal ::= NK_BIN */ + -3, /* (471) tags_literal ::= NK_BIN NK_PLUS duration_literal */ + -3, /* (472) tags_literal ::= NK_BIN NK_MINUS duration_literal */ + -2, /* (473) tags_literal ::= NK_PLUS NK_BIN */ + -4, /* (474) tags_literal ::= NK_PLUS NK_BIN NK_PLUS duration_literal */ + -4, /* (475) tags_literal ::= NK_PLUS NK_BIN NK_MINUS duration_literal */ + -2, /* (476) tags_literal ::= NK_MINUS NK_BIN */ + -4, /* (477) tags_literal ::= NK_MINUS NK_BIN NK_PLUS duration_literal */ + -4, /* (478) tags_literal ::= NK_MINUS NK_BIN NK_MINUS duration_literal */ + -1, /* (479) tags_literal ::= NK_HEX */ + -3, /* (480) tags_literal ::= NK_HEX NK_PLUS duration_literal */ + -3, /* (481) tags_literal ::= NK_HEX NK_MINUS duration_literal */ + -2, /* (482) tags_literal ::= NK_PLUS NK_HEX */ + -4, /* (483) tags_literal ::= NK_PLUS NK_HEX NK_PLUS duration_literal */ + -4, /* (484) tags_literal ::= NK_PLUS NK_HEX NK_MINUS duration_literal */ + -2, /* (485) tags_literal ::= NK_MINUS NK_HEX */ + -4, /* (486) tags_literal ::= NK_MINUS NK_HEX NK_PLUS duration_literal */ + -4, /* (487) tags_literal ::= NK_MINUS NK_HEX NK_MINUS duration_literal */ + -1, /* (488) tags_literal ::= NK_STRING */ + -3, /* (489) tags_literal ::= NK_STRING NK_PLUS duration_literal */ + -3, /* (490) tags_literal ::= NK_STRING NK_MINUS duration_literal */ + -1, /* (491) tags_literal ::= NK_BOOL */ + -1, /* (492) tags_literal ::= NULL */ + -1, /* (493) tags_literal ::= literal_func */ + -3, /* (494) tags_literal ::= literal_func NK_PLUS duration_literal */ + -3, /* (495) tags_literal ::= literal_func NK_MINUS duration_literal */ + -1, /* (496) tags_literal_list ::= tags_literal */ + -3, /* (497) tags_literal_list ::= tags_literal_list NK_COMMA tags_literal */ + -1, /* (498) literal ::= NK_INTEGER */ + -1, /* (499) literal ::= NK_FLOAT */ + -1, /* (500) literal ::= NK_STRING */ + -1, /* (501) literal ::= NK_BOOL */ + -2, /* (502) literal ::= TIMESTAMP NK_STRING */ + -1, /* (503) literal ::= duration_literal */ + -1, /* (504) literal ::= NULL */ + -1, /* (505) literal ::= NK_QUESTION */ + -1, /* (506) duration_literal ::= NK_VARIABLE */ + -1, /* (507) signed ::= NK_INTEGER */ + -2, /* (508) signed ::= NK_PLUS NK_INTEGER */ + -2, /* (509) signed ::= NK_MINUS NK_INTEGER */ + -1, /* (510) signed ::= NK_FLOAT */ + -2, /* (511) signed ::= NK_PLUS NK_FLOAT */ + -2, /* (512) signed ::= NK_MINUS NK_FLOAT */ + -1, /* (513) signed_literal ::= signed */ + -1, /* (514) signed_literal ::= NK_STRING */ + -1, /* (515) signed_literal ::= NK_BOOL */ + -2, /* (516) signed_literal ::= TIMESTAMP NK_STRING */ + -1, /* (517) signed_literal ::= duration_literal */ + -1, /* (518) signed_literal ::= NULL */ + -1, /* (519) signed_literal ::= literal_func */ + -1, /* (520) signed_literal ::= NK_QUESTION */ + -1, /* (521) literal_list ::= signed_literal */ + -3, /* (522) literal_list ::= literal_list NK_COMMA signed_literal */ + -1, /* (523) db_name ::= NK_ID */ + -1, /* (524) table_name ::= NK_ID */ + -1, /* (525) column_name ::= NK_ID */ + -1, /* (526) function_name ::= NK_ID */ + -1, /* (527) view_name ::= NK_ID */ + -1, /* (528) table_alias ::= NK_ID */ + -1, /* (529) column_alias ::= NK_ID */ + -1, /* (530) column_alias ::= NK_ALIAS */ + -1, /* (531) user_name ::= NK_ID */ + -1, /* (532) topic_name ::= NK_ID */ + -1, /* (533) stream_name ::= NK_ID */ + -1, /* (534) cgroup_name ::= NK_ID */ + -1, /* (535) index_name ::= NK_ID */ + -1, /* (536) tsma_name ::= NK_ID */ + -1, /* (537) expr_or_subquery ::= expression */ + -1, /* (538) expression ::= literal */ + -1, /* (539) expression ::= pseudo_column */ + -1, /* (540) expression ::= column_reference */ + -1, /* (541) expression ::= function_expression */ + -1, /* (542) expression ::= case_when_expression */ + -3, /* (543) expression ::= NK_LP expression NK_RP */ + -2, /* (544) expression ::= NK_PLUS expr_or_subquery */ + -2, /* (545) expression ::= NK_MINUS expr_or_subquery */ + -3, /* (546) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ + -3, /* (547) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ + -3, /* (548) expression ::= expr_or_subquery NK_STAR expr_or_subquery */ + -3, /* (549) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ + -3, /* (550) expression ::= expr_or_subquery NK_REM expr_or_subquery */ + -3, /* (551) expression ::= column_reference NK_ARROW NK_STRING */ + -3, /* (552) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ + -3, /* (553) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ + -1, /* (554) expression_list ::= expr_or_subquery */ + -3, /* (555) expression_list ::= expression_list NK_COMMA expr_or_subquery */ + -1, /* (556) column_reference ::= column_name */ + -3, /* (557) column_reference ::= table_name NK_DOT column_name */ + -1, /* (558) column_reference ::= NK_ALIAS */ + -3, /* (559) column_reference ::= table_name NK_DOT NK_ALIAS */ + -1, /* (560) pseudo_column ::= ROWTS */ + -1, /* (561) pseudo_column ::= TBNAME */ + -3, /* (562) pseudo_column ::= table_name NK_DOT TBNAME */ + -1, /* (563) pseudo_column ::= QSTART */ + -1, /* (564) pseudo_column ::= QEND */ + -1, /* (565) pseudo_column ::= QDURATION */ + -1, /* (566) pseudo_column ::= WSTART */ + -1, /* (567) pseudo_column ::= WEND */ + -1, /* (568) pseudo_column ::= WDURATION */ + -1, /* (569) pseudo_column ::= IROWTS */ + -1, /* (570) pseudo_column ::= ISFILLED */ + -1, /* (571) pseudo_column ::= QTAGS */ + -1, /* (572) pseudo_column ::= FLOW */ + -1, /* (573) pseudo_column ::= FHIGH */ + -1, /* (574) pseudo_column ::= FROWTS */ + -4, /* (575) function_expression ::= function_name NK_LP expression_list NK_RP */ + -4, /* (576) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ + -6, /* (577) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ + -6, /* (578) function_expression ::= CAST NK_LP expr_or_subquery AS type_name_default_len NK_RP */ + -6, /* (579) function_expression ::= POSITION NK_LP expr_or_subquery IN expr_or_subquery NK_RP */ + -4, /* (580) function_expression ::= TRIM NK_LP expr_or_subquery NK_RP */ + -6, /* (581) function_expression ::= TRIM NK_LP trim_specification_type FROM expr_or_subquery NK_RP */ + -6, /* (582) function_expression ::= TRIM NK_LP expr_or_subquery FROM expr_or_subquery NK_RP */ + -7, /* (583) function_expression ::= TRIM NK_LP trim_specification_type expr_or_subquery FROM expr_or_subquery NK_RP */ + -4, /* (584) function_expression ::= substr_func NK_LP expression_list NK_RP */ + -6, /* (585) function_expression ::= substr_func NK_LP expr_or_subquery FROM expr_or_subquery NK_RP */ + -8, /* (586) function_expression ::= substr_func NK_LP expr_or_subquery FROM expr_or_subquery FOR expr_or_subquery NK_RP */ + -4, /* (587) function_expression ::= REPLACE NK_LP expression_list NK_RP */ + -1, /* (588) function_expression ::= literal_func */ + -1, /* (589) function_expression ::= rand_func */ + -3, /* (590) literal_func ::= noarg_func NK_LP NK_RP */ + -1, /* (591) literal_func ::= NOW */ + -1, /* (592) literal_func ::= TODAY */ + -3, /* (593) rand_func ::= RAND NK_LP NK_RP */ + -4, /* (594) rand_func ::= RAND NK_LP expression_list NK_RP */ + -1, /* (595) substr_func ::= SUBSTR */ + -1, /* (596) substr_func ::= SUBSTRING */ + -1, /* (597) trim_specification_type ::= BOTH */ + -1, /* (598) trim_specification_type ::= TRAILING */ + -1, /* (599) trim_specification_type ::= LEADING */ + -1, /* (600) noarg_func ::= NOW */ + -1, /* (601) noarg_func ::= TODAY */ + -1, /* (602) noarg_func ::= TIMEZONE */ + -1, /* (603) noarg_func ::= DATABASE */ + -1, /* (604) noarg_func ::= CLIENT_VERSION */ + -1, /* (605) noarg_func ::= SERVER_VERSION */ + -1, /* (606) noarg_func ::= SERVER_STATUS */ + -1, /* (607) noarg_func ::= CURRENT_USER */ + -1, /* (608) noarg_func ::= USER */ + -1, /* (609) noarg_func ::= PI */ + -1, /* (610) star_func ::= COUNT */ + -1, /* (611) star_func ::= FIRST */ + -1, /* (612) star_func ::= LAST */ + -1, /* (613) star_func ::= LAST_ROW */ + -1, /* (614) star_func_para_list ::= NK_STAR */ + -1, /* (615) star_func_para_list ::= other_para_list */ + -1, /* (616) other_para_list ::= star_func_para */ + -3, /* (617) other_para_list ::= other_para_list NK_COMMA star_func_para */ + -1, /* (618) star_func_para ::= expr_or_subquery */ + -3, /* (619) star_func_para ::= table_name NK_DOT NK_STAR */ + -4, /* (620) case_when_expression ::= CASE when_then_list case_when_else_opt END */ + -5, /* (621) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ + -1, /* (622) when_then_list ::= when_then_expr */ + -2, /* (623) when_then_list ::= when_then_list when_then_expr */ + -4, /* (624) when_then_expr ::= WHEN common_expression THEN common_expression */ + 0, /* (625) case_when_else_opt ::= */ + -2, /* (626) case_when_else_opt ::= ELSE common_expression */ + -3, /* (627) predicate ::= expr_or_subquery compare_op expr_or_subquery */ + -5, /* (628) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ + -6, /* (629) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ + -3, /* (630) predicate ::= expr_or_subquery IS NULL */ + -4, /* (631) predicate ::= expr_or_subquery IS NOT NULL */ + -3, /* (632) predicate ::= expr_or_subquery in_op in_predicate_value */ + -1, /* (633) compare_op ::= NK_LT */ + -1, /* (634) compare_op ::= NK_GT */ + -1, /* (635) compare_op ::= NK_LE */ + -1, /* (636) compare_op ::= NK_GE */ + -1, /* (637) compare_op ::= NK_NE */ + -1, /* (638) compare_op ::= NK_EQ */ + -1, /* (639) compare_op ::= LIKE */ + -2, /* (640) compare_op ::= NOT LIKE */ + -1, /* (641) compare_op ::= MATCH */ + -1, /* (642) compare_op ::= NMATCH */ + -1, /* (643) compare_op ::= CONTAINS */ + -1, /* (644) in_op ::= IN */ + -2, /* (645) in_op ::= NOT IN */ + -3, /* (646) in_predicate_value ::= NK_LP literal_list NK_RP */ + -1, /* (647) boolean_value_expression ::= boolean_primary */ + -2, /* (648) boolean_value_expression ::= NOT boolean_primary */ + -3, /* (649) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + -3, /* (650) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + -1, /* (651) boolean_primary ::= predicate */ + -3, /* (652) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ + -1, /* (653) common_expression ::= expr_or_subquery */ + -1, /* (654) common_expression ::= boolean_value_expression */ + 0, /* (655) from_clause_opt ::= */ + -2, /* (656) from_clause_opt ::= FROM table_reference_list */ + -1, /* (657) table_reference_list ::= table_reference */ + -3, /* (658) table_reference_list ::= table_reference_list NK_COMMA table_reference */ + -1, /* (659) table_reference ::= table_primary */ + -1, /* (660) table_reference ::= joined_table */ + -2, /* (661) table_primary ::= table_name alias_opt */ + -4, /* (662) table_primary ::= db_name NK_DOT table_name alias_opt */ + -2, /* (663) table_primary ::= subquery alias_opt */ + -1, /* (664) table_primary ::= parenthesized_joined_table */ + 0, /* (665) alias_opt ::= */ + -1, /* (666) alias_opt ::= table_alias */ + -2, /* (667) alias_opt ::= AS table_alias */ + -3, /* (668) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + -3, /* (669) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ + -8, /* (670) joined_table ::= table_reference join_type join_subtype JOIN table_reference join_on_clause_opt window_offset_clause_opt jlimit_clause_opt */ + 0, /* (671) join_type ::= */ + -1, /* (672) join_type ::= INNER */ + -1, /* (673) join_type ::= LEFT */ + -1, /* (674) join_type ::= RIGHT */ + -1, /* (675) join_type ::= FULL */ + 0, /* (676) join_subtype ::= */ + -1, /* (677) join_subtype ::= OUTER */ + -1, /* (678) join_subtype ::= SEMI */ + -1, /* (679) join_subtype ::= ANTI */ + -1, /* (680) join_subtype ::= ASOF */ + -1, /* (681) join_subtype ::= WINDOW */ + 0, /* (682) join_on_clause_opt ::= */ + -2, /* (683) join_on_clause_opt ::= ON search_condition */ + 0, /* (684) window_offset_clause_opt ::= */ + -6, /* (685) window_offset_clause_opt ::= WINDOW_OFFSET NK_LP window_offset_literal NK_COMMA window_offset_literal NK_RP */ + -1, /* (686) window_offset_literal ::= NK_VARIABLE */ + -2, /* (687) window_offset_literal ::= NK_MINUS NK_VARIABLE */ + 0, /* (688) jlimit_clause_opt ::= */ + -2, /* (689) jlimit_clause_opt ::= JLIMIT NK_INTEGER */ + -14, /* (690) 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, /* (691) hint_list ::= */ + -1, /* (692) hint_list ::= NK_HINT */ + 0, /* (693) tag_mode_opt ::= */ + -1, /* (694) tag_mode_opt ::= TAGS */ + 0, /* (695) set_quantifier_opt ::= */ + -1, /* (696) set_quantifier_opt ::= DISTINCT */ + -1, /* (697) set_quantifier_opt ::= ALL */ + -1, /* (698) select_list ::= select_item */ + -3, /* (699) select_list ::= select_list NK_COMMA select_item */ + -1, /* (700) select_item ::= NK_STAR */ + -1, /* (701) select_item ::= common_expression */ + -2, /* (702) select_item ::= common_expression column_alias */ + -3, /* (703) select_item ::= common_expression AS column_alias */ + -3, /* (704) select_item ::= table_name NK_DOT NK_STAR */ + 0, /* (705) where_clause_opt ::= */ + -2, /* (706) where_clause_opt ::= WHERE search_condition */ + 0, /* (707) partition_by_clause_opt ::= */ + -3, /* (708) partition_by_clause_opt ::= PARTITION BY partition_list */ + -1, /* (709) partition_list ::= partition_item */ + -3, /* (710) partition_list ::= partition_list NK_COMMA partition_item */ + -1, /* (711) partition_item ::= expr_or_subquery */ + -2, /* (712) partition_item ::= expr_or_subquery column_alias */ + -3, /* (713) partition_item ::= expr_or_subquery AS column_alias */ + 0, /* (714) twindow_clause_opt ::= */ + -6, /* (715) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP */ + -4, /* (716) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ + -6, /* (717) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ + -8, /* (718) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ + -7, /* (719) twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ + -4, /* (720) twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP */ + -6, /* (721) twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ + -4, /* (722) twindow_clause_opt ::= ANOMALY_WINDOW NK_LP expr_or_subquery NK_RP */ + -6, /* (723) twindow_clause_opt ::= ANOMALY_WINDOW NK_LP expr_or_subquery NK_COMMA NK_STRING NK_RP */ + 0, /* (724) sliding_opt ::= */ + -4, /* (725) sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ + -1, /* (726) interval_sliding_duration_literal ::= NK_VARIABLE */ + -1, /* (727) interval_sliding_duration_literal ::= NK_STRING */ + -1, /* (728) interval_sliding_duration_literal ::= NK_INTEGER */ + 0, /* (729) fill_opt ::= */ + -4, /* (730) fill_opt ::= FILL NK_LP fill_mode NK_RP */ + -6, /* (731) fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ + -6, /* (732) fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ + -1, /* (733) fill_mode ::= NONE */ + -1, /* (734) fill_mode ::= PREV */ + -1, /* (735) fill_mode ::= NULL */ + -1, /* (736) fill_mode ::= NULL_F */ + -1, /* (737) fill_mode ::= LINEAR */ + -1, /* (738) fill_mode ::= NEXT */ + 0, /* (739) group_by_clause_opt ::= */ + -3, /* (740) group_by_clause_opt ::= GROUP BY group_by_list */ + -1, /* (741) group_by_list ::= expr_or_subquery */ + -3, /* (742) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ + 0, /* (743) having_clause_opt ::= */ + -2, /* (744) having_clause_opt ::= HAVING search_condition */ + 0, /* (745) range_opt ::= */ + -6, /* (746) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ + -4, /* (747) range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ + 0, /* (748) every_opt ::= */ + -4, /* (749) every_opt ::= EVERY NK_LP duration_literal NK_RP */ + -4, /* (750) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ + -1, /* (751) query_simple ::= query_specification */ + -1, /* (752) query_simple ::= union_query_expression */ + -4, /* (753) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ + -3, /* (754) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ + -1, /* (755) query_simple_or_subquery ::= query_simple */ + -1, /* (756) query_simple_or_subquery ::= subquery */ + -1, /* (757) query_or_subquery ::= query_expression */ + -1, /* (758) query_or_subquery ::= subquery */ + 0, /* (759) order_by_clause_opt ::= */ + -3, /* (760) order_by_clause_opt ::= ORDER BY sort_specification_list */ + 0, /* (761) slimit_clause_opt ::= */ + -2, /* (762) slimit_clause_opt ::= SLIMIT NK_INTEGER */ + -4, /* (763) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + -4, /* (764) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + 0, /* (765) limit_clause_opt ::= */ + -2, /* (766) limit_clause_opt ::= LIMIT NK_INTEGER */ + -4, /* (767) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ + -4, /* (768) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + -3, /* (769) subquery ::= NK_LP query_expression NK_RP */ + -3, /* (770) subquery ::= NK_LP subquery NK_RP */ + -1, /* (771) search_condition ::= common_expression */ + -1, /* (772) sort_specification_list ::= sort_specification */ + -3, /* (773) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ + -3, /* (774) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ + 0, /* (775) ordering_specification_opt ::= */ + -1, /* (776) ordering_specification_opt ::= ASC */ + -1, /* (777) ordering_specification_opt ::= DESC */ + 0, /* (778) null_ordering_opt ::= */ + -2, /* (779) null_ordering_opt ::= NULLS FIRST */ + -2, /* (780) null_ordering_opt ::= NULLS LAST */ + 0, /* (781) column_options ::= */ + -3, /* (782) column_options ::= column_options PRIMARY KEY */ + -3, /* (783) column_options ::= column_options NK_ID NK_STRING */ }; static void yy_accept(yyParser*); /* Forward Declaration */ @@ -5551,11 +5619,11 @@ static YYACTIONTYPE yy_reduce( YYMINORTYPE yylhsminor; case 0: /* cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } - yy_destructor(yypParser,384,&yymsp[0].minor); + yy_destructor(yypParser,390,&yymsp[0].minor); break; case 1: /* cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } - yy_destructor(yypParser,385,&yymsp[0].minor); + yy_destructor(yypParser,391,&yymsp[0].minor); break; case 2: /* account_options ::= */ { } @@ -5569,20 +5637,20 @@ static YYACTIONTYPE yy_reduce( case 9: /* account_options ::= account_options USERS literal */ yytestcase(yyruleno==9); case 10: /* account_options ::= account_options CONNS literal */ yytestcase(yyruleno==10); case 11: /* account_options ::= account_options STATE literal */ yytestcase(yyruleno==11); -{ yy_destructor(yypParser,384,&yymsp[-2].minor); +{ yy_destructor(yypParser,390,&yymsp[-2].minor); { } - yy_destructor(yypParser,386,&yymsp[0].minor); + yy_destructor(yypParser,392,&yymsp[0].minor); } break; case 12: /* alter_account_options ::= alter_account_option */ -{ yy_destructor(yypParser,387,&yymsp[0].minor); +{ yy_destructor(yypParser,393,&yymsp[0].minor); { } } break; case 13: /* alter_account_options ::= alter_account_options alter_account_option */ -{ yy_destructor(yypParser,385,&yymsp[-1].minor); +{ yy_destructor(yypParser,391,&yymsp[-1].minor); { } - yy_destructor(yypParser,387,&yymsp[0].minor); + yy_destructor(yypParser,393,&yymsp[0].minor); } break; case 14: /* alter_account_option ::= PASS literal */ @@ -5596,2110 +5664,2137 @@ static YYACTIONTYPE yy_reduce( case 22: /* alter_account_option ::= CONNS literal */ yytestcase(yyruleno==22); case 23: /* alter_account_option ::= STATE literal */ yytestcase(yyruleno==23); { } - yy_destructor(yypParser,386,&yymsp[0].minor); + yy_destructor(yypParser,392,&yymsp[0].minor); break; case 24: /* ip_range_list ::= NK_STRING */ -{ yylhsminor.yy334 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy334 = yylhsminor.yy334; +{ yylhsminor.yy946 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy946 = yylhsminor.yy946; break; case 25: /* ip_range_list ::= ip_range_list NK_COMMA NK_STRING */ -{ yylhsminor.yy334 = addNodeToList(pCxt, yymsp[-2].minor.yy334, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy334 = yylhsminor.yy334; +{ yylhsminor.yy946 = addNodeToList(pCxt, yymsp[-2].minor.yy946, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy946 = yylhsminor.yy946; break; case 26: /* white_list ::= HOST ip_range_list */ -{ yymsp[-1].minor.yy334 = yymsp[0].minor.yy334; } +{ yymsp[-1].minor.yy946 = yymsp[0].minor.yy946; } break; case 27: /* white_list_opt ::= */ - case 208: /* specific_cols_opt ::= */ yytestcase(yyruleno==208); - case 246: /* tags_def_opt ::= */ yytestcase(yyruleno==246); - case 337: /* tag_list_opt ::= */ yytestcase(yyruleno==337); - case 410: /* col_list_opt ::= */ yytestcase(yyruleno==410); - case 417: /* tag_def_or_ref_opt ::= */ yytestcase(yyruleno==417); - case 698: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==698); - case 728: /* group_by_clause_opt ::= */ yytestcase(yyruleno==728); - case 748: /* order_by_clause_opt ::= */ yytestcase(yyruleno==748); -{ yymsp[1].minor.yy334 = NULL; } + case 212: /* specific_cols_opt ::= */ yytestcase(yyruleno==212); + case 250: /* tags_def_opt ::= */ yytestcase(yyruleno==250); + case 343: /* tag_list_opt ::= */ yytestcase(yyruleno==343); + case 416: /* col_list_opt ::= */ yytestcase(yyruleno==416); + case 423: /* tag_def_or_ref_opt ::= */ yytestcase(yyruleno==423); + case 707: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==707); + case 739: /* group_by_clause_opt ::= */ yytestcase(yyruleno==739); + case 759: /* order_by_clause_opt ::= */ yytestcase(yyruleno==759); +{ yymsp[1].minor.yy946 = NULL; } break; case 28: /* white_list_opt ::= white_list */ - case 247: /* tags_def_opt ::= tags_def */ yytestcase(yyruleno==247); - case 418: /* tag_def_or_ref_opt ::= tags_def */ yytestcase(yyruleno==418); - case 606: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==606); -{ yylhsminor.yy334 = yymsp[0].minor.yy334; } - yymsp[0].minor.yy334 = yylhsminor.yy334; + case 251: /* tags_def_opt ::= tags_def */ yytestcase(yyruleno==251); + case 424: /* tag_def_or_ref_opt ::= tags_def */ yytestcase(yyruleno==424); + case 615: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==615); +{ yylhsminor.yy946 = yymsp[0].minor.yy946; } + yymsp[0].minor.yy946 = yylhsminor.yy946; break; case 29: /* is_import_opt ::= */ case 31: /* is_createdb_opt ::= */ yytestcase(yyruleno==31); -{ yymsp[1].minor.yy719 = 0; } +{ yymsp[1].minor.yy815 = 0; } break; case 30: /* is_import_opt ::= IS_IMPORT NK_INTEGER */ case 32: /* is_createdb_opt ::= CREATEDB NK_INTEGER */ yytestcase(yyruleno==32); case 42: /* sysinfo_opt ::= SYSINFO NK_INTEGER */ yytestcase(yyruleno==42); -{ yymsp[-1].minor.yy719 = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); } +{ yymsp[-1].minor.yy815 = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); } break; case 33: /* cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt is_createdb_opt is_import_opt white_list_opt */ { - pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-6].minor.yy533, &yymsp[-4].minor.yy0, yymsp[-3].minor.yy719, yymsp[-1].minor.yy719, yymsp[-2].minor.yy719); - pCxt->pRootNode = addCreateUserStmtWhiteList(pCxt, pCxt->pRootNode, yymsp[0].minor.yy334); + pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-6].minor.yy557, &yymsp[-4].minor.yy0, yymsp[-3].minor.yy815, yymsp[-1].minor.yy815, yymsp[-2].minor.yy815); + pCxt->pRootNode = addCreateUserStmtWhiteList(pCxt, pCxt->pRootNode, yymsp[0].minor.yy946); } break; case 34: /* cmd ::= ALTER USER user_name PASS NK_STRING */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy533, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy557, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0); } break; case 35: /* cmd ::= ALTER USER user_name ENABLE NK_INTEGER */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy533, TSDB_ALTER_USER_ENABLE, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy557, TSDB_ALTER_USER_ENABLE, &yymsp[0].minor.yy0); } break; case 36: /* cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy533, TSDB_ALTER_USER_SYSINFO, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy557, TSDB_ALTER_USER_SYSINFO, &yymsp[0].minor.yy0); } break; case 37: /* cmd ::= ALTER USER user_name CREATEDB NK_INTEGER */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy533, TSDB_ALTER_USER_CREATEDB, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy557, TSDB_ALTER_USER_CREATEDB, &yymsp[0].minor.yy0); } break; case 38: /* cmd ::= ALTER USER user_name ADD white_list */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy533, TSDB_ALTER_USER_ADD_WHITE_LIST, yymsp[0].minor.yy334); } +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy557, TSDB_ALTER_USER_ADD_WHITE_LIST, yymsp[0].minor.yy946); } break; case 39: /* cmd ::= ALTER USER user_name DROP white_list */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy533, TSDB_ALTER_USER_DROP_WHITE_LIST, yymsp[0].minor.yy334); } +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy557, TSDB_ALTER_USER_DROP_WHITE_LIST, yymsp[0].minor.yy946); } break; case 40: /* cmd ::= DROP USER user_name */ -{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy533); } +{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy557); } break; case 41: /* sysinfo_opt ::= */ -{ yymsp[1].minor.yy719 = 1; } +{ yymsp[1].minor.yy815 = 1; } break; case 43: /* cmd ::= GRANT privileges ON priv_level with_clause_opt TO user_name */ -{ pCxt->pRootNode = createGrantStmt(pCxt, yymsp[-5].minor.yy585, &yymsp[-3].minor.yy399, &yymsp[0].minor.yy533, yymsp[-2].minor.yy560); } +{ pCxt->pRootNode = createGrantStmt(pCxt, yymsp[-5].minor.yy483, &yymsp[-3].minor.yy723, &yymsp[0].minor.yy557, yymsp[-2].minor.yy974); } break; case 44: /* cmd ::= REVOKE privileges ON priv_level with_clause_opt FROM user_name */ -{ pCxt->pRootNode = createRevokeStmt(pCxt, yymsp[-5].minor.yy585, &yymsp[-3].minor.yy399, &yymsp[0].minor.yy533, yymsp[-2].minor.yy560); } +{ pCxt->pRootNode = createRevokeStmt(pCxt, yymsp[-5].minor.yy483, &yymsp[-3].minor.yy723, &yymsp[0].minor.yy557, yymsp[-2].minor.yy974); } break; case 45: /* privileges ::= ALL */ -{ yymsp[0].minor.yy585 = PRIVILEGE_TYPE_ALL; } +{ yymsp[0].minor.yy483 = PRIVILEGE_TYPE_ALL; } break; case 46: /* privileges ::= priv_type_list */ case 48: /* priv_type_list ::= priv_type */ yytestcase(yyruleno==48); -{ yylhsminor.yy585 = yymsp[0].minor.yy585; } - yymsp[0].minor.yy585 = yylhsminor.yy585; +{ yylhsminor.yy483 = yymsp[0].minor.yy483; } + yymsp[0].minor.yy483 = yylhsminor.yy483; break; case 47: /* privileges ::= SUBSCRIBE */ -{ yymsp[0].minor.yy585 = PRIVILEGE_TYPE_SUBSCRIBE; } +{ yymsp[0].minor.yy483 = PRIVILEGE_TYPE_SUBSCRIBE; } break; case 49: /* priv_type_list ::= priv_type_list NK_COMMA priv_type */ -{ yylhsminor.yy585 = yymsp[-2].minor.yy585 | yymsp[0].minor.yy585; } - yymsp[-2].minor.yy585 = yylhsminor.yy585; +{ yylhsminor.yy483 = yymsp[-2].minor.yy483 | yymsp[0].minor.yy483; } + yymsp[-2].minor.yy483 = yylhsminor.yy483; break; case 50: /* priv_type ::= READ */ -{ yymsp[0].minor.yy585 = PRIVILEGE_TYPE_READ; } +{ yymsp[0].minor.yy483 = PRIVILEGE_TYPE_READ; } break; case 51: /* priv_type ::= WRITE */ -{ yymsp[0].minor.yy585 = PRIVILEGE_TYPE_WRITE; } +{ yymsp[0].minor.yy483 = PRIVILEGE_TYPE_WRITE; } break; case 52: /* priv_type ::= ALTER */ -{ yymsp[0].minor.yy585 = PRIVILEGE_TYPE_ALTER; } +{ yymsp[0].minor.yy483 = PRIVILEGE_TYPE_ALTER; } break; case 53: /* priv_level ::= NK_STAR NK_DOT NK_STAR */ -{ yylhsminor.yy399.first = yymsp[-2].minor.yy0; yylhsminor.yy399.second = yymsp[0].minor.yy0; } - yymsp[-2].minor.yy399 = yylhsminor.yy399; +{ yylhsminor.yy723.first = yymsp[-2].minor.yy0; yylhsminor.yy723.second = yymsp[0].minor.yy0; } + yymsp[-2].minor.yy723 = yylhsminor.yy723; break; case 54: /* priv_level ::= db_name NK_DOT NK_STAR */ -{ yylhsminor.yy399.first = yymsp[-2].minor.yy533; yylhsminor.yy399.second = yymsp[0].minor.yy0; } - yymsp[-2].minor.yy399 = yylhsminor.yy399; +{ yylhsminor.yy723.first = yymsp[-2].minor.yy557; yylhsminor.yy723.second = yymsp[0].minor.yy0; } + yymsp[-2].minor.yy723 = yylhsminor.yy723; break; case 55: /* priv_level ::= db_name NK_DOT table_name */ -{ yylhsminor.yy399.first = yymsp[-2].minor.yy533; yylhsminor.yy399.second = yymsp[0].minor.yy533; } - yymsp[-2].minor.yy399 = yylhsminor.yy399; +{ yylhsminor.yy723.first = yymsp[-2].minor.yy557; yylhsminor.yy723.second = yymsp[0].minor.yy557; } + yymsp[-2].minor.yy723 = yylhsminor.yy723; break; case 56: /* priv_level ::= topic_name */ -{ yylhsminor.yy399.first = yymsp[0].minor.yy533; yylhsminor.yy399.second = nil_token; } - yymsp[0].minor.yy399 = yylhsminor.yy399; +{ yylhsminor.yy723.first = yymsp[0].minor.yy557; yylhsminor.yy723.second = nil_token; } + yymsp[0].minor.yy723 = yylhsminor.yy723; break; case 57: /* with_clause_opt ::= */ - case 173: /* start_opt ::= */ yytestcase(yyruleno==173); - case 177: /* end_opt ::= */ yytestcase(yyruleno==177); - case 332: /* like_pattern_opt ::= */ yytestcase(yyruleno==332); - case 429: /* subtable_opt ::= */ yytestcase(yyruleno==429); - case 616: /* case_when_else_opt ::= */ yytestcase(yyruleno==616); - case 646: /* from_clause_opt ::= */ yytestcase(yyruleno==646); - case 673: /* join_on_clause_opt ::= */ yytestcase(yyruleno==673); - case 675: /* window_offset_clause_opt ::= */ yytestcase(yyruleno==675); - case 679: /* jlimit_clause_opt ::= */ yytestcase(yyruleno==679); - case 696: /* where_clause_opt ::= */ yytestcase(yyruleno==696); - case 705: /* twindow_clause_opt ::= */ yytestcase(yyruleno==705); - case 713: /* sliding_opt ::= */ yytestcase(yyruleno==713); - case 718: /* fill_opt ::= */ yytestcase(yyruleno==718); - case 732: /* having_clause_opt ::= */ yytestcase(yyruleno==732); - case 734: /* range_opt ::= */ yytestcase(yyruleno==734); - case 737: /* every_opt ::= */ yytestcase(yyruleno==737); - case 750: /* slimit_clause_opt ::= */ yytestcase(yyruleno==750); - case 754: /* limit_clause_opt ::= */ yytestcase(yyruleno==754); -{ yymsp[1].minor.yy560 = NULL; } + case 177: /* start_opt ::= */ yytestcase(yyruleno==177); + case 181: /* end_opt ::= */ yytestcase(yyruleno==181); + case 338: /* like_pattern_opt ::= */ yytestcase(yyruleno==338); + case 435: /* subtable_opt ::= */ yytestcase(yyruleno==435); + case 625: /* case_when_else_opt ::= */ yytestcase(yyruleno==625); + case 655: /* from_clause_opt ::= */ yytestcase(yyruleno==655); + case 682: /* join_on_clause_opt ::= */ yytestcase(yyruleno==682); + case 684: /* window_offset_clause_opt ::= */ yytestcase(yyruleno==684); + case 688: /* jlimit_clause_opt ::= */ yytestcase(yyruleno==688); + case 705: /* where_clause_opt ::= */ yytestcase(yyruleno==705); + case 714: /* twindow_clause_opt ::= */ yytestcase(yyruleno==714); + case 724: /* sliding_opt ::= */ yytestcase(yyruleno==724); + case 729: /* fill_opt ::= */ yytestcase(yyruleno==729); + case 743: /* having_clause_opt ::= */ yytestcase(yyruleno==743); + case 745: /* range_opt ::= */ yytestcase(yyruleno==745); + case 748: /* every_opt ::= */ yytestcase(yyruleno==748); + case 761: /* slimit_clause_opt ::= */ yytestcase(yyruleno==761); + case 765: /* limit_clause_opt ::= */ yytestcase(yyruleno==765); +{ yymsp[1].minor.yy974 = NULL; } break; case 58: /* with_clause_opt ::= WITH search_condition */ - case 647: /* from_clause_opt ::= FROM table_reference_list */ yytestcase(yyruleno==647); - case 674: /* join_on_clause_opt ::= ON search_condition */ yytestcase(yyruleno==674); - case 697: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==697); - case 733: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==733); -{ yymsp[-1].minor.yy560 = yymsp[0].minor.yy560; } + case 656: /* from_clause_opt ::= FROM table_reference_list */ yytestcase(yyruleno==656); + case 683: /* join_on_clause_opt ::= ON search_condition */ yytestcase(yyruleno==683); + case 706: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==706); + case 744: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==744); +{ yymsp[-1].minor.yy974 = yymsp[0].minor.yy974; } break; case 59: /* cmd ::= CREATE ENCRYPT_KEY NK_STRING */ { pCxt->pRootNode = createEncryptKeyStmt(pCxt, &yymsp[0].minor.yy0); } break; - case 60: /* cmd ::= CREATE DNODE dnode_endpoint */ -{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy533, NULL); } + case 60: /* cmd ::= CREATE ANODE NK_STRING */ +{ pCxt->pRootNode = createCreateAnodeStmt(pCxt, &yymsp[0].minor.yy0); } break; - case 61: /* cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */ -{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy533, &yymsp[0].minor.yy0); } + case 61: /* cmd ::= UPDATE ANODE NK_INTEGER */ +{ pCxt->pRootNode = createUpdateAnodeStmt(pCxt, &yymsp[0].minor.yy0, false); } break; - case 62: /* cmd ::= DROP DNODE NK_INTEGER force_opt */ -{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy173, false); } + case 62: /* cmd ::= UPDATE ALL ANODES */ +{ pCxt->pRootNode = createUpdateAnodeStmt(pCxt, NULL, true); } break; - case 63: /* cmd ::= DROP DNODE dnode_endpoint force_opt */ -{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy533, yymsp[0].minor.yy173, false); } + case 63: /* cmd ::= DROP ANODE NK_INTEGER */ +{ pCxt->pRootNode = createDropAnodeStmt(pCxt, &yymsp[0].minor.yy0); } break; - case 64: /* cmd ::= DROP DNODE NK_INTEGER unsafe_opt */ -{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, false, yymsp[0].minor.yy173); } + case 64: /* cmd ::= CREATE DNODE dnode_endpoint */ +{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy557, NULL); } break; - case 65: /* cmd ::= DROP DNODE dnode_endpoint unsafe_opt */ -{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy533, false, yymsp[0].minor.yy173); } + case 65: /* cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */ +{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy557, &yymsp[0].minor.yy0); } break; - case 66: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ + case 66: /* cmd ::= DROP DNODE NK_INTEGER force_opt */ +{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy569, false); } + break; + case 67: /* cmd ::= DROP DNODE dnode_endpoint force_opt */ +{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy557, yymsp[0].minor.yy569, false); } + break; + case 68: /* cmd ::= DROP DNODE NK_INTEGER unsafe_opt */ +{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, false, yymsp[0].minor.yy569); } + break; + case 69: /* cmd ::= DROP DNODE dnode_endpoint unsafe_opt */ +{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy557, false, yymsp[0].minor.yy569); } + break; + case 70: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ { pCxt->pRootNode = createAlterDnodeStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, NULL); } break; - case 67: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ + case 71: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ { pCxt->pRootNode = createAlterDnodeStmt(pCxt, &yymsp[-2].minor.yy0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } break; - case 68: /* cmd ::= ALTER ALL DNODES NK_STRING */ + case 72: /* cmd ::= ALTER ALL DNODES NK_STRING */ { pCxt->pRootNode = createAlterDnodeStmt(pCxt, NULL, &yymsp[0].minor.yy0, NULL); } break; - case 69: /* cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ + case 73: /* cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ { pCxt->pRootNode = createAlterDnodeStmt(pCxt, NULL, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } break; - case 70: /* cmd ::= RESTORE DNODE NK_INTEGER */ + case 74: /* cmd ::= RESTORE DNODE NK_INTEGER */ { pCxt->pRootNode = createRestoreComponentNodeStmt(pCxt, QUERY_NODE_RESTORE_DNODE_STMT, &yymsp[0].minor.yy0); } break; - case 71: /* dnode_endpoint ::= NK_STRING */ - case 72: /* dnode_endpoint ::= NK_ID */ yytestcase(yyruleno==72); - case 73: /* dnode_endpoint ::= NK_IPTOKEN */ yytestcase(yyruleno==73); - case 366: /* sma_func_name ::= COUNT */ yytestcase(yyruleno==366); - case 367: /* sma_func_name ::= FIRST */ yytestcase(yyruleno==367); - case 368: /* sma_func_name ::= LAST */ yytestcase(yyruleno==368); - case 369: /* sma_func_name ::= LAST_ROW */ yytestcase(yyruleno==369); - case 517: /* db_name ::= NK_ID */ yytestcase(yyruleno==517); - case 518: /* table_name ::= NK_ID */ yytestcase(yyruleno==518); - case 519: /* column_name ::= NK_ID */ yytestcase(yyruleno==519); - case 520: /* function_name ::= NK_ID */ yytestcase(yyruleno==520); - case 521: /* view_name ::= NK_ID */ yytestcase(yyruleno==521); - case 522: /* table_alias ::= NK_ID */ yytestcase(yyruleno==522); - case 523: /* column_alias ::= NK_ID */ yytestcase(yyruleno==523); - case 524: /* column_alias ::= NK_ALIAS */ yytestcase(yyruleno==524); - case 525: /* user_name ::= NK_ID */ yytestcase(yyruleno==525); - case 526: /* topic_name ::= NK_ID */ yytestcase(yyruleno==526); - case 527: /* stream_name ::= NK_ID */ yytestcase(yyruleno==527); - case 528: /* cgroup_name ::= NK_ID */ yytestcase(yyruleno==528); - case 529: /* index_name ::= NK_ID */ yytestcase(yyruleno==529); - case 530: /* tsma_name ::= NK_ID */ yytestcase(yyruleno==530); - case 586: /* substr_func ::= SUBSTR */ yytestcase(yyruleno==586); - case 587: /* substr_func ::= SUBSTRING */ yytestcase(yyruleno==587); - case 591: /* noarg_func ::= NOW */ yytestcase(yyruleno==591); - case 592: /* noarg_func ::= TODAY */ yytestcase(yyruleno==592); - case 593: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==593); - case 594: /* noarg_func ::= DATABASE */ yytestcase(yyruleno==594); - case 595: /* noarg_func ::= CLIENT_VERSION */ yytestcase(yyruleno==595); - case 596: /* noarg_func ::= SERVER_VERSION */ yytestcase(yyruleno==596); - case 597: /* noarg_func ::= SERVER_STATUS */ yytestcase(yyruleno==597); - case 598: /* noarg_func ::= CURRENT_USER */ yytestcase(yyruleno==598); - case 599: /* noarg_func ::= USER */ yytestcase(yyruleno==599); - case 600: /* noarg_func ::= PI */ yytestcase(yyruleno==600); - case 601: /* star_func ::= COUNT */ yytestcase(yyruleno==601); - case 602: /* star_func ::= FIRST */ yytestcase(yyruleno==602); - case 603: /* star_func ::= LAST */ yytestcase(yyruleno==603); - case 604: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==604); -{ yylhsminor.yy533 = yymsp[0].minor.yy0; } - yymsp[0].minor.yy533 = yylhsminor.yy533; + case 75: /* dnode_endpoint ::= NK_STRING */ + case 76: /* dnode_endpoint ::= NK_ID */ yytestcase(yyruleno==76); + case 77: /* dnode_endpoint ::= NK_IPTOKEN */ yytestcase(yyruleno==77); + case 372: /* sma_func_name ::= COUNT */ yytestcase(yyruleno==372); + case 373: /* sma_func_name ::= FIRST */ yytestcase(yyruleno==373); + case 374: /* sma_func_name ::= LAST */ yytestcase(yyruleno==374); + case 375: /* sma_func_name ::= LAST_ROW */ yytestcase(yyruleno==375); + case 523: /* db_name ::= NK_ID */ yytestcase(yyruleno==523); + case 524: /* table_name ::= NK_ID */ yytestcase(yyruleno==524); + case 525: /* column_name ::= NK_ID */ yytestcase(yyruleno==525); + case 526: /* function_name ::= NK_ID */ yytestcase(yyruleno==526); + case 527: /* view_name ::= NK_ID */ yytestcase(yyruleno==527); + case 528: /* table_alias ::= NK_ID */ yytestcase(yyruleno==528); + case 529: /* column_alias ::= NK_ID */ yytestcase(yyruleno==529); + case 530: /* column_alias ::= NK_ALIAS */ yytestcase(yyruleno==530); + case 531: /* user_name ::= NK_ID */ yytestcase(yyruleno==531); + case 532: /* topic_name ::= NK_ID */ yytestcase(yyruleno==532); + case 533: /* stream_name ::= NK_ID */ yytestcase(yyruleno==533); + case 534: /* cgroup_name ::= NK_ID */ yytestcase(yyruleno==534); + case 535: /* index_name ::= NK_ID */ yytestcase(yyruleno==535); + case 536: /* tsma_name ::= NK_ID */ yytestcase(yyruleno==536); + case 595: /* substr_func ::= SUBSTR */ yytestcase(yyruleno==595); + case 596: /* substr_func ::= SUBSTRING */ yytestcase(yyruleno==596); + case 600: /* noarg_func ::= NOW */ yytestcase(yyruleno==600); + case 601: /* noarg_func ::= TODAY */ yytestcase(yyruleno==601); + case 602: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==602); + case 603: /* noarg_func ::= DATABASE */ yytestcase(yyruleno==603); + case 604: /* noarg_func ::= CLIENT_VERSION */ yytestcase(yyruleno==604); + case 605: /* noarg_func ::= SERVER_VERSION */ yytestcase(yyruleno==605); + case 606: /* noarg_func ::= SERVER_STATUS */ yytestcase(yyruleno==606); + case 607: /* noarg_func ::= CURRENT_USER */ yytestcase(yyruleno==607); + case 608: /* noarg_func ::= USER */ yytestcase(yyruleno==608); + case 609: /* noarg_func ::= PI */ yytestcase(yyruleno==609); + case 610: /* star_func ::= COUNT */ yytestcase(yyruleno==610); + case 611: /* star_func ::= FIRST */ yytestcase(yyruleno==611); + case 612: /* star_func ::= LAST */ yytestcase(yyruleno==612); + case 613: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==613); +{ yylhsminor.yy557 = yymsp[0].minor.yy0; } + yymsp[0].minor.yy557 = yylhsminor.yy557; break; - case 74: /* force_opt ::= */ - case 101: /* not_exists_opt ::= */ yytestcase(yyruleno==101); - case 103: /* exists_opt ::= */ yytestcase(yyruleno==103); - case 206: /* with_opt ::= */ yytestcase(yyruleno==206); - case 387: /* analyze_opt ::= */ yytestcase(yyruleno==387); - case 394: /* agg_func_opt ::= */ yytestcase(yyruleno==394); - case 400: /* or_replace_opt ::= */ yytestcase(yyruleno==400); - case 431: /* ignore_opt ::= */ yytestcase(yyruleno==431); - case 684: /* tag_mode_opt ::= */ yytestcase(yyruleno==684); - case 686: /* set_quantifier_opt ::= */ yytestcase(yyruleno==686); -{ yymsp[1].minor.yy173 = false; } + case 78: /* force_opt ::= */ + case 105: /* not_exists_opt ::= */ yytestcase(yyruleno==105); + case 107: /* exists_opt ::= */ yytestcase(yyruleno==107); + case 210: /* with_opt ::= */ yytestcase(yyruleno==210); + case 393: /* analyze_opt ::= */ yytestcase(yyruleno==393); + case 400: /* agg_func_opt ::= */ yytestcase(yyruleno==400); + case 406: /* or_replace_opt ::= */ yytestcase(yyruleno==406); + case 437: /* ignore_opt ::= */ yytestcase(yyruleno==437); + case 693: /* tag_mode_opt ::= */ yytestcase(yyruleno==693); + case 695: /* set_quantifier_opt ::= */ yytestcase(yyruleno==695); +{ yymsp[1].minor.yy569 = false; } break; - case 75: /* force_opt ::= FORCE */ - case 76: /* unsafe_opt ::= UNSAFE */ yytestcase(yyruleno==76); - case 207: /* with_opt ::= WITH */ yytestcase(yyruleno==207); - case 388: /* analyze_opt ::= ANALYZE */ yytestcase(yyruleno==388); - case 395: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==395); - case 685: /* tag_mode_opt ::= TAGS */ yytestcase(yyruleno==685); - case 687: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==687); -{ yymsp[0].minor.yy173 = true; } + case 79: /* force_opt ::= FORCE */ + case 80: /* unsafe_opt ::= UNSAFE */ yytestcase(yyruleno==80); + case 211: /* with_opt ::= WITH */ yytestcase(yyruleno==211); + case 394: /* analyze_opt ::= ANALYZE */ yytestcase(yyruleno==394); + case 401: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==401); + case 694: /* tag_mode_opt ::= TAGS */ yytestcase(yyruleno==694); + case 696: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==696); +{ yymsp[0].minor.yy569 = true; } break; - case 77: /* cmd ::= ALTER CLUSTER NK_STRING */ + case 81: /* cmd ::= ALTER CLUSTER NK_STRING */ { pCxt->pRootNode = createAlterClusterStmt(pCxt, &yymsp[0].minor.yy0, NULL); } break; - case 78: /* cmd ::= ALTER CLUSTER NK_STRING NK_STRING */ + case 82: /* cmd ::= ALTER CLUSTER NK_STRING NK_STRING */ { pCxt->pRootNode = createAlterClusterStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } break; - case 79: /* cmd ::= ALTER LOCAL NK_STRING */ + case 83: /* cmd ::= ALTER LOCAL NK_STRING */ { pCxt->pRootNode = createAlterLocalStmt(pCxt, &yymsp[0].minor.yy0, NULL); } break; - case 80: /* cmd ::= ALTER LOCAL NK_STRING NK_STRING */ + case 84: /* cmd ::= ALTER LOCAL NK_STRING NK_STRING */ { pCxt->pRootNode = createAlterLocalStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } break; - case 81: /* cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ + case 85: /* cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ { pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_QNODE_STMT, &yymsp[0].minor.yy0); } break; - case 82: /* cmd ::= DROP QNODE ON DNODE NK_INTEGER */ + case 86: /* cmd ::= DROP QNODE ON DNODE NK_INTEGER */ { pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_QNODE_STMT, &yymsp[0].minor.yy0); } break; - case 83: /* cmd ::= RESTORE QNODE ON DNODE NK_INTEGER */ + case 87: /* cmd ::= RESTORE QNODE ON DNODE NK_INTEGER */ { pCxt->pRootNode = createRestoreComponentNodeStmt(pCxt, QUERY_NODE_RESTORE_QNODE_STMT, &yymsp[0].minor.yy0); } break; - case 84: /* cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ + case 88: /* cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ { pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_BNODE_STMT, &yymsp[0].minor.yy0); } break; - case 85: /* cmd ::= DROP BNODE ON DNODE NK_INTEGER */ + case 89: /* cmd ::= DROP BNODE ON DNODE NK_INTEGER */ { pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_BNODE_STMT, &yymsp[0].minor.yy0); } break; - case 86: /* cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ + case 90: /* cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ { pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_SNODE_STMT, &yymsp[0].minor.yy0); } break; - case 87: /* cmd ::= DROP SNODE ON DNODE NK_INTEGER */ + case 91: /* cmd ::= DROP SNODE ON DNODE NK_INTEGER */ { pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_SNODE_STMT, &yymsp[0].minor.yy0); } break; - case 88: /* cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ + case 92: /* cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ { pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_MNODE_STMT, &yymsp[0].minor.yy0); } break; - case 89: /* cmd ::= DROP MNODE ON DNODE NK_INTEGER */ + case 93: /* cmd ::= DROP MNODE ON DNODE NK_INTEGER */ { pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_MNODE_STMT, &yymsp[0].minor.yy0); } break; - case 90: /* cmd ::= RESTORE MNODE ON DNODE NK_INTEGER */ + case 94: /* cmd ::= RESTORE MNODE ON DNODE NK_INTEGER */ { pCxt->pRootNode = createRestoreComponentNodeStmt(pCxt, QUERY_NODE_RESTORE_MNODE_STMT, &yymsp[0].minor.yy0); } break; - case 91: /* cmd ::= RESTORE VNODE ON DNODE NK_INTEGER */ + case 95: /* cmd ::= RESTORE VNODE ON DNODE NK_INTEGER */ { pCxt->pRootNode = createRestoreComponentNodeStmt(pCxt, QUERY_NODE_RESTORE_VNODE_STMT, &yymsp[0].minor.yy0); } break; - case 92: /* cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ -{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy173, &yymsp[-1].minor.yy533, yymsp[0].minor.yy560); } + case 96: /* cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ +{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy569, &yymsp[-1].minor.yy557, yymsp[0].minor.yy974); } break; - case 93: /* cmd ::= DROP DATABASE exists_opt db_name */ -{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy173, &yymsp[0].minor.yy533); } + case 97: /* cmd ::= DROP DATABASE exists_opt db_name */ +{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy569, &yymsp[0].minor.yy557); } break; - case 94: /* cmd ::= USE db_name */ -{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy533); } + case 98: /* cmd ::= USE db_name */ +{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy557); } break; - case 95: /* cmd ::= ALTER DATABASE db_name alter_db_options */ -{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy533, yymsp[0].minor.yy560); } + case 99: /* cmd ::= ALTER DATABASE db_name alter_db_options */ +{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy557, yymsp[0].minor.yy974); } break; - case 96: /* cmd ::= FLUSH DATABASE db_name */ -{ pCxt->pRootNode = createFlushDatabaseStmt(pCxt, &yymsp[0].minor.yy533); } + case 100: /* cmd ::= FLUSH DATABASE db_name */ +{ pCxt->pRootNode = createFlushDatabaseStmt(pCxt, &yymsp[0].minor.yy557); } break; - case 97: /* cmd ::= TRIM DATABASE db_name speed_opt */ -{ pCxt->pRootNode = createTrimDatabaseStmt(pCxt, &yymsp[-1].minor.yy533, yymsp[0].minor.yy802); } + case 101: /* cmd ::= TRIM DATABASE db_name speed_opt */ +{ pCxt->pRootNode = createTrimDatabaseStmt(pCxt, &yymsp[-1].minor.yy557, yymsp[0].minor.yy904); } break; - case 98: /* cmd ::= S3MIGRATE DATABASE db_name */ -{ pCxt->pRootNode = createS3MigrateDatabaseStmt(pCxt, &yymsp[0].minor.yy533); } + case 102: /* cmd ::= S3MIGRATE DATABASE db_name */ +{ pCxt->pRootNode = createS3MigrateDatabaseStmt(pCxt, &yymsp[0].minor.yy557); } break; - case 99: /* cmd ::= COMPACT DATABASE db_name start_opt end_opt */ -{ pCxt->pRootNode = createCompactStmt(pCxt, &yymsp[-2].minor.yy533, yymsp[-1].minor.yy560, yymsp[0].minor.yy560); } + case 103: /* cmd ::= COMPACT DATABASE db_name start_opt end_opt */ +{ pCxt->pRootNode = createCompactStmt(pCxt, &yymsp[-2].minor.yy557, yymsp[-1].minor.yy974, yymsp[0].minor.yy974); } break; - case 100: /* not_exists_opt ::= IF NOT EXISTS */ -{ yymsp[-2].minor.yy173 = true; } + case 104: /* not_exists_opt ::= IF NOT EXISTS */ +{ yymsp[-2].minor.yy569 = true; } break; - case 102: /* exists_opt ::= IF EXISTS */ - case 401: /* or_replace_opt ::= OR REPLACE */ yytestcase(yyruleno==401); - case 432: /* ignore_opt ::= IGNORE UNTREATED */ yytestcase(yyruleno==432); -{ yymsp[-1].minor.yy173 = true; } + case 106: /* exists_opt ::= IF EXISTS */ + case 407: /* or_replace_opt ::= OR REPLACE */ yytestcase(yyruleno==407); + case 438: /* ignore_opt ::= IGNORE UNTREATED */ yytestcase(yyruleno==438); +{ yymsp[-1].minor.yy569 = true; } break; - case 104: /* db_options ::= */ -{ yymsp[1].minor.yy560 = createDefaultDatabaseOptions(pCxt); } + case 108: /* db_options ::= */ +{ yymsp[1].minor.yy974 = createDefaultDatabaseOptions(pCxt); } break; - case 105: /* db_options ::= db_options BUFFER NK_INTEGER */ -{ yylhsminor.yy560 = setDatabaseOption(pCxt, yymsp[-2].minor.yy560, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + case 109: /* db_options ::= db_options BUFFER NK_INTEGER */ +{ yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 106: /* db_options ::= db_options CACHEMODEL NK_STRING */ -{ yylhsminor.yy560 = setDatabaseOption(pCxt, yymsp[-2].minor.yy560, DB_OPTION_CACHEMODEL, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + case 110: /* db_options ::= db_options CACHEMODEL NK_STRING */ +{ yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_CACHEMODEL, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 107: /* db_options ::= db_options CACHESIZE NK_INTEGER */ -{ yylhsminor.yy560 = setDatabaseOption(pCxt, yymsp[-2].minor.yy560, DB_OPTION_CACHESIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + case 111: /* db_options ::= db_options CACHESIZE NK_INTEGER */ +{ yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_CACHESIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 108: /* db_options ::= db_options COMP NK_INTEGER */ -{ yylhsminor.yy560 = setDatabaseOption(pCxt, yymsp[-2].minor.yy560, DB_OPTION_COMP, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + case 112: /* db_options ::= db_options COMP NK_INTEGER */ +{ yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_COMP, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 109: /* db_options ::= db_options DURATION NK_INTEGER */ - case 110: /* db_options ::= db_options DURATION NK_VARIABLE */ yytestcase(yyruleno==110); -{ yylhsminor.yy560 = setDatabaseOption(pCxt, yymsp[-2].minor.yy560, DB_OPTION_DAYS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + case 113: /* db_options ::= db_options DURATION NK_INTEGER */ + case 114: /* db_options ::= db_options DURATION NK_VARIABLE */ yytestcase(yyruleno==114); +{ yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_DAYS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 111: /* db_options ::= db_options MAXROWS NK_INTEGER */ -{ yylhsminor.yy560 = setDatabaseOption(pCxt, yymsp[-2].minor.yy560, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + case 115: /* db_options ::= db_options MAXROWS NK_INTEGER */ +{ yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 112: /* db_options ::= db_options MINROWS NK_INTEGER */ -{ yylhsminor.yy560 = setDatabaseOption(pCxt, yymsp[-2].minor.yy560, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + case 116: /* db_options ::= db_options MINROWS NK_INTEGER */ +{ yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 113: /* db_options ::= db_options KEEP integer_list */ - case 114: /* db_options ::= db_options KEEP variable_list */ yytestcase(yyruleno==114); -{ yylhsminor.yy560 = setDatabaseOption(pCxt, yymsp[-2].minor.yy560, DB_OPTION_KEEP, yymsp[0].minor.yy334); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + case 117: /* db_options ::= db_options KEEP integer_list */ + case 118: /* db_options ::= db_options KEEP variable_list */ yytestcase(yyruleno==118); +{ yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_KEEP, yymsp[0].minor.yy946); } + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 115: /* db_options ::= db_options PAGES NK_INTEGER */ -{ yylhsminor.yy560 = setDatabaseOption(pCxt, yymsp[-2].minor.yy560, DB_OPTION_PAGES, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + case 119: /* db_options ::= db_options PAGES NK_INTEGER */ +{ yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_PAGES, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 116: /* db_options ::= db_options PAGESIZE NK_INTEGER */ -{ yylhsminor.yy560 = setDatabaseOption(pCxt, yymsp[-2].minor.yy560, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + case 120: /* db_options ::= db_options PAGESIZE NK_INTEGER */ +{ yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 117: /* db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ -{ yylhsminor.yy560 = setDatabaseOption(pCxt, yymsp[-2].minor.yy560, DB_OPTION_TSDB_PAGESIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + case 121: /* db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ +{ yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_TSDB_PAGESIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 118: /* db_options ::= db_options PRECISION NK_STRING */ -{ yylhsminor.yy560 = setDatabaseOption(pCxt, yymsp[-2].minor.yy560, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + case 122: /* db_options ::= db_options PRECISION NK_STRING */ +{ yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 119: /* db_options ::= db_options REPLICA NK_INTEGER */ -{ yylhsminor.yy560 = setDatabaseOption(pCxt, yymsp[-2].minor.yy560, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + case 123: /* db_options ::= db_options REPLICA NK_INTEGER */ +{ yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 120: /* db_options ::= db_options VGROUPS NK_INTEGER */ -{ yylhsminor.yy560 = setDatabaseOption(pCxt, yymsp[-2].minor.yy560, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + case 124: /* db_options ::= db_options VGROUPS NK_INTEGER */ +{ yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 121: /* db_options ::= db_options SINGLE_STABLE NK_INTEGER */ -{ yylhsminor.yy560 = setDatabaseOption(pCxt, yymsp[-2].minor.yy560, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + case 125: /* db_options ::= db_options SINGLE_STABLE NK_INTEGER */ +{ yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 122: /* db_options ::= db_options RETENTIONS retention_list */ -{ yylhsminor.yy560 = setDatabaseOption(pCxt, yymsp[-2].minor.yy560, DB_OPTION_RETENTIONS, yymsp[0].minor.yy334); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + case 126: /* db_options ::= db_options RETENTIONS retention_list */ +{ yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_RETENTIONS, yymsp[0].minor.yy946); } + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 123: /* db_options ::= db_options SCHEMALESS NK_INTEGER */ -{ yylhsminor.yy560 = setDatabaseOption(pCxt, yymsp[-2].minor.yy560, DB_OPTION_SCHEMALESS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + case 127: /* db_options ::= db_options SCHEMALESS NK_INTEGER */ +{ yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_SCHEMALESS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 124: /* db_options ::= db_options WAL_LEVEL NK_INTEGER */ -{ yylhsminor.yy560 = setDatabaseOption(pCxt, yymsp[-2].minor.yy560, DB_OPTION_WAL, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + case 128: /* db_options ::= db_options WAL_LEVEL NK_INTEGER */ +{ yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_WAL, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 125: /* db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ -{ yylhsminor.yy560 = setDatabaseOption(pCxt, yymsp[-2].minor.yy560, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + case 129: /* db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ +{ yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 126: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ -{ yylhsminor.yy560 = setDatabaseOption(pCxt, yymsp[-2].minor.yy560, DB_OPTION_WAL_RETENTION_PERIOD, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + case 130: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ +{ yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_WAL_RETENTION_PERIOD, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 127: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ + case 131: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy560 = setDatabaseOption(pCxt, yymsp[-3].minor.yy560, DB_OPTION_WAL_RETENTION_PERIOD, &t); + yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-3].minor.yy974, DB_OPTION_WAL_RETENTION_PERIOD, &t); } - yymsp[-3].minor.yy560 = yylhsminor.yy560; + yymsp[-3].minor.yy974 = yylhsminor.yy974; break; - case 128: /* db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ -{ yylhsminor.yy560 = setDatabaseOption(pCxt, yymsp[-2].minor.yy560, DB_OPTION_WAL_RETENTION_SIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + case 132: /* db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ +{ yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_WAL_RETENTION_SIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 129: /* db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ + case 133: /* db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy560 = setDatabaseOption(pCxt, yymsp[-3].minor.yy560, DB_OPTION_WAL_RETENTION_SIZE, &t); + yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-3].minor.yy974, DB_OPTION_WAL_RETENTION_SIZE, &t); } - yymsp[-3].minor.yy560 = yylhsminor.yy560; + yymsp[-3].minor.yy974 = yylhsminor.yy974; break; - case 130: /* db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ -{ yylhsminor.yy560 = setDatabaseOption(pCxt, yymsp[-2].minor.yy560, DB_OPTION_WAL_ROLL_PERIOD, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + case 134: /* db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ +{ yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_WAL_ROLL_PERIOD, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 131: /* db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ -{ yylhsminor.yy560 = setDatabaseOption(pCxt, yymsp[-2].minor.yy560, DB_OPTION_WAL_SEGMENT_SIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + case 135: /* db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ +{ yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_WAL_SEGMENT_SIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 132: /* db_options ::= db_options STT_TRIGGER NK_INTEGER */ -{ yylhsminor.yy560 = setDatabaseOption(pCxt, yymsp[-2].minor.yy560, DB_OPTION_STT_TRIGGER, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + case 136: /* db_options ::= db_options STT_TRIGGER NK_INTEGER */ +{ yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_STT_TRIGGER, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 133: /* db_options ::= db_options TABLE_PREFIX signed */ -{ yylhsminor.yy560 = setDatabaseOption(pCxt, yymsp[-2].minor.yy560, DB_OPTION_TABLE_PREFIX, yymsp[0].minor.yy560); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + case 137: /* db_options ::= db_options TABLE_PREFIX signed */ +{ yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_TABLE_PREFIX, yymsp[0].minor.yy974); } + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 134: /* db_options ::= db_options TABLE_SUFFIX signed */ -{ yylhsminor.yy560 = setDatabaseOption(pCxt, yymsp[-2].minor.yy560, DB_OPTION_TABLE_SUFFIX, yymsp[0].minor.yy560); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + case 138: /* db_options ::= db_options TABLE_SUFFIX signed */ +{ yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_TABLE_SUFFIX, yymsp[0].minor.yy974); } + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 135: /* db_options ::= db_options S3_CHUNKSIZE NK_INTEGER */ -{ yylhsminor.yy560 = setDatabaseOption(pCxt, yymsp[-2].minor.yy560, DB_OPTION_S3_CHUNKSIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + case 139: /* db_options ::= db_options S3_CHUNKSIZE NK_INTEGER */ +{ yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_S3_CHUNKSIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 136: /* db_options ::= db_options S3_KEEPLOCAL NK_INTEGER */ - case 137: /* db_options ::= db_options S3_KEEPLOCAL NK_VARIABLE */ yytestcase(yyruleno==137); -{ yylhsminor.yy560 = setDatabaseOption(pCxt, yymsp[-2].minor.yy560, DB_OPTION_S3_KEEPLOCAL, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + case 140: /* db_options ::= db_options S3_KEEPLOCAL NK_INTEGER */ + case 141: /* db_options ::= db_options S3_KEEPLOCAL NK_VARIABLE */ yytestcase(yyruleno==141); +{ yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_S3_KEEPLOCAL, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 138: /* db_options ::= db_options S3_COMPACT NK_INTEGER */ -{ yylhsminor.yy560 = setDatabaseOption(pCxt, yymsp[-2].minor.yy560, DB_OPTION_S3_COMPACT, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + case 142: /* db_options ::= db_options S3_COMPACT NK_INTEGER */ +{ yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_S3_COMPACT, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 139: /* db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER */ -{ yylhsminor.yy560 = setDatabaseOption(pCxt, yymsp[-2].minor.yy560, DB_OPTION_KEEP_TIME_OFFSET, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + case 143: /* db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER */ +{ yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_KEEP_TIME_OFFSET, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 140: /* db_options ::= db_options ENCRYPT_ALGORITHM NK_STRING */ -{ yylhsminor.yy560 = setDatabaseOption(pCxt, yymsp[-2].minor.yy560, DB_OPTION_ENCRYPT_ALGORITHM, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + case 144: /* db_options ::= db_options ENCRYPT_ALGORITHM NK_STRING */ +{ yylhsminor.yy974 = setDatabaseOption(pCxt, yymsp[-2].minor.yy974, DB_OPTION_ENCRYPT_ALGORITHM, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 141: /* alter_db_options ::= alter_db_option */ -{ yylhsminor.yy560 = createAlterDatabaseOptions(pCxt); yylhsminor.yy560 = setAlterDatabaseOption(pCxt, yylhsminor.yy560, &yymsp[0].minor.yy389); } - yymsp[0].minor.yy560 = yylhsminor.yy560; + case 145: /* alter_db_options ::= alter_db_option */ +{ yylhsminor.yy974 = createAlterDatabaseOptions(pCxt); yylhsminor.yy974 = setAlterDatabaseOption(pCxt, yylhsminor.yy974, &yymsp[0].minor.yy683); } + yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 142: /* alter_db_options ::= alter_db_options alter_db_option */ -{ yylhsminor.yy560 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy560, &yymsp[0].minor.yy389); } - yymsp[-1].minor.yy560 = yylhsminor.yy560; + case 146: /* alter_db_options ::= alter_db_options alter_db_option */ +{ yylhsminor.yy974 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy974, &yymsp[0].minor.yy683); } + yymsp[-1].minor.yy974 = yylhsminor.yy974; break; - case 143: /* alter_db_option ::= BUFFER NK_INTEGER */ -{ yymsp[-1].minor.yy389.type = DB_OPTION_BUFFER; yymsp[-1].minor.yy389.val = yymsp[0].minor.yy0; } + case 147: /* alter_db_option ::= BUFFER NK_INTEGER */ +{ yymsp[-1].minor.yy683.type = DB_OPTION_BUFFER; yymsp[-1].minor.yy683.val = yymsp[0].minor.yy0; } break; - case 144: /* alter_db_option ::= CACHEMODEL NK_STRING */ -{ yymsp[-1].minor.yy389.type = DB_OPTION_CACHEMODEL; yymsp[-1].minor.yy389.val = yymsp[0].minor.yy0; } + case 148: /* alter_db_option ::= CACHEMODEL NK_STRING */ +{ yymsp[-1].minor.yy683.type = DB_OPTION_CACHEMODEL; yymsp[-1].minor.yy683.val = yymsp[0].minor.yy0; } break; - case 145: /* alter_db_option ::= CACHESIZE NK_INTEGER */ -{ yymsp[-1].minor.yy389.type = DB_OPTION_CACHESIZE; yymsp[-1].minor.yy389.val = yymsp[0].minor.yy0; } + case 149: /* alter_db_option ::= CACHESIZE NK_INTEGER */ +{ yymsp[-1].minor.yy683.type = DB_OPTION_CACHESIZE; yymsp[-1].minor.yy683.val = yymsp[0].minor.yy0; } break; - case 146: /* alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ -{ yymsp[-1].minor.yy389.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy389.val = yymsp[0].minor.yy0; } + case 150: /* alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ +{ yymsp[-1].minor.yy683.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy683.val = yymsp[0].minor.yy0; } break; - case 147: /* alter_db_option ::= KEEP integer_list */ - case 148: /* alter_db_option ::= KEEP variable_list */ yytestcase(yyruleno==148); -{ yymsp[-1].minor.yy389.type = DB_OPTION_KEEP; yymsp[-1].minor.yy389.pList = yymsp[0].minor.yy334; } + case 151: /* alter_db_option ::= KEEP integer_list */ + case 152: /* alter_db_option ::= KEEP variable_list */ yytestcase(yyruleno==152); +{ yymsp[-1].minor.yy683.type = DB_OPTION_KEEP; yymsp[-1].minor.yy683.pList = yymsp[0].minor.yy946; } break; - case 149: /* alter_db_option ::= PAGES NK_INTEGER */ -{ yymsp[-1].minor.yy389.type = DB_OPTION_PAGES; yymsp[-1].minor.yy389.val = yymsp[0].minor.yy0; } + case 153: /* alter_db_option ::= PAGES NK_INTEGER */ +{ yymsp[-1].minor.yy683.type = DB_OPTION_PAGES; yymsp[-1].minor.yy683.val = yymsp[0].minor.yy0; } break; - case 150: /* alter_db_option ::= REPLICA NK_INTEGER */ -{ yymsp[-1].minor.yy389.type = DB_OPTION_REPLICA; yymsp[-1].minor.yy389.val = yymsp[0].minor.yy0; } + case 154: /* alter_db_option ::= REPLICA NK_INTEGER */ +{ yymsp[-1].minor.yy683.type = DB_OPTION_REPLICA; yymsp[-1].minor.yy683.val = yymsp[0].minor.yy0; } break; - case 151: /* alter_db_option ::= WAL_LEVEL NK_INTEGER */ -{ yymsp[-1].minor.yy389.type = DB_OPTION_WAL; yymsp[-1].minor.yy389.val = yymsp[0].minor.yy0; } + case 155: /* alter_db_option ::= WAL_LEVEL NK_INTEGER */ +{ yymsp[-1].minor.yy683.type = DB_OPTION_WAL; yymsp[-1].minor.yy683.val = yymsp[0].minor.yy0; } break; - case 152: /* alter_db_option ::= STT_TRIGGER NK_INTEGER */ -{ yymsp[-1].minor.yy389.type = DB_OPTION_STT_TRIGGER; yymsp[-1].minor.yy389.val = yymsp[0].minor.yy0; } + case 156: /* alter_db_option ::= STT_TRIGGER NK_INTEGER */ +{ yymsp[-1].minor.yy683.type = DB_OPTION_STT_TRIGGER; yymsp[-1].minor.yy683.val = yymsp[0].minor.yy0; } break; - case 153: /* alter_db_option ::= MINROWS NK_INTEGER */ -{ yymsp[-1].minor.yy389.type = DB_OPTION_MINROWS; yymsp[-1].minor.yy389.val = yymsp[0].minor.yy0; } + case 157: /* alter_db_option ::= MINROWS NK_INTEGER */ +{ yymsp[-1].minor.yy683.type = DB_OPTION_MINROWS; yymsp[-1].minor.yy683.val = yymsp[0].minor.yy0; } break; - case 154: /* alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER */ -{ yymsp[-1].minor.yy389.type = DB_OPTION_WAL_RETENTION_PERIOD; yymsp[-1].minor.yy389.val = yymsp[0].minor.yy0; } + case 158: /* alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER */ +{ yymsp[-1].minor.yy683.type = DB_OPTION_WAL_RETENTION_PERIOD; yymsp[-1].minor.yy683.val = yymsp[0].minor.yy0; } break; - case 155: /* alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ + case 159: /* alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yymsp[-2].minor.yy389.type = DB_OPTION_WAL_RETENTION_PERIOD; yymsp[-2].minor.yy389.val = t; + yymsp[-2].minor.yy683.type = DB_OPTION_WAL_RETENTION_PERIOD; yymsp[-2].minor.yy683.val = t; } break; - case 156: /* alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER */ -{ yymsp[-1].minor.yy389.type = DB_OPTION_WAL_RETENTION_SIZE; yymsp[-1].minor.yy389.val = yymsp[0].minor.yy0; } + case 160: /* alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER */ +{ yymsp[-1].minor.yy683.type = DB_OPTION_WAL_RETENTION_SIZE; yymsp[-1].minor.yy683.val = yymsp[0].minor.yy0; } break; - case 157: /* alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ + case 161: /* alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yymsp[-2].minor.yy389.type = DB_OPTION_WAL_RETENTION_SIZE; yymsp[-2].minor.yy389.val = t; + yymsp[-2].minor.yy683.type = DB_OPTION_WAL_RETENTION_SIZE; yymsp[-2].minor.yy683.val = t; } break; - case 158: /* alter_db_option ::= S3_KEEPLOCAL NK_INTEGER */ - case 159: /* alter_db_option ::= S3_KEEPLOCAL NK_VARIABLE */ yytestcase(yyruleno==159); -{ yymsp[-1].minor.yy389.type = DB_OPTION_S3_KEEPLOCAL; yymsp[-1].minor.yy389.val = yymsp[0].minor.yy0; } - break; - case 160: /* alter_db_option ::= S3_COMPACT NK_INTEGER */ -{ yymsp[-1].minor.yy389.type = DB_OPTION_S3_COMPACT, yymsp[-1].minor.yy389.val = yymsp[0].minor.yy0; } - break; - case 161: /* alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER */ -{ yymsp[-1].minor.yy389.type = DB_OPTION_KEEP_TIME_OFFSET; yymsp[-1].minor.yy389.val = yymsp[0].minor.yy0; } - break; - case 162: /* alter_db_option ::= ENCRYPT_ALGORITHM NK_STRING */ -{ yymsp[-1].minor.yy389.type = DB_OPTION_ENCRYPT_ALGORITHM; yymsp[-1].minor.yy389.val = yymsp[0].minor.yy0; } - break; - case 163: /* integer_list ::= NK_INTEGER */ -{ yylhsminor.yy334 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy334 = yylhsminor.yy334; - break; - case 164: /* integer_list ::= integer_list NK_COMMA NK_INTEGER */ - case 446: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==446); -{ yylhsminor.yy334 = addNodeToList(pCxt, yymsp[-2].minor.yy334, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy334 = yylhsminor.yy334; - break; - case 165: /* variable_list ::= NK_VARIABLE */ -{ yylhsminor.yy334 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy334 = yylhsminor.yy334; - break; - case 166: /* variable_list ::= variable_list NK_COMMA NK_VARIABLE */ -{ yylhsminor.yy334 = addNodeToList(pCxt, yymsp[-2].minor.yy334, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy334 = yylhsminor.yy334; - break; - case 167: /* retention_list ::= retention */ - case 200: /* multi_create_clause ::= create_subtable_clause */ yytestcase(yyruleno==200); - case 203: /* multi_drop_clause ::= drop_table_clause */ yytestcase(yyruleno==203); - case 212: /* tag_def_list ::= tag_def */ yytestcase(yyruleno==212); - case 215: /* column_def_list ::= column_def */ yytestcase(yyruleno==215); - case 263: /* rollup_func_list ::= rollup_func_name */ yytestcase(yyruleno==263); - case 268: /* col_name_list ::= col_name */ yytestcase(yyruleno==268); - case 338: /* tag_list_opt ::= tag_item */ yytestcase(yyruleno==338); - case 362: /* func_list ::= func */ yytestcase(yyruleno==362); - case 412: /* column_stream_def_list ::= column_stream_def */ yytestcase(yyruleno==412); - case 490: /* tags_literal_list ::= tags_literal */ yytestcase(yyruleno==490); - case 515: /* literal_list ::= signed_literal */ yytestcase(yyruleno==515); - case 607: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==607); - case 613: /* when_then_list ::= when_then_expr */ yytestcase(yyruleno==613); - case 689: /* select_list ::= select_item */ yytestcase(yyruleno==689); - case 700: /* partition_list ::= partition_item */ yytestcase(yyruleno==700); - case 761: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==761); -{ yylhsminor.yy334 = createNodeList(pCxt, yymsp[0].minor.yy560); } - yymsp[0].minor.yy334 = yylhsminor.yy334; - break; - case 168: /* retention_list ::= retention_list NK_COMMA retention */ - case 204: /* multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */ yytestcase(yyruleno==204); - case 213: /* tag_def_list ::= tag_def_list NK_COMMA tag_def */ yytestcase(yyruleno==213); - case 216: /* column_def_list ::= column_def_list NK_COMMA column_def */ yytestcase(yyruleno==216); - case 264: /* rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ yytestcase(yyruleno==264); - case 269: /* col_name_list ::= col_name_list NK_COMMA col_name */ yytestcase(yyruleno==269); - case 339: /* tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ yytestcase(yyruleno==339); - case 363: /* func_list ::= func_list NK_COMMA func */ yytestcase(yyruleno==363); - case 413: /* column_stream_def_list ::= column_stream_def_list NK_COMMA column_stream_def */ yytestcase(yyruleno==413); - case 491: /* tags_literal_list ::= tags_literal_list NK_COMMA tags_literal */ yytestcase(yyruleno==491); - case 516: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==516); - case 608: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==608); - case 690: /* select_list ::= select_list NK_COMMA select_item */ yytestcase(yyruleno==690); - case 701: /* partition_list ::= partition_list NK_COMMA partition_item */ yytestcase(yyruleno==701); - case 762: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==762); -{ yylhsminor.yy334 = addNodeToList(pCxt, yymsp[-2].minor.yy334, yymsp[0].minor.yy560); } - yymsp[-2].minor.yy334 = yylhsminor.yy334; - break; - case 169: /* retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ - case 170: /* retention ::= NK_MINUS NK_COLON NK_VARIABLE */ yytestcase(yyruleno==170); -{ yylhsminor.yy560 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; - break; - case 171: /* speed_opt ::= */ - case 396: /* bufsize_opt ::= */ yytestcase(yyruleno==396); -{ yymsp[1].minor.yy802 = 0; } - break; - case 172: /* speed_opt ::= BWLIMIT NK_INTEGER */ - case 397: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ yytestcase(yyruleno==397); -{ yymsp[-1].minor.yy802 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); } - break; - case 174: /* start_opt ::= START WITH NK_INTEGER */ - case 178: /* end_opt ::= END WITH NK_INTEGER */ yytestcase(yyruleno==178); -{ yymsp[-2].minor.yy560 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } - break; - case 175: /* start_opt ::= START WITH NK_STRING */ - case 179: /* end_opt ::= END WITH NK_STRING */ yytestcase(yyruleno==179); -{ yymsp[-2].minor.yy560 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } - break; - case 176: /* start_opt ::= START WITH TIMESTAMP NK_STRING */ - case 180: /* end_opt ::= END WITH TIMESTAMP NK_STRING */ yytestcase(yyruleno==180); -{ yymsp[-3].minor.yy560 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } - break; - case 181: /* cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ - case 184: /* cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ yytestcase(yyruleno==184); -{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy173, yymsp[-5].minor.yy560, yymsp[-3].minor.yy334, yymsp[-1].minor.yy334, yymsp[0].minor.yy560); } - break; - case 182: /* cmd ::= CREATE TABLE multi_create_clause */ -{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy334); } - break; - case 183: /* cmd ::= CREATE TABLE not_exists_opt USING full_table_name NK_LP tag_list_opt NK_RP FILE NK_STRING */ -{ pCxt->pRootNode = createCreateSubTableFromFileClause(pCxt, yymsp[-7].minor.yy173, yymsp[-5].minor.yy560, yymsp[-3].minor.yy334, &yymsp[0].minor.yy0); } - break; - case 185: /* cmd ::= DROP TABLE with_opt multi_drop_clause */ -{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[-1].minor.yy173, yymsp[0].minor.yy334); } - break; - case 186: /* cmd ::= DROP STABLE with_opt exists_opt full_table_name */ -{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-2].minor.yy173, yymsp[-1].minor.yy173, yymsp[0].minor.yy560); } - break; - case 187: /* cmd ::= ALTER TABLE alter_table_clause */ - case 448: /* cmd ::= query_or_subquery */ yytestcase(yyruleno==448); - case 449: /* cmd ::= insert_query */ yytestcase(yyruleno==449); -{ pCxt->pRootNode = yymsp[0].minor.yy560; } - break; - case 188: /* cmd ::= ALTER STABLE alter_table_clause */ -{ pCxt->pRootNode = setAlterSuperTableType(yymsp[0].minor.yy560); } - break; - case 189: /* alter_table_clause ::= full_table_name alter_table_options */ -{ yylhsminor.yy560 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy560, yymsp[0].minor.yy560); } - yymsp[-1].minor.yy560 = yylhsminor.yy560; - break; - case 190: /* alter_table_clause ::= full_table_name ADD COLUMN column_name type_name column_options */ -{ yylhsminor.yy560 = createAlterTableAddModifyColOptions2(pCxt, yymsp[-5].minor.yy560, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-2].minor.yy533, yymsp[-1].minor.yy952, yymsp[0].minor.yy560); } - yymsp[-5].minor.yy560 = yylhsminor.yy560; - break; - case 191: /* alter_table_clause ::= full_table_name DROP COLUMN column_name */ -{ yylhsminor.yy560 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy560, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy533); } - yymsp[-3].minor.yy560 = yylhsminor.yy560; - break; - case 192: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ -{ yylhsminor.yy560 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy560, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy533, yymsp[0].minor.yy952); } - yymsp[-4].minor.yy560 = yylhsminor.yy560; - break; - case 193: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name column_options */ -{ yylhsminor.yy560 = createAlterTableAddModifyColOptions(pCxt, yymsp[-4].minor.yy560, TSDB_ALTER_TABLE_UPDATE_COLUMN_COMPRESS, &yymsp[-1].minor.yy533, yymsp[0].minor.yy560); } - yymsp[-4].minor.yy560 = yylhsminor.yy560; - break; - case 194: /* alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ -{ yylhsminor.yy560 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy560, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy533, &yymsp[0].minor.yy533); } - yymsp[-4].minor.yy560 = yylhsminor.yy560; - break; - case 195: /* alter_table_clause ::= full_table_name ADD TAG column_name type_name */ -{ yylhsminor.yy560 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy560, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy533, yymsp[0].minor.yy952); } - yymsp[-4].minor.yy560 = yylhsminor.yy560; + case 162: /* alter_db_option ::= S3_KEEPLOCAL NK_INTEGER */ + case 163: /* alter_db_option ::= S3_KEEPLOCAL NK_VARIABLE */ yytestcase(yyruleno==163); +{ yymsp[-1].minor.yy683.type = DB_OPTION_S3_KEEPLOCAL; yymsp[-1].minor.yy683.val = yymsp[0].minor.yy0; } + break; + case 164: /* alter_db_option ::= S3_COMPACT NK_INTEGER */ +{ yymsp[-1].minor.yy683.type = DB_OPTION_S3_COMPACT, yymsp[-1].minor.yy683.val = yymsp[0].minor.yy0; } + break; + case 165: /* alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER */ +{ yymsp[-1].minor.yy683.type = DB_OPTION_KEEP_TIME_OFFSET; yymsp[-1].minor.yy683.val = yymsp[0].minor.yy0; } + break; + case 166: /* alter_db_option ::= ENCRYPT_ALGORITHM NK_STRING */ +{ yymsp[-1].minor.yy683.type = DB_OPTION_ENCRYPT_ALGORITHM; yymsp[-1].minor.yy683.val = yymsp[0].minor.yy0; } + break; + case 167: /* integer_list ::= NK_INTEGER */ +{ yylhsminor.yy946 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy946 = yylhsminor.yy946; + break; + case 168: /* integer_list ::= integer_list NK_COMMA NK_INTEGER */ + case 452: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==452); +{ yylhsminor.yy946 = addNodeToList(pCxt, yymsp[-2].minor.yy946, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy946 = yylhsminor.yy946; + break; + case 169: /* variable_list ::= NK_VARIABLE */ +{ yylhsminor.yy946 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy946 = yylhsminor.yy946; + break; + case 170: /* variable_list ::= variable_list NK_COMMA NK_VARIABLE */ +{ yylhsminor.yy946 = addNodeToList(pCxt, yymsp[-2].minor.yy946, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy946 = yylhsminor.yy946; + break; + case 171: /* retention_list ::= retention */ + case 204: /* multi_create_clause ::= create_subtable_clause */ yytestcase(yyruleno==204); + case 207: /* multi_drop_clause ::= drop_table_clause */ yytestcase(yyruleno==207); + case 216: /* tag_def_list ::= tag_def */ yytestcase(yyruleno==216); + case 219: /* column_def_list ::= column_def */ yytestcase(yyruleno==219); + case 267: /* rollup_func_list ::= rollup_func_name */ yytestcase(yyruleno==267); + case 272: /* col_name_list ::= col_name */ yytestcase(yyruleno==272); + case 344: /* tag_list_opt ::= tag_item */ yytestcase(yyruleno==344); + case 368: /* func_list ::= func */ yytestcase(yyruleno==368); + case 418: /* column_stream_def_list ::= column_stream_def */ yytestcase(yyruleno==418); + case 496: /* tags_literal_list ::= tags_literal */ yytestcase(yyruleno==496); + case 521: /* literal_list ::= signed_literal */ yytestcase(yyruleno==521); + case 616: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==616); + case 622: /* when_then_list ::= when_then_expr */ yytestcase(yyruleno==622); + case 698: /* select_list ::= select_item */ yytestcase(yyruleno==698); + case 709: /* partition_list ::= partition_item */ yytestcase(yyruleno==709); + case 772: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==772); +{ yylhsminor.yy946 = createNodeList(pCxt, yymsp[0].minor.yy974); } + yymsp[0].minor.yy946 = yylhsminor.yy946; + break; + case 172: /* retention_list ::= retention_list NK_COMMA retention */ + case 208: /* multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */ yytestcase(yyruleno==208); + case 217: /* tag_def_list ::= tag_def_list NK_COMMA tag_def */ yytestcase(yyruleno==217); + case 220: /* column_def_list ::= column_def_list NK_COMMA column_def */ yytestcase(yyruleno==220); + case 268: /* rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ yytestcase(yyruleno==268); + case 273: /* col_name_list ::= col_name_list NK_COMMA col_name */ yytestcase(yyruleno==273); + case 345: /* tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ yytestcase(yyruleno==345); + case 369: /* func_list ::= func_list NK_COMMA func */ yytestcase(yyruleno==369); + case 419: /* column_stream_def_list ::= column_stream_def_list NK_COMMA column_stream_def */ yytestcase(yyruleno==419); + case 497: /* tags_literal_list ::= tags_literal_list NK_COMMA tags_literal */ yytestcase(yyruleno==497); + case 522: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==522); + case 617: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==617); + case 699: /* select_list ::= select_list NK_COMMA select_item */ yytestcase(yyruleno==699); + case 710: /* partition_list ::= partition_list NK_COMMA partition_item */ yytestcase(yyruleno==710); + case 773: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==773); +{ yylhsminor.yy946 = addNodeToList(pCxt, yymsp[-2].minor.yy946, yymsp[0].minor.yy974); } + yymsp[-2].minor.yy946 = yylhsminor.yy946; + break; + case 173: /* retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ + case 174: /* retention ::= NK_MINUS NK_COLON NK_VARIABLE */ yytestcase(yyruleno==174); +{ yylhsminor.yy974 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy974 = yylhsminor.yy974; + break; + case 175: /* speed_opt ::= */ + case 402: /* bufsize_opt ::= */ yytestcase(yyruleno==402); +{ yymsp[1].minor.yy904 = 0; } + break; + case 176: /* speed_opt ::= BWLIMIT NK_INTEGER */ + case 403: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ yytestcase(yyruleno==403); +{ yymsp[-1].minor.yy904 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); } + break; + case 178: /* start_opt ::= START WITH NK_INTEGER */ + case 182: /* end_opt ::= END WITH NK_INTEGER */ yytestcase(yyruleno==182); +{ yymsp[-2].minor.yy974 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } + break; + case 179: /* start_opt ::= START WITH NK_STRING */ + case 183: /* end_opt ::= END WITH NK_STRING */ yytestcase(yyruleno==183); +{ yymsp[-2].minor.yy974 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } + break; + case 180: /* start_opt ::= START WITH TIMESTAMP NK_STRING */ + case 184: /* end_opt ::= END WITH TIMESTAMP NK_STRING */ yytestcase(yyruleno==184); +{ yymsp[-3].minor.yy974 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } + break; + case 185: /* cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ + case 188: /* cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ yytestcase(yyruleno==188); +{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy569, yymsp[-5].minor.yy974, yymsp[-3].minor.yy946, yymsp[-1].minor.yy946, yymsp[0].minor.yy974); } + break; + case 186: /* cmd ::= CREATE TABLE multi_create_clause */ +{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy946); } + break; + case 187: /* cmd ::= CREATE TABLE not_exists_opt USING full_table_name NK_LP tag_list_opt NK_RP FILE NK_STRING */ +{ pCxt->pRootNode = createCreateSubTableFromFileClause(pCxt, yymsp[-7].minor.yy569, yymsp[-5].minor.yy974, yymsp[-3].minor.yy946, &yymsp[0].minor.yy0); } + break; + case 189: /* cmd ::= DROP TABLE with_opt multi_drop_clause */ +{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[-1].minor.yy569, yymsp[0].minor.yy946); } + break; + case 190: /* cmd ::= DROP STABLE with_opt exists_opt full_table_name */ +{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-2].minor.yy569, yymsp[-1].minor.yy569, yymsp[0].minor.yy974); } + break; + case 191: /* cmd ::= ALTER TABLE alter_table_clause */ + case 454: /* cmd ::= query_or_subquery */ yytestcase(yyruleno==454); + case 455: /* cmd ::= insert_query */ yytestcase(yyruleno==455); +{ pCxt->pRootNode = yymsp[0].minor.yy974; } + break; + case 192: /* cmd ::= ALTER STABLE alter_table_clause */ +{ pCxt->pRootNode = setAlterSuperTableType(yymsp[0].minor.yy974); } + break; + case 193: /* alter_table_clause ::= full_table_name alter_table_options */ +{ yylhsminor.yy974 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy974, yymsp[0].minor.yy974); } + yymsp[-1].minor.yy974 = yylhsminor.yy974; + break; + case 194: /* alter_table_clause ::= full_table_name ADD COLUMN column_name type_name column_options */ +{ yylhsminor.yy974 = createAlterTableAddModifyColOptions2(pCxt, yymsp[-5].minor.yy974, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-2].minor.yy557, yymsp[-1].minor.yy424, yymsp[0].minor.yy974); } + yymsp[-5].minor.yy974 = yylhsminor.yy974; + break; + case 195: /* alter_table_clause ::= full_table_name DROP COLUMN column_name */ +{ yylhsminor.yy974 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy974, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy557); } + yymsp[-3].minor.yy974 = yylhsminor.yy974; + break; + case 196: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ +{ yylhsminor.yy974 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy974, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy557, yymsp[0].minor.yy424); } + yymsp[-4].minor.yy974 = yylhsminor.yy974; + break; + case 197: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name column_options */ +{ yylhsminor.yy974 = createAlterTableAddModifyColOptions(pCxt, yymsp[-4].minor.yy974, TSDB_ALTER_TABLE_UPDATE_COLUMN_COMPRESS, &yymsp[-1].minor.yy557, yymsp[0].minor.yy974); } + yymsp[-4].minor.yy974 = yylhsminor.yy974; + break; + case 198: /* alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ +{ yylhsminor.yy974 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy974, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy557, &yymsp[0].minor.yy557); } + yymsp[-4].minor.yy974 = yylhsminor.yy974; + break; + case 199: /* alter_table_clause ::= full_table_name ADD TAG column_name type_name */ +{ yylhsminor.yy974 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy974, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy557, yymsp[0].minor.yy424); } + yymsp[-4].minor.yy974 = yylhsminor.yy974; break; - case 196: /* alter_table_clause ::= full_table_name DROP TAG column_name */ -{ yylhsminor.yy560 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy560, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy533); } - yymsp[-3].minor.yy560 = yylhsminor.yy560; + case 200: /* alter_table_clause ::= full_table_name DROP TAG column_name */ +{ yylhsminor.yy974 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy974, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy557); } + yymsp[-3].minor.yy974 = yylhsminor.yy974; break; - case 197: /* alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ -{ yylhsminor.yy560 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy560, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy533, yymsp[0].minor.yy952); } - yymsp[-4].minor.yy560 = yylhsminor.yy560; + case 201: /* alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ +{ yylhsminor.yy974 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy974, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy557, yymsp[0].minor.yy424); } + yymsp[-4].minor.yy974 = yylhsminor.yy974; break; - case 198: /* alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ -{ yylhsminor.yy560 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy560, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy533, &yymsp[0].minor.yy533); } - yymsp[-4].minor.yy560 = yylhsminor.yy560; + case 202: /* alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ +{ yylhsminor.yy974 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy974, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy557, &yymsp[0].minor.yy557); } + yymsp[-4].minor.yy974 = yylhsminor.yy974; break; - case 199: /* alter_table_clause ::= full_table_name SET TAG column_name NK_EQ tags_literal */ -{ yylhsminor.yy560 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy560, &yymsp[-2].minor.yy533, yymsp[0].minor.yy560); } - yymsp[-5].minor.yy560 = yylhsminor.yy560; + case 203: /* alter_table_clause ::= full_table_name SET TAG column_name NK_EQ tags_literal */ +{ yylhsminor.yy974 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy974, &yymsp[-2].minor.yy557, yymsp[0].minor.yy974); } + yymsp[-5].minor.yy974 = yylhsminor.yy974; break; - case 201: /* multi_create_clause ::= multi_create_clause create_subtable_clause */ - case 614: /* when_then_list ::= when_then_list when_then_expr */ yytestcase(yyruleno==614); -{ yylhsminor.yy334 = addNodeToList(pCxt, yymsp[-1].minor.yy334, yymsp[0].minor.yy560); } - yymsp[-1].minor.yy334 = yylhsminor.yy334; + case 205: /* multi_create_clause ::= multi_create_clause create_subtable_clause */ + case 623: /* when_then_list ::= when_then_list when_then_expr */ yytestcase(yyruleno==623); +{ yylhsminor.yy946 = addNodeToList(pCxt, yymsp[-1].minor.yy946, yymsp[0].minor.yy974); } + yymsp[-1].minor.yy946 = yylhsminor.yy946; break; - case 202: /* 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.yy560 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy173, yymsp[-8].minor.yy560, yymsp[-6].minor.yy560, yymsp[-5].minor.yy334, yymsp[-2].minor.yy334, yymsp[0].minor.yy560); } - yymsp[-9].minor.yy560 = yylhsminor.yy560; + case 206: /* create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP tags_literal_list NK_RP table_options */ +{ yylhsminor.yy974 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy569, yymsp[-8].minor.yy974, yymsp[-6].minor.yy974, yymsp[-5].minor.yy946, yymsp[-2].minor.yy946, yymsp[0].minor.yy974); } + yymsp[-9].minor.yy974 = yylhsminor.yy974; break; - case 205: /* drop_table_clause ::= exists_opt full_table_name */ -{ yylhsminor.yy560 = createDropTableClause(pCxt, yymsp[-1].minor.yy173, yymsp[0].minor.yy560); } - yymsp[-1].minor.yy560 = yylhsminor.yy560; + case 209: /* drop_table_clause ::= exists_opt full_table_name */ +{ yylhsminor.yy974 = createDropTableClause(pCxt, yymsp[-1].minor.yy569, yymsp[0].minor.yy974); } + yymsp[-1].minor.yy974 = yylhsminor.yy974; break; - case 209: /* specific_cols_opt ::= NK_LP col_name_list NK_RP */ - case 411: /* col_list_opt ::= NK_LP column_stream_def_list NK_RP */ yytestcase(yyruleno==411); -{ yymsp[-2].minor.yy334 = yymsp[-1].minor.yy334; } + case 213: /* specific_cols_opt ::= NK_LP col_name_list NK_RP */ + case 417: /* col_list_opt ::= NK_LP column_stream_def_list NK_RP */ yytestcase(yyruleno==417); +{ yymsp[-2].minor.yy946 = yymsp[-1].minor.yy946; } break; - case 210: /* full_table_name ::= table_name */ - case 352: /* full_tsma_name ::= tsma_name */ yytestcase(yyruleno==352); -{ yylhsminor.yy560 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy533, NULL); } - yymsp[0].minor.yy560 = yylhsminor.yy560; + case 214: /* full_table_name ::= table_name */ + case 358: /* full_tsma_name ::= tsma_name */ yytestcase(yyruleno==358); +{ yylhsminor.yy974 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy557, NULL); } + yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 211: /* full_table_name ::= db_name NK_DOT table_name */ - case 353: /* full_tsma_name ::= db_name NK_DOT tsma_name */ yytestcase(yyruleno==353); -{ yylhsminor.yy560 = createRealTableNode(pCxt, &yymsp[-2].minor.yy533, &yymsp[0].minor.yy533, NULL); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + case 215: /* full_table_name ::= db_name NK_DOT table_name */ + case 359: /* full_tsma_name ::= db_name NK_DOT tsma_name */ yytestcase(yyruleno==359); +{ yylhsminor.yy974 = createRealTableNode(pCxt, &yymsp[-2].minor.yy557, &yymsp[0].minor.yy557, NULL); } + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 214: /* tag_def ::= column_name type_name */ -{ yylhsminor.yy560 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy533, yymsp[0].minor.yy952, NULL); } - yymsp[-1].minor.yy560 = yylhsminor.yy560; + case 218: /* tag_def ::= column_name type_name */ +{ yylhsminor.yy974 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy557, yymsp[0].minor.yy424, NULL); } + yymsp[-1].minor.yy974 = yylhsminor.yy974; break; - case 217: /* column_def ::= column_name type_name column_options */ -{ yylhsminor.yy560 = createColumnDefNode(pCxt, &yymsp[-2].minor.yy533, yymsp[-1].minor.yy952, yymsp[0].minor.yy560); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + case 221: /* column_def ::= column_name type_name column_options */ +{ yylhsminor.yy974 = createColumnDefNode(pCxt, &yymsp[-2].minor.yy557, yymsp[-1].minor.yy424, yymsp[0].minor.yy974); } + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 218: /* type_name ::= BOOL */ -{ yymsp[0].minor.yy952 = createDataType(TSDB_DATA_TYPE_BOOL); } + case 222: /* type_name ::= BOOL */ +{ yymsp[0].minor.yy424 = createDataType(TSDB_DATA_TYPE_BOOL); } break; - case 219: /* type_name ::= TINYINT */ -{ yymsp[0].minor.yy952 = createDataType(TSDB_DATA_TYPE_TINYINT); } + case 223: /* type_name ::= TINYINT */ +{ yymsp[0].minor.yy424 = createDataType(TSDB_DATA_TYPE_TINYINT); } break; - case 220: /* type_name ::= SMALLINT */ -{ yymsp[0].minor.yy952 = createDataType(TSDB_DATA_TYPE_SMALLINT); } + case 224: /* type_name ::= SMALLINT */ +{ yymsp[0].minor.yy424 = createDataType(TSDB_DATA_TYPE_SMALLINT); } break; - case 221: /* type_name ::= INT */ - case 222: /* type_name ::= INTEGER */ yytestcase(yyruleno==222); -{ yymsp[0].minor.yy952 = createDataType(TSDB_DATA_TYPE_INT); } + case 225: /* type_name ::= INT */ + case 226: /* type_name ::= INTEGER */ yytestcase(yyruleno==226); +{ yymsp[0].minor.yy424 = createDataType(TSDB_DATA_TYPE_INT); } break; - case 223: /* type_name ::= BIGINT */ -{ yymsp[0].minor.yy952 = createDataType(TSDB_DATA_TYPE_BIGINT); } + case 227: /* type_name ::= BIGINT */ +{ yymsp[0].minor.yy424 = createDataType(TSDB_DATA_TYPE_BIGINT); } break; - case 224: /* type_name ::= FLOAT */ -{ yymsp[0].minor.yy952 = createDataType(TSDB_DATA_TYPE_FLOAT); } + case 228: /* type_name ::= FLOAT */ +{ yymsp[0].minor.yy424 = createDataType(TSDB_DATA_TYPE_FLOAT); } break; - case 225: /* type_name ::= DOUBLE */ -{ yymsp[0].minor.yy952 = createDataType(TSDB_DATA_TYPE_DOUBLE); } + case 229: /* type_name ::= DOUBLE */ +{ yymsp[0].minor.yy424 = createDataType(TSDB_DATA_TYPE_DOUBLE); } break; - case 226: /* type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy952 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); } + case 230: /* type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ +{ yymsp[-3].minor.yy424 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); } break; - case 227: /* type_name ::= TIMESTAMP */ -{ yymsp[0].minor.yy952 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); } + case 231: /* type_name ::= TIMESTAMP */ +{ yymsp[0].minor.yy424 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); } break; - case 228: /* type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy952 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); } + case 232: /* type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ +{ yymsp[-3].minor.yy424 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); } break; - case 229: /* type_name ::= TINYINT UNSIGNED */ -{ yymsp[-1].minor.yy952 = createDataType(TSDB_DATA_TYPE_UTINYINT); } + case 233: /* type_name ::= TINYINT UNSIGNED */ +{ yymsp[-1].minor.yy424 = createDataType(TSDB_DATA_TYPE_UTINYINT); } break; - case 230: /* type_name ::= SMALLINT UNSIGNED */ -{ yymsp[-1].minor.yy952 = createDataType(TSDB_DATA_TYPE_USMALLINT); } + case 234: /* type_name ::= SMALLINT UNSIGNED */ +{ yymsp[-1].minor.yy424 = createDataType(TSDB_DATA_TYPE_USMALLINT); } break; - case 231: /* type_name ::= INT UNSIGNED */ -{ yymsp[-1].minor.yy952 = createDataType(TSDB_DATA_TYPE_UINT); } + case 235: /* type_name ::= INT UNSIGNED */ +{ yymsp[-1].minor.yy424 = createDataType(TSDB_DATA_TYPE_UINT); } break; - case 232: /* type_name ::= BIGINT UNSIGNED */ -{ yymsp[-1].minor.yy952 = createDataType(TSDB_DATA_TYPE_UBIGINT); } + case 236: /* type_name ::= BIGINT UNSIGNED */ +{ yymsp[-1].minor.yy424 = createDataType(TSDB_DATA_TYPE_UBIGINT); } break; - case 233: /* type_name ::= JSON */ -{ yymsp[0].minor.yy952 = createDataType(TSDB_DATA_TYPE_JSON); } + case 237: /* type_name ::= JSON */ +{ yymsp[0].minor.yy424 = createDataType(TSDB_DATA_TYPE_JSON); } break; - case 234: /* type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy952 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); } + case 238: /* type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ +{ yymsp[-3].minor.yy424 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); } break; - case 235: /* type_name ::= MEDIUMBLOB */ -{ yymsp[0].minor.yy952 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); } + case 239: /* type_name ::= MEDIUMBLOB */ +{ yymsp[0].minor.yy424 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); } break; - case 236: /* type_name ::= BLOB */ -{ yymsp[0].minor.yy952 = createDataType(TSDB_DATA_TYPE_BLOB); } + case 240: /* type_name ::= BLOB */ +{ yymsp[0].minor.yy424 = createDataType(TSDB_DATA_TYPE_BLOB); } break; - case 237: /* type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy952 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); } + case 241: /* type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ +{ yymsp[-3].minor.yy424 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); } break; - case 238: /* type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy952 = createVarLenDataType(TSDB_DATA_TYPE_GEOMETRY, &yymsp[-1].minor.yy0); } + case 242: /* type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP */ +{ yymsp[-3].minor.yy424 = createVarLenDataType(TSDB_DATA_TYPE_GEOMETRY, &yymsp[-1].minor.yy0); } break; - case 239: /* type_name ::= DECIMAL */ -{ yymsp[0].minor.yy952 = createDataType(TSDB_DATA_TYPE_DECIMAL); } + case 243: /* type_name ::= DECIMAL */ +{ yymsp[0].minor.yy424 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; - case 240: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy952 = createDataType(TSDB_DATA_TYPE_DECIMAL); } + case 244: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ +{ yymsp[-3].minor.yy424 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; - case 241: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ -{ yymsp[-5].minor.yy952 = createDataType(TSDB_DATA_TYPE_DECIMAL); } + case 245: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ +{ yymsp[-5].minor.yy424 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; - case 242: /* type_name_default_len ::= BINARY */ -{ yymsp[0].minor.yy952 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, NULL); } + case 246: /* type_name_default_len ::= BINARY */ +{ yymsp[0].minor.yy424 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, NULL); } break; - case 243: /* type_name_default_len ::= NCHAR */ -{ yymsp[0].minor.yy952 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, NULL); } + case 247: /* type_name_default_len ::= NCHAR */ +{ yymsp[0].minor.yy424 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, NULL); } break; - case 244: /* type_name_default_len ::= VARCHAR */ -{ yymsp[0].minor.yy952 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, NULL); } + case 248: /* type_name_default_len ::= VARCHAR */ +{ yymsp[0].minor.yy424 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, NULL); } break; - case 245: /* type_name_default_len ::= VARBINARY */ -{ yymsp[0].minor.yy952 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, NULL); } + case 249: /* type_name_default_len ::= VARBINARY */ +{ yymsp[0].minor.yy424 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, NULL); } break; - case 248: /* tags_def ::= TAGS NK_LP tag_def_list NK_RP */ - case 419: /* tag_def_or_ref_opt ::= TAGS NK_LP column_stream_def_list NK_RP */ yytestcase(yyruleno==419); -{ yymsp[-3].minor.yy334 = yymsp[-1].minor.yy334; } + case 252: /* tags_def ::= TAGS NK_LP tag_def_list NK_RP */ + case 425: /* tag_def_or_ref_opt ::= TAGS NK_LP column_stream_def_list NK_RP */ yytestcase(yyruleno==425); +{ yymsp[-3].minor.yy946 = yymsp[-1].minor.yy946; } break; - case 249: /* table_options ::= */ -{ yymsp[1].minor.yy560 = createDefaultTableOptions(pCxt); } + case 253: /* table_options ::= */ +{ yymsp[1].minor.yy974 = createDefaultTableOptions(pCxt); } break; - case 250: /* table_options ::= table_options COMMENT NK_STRING */ -{ yylhsminor.yy560 = setTableOption(pCxt, yymsp[-2].minor.yy560, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + case 254: /* table_options ::= table_options COMMENT NK_STRING */ +{ yylhsminor.yy974 = setTableOption(pCxt, yymsp[-2].minor.yy974, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 251: /* table_options ::= table_options MAX_DELAY duration_list */ -{ yylhsminor.yy560 = setTableOption(pCxt, yymsp[-2].minor.yy560, TABLE_OPTION_MAXDELAY, yymsp[0].minor.yy334); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + case 255: /* table_options ::= table_options MAX_DELAY duration_list */ +{ yylhsminor.yy974 = setTableOption(pCxt, yymsp[-2].minor.yy974, TABLE_OPTION_MAXDELAY, yymsp[0].minor.yy946); } + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 252: /* table_options ::= table_options WATERMARK duration_list */ -{ yylhsminor.yy560 = setTableOption(pCxt, yymsp[-2].minor.yy560, TABLE_OPTION_WATERMARK, yymsp[0].minor.yy334); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + case 256: /* table_options ::= table_options WATERMARK duration_list */ +{ yylhsminor.yy974 = setTableOption(pCxt, yymsp[-2].minor.yy974, TABLE_OPTION_WATERMARK, yymsp[0].minor.yy946); } + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 253: /* table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ -{ yylhsminor.yy560 = setTableOption(pCxt, yymsp[-4].minor.yy560, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy334); } - yymsp[-4].minor.yy560 = yylhsminor.yy560; + case 257: /* table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ +{ yylhsminor.yy974 = setTableOption(pCxt, yymsp[-4].minor.yy974, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy946); } + yymsp[-4].minor.yy974 = yylhsminor.yy974; break; - case 254: /* table_options ::= table_options TTL NK_INTEGER */ -{ yylhsminor.yy560 = setTableOption(pCxt, yymsp[-2].minor.yy560, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + case 258: /* table_options ::= table_options TTL NK_INTEGER */ +{ yylhsminor.yy974 = setTableOption(pCxt, yymsp[-2].minor.yy974, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 255: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */ -{ yylhsminor.yy560 = setTableOption(pCxt, yymsp[-4].minor.yy560, TABLE_OPTION_SMA, yymsp[-1].minor.yy334); } - yymsp[-4].minor.yy560 = yylhsminor.yy560; + case 259: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */ +{ yylhsminor.yy974 = setTableOption(pCxt, yymsp[-4].minor.yy974, TABLE_OPTION_SMA, yymsp[-1].minor.yy946); } + yymsp[-4].minor.yy974 = yylhsminor.yy974; break; - case 256: /* table_options ::= table_options DELETE_MARK duration_list */ -{ yylhsminor.yy560 = setTableOption(pCxt, yymsp[-2].minor.yy560, TABLE_OPTION_DELETE_MARK, yymsp[0].minor.yy334); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + case 260: /* table_options ::= table_options DELETE_MARK duration_list */ +{ yylhsminor.yy974 = setTableOption(pCxt, yymsp[-2].minor.yy974, TABLE_OPTION_DELETE_MARK, yymsp[0].minor.yy946); } + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 257: /* alter_table_options ::= alter_table_option */ -{ yylhsminor.yy560 = createAlterTableOptions(pCxt); yylhsminor.yy560 = setTableOption(pCxt, yylhsminor.yy560, yymsp[0].minor.yy389.type, &yymsp[0].minor.yy389.val); } - yymsp[0].minor.yy560 = yylhsminor.yy560; + case 261: /* alter_table_options ::= alter_table_option */ +{ yylhsminor.yy974 = createAlterTableOptions(pCxt); yylhsminor.yy974 = setTableOption(pCxt, yylhsminor.yy974, yymsp[0].minor.yy683.type, &yymsp[0].minor.yy683.val); } + yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 258: /* alter_table_options ::= alter_table_options alter_table_option */ -{ yylhsminor.yy560 = setTableOption(pCxt, yymsp[-1].minor.yy560, yymsp[0].minor.yy389.type, &yymsp[0].minor.yy389.val); } - yymsp[-1].minor.yy560 = yylhsminor.yy560; + case 262: /* alter_table_options ::= alter_table_options alter_table_option */ +{ yylhsminor.yy974 = setTableOption(pCxt, yymsp[-1].minor.yy974, yymsp[0].minor.yy683.type, &yymsp[0].minor.yy683.val); } + yymsp[-1].minor.yy974 = yylhsminor.yy974; break; - case 259: /* alter_table_option ::= COMMENT NK_STRING */ -{ yymsp[-1].minor.yy389.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy389.val = yymsp[0].minor.yy0; } + case 263: /* alter_table_option ::= COMMENT NK_STRING */ +{ yymsp[-1].minor.yy683.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy683.val = yymsp[0].minor.yy0; } break; - case 260: /* alter_table_option ::= TTL NK_INTEGER */ -{ yymsp[-1].minor.yy389.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy389.val = yymsp[0].minor.yy0; } + case 264: /* alter_table_option ::= TTL NK_INTEGER */ +{ yymsp[-1].minor.yy683.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy683.val = yymsp[0].minor.yy0; } break; - case 261: /* duration_list ::= duration_literal */ - case 548: /* expression_list ::= expr_or_subquery */ yytestcase(yyruleno==548); -{ yylhsminor.yy334 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy560)); } - yymsp[0].minor.yy334 = yylhsminor.yy334; + case 265: /* duration_list ::= duration_literal */ + case 554: /* expression_list ::= expr_or_subquery */ yytestcase(yyruleno==554); +{ yylhsminor.yy946 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy974)); } + yymsp[0].minor.yy946 = yylhsminor.yy946; break; - case 262: /* duration_list ::= duration_list NK_COMMA duration_literal */ - case 549: /* expression_list ::= expression_list NK_COMMA expr_or_subquery */ yytestcase(yyruleno==549); -{ yylhsminor.yy334 = addNodeToList(pCxt, yymsp[-2].minor.yy334, releaseRawExprNode(pCxt, yymsp[0].minor.yy560)); } - yymsp[-2].minor.yy334 = yylhsminor.yy334; + case 266: /* duration_list ::= duration_list NK_COMMA duration_literal */ + case 555: /* expression_list ::= expression_list NK_COMMA expr_or_subquery */ yytestcase(yyruleno==555); +{ yylhsminor.yy946 = addNodeToList(pCxt, yymsp[-2].minor.yy946, releaseRawExprNode(pCxt, yymsp[0].minor.yy974)); } + yymsp[-2].minor.yy946 = yylhsminor.yy946; break; - case 265: /* rollup_func_name ::= function_name */ -{ yylhsminor.yy560 = createFunctionNode(pCxt, &yymsp[0].minor.yy533, NULL); } - yymsp[0].minor.yy560 = yylhsminor.yy560; + case 269: /* rollup_func_name ::= function_name */ +{ yylhsminor.yy974 = createFunctionNode(pCxt, &yymsp[0].minor.yy557, NULL); } + yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 266: /* rollup_func_name ::= FIRST */ - case 267: /* rollup_func_name ::= LAST */ yytestcase(yyruleno==267); - case 341: /* tag_item ::= QTAGS */ yytestcase(yyruleno==341); -{ yylhsminor.yy560 = createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL); } - yymsp[0].minor.yy560 = yylhsminor.yy560; + case 270: /* rollup_func_name ::= FIRST */ + case 271: /* rollup_func_name ::= LAST */ yytestcase(yyruleno==271); + case 347: /* tag_item ::= QTAGS */ yytestcase(yyruleno==347); +{ yylhsminor.yy974 = createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL); } + yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 270: /* col_name ::= column_name */ - case 342: /* tag_item ::= column_name */ yytestcase(yyruleno==342); -{ yylhsminor.yy560 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy533); } - yymsp[0].minor.yy560 = yylhsminor.yy560; + case 274: /* col_name ::= column_name */ + case 348: /* tag_item ::= column_name */ yytestcase(yyruleno==348); +{ yylhsminor.yy974 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy557); } + yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 271: /* cmd ::= SHOW DNODES */ + case 275: /* cmd ::= SHOW DNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DNODES_STMT); } break; - case 272: /* cmd ::= SHOW USERS */ + case 276: /* cmd ::= SHOW USERS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_USERS_STMT); } break; - case 273: /* cmd ::= SHOW USERS FULL */ + case 277: /* cmd ::= SHOW USERS FULL */ { pCxt->pRootNode = createShowStmtWithFull(pCxt, QUERY_NODE_SHOW_USERS_FULL_STMT); } break; - case 274: /* cmd ::= SHOW USER PRIVILEGES */ + case 278: /* cmd ::= SHOW USER PRIVILEGES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_USER_PRIVILEGES_STMT); } break; - case 275: /* cmd ::= SHOW db_kind_opt DATABASES */ + case 279: /* cmd ::= SHOW db_kind_opt DATABASES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DATABASES_STMT); - (void)setShowKind(pCxt, pCxt->pRootNode, yymsp[-1].minor.yy537); + (void)setShowKind(pCxt, pCxt->pRootNode, yymsp[-1].minor.yy741); } break; - case 276: /* cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt */ + case 280: /* cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt */ { - pCxt->pRootNode = createShowTablesStmt(pCxt, yymsp[-2].minor.yy709, yymsp[0].minor.yy560, OP_TYPE_LIKE); + pCxt->pRootNode = createShowTablesStmt(pCxt, yymsp[-2].minor.yy595, yymsp[0].minor.yy974, OP_TYPE_LIKE); } break; - case 277: /* cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy560, yymsp[0].minor.yy560, OP_TYPE_LIKE); } + case 281: /* cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy974, yymsp[0].minor.yy974, OP_TYPE_LIKE); } break; - case 278: /* cmd ::= SHOW db_name_cond_opt VGROUPS */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy560, NULL, OP_TYPE_LIKE); } + case 282: /* cmd ::= SHOW db_name_cond_opt VGROUPS */ +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy974, NULL, OP_TYPE_LIKE); } break; - case 279: /* cmd ::= SHOW MNODES */ + case 283: /* cmd ::= SHOW MNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MNODES_STMT); } break; - case 280: /* cmd ::= SHOW QNODES */ + case 284: /* cmd ::= SHOW QNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QNODES_STMT); } break; - case 281: /* cmd ::= SHOW ARBGROUPS */ + case 285: /* cmd ::= SHOW ANODES */ +{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_ANODES_STMT); } + break; + case 286: /* cmd ::= SHOW ANODES FULL */ +{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_ANODES_FULL_STMT); } + break; + case 287: /* cmd ::= SHOW ARBGROUPS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_ARBGROUPS_STMT); } break; - case 282: /* cmd ::= SHOW FUNCTIONS */ + case 288: /* cmd ::= SHOW FUNCTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_FUNCTIONS_STMT); } break; - case 283: /* cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[0].minor.yy560, yymsp[-1].minor.yy560, OP_TYPE_EQUAL); } + case 289: /* cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[0].minor.yy974, yymsp[-1].minor.yy974, OP_TYPE_EQUAL); } break; - case 284: /* cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy533), createIdentifierValueNode(pCxt, &yymsp[0].minor.yy533), OP_TYPE_EQUAL); } + case 290: /* cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name */ +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy557), createIdentifierValueNode(pCxt, &yymsp[0].minor.yy557), OP_TYPE_EQUAL); } break; - case 285: /* cmd ::= SHOW STREAMS */ + case 291: /* cmd ::= SHOW STREAMS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STREAMS_STMT); } break; - case 286: /* cmd ::= SHOW ACCOUNTS */ + case 292: /* cmd ::= SHOW ACCOUNTS */ { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } break; - case 287: /* cmd ::= SHOW APPS */ + case 293: /* cmd ::= SHOW APPS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_APPS_STMT); } break; - case 288: /* cmd ::= SHOW CONNECTIONS */ + case 294: /* cmd ::= SHOW CONNECTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONNECTIONS_STMT); } break; - case 289: /* cmd ::= SHOW LICENCES */ - case 290: /* cmd ::= SHOW GRANTS */ yytestcase(yyruleno==290); + case 295: /* cmd ::= SHOW LICENCES */ + case 296: /* cmd ::= SHOW GRANTS */ yytestcase(yyruleno==296); { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LICENCES_STMT); } break; - case 291: /* cmd ::= SHOW GRANTS FULL */ + case 297: /* cmd ::= SHOW GRANTS FULL */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_GRANTS_FULL_STMT); } break; - case 292: /* cmd ::= SHOW GRANTS LOGS */ + case 298: /* cmd ::= SHOW GRANTS LOGS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_GRANTS_LOGS_STMT); } break; - case 293: /* cmd ::= SHOW CLUSTER MACHINES */ + case 299: /* cmd ::= SHOW CLUSTER MACHINES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CLUSTER_MACHINES_STMT); } break; - case 294: /* cmd ::= SHOW CREATE DATABASE db_name */ -{ pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy533); } + case 300: /* cmd ::= SHOW CREATE DATABASE db_name */ +{ pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy557); } break; - case 295: /* cmd ::= SHOW CREATE TABLE full_table_name */ -{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy560); } + case 301: /* cmd ::= SHOW CREATE TABLE full_table_name */ +{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy974); } break; - case 296: /* cmd ::= SHOW CREATE STABLE full_table_name */ + case 302: /* cmd ::= SHOW CREATE STABLE full_table_name */ { pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, -yymsp[0].minor.yy560); } +yymsp[0].minor.yy974); } break; - case 297: /* cmd ::= SHOW ENCRYPTIONS */ + case 303: /* cmd ::= SHOW ENCRYPTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_ENCRYPTIONS_STMT); } break; - case 298: /* cmd ::= SHOW QUERIES */ + case 304: /* cmd ::= SHOW QUERIES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QUERIES_STMT); } break; - case 299: /* cmd ::= SHOW SCORES */ + case 305: /* cmd ::= SHOW SCORES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SCORES_STMT); } break; - case 300: /* cmd ::= SHOW TOPICS */ + case 306: /* cmd ::= SHOW TOPICS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TOPICS_STMT); } break; - case 301: /* cmd ::= SHOW VARIABLES */ - case 302: /* cmd ::= SHOW CLUSTER VARIABLES */ yytestcase(yyruleno==302); + case 307: /* cmd ::= SHOW VARIABLES */ + case 308: /* cmd ::= SHOW CLUSTER VARIABLES */ yytestcase(yyruleno==308); { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VARIABLES_STMT); } break; - case 303: /* cmd ::= SHOW LOCAL VARIABLES */ + case 309: /* cmd ::= SHOW LOCAL VARIABLES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LOCAL_VARIABLES_STMT); } break; - case 304: /* 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.yy560); } + case 310: /* cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ +{ pCxt->pRootNode = createShowDnodeVariablesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[-2].minor.yy0), yymsp[0].minor.yy974); } break; - case 305: /* cmd ::= SHOW BNODES */ + case 311: /* cmd ::= SHOW BNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_BNODES_STMT); } break; - case 306: /* cmd ::= SHOW SNODES */ + case 312: /* cmd ::= SHOW SNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SNODES_STMT); } break; - case 307: /* cmd ::= SHOW CLUSTER */ + case 313: /* cmd ::= SHOW CLUSTER */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CLUSTER_STMT); } break; - case 308: /* cmd ::= SHOW TRANSACTIONS */ + case 314: /* cmd ::= SHOW TRANSACTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TRANSACTIONS_STMT); } break; - case 309: /* cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ -{ pCxt->pRootNode = createShowTableDistributedStmt(pCxt, yymsp[0].minor.yy560); } + case 315: /* cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ +{ pCxt->pRootNode = createShowTableDistributedStmt(pCxt, yymsp[0].minor.yy974); } break; - case 310: /* cmd ::= SHOW CONSUMERS */ + case 316: /* cmd ::= SHOW CONSUMERS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONSUMERS_STMT); } break; - case 311: /* cmd ::= SHOW SUBSCRIPTIONS */ + case 317: /* cmd ::= SHOW SUBSCRIPTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SUBSCRIPTIONS_STMT); } break; - case 312: /* cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, yymsp[0].minor.yy560, yymsp[-1].minor.yy560, OP_TYPE_EQUAL); } + case 318: /* cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, yymsp[0].minor.yy974, yymsp[-1].minor.yy974, OP_TYPE_EQUAL); } break; - case 313: /* cmd ::= SHOW TAGS FROM db_name NK_DOT table_name */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy533), createIdentifierValueNode(pCxt, &yymsp[0].minor.yy533), OP_TYPE_EQUAL); } + case 319: /* cmd ::= SHOW TAGS FROM db_name NK_DOT table_name */ +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy557), createIdentifierValueNode(pCxt, &yymsp[0].minor.yy557), OP_TYPE_EQUAL); } break; - case 314: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ -{ pCxt->pRootNode = createShowTableTagsStmt(pCxt, yymsp[-1].minor.yy560, yymsp[0].minor.yy560, yymsp[-3].minor.yy334); } + case 320: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ +{ pCxt->pRootNode = createShowTableTagsStmt(pCxt, yymsp[-1].minor.yy974, yymsp[0].minor.yy974, yymsp[-3].minor.yy946); } break; - case 315: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name */ -{ pCxt->pRootNode = createShowTableTagsStmt(pCxt, createIdentifierValueNode(pCxt, &yymsp[0].minor.yy533), createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy533), yymsp[-4].minor.yy334); } + case 321: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name */ +{ pCxt->pRootNode = createShowTableTagsStmt(pCxt, createIdentifierValueNode(pCxt, &yymsp[0].minor.yy557), createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy557), yymsp[-4].minor.yy946); } break; - case 316: /* cmd ::= SHOW VNODES ON DNODE NK_INTEGER */ + case 322: /* cmd ::= SHOW VNODES ON DNODE NK_INTEGER */ { pCxt->pRootNode = createShowVnodesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0), NULL); } break; - case 317: /* cmd ::= SHOW VNODES */ + case 323: /* cmd ::= SHOW VNODES */ { pCxt->pRootNode = createShowVnodesStmt(pCxt, NULL, NULL); } break; - case 318: /* cmd ::= SHOW db_name_cond_opt ALIVE */ -{ pCxt->pRootNode = createShowAliveStmt(pCxt, yymsp[-1].minor.yy560, QUERY_NODE_SHOW_DB_ALIVE_STMT); } + case 324: /* cmd ::= SHOW db_name_cond_opt ALIVE */ +{ pCxt->pRootNode = createShowAliveStmt(pCxt, yymsp[-1].minor.yy974, QUERY_NODE_SHOW_DB_ALIVE_STMT); } break; - case 319: /* cmd ::= SHOW CLUSTER ALIVE */ + case 325: /* cmd ::= SHOW CLUSTER ALIVE */ { pCxt->pRootNode = createShowAliveStmt(pCxt, NULL, QUERY_NODE_SHOW_CLUSTER_ALIVE_STMT); } break; - case 320: /* cmd ::= SHOW db_name_cond_opt VIEWS like_pattern_opt */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VIEWS_STMT, yymsp[-2].minor.yy560, yymsp[0].minor.yy560, OP_TYPE_LIKE); } + case 326: /* cmd ::= SHOW db_name_cond_opt VIEWS like_pattern_opt */ +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VIEWS_STMT, yymsp[-2].minor.yy974, yymsp[0].minor.yy974, OP_TYPE_LIKE); } break; - case 321: /* cmd ::= SHOW CREATE VIEW full_table_name */ -{ pCxt->pRootNode = createShowCreateViewStmt(pCxt, QUERY_NODE_SHOW_CREATE_VIEW_STMT, yymsp[0].minor.yy560); } + case 327: /* cmd ::= SHOW CREATE VIEW full_table_name */ +{ pCxt->pRootNode = createShowCreateViewStmt(pCxt, QUERY_NODE_SHOW_CREATE_VIEW_STMT, yymsp[0].minor.yy974); } break; - case 322: /* cmd ::= SHOW COMPACTS */ + case 328: /* cmd ::= SHOW COMPACTS */ { pCxt->pRootNode = createShowCompactsStmt(pCxt, QUERY_NODE_SHOW_COMPACTS_STMT); } break; - case 323: /* cmd ::= SHOW COMPACT NK_INTEGER */ + case 329: /* cmd ::= SHOW COMPACT NK_INTEGER */ { pCxt->pRootNode = createShowCompactDetailsStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } break; - case 324: /* table_kind_db_name_cond_opt ::= */ -{ yymsp[1].minor.yy709.kind = SHOW_KIND_ALL; yymsp[1].minor.yy709.dbName = nil_token; } + case 330: /* table_kind_db_name_cond_opt ::= */ +{ yymsp[1].minor.yy595.kind = SHOW_KIND_ALL; yymsp[1].minor.yy595.dbName = nil_token; } break; - case 325: /* table_kind_db_name_cond_opt ::= table_kind */ -{ yylhsminor.yy709.kind = yymsp[0].minor.yy537; yylhsminor.yy709.dbName = nil_token; } - yymsp[0].minor.yy709 = yylhsminor.yy709; + case 331: /* table_kind_db_name_cond_opt ::= table_kind */ +{ yylhsminor.yy595.kind = yymsp[0].minor.yy741; yylhsminor.yy595.dbName = nil_token; } + yymsp[0].minor.yy595 = yylhsminor.yy595; break; - case 326: /* table_kind_db_name_cond_opt ::= db_name NK_DOT */ -{ yylhsminor.yy709.kind = SHOW_KIND_ALL; yylhsminor.yy709.dbName = yymsp[-1].minor.yy533; } - yymsp[-1].minor.yy709 = yylhsminor.yy709; + case 332: /* table_kind_db_name_cond_opt ::= db_name NK_DOT */ +{ yylhsminor.yy595.kind = SHOW_KIND_ALL; yylhsminor.yy595.dbName = yymsp[-1].minor.yy557; } + yymsp[-1].minor.yy595 = yylhsminor.yy595; break; - case 327: /* table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT */ -{ yylhsminor.yy709.kind = yymsp[-2].minor.yy537; yylhsminor.yy709.dbName = yymsp[-1].minor.yy533; } - yymsp[-2].minor.yy709 = yylhsminor.yy709; + case 333: /* table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT */ +{ yylhsminor.yy595.kind = yymsp[-2].minor.yy741; yylhsminor.yy595.dbName = yymsp[-1].minor.yy557; } + yymsp[-2].minor.yy595 = yylhsminor.yy595; break; - case 328: /* table_kind ::= NORMAL */ -{ yymsp[0].minor.yy537 = SHOW_KIND_TABLES_NORMAL; } + case 334: /* table_kind ::= NORMAL */ +{ yymsp[0].minor.yy741 = SHOW_KIND_TABLES_NORMAL; } break; - case 329: /* table_kind ::= CHILD */ -{ yymsp[0].minor.yy537 = SHOW_KIND_TABLES_CHILD; } + case 335: /* table_kind ::= CHILD */ +{ yymsp[0].minor.yy741 = SHOW_KIND_TABLES_CHILD; } break; - case 330: /* db_name_cond_opt ::= */ - case 335: /* from_db_opt ::= */ yytestcase(yyruleno==335); -{ yymsp[1].minor.yy560 = createDefaultDatabaseCondValue(pCxt); } + case 336: /* db_name_cond_opt ::= */ + case 341: /* from_db_opt ::= */ yytestcase(yyruleno==341); +{ yymsp[1].minor.yy974 = createDefaultDatabaseCondValue(pCxt); } break; - case 331: /* db_name_cond_opt ::= db_name NK_DOT */ -{ yylhsminor.yy560 = createIdentifierValueNode(pCxt, &yymsp[-1].minor.yy533); } - yymsp[-1].minor.yy560 = yylhsminor.yy560; + case 337: /* db_name_cond_opt ::= db_name NK_DOT */ +{ yylhsminor.yy974 = createIdentifierValueNode(pCxt, &yymsp[-1].minor.yy557); } + yymsp[-1].minor.yy974 = yylhsminor.yy974; break; - case 333: /* like_pattern_opt ::= LIKE NK_STRING */ -{ yymsp[-1].minor.yy560 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } + case 339: /* like_pattern_opt ::= LIKE NK_STRING */ +{ yymsp[-1].minor.yy974 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } break; - case 334: /* table_name_cond ::= table_name */ -{ yylhsminor.yy560 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy533); } - yymsp[0].minor.yy560 = yylhsminor.yy560; + case 340: /* table_name_cond ::= table_name */ +{ yylhsminor.yy974 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy557); } + yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 336: /* from_db_opt ::= FROM db_name */ -{ yymsp[-1].minor.yy560 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy533); } + case 342: /* from_db_opt ::= FROM db_name */ +{ yymsp[-1].minor.yy974 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy557); } break; - case 340: /* tag_item ::= TBNAME */ -{ yylhsminor.yy560 = setProjectionAlias(pCxt, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL), &yymsp[0].minor.yy0); } - yymsp[0].minor.yy560 = yylhsminor.yy560; + case 346: /* tag_item ::= TBNAME */ +{ yylhsminor.yy974 = setProjectionAlias(pCxt, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL), &yymsp[0].minor.yy0); } + yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 343: /* tag_item ::= column_name column_alias */ -{ yylhsminor.yy560 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-1].minor.yy533), &yymsp[0].minor.yy533); } - yymsp[-1].minor.yy560 = yylhsminor.yy560; + case 349: /* tag_item ::= column_name column_alias */ +{ yylhsminor.yy974 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-1].minor.yy557), &yymsp[0].minor.yy557); } + yymsp[-1].minor.yy974 = yylhsminor.yy974; break; - case 344: /* tag_item ::= column_name AS column_alias */ -{ yylhsminor.yy560 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-2].minor.yy533), &yymsp[0].minor.yy533); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + case 350: /* tag_item ::= column_name AS column_alias */ +{ yylhsminor.yy974 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-2].minor.yy557), &yymsp[0].minor.yy557); } + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 345: /* db_kind_opt ::= */ -{ yymsp[1].minor.yy537 = SHOW_KIND_ALL; } + case 351: /* db_kind_opt ::= */ +{ yymsp[1].minor.yy741 = SHOW_KIND_ALL; } break; - case 346: /* db_kind_opt ::= USER */ -{ yymsp[0].minor.yy537 = SHOW_KIND_DATABASES_USER; } + case 352: /* db_kind_opt ::= USER */ +{ yymsp[0].minor.yy741 = SHOW_KIND_DATABASES_USER; } break; - case 347: /* db_kind_opt ::= SYSTEM */ -{ yymsp[0].minor.yy537 = SHOW_KIND_DATABASES_SYSTEM; } + case 353: /* db_kind_opt ::= SYSTEM */ +{ yymsp[0].minor.yy741 = SHOW_KIND_DATABASES_SYSTEM; } break; - case 348: /* cmd ::= CREATE TSMA not_exists_opt tsma_name ON full_table_name tsma_func_list INTERVAL NK_LP duration_literal NK_RP */ -{ pCxt->pRootNode = createCreateTSMAStmt(pCxt, yymsp[-8].minor.yy173, &yymsp[-7].minor.yy533, yymsp[-4].minor.yy560, yymsp[-5].minor.yy560, releaseRawExprNode(pCxt, yymsp[-1].minor.yy560)); } + case 354: /* cmd ::= CREATE TSMA not_exists_opt tsma_name ON full_table_name tsma_func_list INTERVAL NK_LP duration_literal NK_RP */ +{ pCxt->pRootNode = createCreateTSMAStmt(pCxt, yymsp[-8].minor.yy569, &yymsp[-7].minor.yy557, yymsp[-4].minor.yy974, yymsp[-5].minor.yy974, releaseRawExprNode(pCxt, yymsp[-1].minor.yy974)); } break; - case 349: /* cmd ::= CREATE RECURSIVE TSMA not_exists_opt tsma_name ON full_table_name INTERVAL NK_LP duration_literal NK_RP */ -{ pCxt->pRootNode = createCreateTSMAStmt(pCxt, yymsp[-7].minor.yy173, &yymsp[-6].minor.yy533, NULL, yymsp[-4].minor.yy560, releaseRawExprNode(pCxt, yymsp[-1].minor.yy560)); } + case 355: /* cmd ::= CREATE RECURSIVE TSMA not_exists_opt tsma_name ON full_table_name INTERVAL NK_LP duration_literal NK_RP */ +{ pCxt->pRootNode = createCreateTSMAStmt(pCxt, yymsp[-7].minor.yy569, &yymsp[-6].minor.yy557, NULL, yymsp[-4].minor.yy974, releaseRawExprNode(pCxt, yymsp[-1].minor.yy974)); } break; - case 350: /* cmd ::= DROP TSMA exists_opt full_tsma_name */ -{ pCxt->pRootNode = createDropTSMAStmt(pCxt, yymsp[-1].minor.yy173, yymsp[0].minor.yy560); } + case 356: /* cmd ::= DROP TSMA exists_opt full_tsma_name */ +{ pCxt->pRootNode = createDropTSMAStmt(pCxt, yymsp[-1].minor.yy569, yymsp[0].minor.yy974); } break; - case 351: /* cmd ::= SHOW db_name_cond_opt TSMAS */ -{ pCxt->pRootNode = createShowTSMASStmt(pCxt, yymsp[-1].minor.yy560); } + case 357: /* cmd ::= SHOW db_name_cond_opt TSMAS */ +{ pCxt->pRootNode = createShowTSMASStmt(pCxt, yymsp[-1].minor.yy974); } break; - case 354: /* tsma_func_list ::= FUNCTION NK_LP func_list NK_RP */ -{ yymsp[-3].minor.yy560 = createTSMAOptions(pCxt, yymsp[-1].minor.yy334); } + case 360: /* tsma_func_list ::= FUNCTION NK_LP func_list NK_RP */ +{ yymsp[-3].minor.yy974 = createTSMAOptions(pCxt, yymsp[-1].minor.yy946); } break; - case 355: /* 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.yy173, yymsp[-3].minor.yy560, yymsp[-1].minor.yy560, NULL, yymsp[0].minor.yy560); } + case 361: /* cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options */ +{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy569, yymsp[-3].minor.yy974, yymsp[-1].minor.yy974, NULL, yymsp[0].minor.yy974); } break; - case 356: /* 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.yy173, yymsp[-5].minor.yy560, yymsp[-3].minor.yy560, yymsp[-1].minor.yy334, NULL); } + case 362: /* cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP */ +{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_NORMAL, yymsp[-6].minor.yy569, yymsp[-5].minor.yy974, yymsp[-3].minor.yy974, yymsp[-1].minor.yy946, NULL); } break; - case 357: /* cmd ::= DROP INDEX exists_opt full_index_name */ -{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-1].minor.yy173, yymsp[0].minor.yy560); } + case 363: /* cmd ::= DROP INDEX exists_opt full_index_name */ +{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-1].minor.yy569, yymsp[0].minor.yy974); } break; - case 358: /* full_index_name ::= index_name */ -{ yylhsminor.yy560 = createRealTableNodeForIndexName(pCxt, NULL, &yymsp[0].minor.yy533); } - yymsp[0].minor.yy560 = yylhsminor.yy560; + case 364: /* full_index_name ::= index_name */ +{ yylhsminor.yy974 = createRealTableNodeForIndexName(pCxt, NULL, &yymsp[0].minor.yy557); } + yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 359: /* full_index_name ::= db_name NK_DOT index_name */ -{ yylhsminor.yy560 = createRealTableNodeForIndexName(pCxt, &yymsp[-2].minor.yy533, &yymsp[0].minor.yy533); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + case 365: /* full_index_name ::= db_name NK_DOT index_name */ +{ yylhsminor.yy974 = createRealTableNodeForIndexName(pCxt, &yymsp[-2].minor.yy557, &yymsp[0].minor.yy557); } + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 360: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ -{ yymsp[-9].minor.yy560 = createIndexOption(pCxt, yymsp[-7].minor.yy334, releaseRawExprNode(pCxt, yymsp[-3].minor.yy560), NULL, yymsp[-1].minor.yy560, yymsp[0].minor.yy560); } + case 366: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ +{ yymsp[-9].minor.yy974 = createIndexOption(pCxt, yymsp[-7].minor.yy946, releaseRawExprNode(pCxt, yymsp[-3].minor.yy974), NULL, yymsp[-1].minor.yy974, yymsp[0].minor.yy974); } break; - case 361: /* 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.yy560 = createIndexOption(pCxt, yymsp[-9].minor.yy334, releaseRawExprNode(pCxt, yymsp[-5].minor.yy560), releaseRawExprNode(pCxt, yymsp[-3].minor.yy560), yymsp[-1].minor.yy560, yymsp[0].minor.yy560); } + case 367: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt sma_stream_opt */ +{ yymsp[-11].minor.yy974 = createIndexOption(pCxt, yymsp[-9].minor.yy946, releaseRawExprNode(pCxt, yymsp[-5].minor.yy974), releaseRawExprNode(pCxt, yymsp[-3].minor.yy974), yymsp[-1].minor.yy974, yymsp[0].minor.yy974); } break; - case 364: /* func ::= sma_func_name NK_LP expression_list NK_RP */ -{ yylhsminor.yy560 = createFunctionNode(pCxt, &yymsp[-3].minor.yy533, yymsp[-1].minor.yy334); } - yymsp[-3].minor.yy560 = yylhsminor.yy560; + case 370: /* func ::= sma_func_name NK_LP expression_list NK_RP */ +{ yylhsminor.yy974 = createFunctionNode(pCxt, &yymsp[-3].minor.yy557, yymsp[-1].minor.yy946); } + yymsp[-3].minor.yy974 = yylhsminor.yy974; break; - case 365: /* sma_func_name ::= function_name */ - case 657: /* alias_opt ::= table_alias */ yytestcase(yyruleno==657); -{ yylhsminor.yy533 = yymsp[0].minor.yy533; } - yymsp[0].minor.yy533 = yylhsminor.yy533; + case 371: /* sma_func_name ::= function_name */ + case 666: /* alias_opt ::= table_alias */ yytestcase(yyruleno==666); +{ yylhsminor.yy557 = yymsp[0].minor.yy557; } + yymsp[0].minor.yy557 = yylhsminor.yy557; break; - case 370: /* sma_stream_opt ::= */ - case 420: /* stream_options ::= */ yytestcase(yyruleno==420); -{ yymsp[1].minor.yy560 = createStreamOptions(pCxt); } + case 376: /* sma_stream_opt ::= */ + case 426: /* stream_options ::= */ yytestcase(yyruleno==426); +{ yymsp[1].minor.yy974 = createStreamOptions(pCxt); } break; - case 371: /* sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ -{ ((SStreamOptions*)yymsp[-2].minor.yy560)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy560); yylhsminor.yy560 = yymsp[-2].minor.yy560; } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + case 377: /* sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ +{ ((SStreamOptions*)yymsp[-2].minor.yy974)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy974); yylhsminor.yy974 = yymsp[-2].minor.yy974; } + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 372: /* sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ -{ ((SStreamOptions*)yymsp[-2].minor.yy560)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy560); yylhsminor.yy560 = yymsp[-2].minor.yy560; } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + case 378: /* sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ +{ ((SStreamOptions*)yymsp[-2].minor.yy974)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy974); yylhsminor.yy974 = yymsp[-2].minor.yy974; } + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 373: /* sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ -{ ((SStreamOptions*)yymsp[-2].minor.yy560)->pDeleteMark = releaseRawExprNode(pCxt, yymsp[0].minor.yy560); yylhsminor.yy560 = yymsp[-2].minor.yy560; } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + case 379: /* sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ +{ ((SStreamOptions*)yymsp[-2].minor.yy974)->pDeleteMark = releaseRawExprNode(pCxt, yymsp[0].minor.yy974); yylhsminor.yy974 = yymsp[-2].minor.yy974; } + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 374: /* with_meta ::= AS */ -{ yymsp[0].minor.yy802 = 0; } + case 380: /* with_meta ::= AS */ +{ yymsp[0].minor.yy904 = 0; } break; - case 375: /* with_meta ::= WITH META AS */ -{ yymsp[-2].minor.yy802 = 1; } + case 381: /* with_meta ::= WITH META AS */ +{ yymsp[-2].minor.yy904 = 1; } break; - case 376: /* with_meta ::= ONLY META AS */ -{ yymsp[-2].minor.yy802 = 2; } + case 382: /* with_meta ::= ONLY META AS */ +{ yymsp[-2].minor.yy904 = 2; } break; - case 377: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ -{ pCxt->pRootNode = createCreateTopicStmtUseQuery(pCxt, yymsp[-3].minor.yy173, &yymsp[-2].minor.yy533, yymsp[0].minor.yy560); } + case 383: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ +{ pCxt->pRootNode = createCreateTopicStmtUseQuery(pCxt, yymsp[-3].minor.yy569, &yymsp[-2].minor.yy557, yymsp[0].minor.yy974); } break; - case 378: /* cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */ -{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-4].minor.yy173, &yymsp[-3].minor.yy533, &yymsp[0].minor.yy533, yymsp[-2].minor.yy802); } + case 384: /* cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */ +{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-4].minor.yy569, &yymsp[-3].minor.yy557, &yymsp[0].minor.yy557, yymsp[-2].minor.yy904); } break; - case 379: /* cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */ -{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-5].minor.yy173, &yymsp[-4].minor.yy533, yymsp[-1].minor.yy560, yymsp[-3].minor.yy802, yymsp[0].minor.yy560); } + case 385: /* cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */ +{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-5].minor.yy569, &yymsp[-4].minor.yy557, yymsp[-1].minor.yy974, yymsp[-3].minor.yy904, yymsp[0].minor.yy974); } break; - case 380: /* cmd ::= DROP TOPIC exists_opt topic_name */ -{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy173, &yymsp[0].minor.yy533); } + case 386: /* cmd ::= DROP TOPIC exists_opt topic_name */ +{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy569, &yymsp[0].minor.yy557); } break; - case 381: /* cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ -{ pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy173, &yymsp[-2].minor.yy533, &yymsp[0].minor.yy533); } + case 387: /* cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ +{ pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy569, &yymsp[-2].minor.yy557, &yymsp[0].minor.yy557); } break; - case 382: /* cmd ::= DESC full_table_name */ - case 383: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==383); -{ pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy560); } + case 388: /* cmd ::= DESC full_table_name */ + case 389: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==389); +{ pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy974); } break; - case 384: /* cmd ::= RESET QUERY CACHE */ + case 390: /* cmd ::= RESET QUERY CACHE */ { pCxt->pRootNode = createResetQueryCacheStmt(pCxt); } break; - case 385: /* cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ - case 386: /* cmd ::= EXPLAIN analyze_opt explain_options insert_query */ yytestcase(yyruleno==386); -{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy173, yymsp[-1].minor.yy560, yymsp[0].minor.yy560); } + case 391: /* cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ + case 392: /* cmd ::= EXPLAIN analyze_opt explain_options insert_query */ yytestcase(yyruleno==392); +{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy569, yymsp[-1].minor.yy974, yymsp[0].minor.yy974); } break; - case 389: /* explain_options ::= */ -{ yymsp[1].minor.yy560 = createDefaultExplainOptions(pCxt); } + case 395: /* explain_options ::= */ +{ yymsp[1].minor.yy974 = createDefaultExplainOptions(pCxt); } break; - case 390: /* explain_options ::= explain_options VERBOSE NK_BOOL */ -{ yylhsminor.yy560 = setExplainVerbose(pCxt, yymsp[-2].minor.yy560, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + case 396: /* explain_options ::= explain_options VERBOSE NK_BOOL */ +{ yylhsminor.yy974 = setExplainVerbose(pCxt, yymsp[-2].minor.yy974, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 391: /* explain_options ::= explain_options RATIO NK_FLOAT */ -{ yylhsminor.yy560 = setExplainRatio(pCxt, yymsp[-2].minor.yy560, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + case 397: /* explain_options ::= explain_options RATIO NK_FLOAT */ +{ yylhsminor.yy974 = setExplainRatio(pCxt, yymsp[-2].minor.yy974, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 392: /* 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.yy173, yymsp[-9].minor.yy173, &yymsp[-6].minor.yy533, &yymsp[-4].minor.yy0, yymsp[-2].minor.yy952, yymsp[-1].minor.yy802, &yymsp[0].minor.yy533, yymsp[-10].minor.yy173); } + case 398: /* cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt */ +{ pCxt->pRootNode = createCreateFunctionStmt(pCxt, yymsp[-7].minor.yy569, yymsp[-9].minor.yy569, &yymsp[-6].minor.yy557, &yymsp[-4].minor.yy0, yymsp[-2].minor.yy424, yymsp[-1].minor.yy904, &yymsp[0].minor.yy557, yymsp[-10].minor.yy569); } break; - case 393: /* cmd ::= DROP FUNCTION exists_opt function_name */ -{ pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy173, &yymsp[0].minor.yy533); } + case 399: /* cmd ::= DROP FUNCTION exists_opt function_name */ +{ pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy569, &yymsp[0].minor.yy557); } break; - case 398: /* language_opt ::= */ - case 443: /* on_vgroup_id ::= */ yytestcase(yyruleno==443); -{ yymsp[1].minor.yy533 = nil_token; } + case 404: /* language_opt ::= */ + case 449: /* on_vgroup_id ::= */ yytestcase(yyruleno==449); +{ yymsp[1].minor.yy557 = nil_token; } break; - case 399: /* language_opt ::= LANGUAGE NK_STRING */ - case 444: /* on_vgroup_id ::= ON NK_INTEGER */ yytestcase(yyruleno==444); -{ yymsp[-1].minor.yy533 = yymsp[0].minor.yy0; } + case 405: /* language_opt ::= LANGUAGE NK_STRING */ + case 450: /* on_vgroup_id ::= ON NK_INTEGER */ yytestcase(yyruleno==450); +{ yymsp[-1].minor.yy557 = yymsp[0].minor.yy0; } break; - case 402: /* cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery */ -{ pCxt->pRootNode = createCreateViewStmt(pCxt, yymsp[-4].minor.yy173, yymsp[-2].minor.yy560, &yymsp[-1].minor.yy0, yymsp[0].minor.yy560); } + case 408: /* cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery */ +{ pCxt->pRootNode = createCreateViewStmt(pCxt, yymsp[-4].minor.yy569, yymsp[-2].minor.yy974, &yymsp[-1].minor.yy0, yymsp[0].minor.yy974); } break; - case 403: /* cmd ::= DROP VIEW exists_opt full_view_name */ -{ pCxt->pRootNode = createDropViewStmt(pCxt, yymsp[-1].minor.yy173, yymsp[0].minor.yy560); } + case 409: /* cmd ::= DROP VIEW exists_opt full_view_name */ +{ pCxt->pRootNode = createDropViewStmt(pCxt, yymsp[-1].minor.yy569, yymsp[0].minor.yy974); } break; - case 404: /* full_view_name ::= view_name */ -{ yylhsminor.yy560 = createViewNode(pCxt, NULL, &yymsp[0].minor.yy533); } - yymsp[0].minor.yy560 = yylhsminor.yy560; + case 410: /* full_view_name ::= view_name */ +{ yylhsminor.yy974 = createViewNode(pCxt, NULL, &yymsp[0].minor.yy557); } + yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 405: /* full_view_name ::= db_name NK_DOT view_name */ -{ yylhsminor.yy560 = createViewNode(pCxt, &yymsp[-2].minor.yy533, &yymsp[0].minor.yy533); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + case 411: /* full_view_name ::= db_name NK_DOT view_name */ +{ yylhsminor.yy974 = createViewNode(pCxt, &yymsp[-2].minor.yy557, &yymsp[0].minor.yy557); } + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 406: /* 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.yy173, &yymsp[-8].minor.yy533, yymsp[-5].minor.yy560, yymsp[-7].minor.yy560, yymsp[-3].minor.yy334, yymsp[-2].minor.yy560, yymsp[0].minor.yy560, yymsp[-4].minor.yy334); } + case 412: /* cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery */ +{ pCxt->pRootNode = createCreateStreamStmt(pCxt, yymsp[-9].minor.yy569, &yymsp[-8].minor.yy557, yymsp[-5].minor.yy974, yymsp[-7].minor.yy974, yymsp[-3].minor.yy946, yymsp[-2].minor.yy974, yymsp[0].minor.yy974, yymsp[-4].minor.yy946); } break; - case 407: /* cmd ::= DROP STREAM exists_opt stream_name */ -{ pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy173, &yymsp[0].minor.yy533); } + case 413: /* cmd ::= DROP STREAM exists_opt stream_name */ +{ pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy569, &yymsp[0].minor.yy557); } break; - case 408: /* cmd ::= PAUSE STREAM exists_opt stream_name */ -{ pCxt->pRootNode = createPauseStreamStmt(pCxt, yymsp[-1].minor.yy173, &yymsp[0].minor.yy533); } + case 414: /* cmd ::= PAUSE STREAM exists_opt stream_name */ +{ pCxt->pRootNode = createPauseStreamStmt(pCxt, yymsp[-1].minor.yy569, &yymsp[0].minor.yy557); } break; - case 409: /* cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */ -{ pCxt->pRootNode = createResumeStreamStmt(pCxt, yymsp[-2].minor.yy173, yymsp[-1].minor.yy173, &yymsp[0].minor.yy533); } + case 415: /* cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */ +{ pCxt->pRootNode = createResumeStreamStmt(pCxt, yymsp[-2].minor.yy569, yymsp[-1].minor.yy569, &yymsp[0].minor.yy557); } break; - case 414: /* column_stream_def ::= column_name stream_col_options */ -{ yylhsminor.yy560 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy533, createDataType(TSDB_DATA_TYPE_NULL), yymsp[0].minor.yy560); } - yymsp[-1].minor.yy560 = yylhsminor.yy560; + case 420: /* column_stream_def ::= column_name stream_col_options */ +{ yylhsminor.yy974 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy557, createDataType(TSDB_DATA_TYPE_NULL), yymsp[0].minor.yy974); } + yymsp[-1].minor.yy974 = yylhsminor.yy974; break; - case 415: /* stream_col_options ::= */ - case 770: /* column_options ::= */ yytestcase(yyruleno==770); -{ yymsp[1].minor.yy560 = createDefaultColumnOptions(pCxt); } + case 421: /* stream_col_options ::= */ + case 781: /* column_options ::= */ yytestcase(yyruleno==781); +{ yymsp[1].minor.yy974 = createDefaultColumnOptions(pCxt); } break; - case 416: /* stream_col_options ::= stream_col_options PRIMARY KEY */ - case 771: /* column_options ::= column_options PRIMARY KEY */ yytestcase(yyruleno==771); -{ yylhsminor.yy560 = setColumnOptionsPK(pCxt, yymsp[-2].minor.yy560); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + case 422: /* stream_col_options ::= stream_col_options PRIMARY KEY */ + case 782: /* column_options ::= column_options PRIMARY KEY */ yytestcase(yyruleno==782); +{ yylhsminor.yy974 = setColumnOptionsPK(pCxt, yymsp[-2].minor.yy974); } + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 421: /* stream_options ::= stream_options TRIGGER AT_ONCE */ - case 422: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ yytestcase(yyruleno==422); -{ yylhsminor.yy560 = setStreamOptions(pCxt, yymsp[-2].minor.yy560, SOPT_TRIGGER_TYPE_SET, &yymsp[0].minor.yy0, NULL); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + case 427: /* stream_options ::= stream_options TRIGGER AT_ONCE */ + case 428: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ yytestcase(yyruleno==428); +{ yylhsminor.yy974 = setStreamOptions(pCxt, yymsp[-2].minor.yy974, SOPT_TRIGGER_TYPE_SET, &yymsp[0].minor.yy0, NULL); } + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 423: /* stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ -{ yylhsminor.yy560 = setStreamOptions(pCxt, yymsp[-3].minor.yy560, SOPT_TRIGGER_TYPE_SET, &yymsp[-1].minor.yy0, releaseRawExprNode(pCxt, yymsp[0].minor.yy560)); } - yymsp[-3].minor.yy560 = yylhsminor.yy560; + case 429: /* stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ +{ yylhsminor.yy974 = setStreamOptions(pCxt, yymsp[-3].minor.yy974, SOPT_TRIGGER_TYPE_SET, &yymsp[-1].minor.yy0, releaseRawExprNode(pCxt, yymsp[0].minor.yy974)); } + yymsp[-3].minor.yy974 = yylhsminor.yy974; break; - case 424: /* stream_options ::= stream_options WATERMARK duration_literal */ -{ yylhsminor.yy560 = setStreamOptions(pCxt, yymsp[-2].minor.yy560, SOPT_WATERMARK_SET, NULL, releaseRawExprNode(pCxt, yymsp[0].minor.yy560)); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + case 430: /* stream_options ::= stream_options WATERMARK duration_literal */ +{ yylhsminor.yy974 = setStreamOptions(pCxt, yymsp[-2].minor.yy974, SOPT_WATERMARK_SET, NULL, releaseRawExprNode(pCxt, yymsp[0].minor.yy974)); } + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 425: /* stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ -{ yylhsminor.yy560 = setStreamOptions(pCxt, yymsp[-3].minor.yy560, SOPT_IGNORE_EXPIRED_SET, &yymsp[0].minor.yy0, NULL); } - yymsp[-3].minor.yy560 = yylhsminor.yy560; + case 431: /* stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ +{ yylhsminor.yy974 = setStreamOptions(pCxt, yymsp[-3].minor.yy974, SOPT_IGNORE_EXPIRED_SET, &yymsp[0].minor.yy0, NULL); } + yymsp[-3].minor.yy974 = yylhsminor.yy974; break; - case 426: /* stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ -{ yylhsminor.yy560 = setStreamOptions(pCxt, yymsp[-2].minor.yy560, SOPT_FILL_HISTORY_SET, &yymsp[0].minor.yy0, NULL); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + case 432: /* stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ +{ yylhsminor.yy974 = setStreamOptions(pCxt, yymsp[-2].minor.yy974, SOPT_FILL_HISTORY_SET, &yymsp[0].minor.yy0, NULL); } + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 427: /* stream_options ::= stream_options DELETE_MARK duration_literal */ -{ yylhsminor.yy560 = setStreamOptions(pCxt, yymsp[-2].minor.yy560, SOPT_DELETE_MARK_SET, NULL, releaseRawExprNode(pCxt, yymsp[0].minor.yy560)); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + case 433: /* stream_options ::= stream_options DELETE_MARK duration_literal */ +{ yylhsminor.yy974 = setStreamOptions(pCxt, yymsp[-2].minor.yy974, SOPT_DELETE_MARK_SET, NULL, releaseRawExprNode(pCxt, yymsp[0].minor.yy974)); } + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 428: /* stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ -{ yylhsminor.yy560 = setStreamOptions(pCxt, yymsp[-3].minor.yy560, SOPT_IGNORE_UPDATE_SET, &yymsp[0].minor.yy0, NULL); } - yymsp[-3].minor.yy560 = yylhsminor.yy560; + case 434: /* stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ +{ yylhsminor.yy974 = setStreamOptions(pCxt, yymsp[-3].minor.yy974, SOPT_IGNORE_UPDATE_SET, &yymsp[0].minor.yy0, NULL); } + yymsp[-3].minor.yy974 = yylhsminor.yy974; break; - case 430: /* subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ - case 714: /* sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ yytestcase(yyruleno==714); - case 738: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==738); -{ yymsp[-3].minor.yy560 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy560); } + case 436: /* subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ + case 725: /* sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ yytestcase(yyruleno==725); + case 749: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==749); +{ yymsp[-3].minor.yy974 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy974); } break; - case 433: /* cmd ::= KILL CONNECTION NK_INTEGER */ + case 439: /* cmd ::= KILL CONNECTION NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_CONNECTION_STMT, &yymsp[0].minor.yy0); } break; - case 434: /* cmd ::= KILL QUERY NK_STRING */ + case 440: /* cmd ::= KILL QUERY NK_STRING */ { pCxt->pRootNode = createKillQueryStmt(pCxt, &yymsp[0].minor.yy0); } break; - case 435: /* cmd ::= KILL TRANSACTION NK_INTEGER */ + case 441: /* cmd ::= KILL TRANSACTION NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_TRANSACTION_STMT, &yymsp[0].minor.yy0); } break; - case 436: /* cmd ::= KILL COMPACT NK_INTEGER */ + case 442: /* cmd ::= KILL COMPACT NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_COMPACT_STMT, &yymsp[0].minor.yy0); } break; - case 437: /* cmd ::= BALANCE VGROUP */ + case 443: /* cmd ::= BALANCE VGROUP */ { pCxt->pRootNode = createBalanceVgroupStmt(pCxt); } break; - case 438: /* cmd ::= BALANCE VGROUP LEADER on_vgroup_id */ -{ pCxt->pRootNode = createBalanceVgroupLeaderStmt(pCxt, &yymsp[0].minor.yy533); } + case 444: /* cmd ::= BALANCE VGROUP LEADER on_vgroup_id */ +{ pCxt->pRootNode = createBalanceVgroupLeaderStmt(pCxt, &yymsp[0].minor.yy557); } break; - case 439: /* cmd ::= BALANCE VGROUP LEADER DATABASE db_name */ -{ pCxt->pRootNode = createBalanceVgroupLeaderDBNameStmt(pCxt, &yymsp[0].minor.yy533); } + case 445: /* cmd ::= BALANCE VGROUP LEADER DATABASE db_name */ +{ pCxt->pRootNode = createBalanceVgroupLeaderDBNameStmt(pCxt, &yymsp[0].minor.yy557); } break; - case 440: /* cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ + case 446: /* cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ { pCxt->pRootNode = createMergeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } break; - case 441: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ -{ pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy334); } + case 447: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ +{ pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy946); } break; - case 442: /* cmd ::= SPLIT VGROUP NK_INTEGER */ + case 448: /* cmd ::= SPLIT VGROUP NK_INTEGER */ { pCxt->pRootNode = createSplitVgroupStmt(pCxt, &yymsp[0].minor.yy0); } break; - case 445: /* dnode_list ::= DNODE NK_INTEGER */ -{ yymsp[-1].minor.yy334 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + case 451: /* dnode_list ::= DNODE NK_INTEGER */ +{ yymsp[-1].minor.yy946 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } break; - case 447: /* cmd ::= DELETE FROM full_table_name where_clause_opt */ -{ pCxt->pRootNode = createDeleteStmt(pCxt, yymsp[-1].minor.yy560, yymsp[0].minor.yy560); } + case 453: /* cmd ::= DELETE FROM full_table_name where_clause_opt */ +{ pCxt->pRootNode = createDeleteStmt(pCxt, yymsp[-1].minor.yy974, yymsp[0].minor.yy974); } break; - case 450: /* insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ -{ yymsp[-6].minor.yy560 = createInsertStmt(pCxt, yymsp[-4].minor.yy560, yymsp[-2].minor.yy334, yymsp[0].minor.yy560); } + case 456: /* insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ +{ yymsp[-6].minor.yy974 = createInsertStmt(pCxt, yymsp[-4].minor.yy974, yymsp[-2].minor.yy946, yymsp[0].minor.yy974); } break; - case 451: /* insert_query ::= INSERT INTO full_table_name query_or_subquery */ -{ yymsp[-3].minor.yy560 = createInsertStmt(pCxt, yymsp[-1].minor.yy560, NULL, yymsp[0].minor.yy560); } + case 457: /* insert_query ::= INSERT INTO full_table_name query_or_subquery */ +{ yymsp[-3].minor.yy974 = createInsertStmt(pCxt, yymsp[-1].minor.yy974, NULL, yymsp[0].minor.yy974); } break; - case 452: /* tags_literal ::= NK_INTEGER */ - case 464: /* tags_literal ::= NK_BIN */ yytestcase(yyruleno==464); - case 473: /* tags_literal ::= NK_HEX */ yytestcase(yyruleno==473); -{ yylhsminor.yy560 = createRawValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0, NULL); } - yymsp[0].minor.yy560 = yylhsminor.yy560; + case 458: /* tags_literal ::= NK_INTEGER */ + case 470: /* tags_literal ::= NK_BIN */ yytestcase(yyruleno==470); + case 479: /* tags_literal ::= NK_HEX */ yytestcase(yyruleno==479); +{ yylhsminor.yy974 = createRawValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0, NULL); } + yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 453: /* tags_literal ::= NK_INTEGER NK_PLUS duration_literal */ - case 454: /* tags_literal ::= NK_INTEGER NK_MINUS duration_literal */ yytestcase(yyruleno==454); - case 465: /* tags_literal ::= NK_BIN NK_PLUS duration_literal */ yytestcase(yyruleno==465); - case 466: /* tags_literal ::= NK_BIN NK_MINUS duration_literal */ yytestcase(yyruleno==466); - case 474: /* tags_literal ::= NK_HEX NK_PLUS duration_literal */ yytestcase(yyruleno==474); - case 475: /* tags_literal ::= NK_HEX NK_MINUS duration_literal */ yytestcase(yyruleno==475); - case 483: /* tags_literal ::= NK_STRING NK_PLUS duration_literal */ yytestcase(yyruleno==483); - case 484: /* tags_literal ::= NK_STRING NK_MINUS duration_literal */ yytestcase(yyruleno==484); + case 459: /* tags_literal ::= NK_INTEGER NK_PLUS duration_literal */ + case 460: /* tags_literal ::= NK_INTEGER NK_MINUS duration_literal */ yytestcase(yyruleno==460); + case 471: /* tags_literal ::= NK_BIN NK_PLUS duration_literal */ yytestcase(yyruleno==471); + case 472: /* tags_literal ::= NK_BIN NK_MINUS duration_literal */ yytestcase(yyruleno==472); + case 480: /* tags_literal ::= NK_HEX NK_PLUS duration_literal */ yytestcase(yyruleno==480); + case 481: /* tags_literal ::= NK_HEX NK_MINUS duration_literal */ yytestcase(yyruleno==481); + case 489: /* tags_literal ::= NK_STRING NK_PLUS duration_literal */ yytestcase(yyruleno==489); + case 490: /* tags_literal ::= NK_STRING NK_MINUS duration_literal */ yytestcase(yyruleno==490); { SToken l = yymsp[-2].minor.yy0; - SToken r = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy560); + SToken r = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy974); l.n = (r.z + r.n) - l.z; - yylhsminor.yy560 = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, yymsp[0].minor.yy560); + yylhsminor.yy974 = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, yymsp[0].minor.yy974); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 455: /* tags_literal ::= NK_PLUS NK_INTEGER */ - case 458: /* tags_literal ::= NK_MINUS NK_INTEGER */ yytestcase(yyruleno==458); - case 467: /* tags_literal ::= NK_PLUS NK_BIN */ yytestcase(yyruleno==467); - case 470: /* tags_literal ::= NK_MINUS NK_BIN */ yytestcase(yyruleno==470); - case 476: /* tags_literal ::= NK_PLUS NK_HEX */ yytestcase(yyruleno==476); - case 479: /* tags_literal ::= NK_MINUS NK_HEX */ yytestcase(yyruleno==479); + case 461: /* tags_literal ::= NK_PLUS NK_INTEGER */ + case 464: /* tags_literal ::= NK_MINUS NK_INTEGER */ yytestcase(yyruleno==464); + case 473: /* tags_literal ::= NK_PLUS NK_BIN */ yytestcase(yyruleno==473); + case 476: /* tags_literal ::= NK_MINUS NK_BIN */ yytestcase(yyruleno==476); + case 482: /* tags_literal ::= NK_PLUS NK_HEX */ yytestcase(yyruleno==482); + case 485: /* tags_literal ::= NK_MINUS NK_HEX */ yytestcase(yyruleno==485); { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy560 = createRawValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &t, NULL); + yylhsminor.yy974 = createRawValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &t, NULL); } - yymsp[-1].minor.yy560 = yylhsminor.yy560; + yymsp[-1].minor.yy974 = yylhsminor.yy974; break; - case 456: /* tags_literal ::= NK_PLUS NK_INTEGER NK_PLUS duration_literal */ - case 457: /* tags_literal ::= NK_PLUS NK_INTEGER NK_MINUS duration_literal */ yytestcase(yyruleno==457); - case 459: /* tags_literal ::= NK_MINUS NK_INTEGER NK_PLUS duration_literal */ yytestcase(yyruleno==459); - case 460: /* tags_literal ::= NK_MINUS NK_INTEGER NK_MINUS duration_literal */ yytestcase(yyruleno==460); - case 468: /* tags_literal ::= NK_PLUS NK_BIN NK_PLUS duration_literal */ yytestcase(yyruleno==468); - case 469: /* tags_literal ::= NK_PLUS NK_BIN NK_MINUS duration_literal */ yytestcase(yyruleno==469); - case 471: /* tags_literal ::= NK_MINUS NK_BIN NK_PLUS duration_literal */ yytestcase(yyruleno==471); - case 472: /* tags_literal ::= NK_MINUS NK_BIN NK_MINUS duration_literal */ yytestcase(yyruleno==472); - case 477: /* tags_literal ::= NK_PLUS NK_HEX NK_PLUS duration_literal */ yytestcase(yyruleno==477); - case 478: /* tags_literal ::= NK_PLUS NK_HEX NK_MINUS duration_literal */ yytestcase(yyruleno==478); - case 480: /* tags_literal ::= NK_MINUS NK_HEX NK_PLUS duration_literal */ yytestcase(yyruleno==480); - case 481: /* tags_literal ::= NK_MINUS NK_HEX NK_MINUS duration_literal */ yytestcase(yyruleno==481); + case 462: /* tags_literal ::= NK_PLUS NK_INTEGER NK_PLUS duration_literal */ + case 463: /* tags_literal ::= NK_PLUS NK_INTEGER NK_MINUS duration_literal */ yytestcase(yyruleno==463); + case 465: /* tags_literal ::= NK_MINUS NK_INTEGER NK_PLUS duration_literal */ yytestcase(yyruleno==465); + case 466: /* tags_literal ::= NK_MINUS NK_INTEGER NK_MINUS duration_literal */ yytestcase(yyruleno==466); + case 474: /* tags_literal ::= NK_PLUS NK_BIN NK_PLUS duration_literal */ yytestcase(yyruleno==474); + case 475: /* tags_literal ::= NK_PLUS NK_BIN NK_MINUS duration_literal */ yytestcase(yyruleno==475); + case 477: /* tags_literal ::= NK_MINUS NK_BIN NK_PLUS duration_literal */ yytestcase(yyruleno==477); + case 478: /* tags_literal ::= NK_MINUS NK_BIN NK_MINUS duration_literal */ yytestcase(yyruleno==478); + case 483: /* tags_literal ::= NK_PLUS NK_HEX NK_PLUS duration_literal */ yytestcase(yyruleno==483); + case 484: /* tags_literal ::= NK_PLUS NK_HEX NK_MINUS duration_literal */ yytestcase(yyruleno==484); + case 486: /* tags_literal ::= NK_MINUS NK_HEX NK_PLUS duration_literal */ yytestcase(yyruleno==486); + case 487: /* tags_literal ::= NK_MINUS NK_HEX NK_MINUS duration_literal */ yytestcase(yyruleno==487); { SToken l = yymsp[-3].minor.yy0; - SToken r = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy560); + SToken r = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy974); l.n = (r.z + r.n) - l.z; - yylhsminor.yy560 = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, yymsp[0].minor.yy560); + yylhsminor.yy974 = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, yymsp[0].minor.yy974); } - yymsp[-3].minor.yy560 = yylhsminor.yy560; + yymsp[-3].minor.yy974 = yylhsminor.yy974; break; - case 461: /* tags_literal ::= NK_FLOAT */ -{ yylhsminor.yy560 = createRawValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0, NULL); } - yymsp[0].minor.yy560 = yylhsminor.yy560; + case 467: /* tags_literal ::= NK_FLOAT */ +{ yylhsminor.yy974 = createRawValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0, NULL); } + yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 462: /* tags_literal ::= NK_PLUS NK_FLOAT */ - case 463: /* tags_literal ::= NK_MINUS NK_FLOAT */ yytestcase(yyruleno==463); + case 468: /* tags_literal ::= NK_PLUS NK_FLOAT */ + case 469: /* tags_literal ::= NK_MINUS NK_FLOAT */ yytestcase(yyruleno==469); { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy560 = createRawValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t, NULL); + yylhsminor.yy974 = createRawValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t, NULL); } - yymsp[-1].minor.yy560 = yylhsminor.yy560; + yymsp[-1].minor.yy974 = yylhsminor.yy974; break; - case 482: /* tags_literal ::= NK_STRING */ -{ yylhsminor.yy560 = createRawValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0, NULL); } - yymsp[0].minor.yy560 = yylhsminor.yy560; + case 488: /* tags_literal ::= NK_STRING */ +{ yylhsminor.yy974 = createRawValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0, NULL); } + yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 485: /* tags_literal ::= NK_BOOL */ -{ yylhsminor.yy560 = createRawValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0, NULL); } - yymsp[0].minor.yy560 = yylhsminor.yy560; + case 491: /* tags_literal ::= NK_BOOL */ +{ yylhsminor.yy974 = createRawValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0, NULL); } + yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 486: /* tags_literal ::= NULL */ -{ yylhsminor.yy560 = createRawValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0, NULL); } - yymsp[0].minor.yy560 = yylhsminor.yy560; + case 492: /* tags_literal ::= NULL */ +{ yylhsminor.yy974 = createRawValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0, NULL); } + yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 487: /* tags_literal ::= literal_func */ -{ yylhsminor.yy560 = createRawValueNode(pCxt, TSDB_DATA_TYPE_BINARY, NULL, yymsp[0].minor.yy560); } - yymsp[0].minor.yy560 = yylhsminor.yy560; + case 493: /* tags_literal ::= literal_func */ +{ yylhsminor.yy974 = createRawValueNode(pCxt, TSDB_DATA_TYPE_BINARY, NULL, yymsp[0].minor.yy974); } + yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 488: /* tags_literal ::= literal_func NK_PLUS duration_literal */ - case 489: /* tags_literal ::= literal_func NK_MINUS duration_literal */ yytestcase(yyruleno==489); + case 494: /* tags_literal ::= literal_func NK_PLUS duration_literal */ + case 495: /* tags_literal ::= literal_func NK_MINUS duration_literal */ yytestcase(yyruleno==495); { - SToken l = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy560); - SToken r = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy560); + SToken l = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy974); + SToken r = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy974); l.n = (r.z + r.n) - l.z; - yylhsminor.yy560 = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, yymsp[-2].minor.yy560, yymsp[0].minor.yy560); + yylhsminor.yy974 = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, yymsp[-2].minor.yy974, yymsp[0].minor.yy974); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 492: /* literal ::= NK_INTEGER */ -{ yylhsminor.yy560 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy560 = yylhsminor.yy560; + case 498: /* literal ::= NK_INTEGER */ +{ yylhsminor.yy974 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 493: /* literal ::= NK_FLOAT */ -{ yylhsminor.yy560 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy560 = yylhsminor.yy560; + case 499: /* literal ::= NK_FLOAT */ +{ yylhsminor.yy974 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 494: /* literal ::= NK_STRING */ -{ yylhsminor.yy560 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy560 = yylhsminor.yy560; + case 500: /* literal ::= NK_STRING */ +{ yylhsminor.yy974 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 495: /* literal ::= NK_BOOL */ -{ yylhsminor.yy560 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy560 = yylhsminor.yy560; + case 501: /* literal ::= NK_BOOL */ +{ yylhsminor.yy974 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 496: /* literal ::= TIMESTAMP NK_STRING */ -{ yylhsminor.yy560 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); } - yymsp[-1].minor.yy560 = yylhsminor.yy560; + case 502: /* literal ::= TIMESTAMP NK_STRING */ +{ yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); } + yymsp[-1].minor.yy974 = yylhsminor.yy974; break; - case 497: /* literal ::= duration_literal */ - case 507: /* signed_literal ::= signed */ yytestcase(yyruleno==507); - case 531: /* expr_or_subquery ::= expression */ yytestcase(yyruleno==531); - case 532: /* expression ::= literal */ yytestcase(yyruleno==532); - case 534: /* expression ::= column_reference */ yytestcase(yyruleno==534); - case 535: /* expression ::= function_expression */ yytestcase(yyruleno==535); - case 536: /* expression ::= case_when_expression */ yytestcase(yyruleno==536); - case 579: /* function_expression ::= literal_func */ yytestcase(yyruleno==579); - case 580: /* function_expression ::= rand_func */ yytestcase(yyruleno==580); - case 638: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==638); - case 642: /* boolean_primary ::= predicate */ yytestcase(yyruleno==642); - case 644: /* common_expression ::= expr_or_subquery */ yytestcase(yyruleno==644); - case 645: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==645); - case 648: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==648); - case 650: /* table_reference ::= table_primary */ yytestcase(yyruleno==650); - case 651: /* table_reference ::= joined_table */ yytestcase(yyruleno==651); - case 655: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==655); - case 740: /* query_simple ::= query_specification */ yytestcase(yyruleno==740); - case 741: /* query_simple ::= union_query_expression */ yytestcase(yyruleno==741); - case 744: /* query_simple_or_subquery ::= query_simple */ yytestcase(yyruleno==744); - case 746: /* query_or_subquery ::= query_expression */ yytestcase(yyruleno==746); -{ yylhsminor.yy560 = yymsp[0].minor.yy560; } - yymsp[0].minor.yy560 = yylhsminor.yy560; + case 503: /* literal ::= duration_literal */ + case 513: /* signed_literal ::= signed */ yytestcase(yyruleno==513); + case 537: /* expr_or_subquery ::= expression */ yytestcase(yyruleno==537); + case 538: /* expression ::= literal */ yytestcase(yyruleno==538); + case 540: /* expression ::= column_reference */ yytestcase(yyruleno==540); + case 541: /* expression ::= function_expression */ yytestcase(yyruleno==541); + case 542: /* expression ::= case_when_expression */ yytestcase(yyruleno==542); + case 588: /* function_expression ::= literal_func */ yytestcase(yyruleno==588); + case 589: /* function_expression ::= rand_func */ yytestcase(yyruleno==589); + case 647: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==647); + case 651: /* boolean_primary ::= predicate */ yytestcase(yyruleno==651); + case 653: /* common_expression ::= expr_or_subquery */ yytestcase(yyruleno==653); + case 654: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==654); + case 657: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==657); + case 659: /* table_reference ::= table_primary */ yytestcase(yyruleno==659); + case 660: /* table_reference ::= joined_table */ yytestcase(yyruleno==660); + case 664: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==664); + case 751: /* query_simple ::= query_specification */ yytestcase(yyruleno==751); + case 752: /* query_simple ::= union_query_expression */ yytestcase(yyruleno==752); + case 755: /* query_simple_or_subquery ::= query_simple */ yytestcase(yyruleno==755); + case 757: /* query_or_subquery ::= query_expression */ yytestcase(yyruleno==757); +{ yylhsminor.yy974 = yymsp[0].minor.yy974; } + yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 498: /* literal ::= NULL */ -{ yylhsminor.yy560 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy560 = yylhsminor.yy560; + case 504: /* literal ::= NULL */ +{ yylhsminor.yy974 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 499: /* literal ::= NK_QUESTION */ -{ yylhsminor.yy560 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy560 = yylhsminor.yy560; + case 505: /* literal ::= NK_QUESTION */ +{ yylhsminor.yy974 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 500: /* duration_literal ::= NK_VARIABLE */ - case 715: /* interval_sliding_duration_literal ::= NK_VARIABLE */ yytestcase(yyruleno==715); - case 716: /* interval_sliding_duration_literal ::= NK_STRING */ yytestcase(yyruleno==716); - case 717: /* interval_sliding_duration_literal ::= NK_INTEGER */ yytestcase(yyruleno==717); -{ yylhsminor.yy560 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy560 = yylhsminor.yy560; + case 506: /* duration_literal ::= NK_VARIABLE */ + case 726: /* interval_sliding_duration_literal ::= NK_VARIABLE */ yytestcase(yyruleno==726); + case 727: /* interval_sliding_duration_literal ::= NK_STRING */ yytestcase(yyruleno==727); + case 728: /* interval_sliding_duration_literal ::= NK_INTEGER */ yytestcase(yyruleno==728); +{ yylhsminor.yy974 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 501: /* signed ::= NK_INTEGER */ -{ yylhsminor.yy560 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy560 = yylhsminor.yy560; + case 507: /* signed ::= NK_INTEGER */ +{ yylhsminor.yy974 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 502: /* signed ::= NK_PLUS NK_INTEGER */ -{ yymsp[-1].minor.yy560 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } + case 508: /* signed ::= NK_PLUS NK_INTEGER */ +{ yymsp[-1].minor.yy974 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } break; - case 503: /* signed ::= NK_MINUS NK_INTEGER */ + case 509: /* signed ::= NK_MINUS NK_INTEGER */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy560 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t); + yylhsminor.yy974 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t); } - yymsp[-1].minor.yy560 = yylhsminor.yy560; + yymsp[-1].minor.yy974 = yylhsminor.yy974; break; - case 504: /* signed ::= NK_FLOAT */ -{ yylhsminor.yy560 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy560 = yylhsminor.yy560; + case 510: /* signed ::= NK_FLOAT */ +{ yylhsminor.yy974 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 505: /* signed ::= NK_PLUS NK_FLOAT */ -{ yymsp[-1].minor.yy560 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } + case 511: /* signed ::= NK_PLUS NK_FLOAT */ +{ yymsp[-1].minor.yy974 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } break; - case 506: /* signed ::= NK_MINUS NK_FLOAT */ + case 512: /* signed ::= NK_MINUS NK_FLOAT */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy560 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t); + yylhsminor.yy974 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t); } - yymsp[-1].minor.yy560 = yylhsminor.yy560; + yymsp[-1].minor.yy974 = yylhsminor.yy974; break; - case 508: /* signed_literal ::= NK_STRING */ -{ yylhsminor.yy560 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy560 = yylhsminor.yy560; + case 514: /* signed_literal ::= NK_STRING */ +{ yylhsminor.yy974 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 509: /* signed_literal ::= NK_BOOL */ -{ yylhsminor.yy560 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy560 = yylhsminor.yy560; + case 515: /* signed_literal ::= NK_BOOL */ +{ yylhsminor.yy974 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 510: /* signed_literal ::= TIMESTAMP NK_STRING */ -{ yymsp[-1].minor.yy560 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } + case 516: /* signed_literal ::= TIMESTAMP NK_STRING */ +{ yymsp[-1].minor.yy974 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } break; - case 511: /* signed_literal ::= duration_literal */ - case 513: /* signed_literal ::= literal_func */ yytestcase(yyruleno==513); - case 609: /* star_func_para ::= expr_or_subquery */ yytestcase(yyruleno==609); - case 692: /* select_item ::= common_expression */ yytestcase(yyruleno==692); - case 702: /* partition_item ::= expr_or_subquery */ yytestcase(yyruleno==702); - case 745: /* query_simple_or_subquery ::= subquery */ yytestcase(yyruleno==745); - case 747: /* query_or_subquery ::= subquery */ yytestcase(yyruleno==747); - case 760: /* search_condition ::= common_expression */ yytestcase(yyruleno==760); -{ yylhsminor.yy560 = releaseRawExprNode(pCxt, yymsp[0].minor.yy560); } - yymsp[0].minor.yy560 = yylhsminor.yy560; + case 517: /* signed_literal ::= duration_literal */ + case 519: /* signed_literal ::= literal_func */ yytestcase(yyruleno==519); + case 618: /* star_func_para ::= expr_or_subquery */ yytestcase(yyruleno==618); + case 701: /* select_item ::= common_expression */ yytestcase(yyruleno==701); + case 711: /* partition_item ::= expr_or_subquery */ yytestcase(yyruleno==711); + case 756: /* query_simple_or_subquery ::= subquery */ yytestcase(yyruleno==756); + case 758: /* query_or_subquery ::= subquery */ yytestcase(yyruleno==758); + case 771: /* search_condition ::= common_expression */ yytestcase(yyruleno==771); +{ yylhsminor.yy974 = releaseRawExprNode(pCxt, yymsp[0].minor.yy974); } + yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 512: /* signed_literal ::= NULL */ -{ yylhsminor.yy560 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy560 = yylhsminor.yy560; + case 518: /* signed_literal ::= NULL */ +{ yylhsminor.yy974 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 514: /* signed_literal ::= NK_QUESTION */ -{ yylhsminor.yy560 = createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy560 = yylhsminor.yy560; + case 520: /* signed_literal ::= NK_QUESTION */ +{ yylhsminor.yy974 = createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 533: /* expression ::= pseudo_column */ -{ yylhsminor.yy560 = yymsp[0].minor.yy560; (void)setRawExprNodeIsPseudoColumn(pCxt, yylhsminor.yy560, true); } - yymsp[0].minor.yy560 = yylhsminor.yy560; + case 539: /* expression ::= pseudo_column */ +{ yylhsminor.yy974 = yymsp[0].minor.yy974; (void)setRawExprNodeIsPseudoColumn(pCxt, yylhsminor.yy974, true); } + yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 537: /* expression ::= NK_LP expression NK_RP */ - case 643: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==643); - case 759: /* subquery ::= NK_LP subquery NK_RP */ yytestcase(yyruleno==759); -{ yylhsminor.yy560 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy560)); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + case 543: /* expression ::= NK_LP expression NK_RP */ + case 652: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==652); + case 770: /* subquery ::= NK_LP subquery NK_RP */ yytestcase(yyruleno==770); +{ yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy974)); } + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 538: /* expression ::= NK_PLUS expr_or_subquery */ + case 544: /* expression ::= NK_PLUS expr_or_subquery */ { - SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy560); - yylhsminor.yy560 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy560)); + SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy974); + yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy974)); } - yymsp[-1].minor.yy560 = yylhsminor.yy560; + yymsp[-1].minor.yy974 = yylhsminor.yy974; break; - case 539: /* expression ::= NK_MINUS expr_or_subquery */ + case 545: /* expression ::= NK_MINUS expr_or_subquery */ { - SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy560); - yylhsminor.yy560 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy560), NULL)); + SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy974); + yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy974), NULL)); } - yymsp[-1].minor.yy560 = yylhsminor.yy560; + yymsp[-1].minor.yy974 = yylhsminor.yy974; break; - case 540: /* expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ + case 546: /* expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy560); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy560); - yylhsminor.yy560 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy560), releaseRawExprNode(pCxt, yymsp[0].minor.yy560))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy974); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy974); + yylhsminor.yy974 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy974), releaseRawExprNode(pCxt, yymsp[0].minor.yy974))); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 541: /* expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ + case 547: /* expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy560); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy560); - yylhsminor.yy560 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy560), releaseRawExprNode(pCxt, yymsp[0].minor.yy560))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy974); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy974); + yylhsminor.yy974 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy974), releaseRawExprNode(pCxt, yymsp[0].minor.yy974))); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 542: /* expression ::= expr_or_subquery NK_STAR expr_or_subquery */ + case 548: /* expression ::= expr_or_subquery NK_STAR expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy560); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy560); - yylhsminor.yy560 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy560), releaseRawExprNode(pCxt, yymsp[0].minor.yy560))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy974); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy974); + yylhsminor.yy974 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy974), releaseRawExprNode(pCxt, yymsp[0].minor.yy974))); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 543: /* expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ + case 549: /* expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy560); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy560); - yylhsminor.yy560 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy560), releaseRawExprNode(pCxt, yymsp[0].minor.yy560))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy974); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy974); + yylhsminor.yy974 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy974), releaseRawExprNode(pCxt, yymsp[0].minor.yy974))); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 544: /* expression ::= expr_or_subquery NK_REM expr_or_subquery */ + case 550: /* expression ::= expr_or_subquery NK_REM expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy560); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy560); - yylhsminor.yy560 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_REM, releaseRawExprNode(pCxt, yymsp[-2].minor.yy560), releaseRawExprNode(pCxt, yymsp[0].minor.yy560))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy974); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy974); + yylhsminor.yy974 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_REM, releaseRawExprNode(pCxt, yymsp[-2].minor.yy974), releaseRawExprNode(pCxt, yymsp[0].minor.yy974))); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 545: /* expression ::= column_reference NK_ARROW NK_STRING */ + case 551: /* expression ::= column_reference NK_ARROW NK_STRING */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy560); - yylhsminor.yy560 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy560), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy974); + yylhsminor.yy974 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy974), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0))); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 546: /* expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ + case 552: /* expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy560); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy560); - yylhsminor.yy560 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy560), releaseRawExprNode(pCxt, yymsp[0].minor.yy560))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy974); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy974); + yylhsminor.yy974 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy974), releaseRawExprNode(pCxt, yymsp[0].minor.yy974))); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 547: /* expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ + case 553: /* expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy560); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy560); - yylhsminor.yy560 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy560), releaseRawExprNode(pCxt, yymsp[0].minor.yy560))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy974); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy974); + yylhsminor.yy974 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy974), releaseRawExprNode(pCxt, yymsp[0].minor.yy974))); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 550: /* column_reference ::= column_name */ -{ yylhsminor.yy560 = createRawExprNode(pCxt, &yymsp[0].minor.yy533, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy533)); } - yymsp[0].minor.yy560 = yylhsminor.yy560; + case 556: /* column_reference ::= column_name */ +{ yylhsminor.yy974 = createRawExprNode(pCxt, &yymsp[0].minor.yy557, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy557)); } + yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 551: /* column_reference ::= table_name NK_DOT column_name */ -{ yylhsminor.yy560 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy533, &yymsp[0].minor.yy533, createColumnNode(pCxt, &yymsp[-2].minor.yy533, &yymsp[0].minor.yy533)); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + case 557: /* column_reference ::= table_name NK_DOT column_name */ +{ yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy557, &yymsp[0].minor.yy557, createColumnNode(pCxt, &yymsp[-2].minor.yy557, &yymsp[0].minor.yy557)); } + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 552: /* column_reference ::= NK_ALIAS */ -{ yylhsminor.yy560 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy560 = yylhsminor.yy560; + case 558: /* column_reference ::= NK_ALIAS */ +{ yylhsminor.yy974 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 553: /* column_reference ::= table_name NK_DOT NK_ALIAS */ -{ yylhsminor.yy560 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy533, &yymsp[0].minor.yy0, createColumnNode(pCxt, &yymsp[-2].minor.yy533, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + case 559: /* column_reference ::= table_name NK_DOT NK_ALIAS */ +{ yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy557, &yymsp[0].minor.yy0, createColumnNode(pCxt, &yymsp[-2].minor.yy557, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 554: /* pseudo_column ::= ROWTS */ - case 555: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==555); - case 557: /* pseudo_column ::= QSTART */ yytestcase(yyruleno==557); - case 558: /* pseudo_column ::= QEND */ yytestcase(yyruleno==558); - case 559: /* pseudo_column ::= QDURATION */ yytestcase(yyruleno==559); - case 560: /* pseudo_column ::= WSTART */ yytestcase(yyruleno==560); - case 561: /* pseudo_column ::= WEND */ yytestcase(yyruleno==561); - case 562: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==562); - case 563: /* pseudo_column ::= IROWTS */ yytestcase(yyruleno==563); - case 564: /* pseudo_column ::= ISFILLED */ yytestcase(yyruleno==564); - case 565: /* pseudo_column ::= QTAGS */ yytestcase(yyruleno==565); - case 582: /* literal_func ::= NOW */ yytestcase(yyruleno==582); - case 583: /* literal_func ::= TODAY */ yytestcase(yyruleno==583); -{ yylhsminor.yy560 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); } - yymsp[0].minor.yy560 = yylhsminor.yy560; + case 560: /* pseudo_column ::= ROWTS */ + case 561: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==561); + case 563: /* pseudo_column ::= QSTART */ yytestcase(yyruleno==563); + case 564: /* pseudo_column ::= QEND */ yytestcase(yyruleno==564); + case 565: /* pseudo_column ::= QDURATION */ yytestcase(yyruleno==565); + case 566: /* pseudo_column ::= WSTART */ yytestcase(yyruleno==566); + case 567: /* pseudo_column ::= WEND */ yytestcase(yyruleno==567); + case 568: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==568); + case 569: /* pseudo_column ::= IROWTS */ yytestcase(yyruleno==569); + case 570: /* pseudo_column ::= ISFILLED */ yytestcase(yyruleno==570); + case 571: /* pseudo_column ::= QTAGS */ yytestcase(yyruleno==571); + case 572: /* pseudo_column ::= FLOW */ yytestcase(yyruleno==572); + case 573: /* pseudo_column ::= FHIGH */ yytestcase(yyruleno==573); + case 574: /* pseudo_column ::= FROWTS */ yytestcase(yyruleno==574); + case 591: /* literal_func ::= NOW */ yytestcase(yyruleno==591); + case 592: /* literal_func ::= TODAY */ yytestcase(yyruleno==592); +{ yylhsminor.yy974 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); } + yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 556: /* pseudo_column ::= table_name NK_DOT TBNAME */ -{ yylhsminor.yy560 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy533, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy533)))); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + case 562: /* pseudo_column ::= table_name NK_DOT TBNAME */ +{ yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy557, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy557)))); } + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 566: /* function_expression ::= function_name NK_LP expression_list NK_RP */ - case 567: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==567); - case 575: /* function_expression ::= substr_func NK_LP expression_list NK_RP */ yytestcase(yyruleno==575); -{ yylhsminor.yy560 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy533, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy533, yymsp[-1].minor.yy334)); } - yymsp[-3].minor.yy560 = yylhsminor.yy560; + case 575: /* function_expression ::= function_name NK_LP expression_list NK_RP */ + case 576: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==576); + case 584: /* function_expression ::= substr_func NK_LP expression_list NK_RP */ yytestcase(yyruleno==584); +{ yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy557, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy557, yymsp[-1].minor.yy946)); } + yymsp[-3].minor.yy974 = yylhsminor.yy974; break; - case 568: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ - case 569: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name_default_len NK_RP */ yytestcase(yyruleno==569); -{ yylhsminor.yy560 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy560), yymsp[-1].minor.yy952)); } - yymsp[-5].minor.yy560 = yylhsminor.yy560; + case 577: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ + case 578: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name_default_len NK_RP */ yytestcase(yyruleno==578); +{ yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy974), yymsp[-1].minor.yy424)); } + yymsp[-5].minor.yy974 = yylhsminor.yy974; break; - case 570: /* function_expression ::= POSITION NK_LP expr_or_subquery IN expr_or_subquery NK_RP */ -{ yylhsminor.yy560 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createPositionFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy560), releaseRawExprNode(pCxt, yymsp[-1].minor.yy560))); } - yymsp[-5].minor.yy560 = yylhsminor.yy560; + case 579: /* function_expression ::= POSITION NK_LP expr_or_subquery IN expr_or_subquery NK_RP */ +{ yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createPositionFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy974), releaseRawExprNode(pCxt, yymsp[-1].minor.yy974))); } + yymsp[-5].minor.yy974 = yylhsminor.yy974; break; - case 571: /* function_expression ::= TRIM NK_LP expr_or_subquery NK_RP */ -{ yylhsminor.yy560 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, createTrimFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy560), TRIM_TYPE_BOTH)); } - yymsp[-3].minor.yy560 = yylhsminor.yy560; + case 580: /* function_expression ::= TRIM NK_LP expr_or_subquery NK_RP */ +{ yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, createTrimFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy974), TRIM_TYPE_BOTH)); } + yymsp[-3].minor.yy974 = yylhsminor.yy974; break; - case 572: /* function_expression ::= TRIM NK_LP trim_specification_type FROM expr_or_subquery NK_RP */ -{ yylhsminor.yy560 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createTrimFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy560), yymsp[-3].minor.yy672)); } - yymsp[-5].minor.yy560 = yylhsminor.yy560; + case 581: /* function_expression ::= TRIM NK_LP trim_specification_type FROM expr_or_subquery NK_RP */ +{ yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createTrimFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy974), yymsp[-3].minor.yy300)); } + yymsp[-5].minor.yy974 = yylhsminor.yy974; break; - case 573: /* function_expression ::= TRIM NK_LP expr_or_subquery FROM expr_or_subquery NK_RP */ -{ yylhsminor.yy560 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createTrimFunctionNodeExt(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy560), releaseRawExprNode(pCxt, yymsp[-1].minor.yy560), TRIM_TYPE_BOTH)); } - yymsp[-5].minor.yy560 = yylhsminor.yy560; + case 582: /* function_expression ::= TRIM NK_LP expr_or_subquery FROM expr_or_subquery NK_RP */ +{ yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createTrimFunctionNodeExt(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy974), releaseRawExprNode(pCxt, yymsp[-1].minor.yy974), TRIM_TYPE_BOTH)); } + yymsp[-5].minor.yy974 = yylhsminor.yy974; break; - case 574: /* function_expression ::= TRIM NK_LP trim_specification_type expr_or_subquery FROM expr_or_subquery NK_RP */ -{ yylhsminor.yy560 = createRawExprNodeExt(pCxt, &yymsp[-6].minor.yy0, &yymsp[0].minor.yy0, createTrimFunctionNodeExt(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy560), releaseRawExprNode(pCxt, yymsp[-1].minor.yy560), yymsp[-4].minor.yy672)); } - yymsp[-6].minor.yy560 = yylhsminor.yy560; + case 583: /* function_expression ::= TRIM NK_LP trim_specification_type expr_or_subquery FROM expr_or_subquery NK_RP */ +{ yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-6].minor.yy0, &yymsp[0].minor.yy0, createTrimFunctionNodeExt(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy974), releaseRawExprNode(pCxt, yymsp[-1].minor.yy974), yymsp[-4].minor.yy300)); } + yymsp[-6].minor.yy974 = yylhsminor.yy974; break; - case 576: /* function_expression ::= substr_func NK_LP expr_or_subquery FROM expr_or_subquery NK_RP */ -{ yylhsminor.yy560 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy533, &yymsp[0].minor.yy0, createSubstrFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy560), releaseRawExprNode(pCxt, yymsp[-1].minor.yy560))); } - yymsp[-5].minor.yy560 = yylhsminor.yy560; + case 585: /* function_expression ::= substr_func NK_LP expr_or_subquery FROM expr_or_subquery NK_RP */ +{ yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy557, &yymsp[0].minor.yy0, createSubstrFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy974), releaseRawExprNode(pCxt, yymsp[-1].minor.yy974))); } + yymsp[-5].minor.yy974 = yylhsminor.yy974; break; - case 577: /* function_expression ::= substr_func NK_LP expr_or_subquery FROM expr_or_subquery FOR expr_or_subquery NK_RP */ -{ yylhsminor.yy560 = createRawExprNodeExt(pCxt, &yymsp[-7].minor.yy533, &yymsp[0].minor.yy0, createSubstrFunctionNodeExt(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy560), releaseRawExprNode(pCxt, yymsp[-3].minor.yy560), releaseRawExprNode(pCxt, yymsp[-1].minor.yy560))); } - yymsp[-7].minor.yy560 = yylhsminor.yy560; + case 586: /* function_expression ::= substr_func NK_LP expr_or_subquery FROM expr_or_subquery FOR expr_or_subquery NK_RP */ +{ yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-7].minor.yy557, &yymsp[0].minor.yy0, createSubstrFunctionNodeExt(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy974), releaseRawExprNode(pCxt, yymsp[-3].minor.yy974), releaseRawExprNode(pCxt, yymsp[-1].minor.yy974))); } + yymsp[-7].minor.yy974 = yylhsminor.yy974; break; - case 578: /* function_expression ::= REPLACE NK_LP expression_list NK_RP */ - case 585: /* rand_func ::= RAND NK_LP expression_list NK_RP */ yytestcase(yyruleno==585); -{ yylhsminor.yy560 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy334)); } - yymsp[-3].minor.yy560 = yylhsminor.yy560; + case 587: /* function_expression ::= REPLACE NK_LP expression_list NK_RP */ + case 594: /* rand_func ::= RAND NK_LP expression_list NK_RP */ yytestcase(yyruleno==594); +{ yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy946)); } + yymsp[-3].minor.yy974 = yylhsminor.yy974; break; - case 581: /* literal_func ::= noarg_func NK_LP NK_RP */ -{ yylhsminor.yy560 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy533, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy533, NULL)); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + case 590: /* literal_func ::= noarg_func NK_LP NK_RP */ +{ yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy557, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy557, NULL)); } + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 584: /* rand_func ::= RAND NK_LP NK_RP */ -{ yylhsminor.yy560 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy0, NULL)); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + case 593: /* rand_func ::= RAND NK_LP NK_RP */ +{ yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy0, NULL)); } + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 588: /* trim_specification_type ::= BOTH */ -{ yymsp[0].minor.yy672 = TRIM_TYPE_BOTH; } + case 597: /* trim_specification_type ::= BOTH */ +{ yymsp[0].minor.yy300 = TRIM_TYPE_BOTH; } break; - case 589: /* trim_specification_type ::= TRAILING */ -{ yymsp[0].minor.yy672 = TRIM_TYPE_TRAILING; } + case 598: /* trim_specification_type ::= TRAILING */ +{ yymsp[0].minor.yy300 = TRIM_TYPE_TRAILING; } break; - case 590: /* trim_specification_type ::= LEADING */ -{ yymsp[0].minor.yy672 = TRIM_TYPE_LEADING; } + case 599: /* trim_specification_type ::= LEADING */ +{ yymsp[0].minor.yy300 = TRIM_TYPE_LEADING; } break; - case 605: /* star_func_para_list ::= NK_STAR */ -{ yylhsminor.yy334 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy334 = yylhsminor.yy334; + case 614: /* star_func_para_list ::= NK_STAR */ +{ yylhsminor.yy946 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy946 = yylhsminor.yy946; break; - case 610: /* star_func_para ::= table_name NK_DOT NK_STAR */ - case 695: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==695); -{ yylhsminor.yy560 = createColumnNode(pCxt, &yymsp[-2].minor.yy533, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + case 619: /* star_func_para ::= table_name NK_DOT NK_STAR */ + case 704: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==704); +{ yylhsminor.yy974 = createColumnNode(pCxt, &yymsp[-2].minor.yy557, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 611: /* case_when_expression ::= CASE when_then_list case_when_else_opt END */ -{ yylhsminor.yy560 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, NULL, yymsp[-2].minor.yy334, yymsp[-1].minor.yy560)); } - yymsp[-3].minor.yy560 = yylhsminor.yy560; + case 620: /* case_when_expression ::= CASE when_then_list case_when_else_opt END */ +{ yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, NULL, yymsp[-2].minor.yy946, yymsp[-1].minor.yy974)); } + yymsp[-3].minor.yy974 = yylhsminor.yy974; break; - case 612: /* case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ -{ yylhsminor.yy560 = createRawExprNodeExt(pCxt, &yymsp[-4].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy560), yymsp[-2].minor.yy334, yymsp[-1].minor.yy560)); } - yymsp[-4].minor.yy560 = yylhsminor.yy560; + case 621: /* case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ +{ yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-4].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy974), yymsp[-2].minor.yy946, yymsp[-1].minor.yy974)); } + yymsp[-4].minor.yy974 = yylhsminor.yy974; break; - case 615: /* when_then_expr ::= WHEN common_expression THEN common_expression */ -{ yymsp[-3].minor.yy560 = createWhenThenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy560), releaseRawExprNode(pCxt, yymsp[0].minor.yy560)); } + case 624: /* when_then_expr ::= WHEN common_expression THEN common_expression */ +{ yymsp[-3].minor.yy974 = createWhenThenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy974), releaseRawExprNode(pCxt, yymsp[0].minor.yy974)); } break; - case 617: /* case_when_else_opt ::= ELSE common_expression */ -{ yymsp[-1].minor.yy560 = releaseRawExprNode(pCxt, yymsp[0].minor.yy560); } + case 626: /* case_when_else_opt ::= ELSE common_expression */ +{ yymsp[-1].minor.yy974 = releaseRawExprNode(pCxt, yymsp[0].minor.yy974); } break; - case 618: /* predicate ::= expr_or_subquery compare_op expr_or_subquery */ - case 623: /* predicate ::= expr_or_subquery in_op in_predicate_value */ yytestcase(yyruleno==623); + case 627: /* predicate ::= expr_or_subquery compare_op expr_or_subquery */ + case 632: /* predicate ::= expr_or_subquery in_op in_predicate_value */ yytestcase(yyruleno==632); { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy560); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy560); - yylhsminor.yy560 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy506, releaseRawExprNode(pCxt, yymsp[-2].minor.yy560), releaseRawExprNode(pCxt, yymsp[0].minor.yy560))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy974); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy974); + yylhsminor.yy974 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy140, releaseRawExprNode(pCxt, yymsp[-2].minor.yy974), releaseRawExprNode(pCxt, yymsp[0].minor.yy974))); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 619: /* predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ + case 628: /* predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy560); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy560); - yylhsminor.yy560 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy560), releaseRawExprNode(pCxt, yymsp[-2].minor.yy560), releaseRawExprNode(pCxt, yymsp[0].minor.yy560))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy974); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy974); + yylhsminor.yy974 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy974), releaseRawExprNode(pCxt, yymsp[-2].minor.yy974), releaseRawExprNode(pCxt, yymsp[0].minor.yy974))); } - yymsp[-4].minor.yy560 = yylhsminor.yy560; + yymsp[-4].minor.yy974 = yylhsminor.yy974; break; - case 620: /* predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ + case 629: /* predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy560); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy560); - yylhsminor.yy560 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy560), releaseRawExprNode(pCxt, yymsp[-2].minor.yy560), releaseRawExprNode(pCxt, yymsp[0].minor.yy560))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy974); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy974); + yylhsminor.yy974 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy974), releaseRawExprNode(pCxt, yymsp[-2].minor.yy974), releaseRawExprNode(pCxt, yymsp[0].minor.yy974))); } - yymsp[-5].minor.yy560 = yylhsminor.yy560; + yymsp[-5].minor.yy974 = yylhsminor.yy974; break; - case 621: /* predicate ::= expr_or_subquery IS NULL */ + case 630: /* predicate ::= expr_or_subquery IS NULL */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy560); - yylhsminor.yy560 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy560), NULL)); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy974); + yylhsminor.yy974 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy974), NULL)); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 622: /* predicate ::= expr_or_subquery IS NOT NULL */ + case 631: /* predicate ::= expr_or_subquery IS NOT NULL */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy560); - yylhsminor.yy560 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy560), NULL)); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy974); + yylhsminor.yy974 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy974), NULL)); } - yymsp[-3].minor.yy560 = yylhsminor.yy560; + yymsp[-3].minor.yy974 = yylhsminor.yy974; break; - case 624: /* compare_op ::= NK_LT */ -{ yymsp[0].minor.yy506 = OP_TYPE_LOWER_THAN; } + case 633: /* compare_op ::= NK_LT */ +{ yymsp[0].minor.yy140 = OP_TYPE_LOWER_THAN; } break; - case 625: /* compare_op ::= NK_GT */ -{ yymsp[0].minor.yy506 = OP_TYPE_GREATER_THAN; } + case 634: /* compare_op ::= NK_GT */ +{ yymsp[0].minor.yy140 = OP_TYPE_GREATER_THAN; } break; - case 626: /* compare_op ::= NK_LE */ -{ yymsp[0].minor.yy506 = OP_TYPE_LOWER_EQUAL; } + case 635: /* compare_op ::= NK_LE */ +{ yymsp[0].minor.yy140 = OP_TYPE_LOWER_EQUAL; } break; - case 627: /* compare_op ::= NK_GE */ -{ yymsp[0].minor.yy506 = OP_TYPE_GREATER_EQUAL; } + case 636: /* compare_op ::= NK_GE */ +{ yymsp[0].minor.yy140 = OP_TYPE_GREATER_EQUAL; } break; - case 628: /* compare_op ::= NK_NE */ -{ yymsp[0].minor.yy506 = OP_TYPE_NOT_EQUAL; } + case 637: /* compare_op ::= NK_NE */ +{ yymsp[0].minor.yy140 = OP_TYPE_NOT_EQUAL; } break; - case 629: /* compare_op ::= NK_EQ */ -{ yymsp[0].minor.yy506 = OP_TYPE_EQUAL; } + case 638: /* compare_op ::= NK_EQ */ +{ yymsp[0].minor.yy140 = OP_TYPE_EQUAL; } break; - case 630: /* compare_op ::= LIKE */ -{ yymsp[0].minor.yy506 = OP_TYPE_LIKE; } + case 639: /* compare_op ::= LIKE */ +{ yymsp[0].minor.yy140 = OP_TYPE_LIKE; } break; - case 631: /* compare_op ::= NOT LIKE */ -{ yymsp[-1].minor.yy506 = OP_TYPE_NOT_LIKE; } + case 640: /* compare_op ::= NOT LIKE */ +{ yymsp[-1].minor.yy140 = OP_TYPE_NOT_LIKE; } break; - case 632: /* compare_op ::= MATCH */ -{ yymsp[0].minor.yy506 = OP_TYPE_MATCH; } + case 641: /* compare_op ::= MATCH */ +{ yymsp[0].minor.yy140 = OP_TYPE_MATCH; } break; - case 633: /* compare_op ::= NMATCH */ -{ yymsp[0].minor.yy506 = OP_TYPE_NMATCH; } + case 642: /* compare_op ::= NMATCH */ +{ yymsp[0].minor.yy140 = OP_TYPE_NMATCH; } break; - case 634: /* compare_op ::= CONTAINS */ -{ yymsp[0].minor.yy506 = OP_TYPE_JSON_CONTAINS; } + case 643: /* compare_op ::= CONTAINS */ +{ yymsp[0].minor.yy140 = OP_TYPE_JSON_CONTAINS; } break; - case 635: /* in_op ::= IN */ -{ yymsp[0].minor.yy506 = OP_TYPE_IN; } + case 644: /* in_op ::= IN */ +{ yymsp[0].minor.yy140 = OP_TYPE_IN; } break; - case 636: /* in_op ::= NOT IN */ -{ yymsp[-1].minor.yy506 = OP_TYPE_NOT_IN; } + case 645: /* in_op ::= NOT IN */ +{ yymsp[-1].minor.yy140 = OP_TYPE_NOT_IN; } break; - case 637: /* in_predicate_value ::= NK_LP literal_list NK_RP */ -{ yylhsminor.yy560 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy334)); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + case 646: /* in_predicate_value ::= NK_LP literal_list NK_RP */ +{ yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy946)); } + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 639: /* boolean_value_expression ::= NOT boolean_primary */ + case 648: /* boolean_value_expression ::= NOT boolean_primary */ { - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy560); - yylhsminor.yy560 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy560), NULL)); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy974); + yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy974), NULL)); } - yymsp[-1].minor.yy560 = yylhsminor.yy560; + yymsp[-1].minor.yy974 = yylhsminor.yy974; break; - case 640: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + case 649: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy560); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy560); - yylhsminor.yy560 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy560), releaseRawExprNode(pCxt, yymsp[0].minor.yy560))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy974); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy974); + yylhsminor.yy974 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy974), releaseRawExprNode(pCxt, yymsp[0].minor.yy974))); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 641: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + case 650: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy560); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy560); - yylhsminor.yy560 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy560), releaseRawExprNode(pCxt, yymsp[0].minor.yy560))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy974); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy974); + yylhsminor.yy974 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy974), releaseRawExprNode(pCxt, yymsp[0].minor.yy974))); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 649: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ -{ yylhsminor.yy560 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, JOIN_STYPE_NONE, yymsp[-2].minor.yy560, yymsp[0].minor.yy560, NULL); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + case 658: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ +{ yylhsminor.yy974 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, JOIN_STYPE_NONE, yymsp[-2].minor.yy974, yymsp[0].minor.yy974, NULL); } + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 652: /* table_primary ::= table_name alias_opt */ -{ yylhsminor.yy560 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy533, &yymsp[0].minor.yy533); } - yymsp[-1].minor.yy560 = yylhsminor.yy560; + case 661: /* table_primary ::= table_name alias_opt */ +{ yylhsminor.yy974 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy557, &yymsp[0].minor.yy557); } + yymsp[-1].minor.yy974 = yylhsminor.yy974; break; - case 653: /* table_primary ::= db_name NK_DOT table_name alias_opt */ -{ yylhsminor.yy560 = createRealTableNode(pCxt, &yymsp[-3].minor.yy533, &yymsp[-1].minor.yy533, &yymsp[0].minor.yy533); } - yymsp[-3].minor.yy560 = yylhsminor.yy560; + case 662: /* table_primary ::= db_name NK_DOT table_name alias_opt */ +{ yylhsminor.yy974 = createRealTableNode(pCxt, &yymsp[-3].minor.yy557, &yymsp[-1].minor.yy557, &yymsp[0].minor.yy557); } + yymsp[-3].minor.yy974 = yylhsminor.yy974; break; - case 654: /* table_primary ::= subquery alias_opt */ -{ yylhsminor.yy560 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy560), &yymsp[0].minor.yy533); } - yymsp[-1].minor.yy560 = yylhsminor.yy560; + case 663: /* table_primary ::= subquery alias_opt */ +{ yylhsminor.yy974 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy974), &yymsp[0].minor.yy557); } + yymsp[-1].minor.yy974 = yylhsminor.yy974; break; - case 656: /* alias_opt ::= */ -{ yymsp[1].minor.yy533 = nil_token; } + case 665: /* alias_opt ::= */ +{ yymsp[1].minor.yy557 = nil_token; } break; - case 658: /* alias_opt ::= AS table_alias */ -{ yymsp[-1].minor.yy533 = yymsp[0].minor.yy533; } + case 667: /* alias_opt ::= AS table_alias */ +{ yymsp[-1].minor.yy557 = yymsp[0].minor.yy557; } break; - case 659: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - case 660: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==660); -{ yymsp[-2].minor.yy560 = yymsp[-1].minor.yy560; } + case 668: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + case 669: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==669); +{ yymsp[-2].minor.yy974 = yymsp[-1].minor.yy974; } break; - case 661: /* joined_table ::= table_reference join_type join_subtype JOIN table_reference join_on_clause_opt window_offset_clause_opt jlimit_clause_opt */ + case 670: /* joined_table ::= table_reference join_type join_subtype JOIN table_reference join_on_clause_opt window_offset_clause_opt jlimit_clause_opt */ { - yylhsminor.yy560 = createJoinTableNode(pCxt, yymsp[-6].minor.yy36, yymsp[-5].minor.yy648, yymsp[-7].minor.yy560, yymsp[-3].minor.yy560, yymsp[-2].minor.yy560); - yylhsminor.yy560 = addWindowOffsetClause(pCxt, yylhsminor.yy560, yymsp[-1].minor.yy560); - yylhsminor.yy560 = addJLimitClause(pCxt, yylhsminor.yy560, yymsp[0].minor.yy560); + yylhsminor.yy974 = createJoinTableNode(pCxt, yymsp[-6].minor.yy792, yymsp[-5].minor.yy744, yymsp[-7].minor.yy974, yymsp[-3].minor.yy974, yymsp[-2].minor.yy974); + yylhsminor.yy974 = addWindowOffsetClause(pCxt, yylhsminor.yy974, yymsp[-1].minor.yy974); + yylhsminor.yy974 = addJLimitClause(pCxt, yylhsminor.yy974, yymsp[0].minor.yy974); } - yymsp[-7].minor.yy560 = yylhsminor.yy560; + yymsp[-7].minor.yy974 = yylhsminor.yy974; break; - case 662: /* join_type ::= */ -{ yymsp[1].minor.yy36 = JOIN_TYPE_INNER; } + case 671: /* join_type ::= */ +{ yymsp[1].minor.yy792 = JOIN_TYPE_INNER; } break; - case 663: /* join_type ::= INNER */ -{ yymsp[0].minor.yy36 = JOIN_TYPE_INNER; } + case 672: /* join_type ::= INNER */ +{ yymsp[0].minor.yy792 = JOIN_TYPE_INNER; } break; - case 664: /* join_type ::= LEFT */ -{ yymsp[0].minor.yy36 = JOIN_TYPE_LEFT; } + case 673: /* join_type ::= LEFT */ +{ yymsp[0].minor.yy792 = JOIN_TYPE_LEFT; } break; - case 665: /* join_type ::= RIGHT */ -{ yymsp[0].minor.yy36 = JOIN_TYPE_RIGHT; } + case 674: /* join_type ::= RIGHT */ +{ yymsp[0].minor.yy792 = JOIN_TYPE_RIGHT; } break; - case 666: /* join_type ::= FULL */ -{ yymsp[0].minor.yy36 = JOIN_TYPE_FULL; } + case 675: /* join_type ::= FULL */ +{ yymsp[0].minor.yy792 = JOIN_TYPE_FULL; } break; - case 667: /* join_subtype ::= */ -{ yymsp[1].minor.yy648 = JOIN_STYPE_NONE; } + case 676: /* join_subtype ::= */ +{ yymsp[1].minor.yy744 = JOIN_STYPE_NONE; } break; - case 668: /* join_subtype ::= OUTER */ -{ yymsp[0].minor.yy648 = JOIN_STYPE_OUTER; } + case 677: /* join_subtype ::= OUTER */ +{ yymsp[0].minor.yy744 = JOIN_STYPE_OUTER; } break; - case 669: /* join_subtype ::= SEMI */ -{ yymsp[0].minor.yy648 = JOIN_STYPE_SEMI; } + case 678: /* join_subtype ::= SEMI */ +{ yymsp[0].minor.yy744 = JOIN_STYPE_SEMI; } break; - case 670: /* join_subtype ::= ANTI */ -{ yymsp[0].minor.yy648 = JOIN_STYPE_ANTI; } + case 679: /* join_subtype ::= ANTI */ +{ yymsp[0].minor.yy744 = JOIN_STYPE_ANTI; } break; - case 671: /* join_subtype ::= ASOF */ -{ yymsp[0].minor.yy648 = JOIN_STYPE_ASOF; } + case 680: /* join_subtype ::= ASOF */ +{ yymsp[0].minor.yy744 = JOIN_STYPE_ASOF; } break; - case 672: /* join_subtype ::= WINDOW */ -{ yymsp[0].minor.yy648 = JOIN_STYPE_WIN; } + case 681: /* join_subtype ::= WINDOW */ +{ yymsp[0].minor.yy744 = JOIN_STYPE_WIN; } break; - case 676: /* window_offset_clause_opt ::= WINDOW_OFFSET NK_LP window_offset_literal NK_COMMA window_offset_literal NK_RP */ -{ yymsp[-5].minor.yy560 = createWindowOffsetNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy560), releaseRawExprNode(pCxt, yymsp[-1].minor.yy560)); } + case 685: /* window_offset_clause_opt ::= WINDOW_OFFSET NK_LP window_offset_literal NK_COMMA window_offset_literal NK_RP */ +{ yymsp[-5].minor.yy974 = createWindowOffsetNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy974), releaseRawExprNode(pCxt, yymsp[-1].minor.yy974)); } break; - case 677: /* window_offset_literal ::= NK_VARIABLE */ -{ yylhsminor.yy560 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createTimeOffsetValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy560 = yylhsminor.yy560; + case 686: /* window_offset_literal ::= NK_VARIABLE */ +{ yylhsminor.yy974 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createTimeOffsetValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 678: /* window_offset_literal ::= NK_MINUS NK_VARIABLE */ + case 687: /* window_offset_literal ::= NK_MINUS NK_VARIABLE */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy560 = createRawExprNode(pCxt, &t, createTimeOffsetValueNode(pCxt, &t)); + yylhsminor.yy974 = createRawExprNode(pCxt, &t, createTimeOffsetValueNode(pCxt, &t)); } - yymsp[-1].minor.yy560 = yylhsminor.yy560; + yymsp[-1].minor.yy974 = yylhsminor.yy974; break; - case 680: /* jlimit_clause_opt ::= JLIMIT NK_INTEGER */ - case 751: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ yytestcase(yyruleno==751); - case 755: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==755); -{ yymsp[-1].minor.yy560 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } + case 689: /* jlimit_clause_opt ::= JLIMIT NK_INTEGER */ + case 762: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ yytestcase(yyruleno==762); + case 766: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==766); +{ yymsp[-1].minor.yy974 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } break; - case 681: /* 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 690: /* query_specification ::= SELECT hint_list set_quantifier_opt tag_mode_opt select_list from_clause_opt where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ { - yymsp[-13].minor.yy560 = createSelectStmt(pCxt, yymsp[-11].minor.yy173, yymsp[-9].minor.yy334, yymsp[-8].minor.yy560, yymsp[-12].minor.yy334); - yymsp[-13].minor.yy560 = setSelectStmtTagMode(pCxt, yymsp[-13].minor.yy560, yymsp[-10].minor.yy173); - yymsp[-13].minor.yy560 = addWhereClause(pCxt, yymsp[-13].minor.yy560, yymsp[-7].minor.yy560); - yymsp[-13].minor.yy560 = addPartitionByClause(pCxt, yymsp[-13].minor.yy560, yymsp[-6].minor.yy334); - yymsp[-13].minor.yy560 = addWindowClauseClause(pCxt, yymsp[-13].minor.yy560, yymsp[-2].minor.yy560); - yymsp[-13].minor.yy560 = addGroupByClause(pCxt, yymsp[-13].minor.yy560, yymsp[-1].minor.yy334); - yymsp[-13].minor.yy560 = addHavingClause(pCxt, yymsp[-13].minor.yy560, yymsp[0].minor.yy560); - yymsp[-13].minor.yy560 = addRangeClause(pCxt, yymsp[-13].minor.yy560, yymsp[-5].minor.yy560); - yymsp[-13].minor.yy560 = addEveryClause(pCxt, yymsp[-13].minor.yy560, yymsp[-4].minor.yy560); - yymsp[-13].minor.yy560 = addFillClause(pCxt, yymsp[-13].minor.yy560, yymsp[-3].minor.yy560); + yymsp[-13].minor.yy974 = createSelectStmt(pCxt, yymsp[-11].minor.yy569, yymsp[-9].minor.yy946, yymsp[-8].minor.yy974, yymsp[-12].minor.yy946); + yymsp[-13].minor.yy974 = setSelectStmtTagMode(pCxt, yymsp[-13].minor.yy974, yymsp[-10].minor.yy569); + yymsp[-13].minor.yy974 = addWhereClause(pCxt, yymsp[-13].minor.yy974, yymsp[-7].minor.yy974); + yymsp[-13].minor.yy974 = addPartitionByClause(pCxt, yymsp[-13].minor.yy974, yymsp[-6].minor.yy946); + yymsp[-13].minor.yy974 = addWindowClauseClause(pCxt, yymsp[-13].minor.yy974, yymsp[-2].minor.yy974); + yymsp[-13].minor.yy974 = addGroupByClause(pCxt, yymsp[-13].minor.yy974, yymsp[-1].minor.yy946); + yymsp[-13].minor.yy974 = addHavingClause(pCxt, yymsp[-13].minor.yy974, yymsp[0].minor.yy974); + yymsp[-13].minor.yy974 = addRangeClause(pCxt, yymsp[-13].minor.yy974, yymsp[-5].minor.yy974); + yymsp[-13].minor.yy974 = addEveryClause(pCxt, yymsp[-13].minor.yy974, yymsp[-4].minor.yy974); + yymsp[-13].minor.yy974 = addFillClause(pCxt, yymsp[-13].minor.yy974, yymsp[-3].minor.yy974); } break; - case 682: /* hint_list ::= */ -{ yymsp[1].minor.yy334 = createHintNodeList(pCxt, NULL); } + case 691: /* hint_list ::= */ +{ yymsp[1].minor.yy946 = createHintNodeList(pCxt, NULL); } break; - case 683: /* hint_list ::= NK_HINT */ -{ yylhsminor.yy334 = createHintNodeList(pCxt, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy334 = yylhsminor.yy334; + case 692: /* hint_list ::= NK_HINT */ +{ yylhsminor.yy946 = createHintNodeList(pCxt, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy946 = yylhsminor.yy946; break; - case 688: /* set_quantifier_opt ::= ALL */ -{ yymsp[0].minor.yy173 = false; } + case 697: /* set_quantifier_opt ::= ALL */ +{ yymsp[0].minor.yy569 = false; } break; - case 691: /* select_item ::= NK_STAR */ -{ yylhsminor.yy560 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy560 = yylhsminor.yy560; + case 700: /* select_item ::= NK_STAR */ +{ yylhsminor.yy974 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy974 = yylhsminor.yy974; break; - case 693: /* select_item ::= common_expression column_alias */ - case 703: /* partition_item ::= expr_or_subquery column_alias */ yytestcase(yyruleno==703); -{ yylhsminor.yy560 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy560), &yymsp[0].minor.yy533); } - yymsp[-1].minor.yy560 = yylhsminor.yy560; + case 702: /* select_item ::= common_expression column_alias */ + case 712: /* partition_item ::= expr_or_subquery column_alias */ yytestcase(yyruleno==712); +{ yylhsminor.yy974 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy974), &yymsp[0].minor.yy557); } + yymsp[-1].minor.yy974 = yylhsminor.yy974; break; - case 694: /* select_item ::= common_expression AS column_alias */ - case 704: /* partition_item ::= expr_or_subquery AS column_alias */ yytestcase(yyruleno==704); -{ yylhsminor.yy560 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy560), &yymsp[0].minor.yy533); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + case 703: /* select_item ::= common_expression AS column_alias */ + case 713: /* partition_item ::= expr_or_subquery AS column_alias */ yytestcase(yyruleno==713); +{ yylhsminor.yy974 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy974), &yymsp[0].minor.yy557); } + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 699: /* partition_by_clause_opt ::= PARTITION BY partition_list */ - case 729: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==729); - case 749: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==749); -{ yymsp[-2].minor.yy334 = yymsp[0].minor.yy334; } + case 708: /* partition_by_clause_opt ::= PARTITION BY partition_list */ + case 740: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==740); + case 760: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==760); +{ yymsp[-2].minor.yy946 = yymsp[0].minor.yy946; } break; - case 706: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP */ -{ yymsp[-5].minor.yy560 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy560), releaseRawExprNode(pCxt, yymsp[-1].minor.yy560)); } + case 715: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP */ +{ yymsp[-5].minor.yy974 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy974), releaseRawExprNode(pCxt, yymsp[-1].minor.yy974)); } break; - case 707: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ -{ yymsp[-3].minor.yy560 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy560)); } + case 716: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ +{ yymsp[-3].minor.yy974 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy974)); } break; - case 708: /* twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ -{ yymsp[-5].minor.yy560 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy560), NULL, yymsp[-1].minor.yy560, yymsp[0].minor.yy560); } + case 717: /* twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ +{ yymsp[-5].minor.yy974 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy974), NULL, yymsp[-1].minor.yy974, yymsp[0].minor.yy974); } break; - case 709: /* 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.yy560 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy560), releaseRawExprNode(pCxt, yymsp[-3].minor.yy560), yymsp[-1].minor.yy560, yymsp[0].minor.yy560); } + case 718: /* twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ +{ yymsp[-7].minor.yy974 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy974), releaseRawExprNode(pCxt, yymsp[-3].minor.yy974), yymsp[-1].minor.yy974, yymsp[0].minor.yy974); } break; - case 710: /* twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ -{ yymsp[-6].minor.yy560 = createEventWindowNode(pCxt, yymsp[-3].minor.yy560, yymsp[0].minor.yy560); } + case 719: /* twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ +{ yymsp[-6].minor.yy974 = createEventWindowNode(pCxt, yymsp[-3].minor.yy974, yymsp[0].minor.yy974); } break; - case 711: /* twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy560 = createCountWindowNode(pCxt, &yymsp[-1].minor.yy0, &yymsp[-1].minor.yy0); } + case 720: /* twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP */ +{ yymsp[-3].minor.yy974 = createCountWindowNode(pCxt, &yymsp[-1].minor.yy0, &yymsp[-1].minor.yy0); } break; - case 712: /* twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ -{ yymsp[-5].minor.yy560 = createCountWindowNode(pCxt, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy0); } + case 721: /* twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ +{ yymsp[-5].minor.yy974 = createCountWindowNode(pCxt, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy0); } break; - case 719: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ -{ yymsp[-3].minor.yy560 = createFillNode(pCxt, yymsp[-1].minor.yy18, NULL); } + case 722: /* twindow_clause_opt ::= ANOMALY_WINDOW NK_LP expr_or_subquery NK_RP */ +{ yymsp[-3].minor.yy974 = createAnomalyWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy974), NULL); } break; - case 720: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ -{ yymsp[-5].minor.yy560 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy334)); } + case 723: /* twindow_clause_opt ::= ANOMALY_WINDOW NK_LP expr_or_subquery NK_COMMA NK_STRING NK_RP */ +{ yymsp[-5].minor.yy974 = createAnomalyWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy974), &yymsp[-1].minor.yy0); } break; - case 721: /* fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ -{ yymsp[-5].minor.yy560 = createFillNode(pCxt, FILL_MODE_VALUE_F, createNodeListNode(pCxt, yymsp[-1].minor.yy334)); } + case 730: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ +{ yymsp[-3].minor.yy974 = createFillNode(pCxt, yymsp[-1].minor.yy102, NULL); } break; - case 722: /* fill_mode ::= NONE */ -{ yymsp[0].minor.yy18 = FILL_MODE_NONE; } + case 731: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ +{ yymsp[-5].minor.yy974 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy946)); } break; - case 723: /* fill_mode ::= PREV */ -{ yymsp[0].minor.yy18 = FILL_MODE_PREV; } + case 732: /* fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ +{ yymsp[-5].minor.yy974 = createFillNode(pCxt, FILL_MODE_VALUE_F, createNodeListNode(pCxt, yymsp[-1].minor.yy946)); } break; - case 724: /* fill_mode ::= NULL */ -{ yymsp[0].minor.yy18 = FILL_MODE_NULL; } + case 733: /* fill_mode ::= NONE */ +{ yymsp[0].minor.yy102 = FILL_MODE_NONE; } break; - case 725: /* fill_mode ::= NULL_F */ -{ yymsp[0].minor.yy18 = FILL_MODE_NULL_F; } + case 734: /* fill_mode ::= PREV */ +{ yymsp[0].minor.yy102 = FILL_MODE_PREV; } break; - case 726: /* fill_mode ::= LINEAR */ -{ yymsp[0].minor.yy18 = FILL_MODE_LINEAR; } + case 735: /* fill_mode ::= NULL */ +{ yymsp[0].minor.yy102 = FILL_MODE_NULL; } break; - case 727: /* fill_mode ::= NEXT */ -{ yymsp[0].minor.yy18 = FILL_MODE_NEXT; } + case 736: /* fill_mode ::= NULL_F */ +{ yymsp[0].minor.yy102 = FILL_MODE_NULL_F; } break; - case 730: /* group_by_list ::= expr_or_subquery */ -{ yylhsminor.yy334 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy560))); } - yymsp[0].minor.yy334 = yylhsminor.yy334; + case 737: /* fill_mode ::= LINEAR */ +{ yymsp[0].minor.yy102 = FILL_MODE_LINEAR; } break; - case 731: /* group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ -{ yylhsminor.yy334 = addNodeToList(pCxt, yymsp[-2].minor.yy334, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy560))); } - yymsp[-2].minor.yy334 = yylhsminor.yy334; + case 738: /* fill_mode ::= NEXT */ +{ yymsp[0].minor.yy102 = FILL_MODE_NEXT; } break; - case 735: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ -{ yymsp[-5].minor.yy560 = createInterpTimeRange(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy560), releaseRawExprNode(pCxt, yymsp[-1].minor.yy560)); } + case 741: /* group_by_list ::= expr_or_subquery */ +{ yylhsminor.yy946 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy974))); } + yymsp[0].minor.yy946 = yylhsminor.yy946; break; - case 736: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ -{ yymsp[-3].minor.yy560 = createInterpTimePoint(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy560)); } + case 742: /* group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ +{ yylhsminor.yy946 = addNodeToList(pCxt, yymsp[-2].minor.yy946, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy974))); } + yymsp[-2].minor.yy946 = yylhsminor.yy946; break; - case 739: /* query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ + case 746: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ +{ yymsp[-5].minor.yy974 = createInterpTimeRange(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy974), releaseRawExprNode(pCxt, yymsp[-1].minor.yy974)); } + break; + case 747: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ +{ yymsp[-3].minor.yy974 = createInterpTimePoint(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy974)); } + break; + case 750: /* query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ { - yylhsminor.yy560 = addOrderByClause(pCxt, yymsp[-3].minor.yy560, yymsp[-2].minor.yy334); - yylhsminor.yy560 = addSlimitClause(pCxt, yylhsminor.yy560, yymsp[-1].minor.yy560); - yylhsminor.yy560 = addLimitClause(pCxt, yylhsminor.yy560, yymsp[0].minor.yy560); + yylhsminor.yy974 = addOrderByClause(pCxt, yymsp[-3].minor.yy974, yymsp[-2].minor.yy946); + yylhsminor.yy974 = addSlimitClause(pCxt, yylhsminor.yy974, yymsp[-1].minor.yy974); + yylhsminor.yy974 = addLimitClause(pCxt, yylhsminor.yy974, yymsp[0].minor.yy974); } - yymsp[-3].minor.yy560 = yylhsminor.yy560; + yymsp[-3].minor.yy974 = yylhsminor.yy974; break; - case 742: /* union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ -{ yylhsminor.yy560 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy560, yymsp[0].minor.yy560); } - yymsp[-3].minor.yy560 = yylhsminor.yy560; + case 753: /* union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ +{ yylhsminor.yy974 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy974, yymsp[0].minor.yy974); } + yymsp[-3].minor.yy974 = yylhsminor.yy974; break; - case 743: /* union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ -{ yylhsminor.yy560 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy560, yymsp[0].minor.yy560); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + case 754: /* union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ +{ yylhsminor.yy974 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy974, yymsp[0].minor.yy974); } + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 752: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - case 756: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==756); -{ yymsp[-3].minor.yy560 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } + case 763: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + case 767: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==767); +{ yymsp[-3].minor.yy974 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } break; - case 753: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - case 757: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==757); -{ yymsp[-3].minor.yy560 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } + case 764: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + case 768: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==768); +{ yymsp[-3].minor.yy974 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } break; - case 758: /* subquery ::= NK_LP query_expression NK_RP */ -{ yylhsminor.yy560 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy560); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + case 769: /* subquery ::= NK_LP query_expression NK_RP */ +{ yylhsminor.yy974 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy974); } + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 763: /* sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ -{ yylhsminor.yy560 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy560), yymsp[-1].minor.yy974, yymsp[0].minor.yy109); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + case 774: /* sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ +{ yylhsminor.yy974 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy974), yymsp[-1].minor.yy410, yymsp[0].minor.yy307); } + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; - case 764: /* ordering_specification_opt ::= */ -{ yymsp[1].minor.yy974 = ORDER_ASC; } + case 775: /* ordering_specification_opt ::= */ +{ yymsp[1].minor.yy410 = ORDER_ASC; } break; - case 765: /* ordering_specification_opt ::= ASC */ -{ yymsp[0].minor.yy974 = ORDER_ASC; } + case 776: /* ordering_specification_opt ::= ASC */ +{ yymsp[0].minor.yy410 = ORDER_ASC; } break; - case 766: /* ordering_specification_opt ::= DESC */ -{ yymsp[0].minor.yy974 = ORDER_DESC; } + case 777: /* ordering_specification_opt ::= DESC */ +{ yymsp[0].minor.yy410 = ORDER_DESC; } break; - case 767: /* null_ordering_opt ::= */ -{ yymsp[1].minor.yy109 = NULL_ORDER_DEFAULT; } + case 778: /* null_ordering_opt ::= */ +{ yymsp[1].minor.yy307 = NULL_ORDER_DEFAULT; } break; - case 768: /* null_ordering_opt ::= NULLS FIRST */ -{ yymsp[-1].minor.yy109 = NULL_ORDER_FIRST; } + case 779: /* null_ordering_opt ::= NULLS FIRST */ +{ yymsp[-1].minor.yy307 = NULL_ORDER_FIRST; } break; - case 769: /* null_ordering_opt ::= NULLS LAST */ -{ yymsp[-1].minor.yy109 = NULL_ORDER_LAST; } + case 780: /* null_ordering_opt ::= NULLS LAST */ +{ yymsp[-1].minor.yy307 = NULL_ORDER_LAST; } break; - case 772: /* column_options ::= column_options NK_ID NK_STRING */ -{ yylhsminor.yy560 = setColumnOptions(pCxt, yymsp[-2].minor.yy560, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy560 = yylhsminor.yy560; + case 783: /* column_options ::= column_options NK_ID NK_STRING */ +{ yylhsminor.yy974 = setColumnOptions(pCxt, yymsp[-2].minor.yy974, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy974 = yylhsminor.yy974; break; default: break; diff --git a/source/libs/planner/src/planLogicCreater.c b/source/libs/planner/src/planLogicCreater.c index 6ad30eccb8..40cd415cb9 100644 --- a/source/libs/planner/src/planLogicCreater.c +++ b/source/libs/planner/src/planLogicCreater.c @@ -973,6 +973,45 @@ static int32_t createInterpFuncLogicNode(SLogicPlanContext* pCxt, SSelectStmt* p return code; } +static bool isForecastFunc(int32_t funcId) { + return fmIsForecastFunc(funcId) || fmIsForecastPseudoColumnFunc(funcId) || fmIsGroupKeyFunc(funcId) || fmisSelectGroupConstValueFunc(funcId); +} + +static int32_t createForecastFuncLogicNode(SLogicPlanContext* pCxt, SSelectStmt* pSelect, SLogicNode** pLogicNode) { + if (!pSelect->hasForecastFunc) { + return TSDB_CODE_SUCCESS; + } + + SForecastFuncLogicNode* pForecastFunc = NULL; + int32_t code = nodesMakeNode(QUERY_NODE_LOGIC_PLAN_FORECAST_FUNC, (SNode**)&pForecastFunc); + if (NULL == pForecastFunc) { + return code; + } + + pForecastFunc->node.groupAction = getGroupAction(pCxt, pSelect); + pForecastFunc->node.requireDataOrder = getRequireDataOrder(true, pSelect); + pForecastFunc->node.resultDataOrder = pForecastFunc->node.requireDataOrder; + + // interp functions and _group_key functions + code = nodesCollectFuncs(pSelect, SQL_CLAUSE_SELECT, NULL, isForecastFunc, &pForecastFunc->pFuncs); + if (TSDB_CODE_SUCCESS == code) { + code = rewriteExprsForSelect(pForecastFunc->pFuncs, pSelect, SQL_CLAUSE_SELECT, NULL); + } + + // set the output + if (TSDB_CODE_SUCCESS == code) { + code = createColumnByRewriteExprs(pForecastFunc->pFuncs, &pForecastFunc->node.pTargets); + } + + if (TSDB_CODE_SUCCESS == code) { + *pLogicNode = (SLogicNode*)pForecastFunc; + } else { + nodesDestroyNode((SNode*)pForecastFunc); + } + + return code; +} + static int32_t createWindowLogicNodeFinalize(SLogicPlanContext* pCxt, SSelectStmt* pSelect, SWindowLogicNode* pWindow, SLogicNode** pLogicNode) { if (pCxt->pPlanCxt->streamQuery) { @@ -1174,6 +1213,48 @@ static int32_t createWindowLogicNodeByCount(SLogicPlanContext* pCxt, SCountWindo return createWindowLogicNodeFinalize(pCxt, pSelect, pWindow, pLogicNode); } +static int32_t createWindowLogicNodeByAnomaly(SLogicPlanContext* pCxt, SAnomalyWindowNode* pAnomaly, + SSelectStmt* pSelect, SLogicNode** pLogicNode) { + SWindowLogicNode* pWindow = NULL; + int32_t code = nodesMakeNode(QUERY_NODE_LOGIC_PLAN_WINDOW, (SNode**)&pWindow); + if (NULL == pWindow) { + return code; + } + + pWindow->winType = WINDOW_TYPE_ANOMALY; + pWindow->node.groupAction = getGroupAction(pCxt, pSelect); + pWindow->node.requireDataOrder = + pCxt->pPlanCxt->streamQuery ? DATA_ORDER_LEVEL_IN_BLOCK : getRequireDataOrder(true, pSelect); + pWindow->node.resultDataOrder = + pCxt->pPlanCxt->streamQuery ? DATA_ORDER_LEVEL_GLOBAL : pWindow->node.requireDataOrder; + + pWindow->pAnomalyExpr = NULL; + code = nodesCloneNode(pAnomaly->pExpr, &pWindow->pAnomalyExpr); + if (TSDB_CODE_SUCCESS != code) { + nodesDestroyNode((SNode*)pWindow); + return code; + } + + tstrncpy(pWindow->anomalyOpt, pAnomaly->anomalyOpt, sizeof(pWindow->anomalyOpt)); + + pWindow->pTspk = NULL; + code = nodesCloneNode(pAnomaly->pCol, &pWindow->pTspk); + if (NULL == pWindow->pTspk) { + nodesDestroyNode((SNode*)pWindow); + return code; + } + + // rewrite the expression in subsequent clauses + code = rewriteExprForSelect(pWindow->pAnomalyExpr, pSelect, SQL_CLAUSE_WINDOW); + if (TSDB_CODE_SUCCESS == code) { + code = createWindowLogicNodeFinalize(pCxt, pSelect, pWindow, pLogicNode); + } else { + nodesDestroyNode((SNode*)pWindow); + } + + return code; +} + static int32_t createWindowLogicNode(SLogicPlanContext* pCxt, SSelectStmt* pSelect, SLogicNode** pLogicNode) { if (NULL == pSelect->pWindow) { return TSDB_CODE_SUCCESS; @@ -1189,6 +1270,8 @@ static int32_t createWindowLogicNode(SLogicPlanContext* pCxt, SSelectStmt* pSele return createWindowLogicNodeByEvent(pCxt, (SEventWindowNode*)pSelect->pWindow, pSelect, pLogicNode); case QUERY_NODE_COUNT_WINDOW: return createWindowLogicNodeByCount(pCxt, (SCountWindowNode*)pSelect->pWindow, pSelect, pLogicNode); + case QUERY_NODE_ANOMALY_WINDOW: + return createWindowLogicNodeByAnomaly(pCxt, (SAnomalyWindowNode*)pSelect->pWindow, pSelect, pLogicNode); default: break; } @@ -1600,6 +1683,9 @@ static int32_t createSelectFromLogicNode(SLogicPlanContext* pCxt, SSelectStmt* p if (TSDB_CODE_SUCCESS == code) { code = createSelectRootLogicNode(pCxt, pSelect, createInterpFuncLogicNode, &pRoot); } + if (TSDB_CODE_SUCCESS == code) { + code = createSelectRootLogicNode(pCxt, pSelect, createForecastFuncLogicNode, &pRoot); + } if (TSDB_CODE_SUCCESS == code) { code = createSelectRootLogicNode(pCxt, pSelect, createDistinctLogicNode, &pRoot); } diff --git a/source/libs/planner/src/planOptimizer.c b/source/libs/planner/src/planOptimizer.c index 97c4fa9dde..885faa5461 100644 --- a/source/libs/planner/src/planOptimizer.c +++ b/source/libs/planner/src/planOptimizer.c @@ -2380,6 +2380,8 @@ static bool sortPriKeyOptHasUnsupportedPkFunc(SLogicNode* pLogicNode, EOrder sor case QUERY_NODE_LOGIC_PLAN_INTERP_FUNC: pFuncList = ((SInterpFuncLogicNode*)pLogicNode)->pFuncs; break; + case QUERY_NODE_LOGIC_PLAN_FORECAST_FUNC: + pFuncList = ((SForecastFuncLogicNode*)pLogicNode)->pFuncs; default: break; } diff --git a/source/libs/planner/src/planPhysiCreater.c b/source/libs/planner/src/planPhysiCreater.c index a00eb05482..738ccf3224 100644 --- a/source/libs/planner/src/planPhysiCreater.c +++ b/source/libs/planner/src/planPhysiCreater.c @@ -1990,6 +1990,50 @@ static int32_t createInterpFuncPhysiNode(SPhysiPlanContext* pCxt, SNodeList* pCh return code; } +static int32_t createForecastFuncPhysiNode(SPhysiPlanContext* pCxt, SNodeList* pChildren, + SForecastFuncLogicNode* pFuncLogicNode, SPhysiNode** pPhyNode) { + SForecastFuncPhysiNode* pForecastFunc = + (SForecastFuncPhysiNode*)makePhysiNode(pCxt, (SLogicNode*)pFuncLogicNode, QUERY_NODE_PHYSICAL_PLAN_FORECAST_FUNC); + if (NULL == pForecastFunc) { + return terrno; + } + + SNodeList* pPrecalcExprs = NULL; + SNodeList* pFuncs = NULL; + int32_t code = rewritePrecalcExprs(pCxt, pFuncLogicNode->pFuncs, &pPrecalcExprs, &pFuncs); + + SDataBlockDescNode* pChildTupe = (((SPhysiNode*)nodesListGetNode(pChildren, 0))->pOutputDataBlockDesc); + // push down expression to pOutputDataBlockDesc of child node + if (TSDB_CODE_SUCCESS == code && NULL != pPrecalcExprs) { + code = setListSlotId(pCxt, pChildTupe->dataBlockId, -1, pPrecalcExprs, &pForecastFunc->pExprs); + if (TSDB_CODE_SUCCESS == code) { + code = pushdownDataBlockSlots(pCxt, pForecastFunc->pExprs, pChildTupe); + } + } + + if (TSDB_CODE_SUCCESS == code) { + code = setListSlotId(pCxt, pChildTupe->dataBlockId, -1, pFuncs, &pForecastFunc->pFuncs); + if (TSDB_CODE_SUCCESS == code) { + code = addDataBlockSlots(pCxt, pForecastFunc->pFuncs, pForecastFunc->node.pOutputDataBlockDesc); + } + } + + if (TSDB_CODE_SUCCESS == code) { + code = setConditionsSlotId(pCxt, (const SLogicNode*)pFuncLogicNode, (SPhysiNode*)pForecastFunc); + } + + if (TSDB_CODE_SUCCESS == code) { + *pPhyNode = (SPhysiNode*)pForecastFunc; + } else { + nodesDestroyNode((SNode*)pForecastFunc); + } + + nodesDestroyList(pPrecalcExprs); + nodesDestroyList(pFuncs); + + return code; +} + static bool projectCanMergeDataBlock(SProjectLogicNode* pProject) { if (GROUP_ACTION_KEEP == pProject->node.groupAction) { return false; @@ -2325,6 +2369,53 @@ static int32_t createCountWindowPhysiNode(SPhysiPlanContext* pCxt, SNodeList* pC return code; } +static int32_t createAnomalyWindowPhysiNode(SPhysiPlanContext* pCxt, SNodeList* pChildren, + SWindowLogicNode* pWindowLogicNode, SPhysiNode** pPhyNode) { + SAnomalyWindowPhysiNode* pAnomaly = (SAnomalyWindowPhysiNode*)makePhysiNode( + pCxt, (SLogicNode*)pWindowLogicNode, + (pCxt->pPlanCxt->streamQuery ? QUERY_NODE_PHYSICAL_PLAN_STREAM_ANOMALY : QUERY_NODE_PHYSICAL_PLAN_MERGE_ANOMALY)); + if (NULL == pAnomaly) { + return terrno; + } + + SNodeList* pPrecalcExprs = NULL; + SNode* pAnomalyKey = NULL; + int32_t code = rewritePrecalcExpr(pCxt, pWindowLogicNode->pAnomalyExpr, &pPrecalcExprs, &pAnomalyKey); + + SDataBlockDescNode* pChildTupe = (((SPhysiNode*)nodesListGetNode(pChildren, 0))->pOutputDataBlockDesc); + // push down expression to pOutputDataBlockDesc of child node + if (TSDB_CODE_SUCCESS == code && NULL != pPrecalcExprs) { + code = setListSlotId(pCxt, pChildTupe->dataBlockId, -1, pPrecalcExprs, &pAnomaly->window.pExprs); + if (TSDB_CODE_SUCCESS == code) { + code = addDataBlockSlots(pCxt, pAnomaly->window.pExprs, pChildTupe); + } + } + + if (TSDB_CODE_SUCCESS == code) { + code = setNodeSlotId(pCxt, pChildTupe->dataBlockId, -1, pAnomalyKey, &pAnomaly->pAnomalyKey); + // if (TSDB_CODE_SUCCESS == code) { + // code = addDataBlockSlot(pCxt, &pAnomaly->pAnomalyKey, pAnomaly->window.node.pOutputDataBlockDesc); + // } + } + + tstrncpy(pAnomaly->anomalyOpt, pWindowLogicNode->anomalyOpt, sizeof(pAnomaly->anomalyOpt)); + + if (TSDB_CODE_SUCCESS == code) { + code = createWindowPhysiNodeFinalize(pCxt, pChildren, &pAnomaly->window, pWindowLogicNode); + } + + if (TSDB_CODE_SUCCESS == code) { + *pPhyNode = (SPhysiNode*)pAnomaly; + } else { + nodesDestroyNode((SNode*)pAnomaly); + } + + nodesDestroyList(pPrecalcExprs); + nodesDestroyNode(pAnomalyKey); + + return code; +} + static int32_t createWindowPhysiNode(SPhysiPlanContext* pCxt, SNodeList* pChildren, SWindowLogicNode* pWindowLogicNode, SPhysiNode** pPhyNode) { switch (pWindowLogicNode->winType) { @@ -2338,6 +2429,8 @@ static int32_t createWindowPhysiNode(SPhysiPlanContext* pCxt, SNodeList* pChildr return createEventWindowPhysiNode(pCxt, pChildren, pWindowLogicNode, pPhyNode); case WINDOW_TYPE_COUNT: return createCountWindowPhysiNode(pCxt, pChildren, pWindowLogicNode, pPhyNode); + case WINDOW_TYPE_ANOMALY: + return createAnomalyWindowPhysiNode(pCxt, pChildren, pWindowLogicNode, pPhyNode); default: break; } @@ -2652,6 +2745,8 @@ static int32_t doCreatePhysiNode(SPhysiPlanContext* pCxt, SLogicNode* pLogicNode return createIndefRowsFuncPhysiNode(pCxt, pChildren, (SIndefRowsFuncLogicNode*)pLogicNode, pPhyNode); case QUERY_NODE_LOGIC_PLAN_INTERP_FUNC: return createInterpFuncPhysiNode(pCxt, pChildren, (SInterpFuncLogicNode*)pLogicNode, pPhyNode); + case QUERY_NODE_LOGIC_PLAN_FORECAST_FUNC: + return createForecastFuncPhysiNode(pCxt, pChildren, (SForecastFuncLogicNode*)pLogicNode, pPhyNode); case QUERY_NODE_LOGIC_PLAN_MERGE: return createMergePhysiNode(pCxt, pChildren, (SMergeLogicNode*)pLogicNode, pPhyNode); case QUERY_NODE_LOGIC_PLAN_GROUP_CACHE: diff --git a/source/libs/planner/src/planSpliter.c b/source/libs/planner/src/planSpliter.c index bd2462243d..e0e42087f3 100644 --- a/source/libs/planner/src/planSpliter.c +++ b/source/libs/planner/src/planSpliter.c @@ -939,6 +939,18 @@ static int32_t stbSplSplitCount(SSplitContext* pCxt, SStableSplitInfo* pInfo) { } } +static int32_t stbSplSplitAnomalyForStream(SSplitContext* pCxt, SStableSplitInfo* pInfo) { + return TSDB_CODE_PLAN_INTERNAL_ERROR; +} + +static int32_t stbSplSplitAnomaly(SSplitContext* pCxt, SStableSplitInfo* pInfo) { + if (pCxt->pPlanCxt->streamQuery) { + return stbSplSplitAnomalyForStream(pCxt, pInfo); + } else { + return stbSplSplitSessionOrStateForBatch(pCxt, pInfo); + } +} + static int32_t stbSplSplitWindowForCrossTable(SSplitContext* pCxt, SStableSplitInfo* pInfo) { switch (((SWindowLogicNode*)pInfo->pSplitNode)->winType) { case WINDOW_TYPE_INTERVAL: @@ -951,6 +963,8 @@ static int32_t stbSplSplitWindowForCrossTable(SSplitContext* pCxt, SStableSplitI return stbSplSplitEvent(pCxt, pInfo); case WINDOW_TYPE_COUNT: return stbSplSplitCount(pCxt, pInfo); + case WINDOW_TYPE_ANOMALY: + return stbSplSplitAnomaly(pCxt, pInfo); default: break; } @@ -2000,7 +2014,8 @@ typedef struct SQnodeSplitInfo { static bool qndSplFindSplitNode(SSplitContext* pCxt, SLogicSubplan* pSubplan, SLogicNode* pNode, SQnodeSplitInfo* pInfo) { if (QUERY_NODE_LOGIC_PLAN_SCAN == nodeType(pNode) && NULL != pNode->pParent && - QUERY_NODE_LOGIC_PLAN_INTERP_FUNC != nodeType(pNode->pParent) && ((SScanLogicNode*)pNode)->scanSeq[0] <= 1 && + QUERY_NODE_LOGIC_PLAN_INTERP_FUNC != nodeType(pNode->pParent) && + QUERY_NODE_LOGIC_PLAN_FORECAST_FUNC != nodeType(pNode->pParent) && ((SScanLogicNode*)pNode)->scanSeq[0] <= 1 && ((SScanLogicNode*)pNode)->scanSeq[1] <= 1) { pInfo->pSplitNode = pNode; pInfo->pSubplan = pSubplan; diff --git a/source/libs/planner/src/planUtil.c b/source/libs/planner/src/planUtil.c index ae958de6e8..fd8670c23e 100644 --- a/source/libs/planner/src/planUtil.c +++ b/source/libs/planner/src/planUtil.c @@ -256,6 +256,15 @@ static int32_t adjustCountDataRequirement(SWindowLogicNode* pWindow, EDataOrderL return TSDB_CODE_SUCCESS; } +static int32_t adjustAnomalyDataRequirement(SWindowLogicNode* pWindow, EDataOrderLevel requirement) { + if (requirement <= pWindow->node.resultDataOrder) { + return TSDB_CODE_SUCCESS; + } + pWindow->node.resultDataOrder = requirement; + pWindow->node.requireDataOrder = requirement; + return TSDB_CODE_SUCCESS; +} + static int32_t adjustWindowDataRequirement(SWindowLogicNode* pWindow, EDataOrderLevel requirement) { switch (pWindow->winType) { case WINDOW_TYPE_INTERVAL: @@ -268,6 +277,8 @@ static int32_t adjustWindowDataRequirement(SWindowLogicNode* pWindow, EDataOrder return adjustEventDataRequirement(pWindow, requirement); case WINDOW_TYPE_COUNT: return adjustCountDataRequirement(pWindow, requirement); + case WINDOW_TYPE_ANOMALY: + return adjustAnomalyDataRequirement(pWindow, requirement); default: break; } @@ -318,6 +329,15 @@ static int32_t adjustInterpDataRequirement(SInterpFuncLogicNode* pInterp, EDataO return TSDB_CODE_SUCCESS; } +static int32_t adjustForecastDataRequirement(SForecastFuncLogicNode* pForecast, EDataOrderLevel requirement) { + if (requirement <= pForecast->node.requireDataOrder) { + return TSDB_CODE_SUCCESS; + } + pForecast->node.resultDataOrder = requirement; + pForecast->node.requireDataOrder = requirement; + return TSDB_CODE_SUCCESS; +} + int32_t adjustLogicNodeDataRequirement(SLogicNode* pNode, EDataOrderLevel requirement) { int32_t code = TSDB_CODE_SUCCESS; switch (nodeType(pNode)) { @@ -355,6 +375,9 @@ int32_t adjustLogicNodeDataRequirement(SLogicNode* pNode, EDataOrderLevel requir case QUERY_NODE_LOGIC_PLAN_INTERP_FUNC: code = adjustInterpDataRequirement((SInterpFuncLogicNode*)pNode, requirement); break; + case QUERY_NODE_LOGIC_PLAN_FORECAST_FUNC: + code = adjustForecastDataRequirement((SForecastFuncLogicNode*)pNode, requirement); + break; default: break; } diff --git a/source/libs/scalar/src/sclfunc.c b/source/libs/scalar/src/sclfunc.c index 341ce760f5..0197b94fff 100644 --- a/source/libs/scalar/src/sclfunc.c +++ b/source/libs/scalar/src/sclfunc.c @@ -4080,6 +4080,10 @@ int32_t diffScalarFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam return nonCalcScalarFunction(pInput, inputNum, pOutput); } +int32_t forecastScalarFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput) { + return nonCalcScalarFunction(pInput, inputNum, pOutput); +} + int32_t twaScalarFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput) { return avgScalarFunction(pInput, inputNum, pOutput); } diff --git a/source/util/CMakeLists.txt b/source/util/CMakeLists.txt index f907746821..4972e9f50b 100644 --- a/source/util/CMakeLists.txt +++ b/source/util/CMakeLists.txt @@ -12,6 +12,10 @@ ELSE () MESSAGE(STATUS "enable assert core") ENDIF (${ASSERT_NOT_CORE}) +if(${BUILD_WITH_ANALYSIS}) + add_definitions(-DUSE_ANAL) +endif() + target_include_directories( util PUBLIC "${TD_SOURCE_DIR}/include/util" diff --git a/source/util/src/tanal.c b/source/util/src/tanal.c new file mode 100644 index 0000000000..34be2af3e7 --- /dev/null +++ b/source/util/src/tanal.c @@ -0,0 +1,752 @@ +/* + * Copyright (c) 2019 TAOS Data, Inc. + * + * This program is free software: you can use, redistribute, and/or modify + * it under the terms of the GNU Affero General Public License, version 3 + * or later ("AGPL"), as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +#define _DEFAULT_SOURCE +#include "tanal.h" +#include "tmsg.h" +#include "ttypes.h" +#include "tutil.h" + +#ifdef USE_ANAL +#include +#define ANAL_ALGO_SPLIT "," + +typedef struct { + int64_t ver; + SHashObj *hash; // algoname:algotype -> SAnalUrl + TdThreadMutex lock; +} SAlgoMgmt; + +typedef struct { + char *data; + int64_t dataLen; +} SCurlResp; + +static SAlgoMgmt tsAlgos = {0}; +static int32_t taosAnalBufGetCont(SAnalBuf *pBuf, char **ppCont, int64_t *pContLen); + +const char *taosAnalAlgoStr(EAnalAlgoType type) { + switch (type) { + case ANAL_ALGO_TYPE_ANOMALY_DETECT: + return "anomaly-detection"; + case ANAL_ALGO_TYPE_FORECAST: + return "forecast"; + default: + return "unknown"; + } +} + +const char *taosAnalAlgoUrlStr(EAnalAlgoType type) { + switch (type) { + case ANAL_ALGO_TYPE_ANOMALY_DETECT: + return "anomaly-detect"; + case ANAL_ALGO_TYPE_FORECAST: + return "forecast"; + default: + return "unknown"; + } +} + +EAnalAlgoType taosAnalAlgoInt(const char *name) { + for (EAnalAlgoType i = 0; i < ANAL_ALGO_TYPE_END; ++i) { + if (strcasecmp(name, taosAnalAlgoStr(i)) == 0) { + return i; + } + } + + return ANAL_ALGO_TYPE_END; +} + +int32_t taosAnalInit() { + if (curl_global_init(CURL_GLOBAL_ALL) != 0) { + uError("failed to init curl"); + return -1; + } + + tsAlgos.ver = 0; + if (taosThreadMutexInit(&tsAlgos.lock, NULL) != 0) { + uError("failed to init algo mutex"); + return -1; + } + + tsAlgos.hash = taosHashInit(64, MurmurHash3_32, true, HASH_ENTRY_LOCK); + if (tsAlgos.hash == NULL) { + uError("failed to init algo hash"); + return -1; + } + + uInfo("analysis env is initialized"); + return 0; +} + +static void taosAnalFreeHash(SHashObj *hash) { + void *pIter = taosHashIterate(hash, NULL); + while (pIter != NULL) { + SAnalUrl *pUrl = (SAnalUrl *)pIter; + taosMemoryFree(pUrl->url); + pIter = taosHashIterate(hash, pIter); + } + taosHashCleanup(hash); +} + +void taosAnalCleanup() { + curl_global_cleanup(); + if (taosThreadMutexDestroy(&tsAlgos.lock) != 0) { + uError("failed to destroy anal lock"); + } + taosAnalFreeHash(tsAlgos.hash); + tsAlgos.hash = NULL; + uInfo("analysis env is cleaned up"); +} + +void taosAnalUpdate(int64_t newVer, SHashObj *pHash) { + if (newVer > tsAlgos.ver) { + if (taosThreadMutexLock(&tsAlgos.lock) == 0) { + SHashObj *hash = tsAlgos.hash; + tsAlgos.ver = newVer; + tsAlgos.hash = pHash; + if (taosThreadMutexUnlock(&tsAlgos.lock) != 0) { + uError("failed to unlock hash") + } + taosAnalFreeHash(hash); + } + } else { + taosAnalFreeHash(pHash); + } +} + +bool taosAnalGetOptStr(const char *option, const char *optName, char *optValue, int32_t optMaxLen) { + char buf[TSDB_ANAL_ALGO_OPTION_LEN] = {0}; + int32_t bufLen = tsnprintf(buf, sizeof(buf), "%s=", optName); + + char *pos1 = strstr(option, buf); + char *pos2 = strstr(option, ANAL_ALGO_SPLIT); + if (pos1 != NULL) { + if (optMaxLen > 0) { + int32_t copyLen = optMaxLen; + if (pos2 != NULL) { + copyLen = (int32_t)(pos2 - pos1 - strlen(optName) + 1); + copyLen = MIN(copyLen, optMaxLen); + } + tstrncpy(optValue, pos1 + bufLen, copyLen); + } + return true; + } else { + return false; + } +} + +bool taosAnalGetOptInt(const char *option, const char *optName, int32_t *optValue) { + char buf[TSDB_ANAL_ALGO_OPTION_LEN] = {0}; + int32_t bufLen = tsnprintf(buf, sizeof(buf), "%s=", optName); + + char *pos1 = strstr(option, buf); + char *pos2 = strstr(option, ANAL_ALGO_SPLIT); + if (pos1 != NULL) { + *optValue = taosStr2Int32(pos1 + bufLen + 1, NULL, 10); + return true; + } else { + return false; + } +} + +int32_t taosAnalGetAlgoUrl(const char *algoName, EAnalAlgoType type, char *url, int32_t urlLen) { + int32_t code = 0; + char name[TSDB_ANAL_ALGO_KEY_LEN] = {0}; + int32_t nameLen = 1 + tsnprintf(name, sizeof(name) - 1, "%d:%s", type, algoName); + + if (taosThreadMutexLock(&tsAlgos.lock) == 0) { + SAnalUrl *pUrl = taosHashAcquire(tsAlgos.hash, name, nameLen); + if (pUrl != NULL) { + tstrncpy(url, pUrl->url, urlLen); + uDebug("algo:%s, type:%s, url:%s", algoName, taosAnalAlgoStr(type), url); + } else { + url[0] = 0; + terrno = TSDB_CODE_ANAL_ALGO_NOT_FOUND; + code = terrno; + uError("algo:%s, type:%s, url not found", algoName, taosAnalAlgoStr(type)); + } + if (taosThreadMutexUnlock(&tsAlgos.lock) != 0) { + uError("failed to unlock hash"); + return TSDB_CODE_OUT_OF_MEMORY; + } + } + + return code; +} + +int64_t taosAnalGetVersion() { return tsAlgos.ver; } + +static size_t taosCurlWriteData(char *pCont, size_t contLen, size_t nmemb, void *userdata) { + SCurlResp *pRsp = userdata; + if (contLen == 0 || nmemb == 0 || pCont == NULL) { + pRsp->dataLen = 0; + pRsp->data = NULL; + uError("curl response is received, len:%" PRId64, pRsp->dataLen); + return 0; + } + + pRsp->dataLen = (int64_t)contLen * (int64_t)nmemb; + pRsp->data = taosMemoryMalloc(pRsp->dataLen + 1); + + if (pRsp->data != NULL) { + (void)memcpy(pRsp->data, pCont, pRsp->dataLen); + pRsp->data[pRsp->dataLen] = 0; + uDebug("curl response is received, len:%" PRId64 ", content:%s", pRsp->dataLen, pRsp->data); + return pRsp->dataLen; + } else { + pRsp->dataLen = 0; + uError("failed to malloc curl response"); + return 0; + } +} + +static int32_t taosCurlGetRequest(const char *url, SCurlResp *pRsp) { + CURL *curl = NULL; + CURLcode code = 0; + + curl = curl_easy_init(); + if (curl == NULL) { + uError("failed to create curl handle"); + return -1; + } + + if (curl_easy_setopt(curl, CURLOPT_URL, url) != 0) goto _OVER; + if (curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, taosCurlWriteData) != 0) goto _OVER; + if (curl_easy_setopt(curl, CURLOPT_WRITEDATA, pRsp) != 0) goto _OVER; + if (curl_easy_setopt(curl, CURLOPT_TIMEOUT_MS, 100) != 0) goto _OVER; + + uDebug("curl get request will sent, url:%s", url); + code = curl_easy_perform(curl); + if (code != CURLE_OK) { + uError("failed to perform curl action, code:%d", code); + } + +_OVER: + if (curl != NULL) curl_easy_cleanup(curl); + return code; +} + +static int32_t taosCurlPostRequest(const char *url, SCurlResp *pRsp, const char *buf, int32_t bufLen) { + struct curl_slist *headers = NULL; + CURL *curl = NULL; + CURLcode code = 0; + + curl = curl_easy_init(); + if (curl == NULL) { + uError("failed to create curl handle"); + return -1; + } + + headers = curl_slist_append(headers, "Content-Type:application/json;charset=UTF-8"); + if (curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers) != 0) goto _OVER; + if (curl_easy_setopt(curl, CURLOPT_URL, url) != 0) goto _OVER; + if (curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, taosCurlWriteData) != 0) goto _OVER; + if (curl_easy_setopt(curl, CURLOPT_WRITEDATA, pRsp) != 0) goto _OVER; + if (curl_easy_setopt(curl, CURLOPT_TIMEOUT_MS, 60000) != 0) goto _OVER; + if (curl_easy_setopt(curl, CURLOPT_POST, 1) != 0) goto _OVER; + if (curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, bufLen) != 0) goto _OVER; + if (curl_easy_setopt(curl, CURLOPT_POSTFIELDS, buf) != 0) goto _OVER; + + uDebug("curl post request will sent, url:%s len:%d", url, bufLen); + code = curl_easy_perform(curl); + if (code != CURLE_OK) { + uError("failed to perform curl action, code:%d", code); + } + +_OVER: + if (curl != NULL) { + curl_slist_free_all(headers); + curl_easy_cleanup(curl); + } + return code; +} + +SJson *taosAnalSendReqRetJson(const char *url, EAnalHttpType type, SAnalBuf *pBuf) { + int32_t code = -1; + char *pCont = NULL; + int64_t contentLen; + SJson *pJson = NULL; + SCurlResp curlRsp = {0}; + + if (type == ANAL_HTTP_TYPE_GET) { + if (taosCurlGetRequest(url, &curlRsp) != 0) { + terrno = TSDB_CODE_ANAL_URL_CANT_ACCESS; + goto _OVER; + } + } else { + code = taosAnalBufGetCont(pBuf, &pCont, &contentLen); + if (code != 0) { + terrno = code; + goto _OVER; + } + if (taosCurlPostRequest(url, &curlRsp, pCont, contentLen) != 0) { + terrno = TSDB_CODE_ANAL_URL_CANT_ACCESS; + goto _OVER; + } + } + + if (curlRsp.data == NULL || curlRsp.dataLen == 0) { + terrno = TSDB_CODE_ANAL_URL_RSP_IS_NULL; + goto _OVER; + } + + pJson = tjsonParse(curlRsp.data); + if (pJson == NULL) { + terrno = TSDB_CODE_INVALID_JSON_FORMAT; + goto _OVER; + } + +_OVER: + if (curlRsp.data != NULL) taosMemoryFreeClear(curlRsp.data); + if (pCont != NULL) taosMemoryFree(pCont); + return pJson; +} + +static int32_t taosAnalJsonBufGetCont(const char *fileName, char **ppCont, int64_t *pContLen) { + int32_t code = 0; + int64_t contLen; + char *pCont = NULL; + TdFilePtr pFile = NULL; + + pFile = taosOpenFile(fileName, TD_FILE_READ); + if (pFile == NULL) { + code = terrno; + goto _OVER; + } + + code = taosFStatFile(pFile, &contLen, NULL); + if (code != 0) goto _OVER; + + pCont = taosMemoryMalloc(contLen + 1); + if (pCont == NULL) { + code = TSDB_CODE_OUT_OF_MEMORY; + goto _OVER; + } + + if (taosReadFile(pFile, pCont, contLen) != contLen) { + code = terrno; + goto _OVER; + } + + pCont[contLen] = '\0'; + +_OVER: + if (code == 0) { + *ppCont = pCont; + *pContLen = contLen; + } else { + if (pCont != NULL) taosMemoryFree(pCont); + } + if (pFile != NULL) taosCloseFile(&pFile); + return code; +} + +static int32_t taosAnalJsonBufWriteOptInt(SAnalBuf *pBuf, const char *optName, int64_t optVal) { + char buf[64] = {0}; + int32_t bufLen = tsnprintf(buf, sizeof(buf), "\"%s\": %" PRId64 ",\n", optName, optVal); + if (taosWriteFile(pBuf->filePtr, buf, bufLen) != bufLen) { + return terrno; + } + return 0; +} + +static int32_t taosAnalJsonBufWriteOptStr(SAnalBuf *pBuf, const char *optName, const char *optVal) { + char buf[128] = {0}; + int32_t bufLen = tsnprintf(buf, sizeof(buf), "\"%s\": \"%s\",\n", optName, optVal); + if (taosWriteFile(pBuf->filePtr, buf, bufLen) != bufLen) { + return terrno; + } + return 0; +} + +static int32_t taosAnalJsonBufWriteOptFloat(SAnalBuf *pBuf, const char *optName, float optVal) { + char buf[128] = {0}; + int32_t bufLen = tsnprintf(buf, sizeof(buf), "\"%s\": %f,\n", optName, optVal); + if (taosWriteFile(pBuf->filePtr, buf, bufLen) != bufLen) { + return terrno; + } + return 0; +} + +static int32_t taosAnalJsonBufWriteStr(SAnalBuf *pBuf, const char *buf, int32_t bufLen) { + if (bufLen <= 0) { + bufLen = strlen(buf); + } + if (taosWriteFile(pBuf->filePtr, buf, bufLen) != bufLen) { + return terrno; + } + return 0; +} + +static int32_t taosAnalJsonBufWriteStart(SAnalBuf *pBuf) { return taosAnalJsonBufWriteStr(pBuf, "{\n", 0); } + +static int32_t tsosAnalJsonBufOpen(SAnalBuf *pBuf, int32_t numOfCols) { + pBuf->filePtr = taosOpenFile(pBuf->fileName, TD_FILE_CREATE | TD_FILE_WRITE | TD_FILE_TRUNC | TD_FILE_WRITE_THROUGH); + if (pBuf->filePtr == NULL) { + return terrno; + } + + pBuf->pCols = taosMemoryCalloc(numOfCols, sizeof(SAnalColBuf)); + if (pBuf->pCols == NULL) return TSDB_CODE_OUT_OF_MEMORY; + pBuf->numOfCols = numOfCols; + + if (pBuf->bufType == ANAL_BUF_TYPE_JSON) { + return taosAnalJsonBufWriteStart(pBuf); + } + + for (int32_t i = 0; i < numOfCols; ++i) { + SAnalColBuf *pCol = &pBuf->pCols[i]; + snprintf(pCol->fileName, sizeof(pCol->fileName), "%s-c%d", pBuf->fileName, i); + pCol->filePtr = + taosOpenFile(pCol->fileName, TD_FILE_CREATE | TD_FILE_WRITE | TD_FILE_TRUNC | TD_FILE_WRITE_THROUGH); + if (pCol->filePtr == NULL) { + return terrno; + } + } + + return taosAnalJsonBufWriteStart(pBuf); +} + +static int32_t taosAnalJsonBufWriteColMeta(SAnalBuf *pBuf, int32_t colIndex, int32_t colType, const char *colName) { + char buf[128] = {0}; + bool first = (colIndex == 0); + bool last = (colIndex == pBuf->numOfCols - 1); + + if (first) { + if (taosAnalJsonBufWriteStr(pBuf, "\"schema\": [\n", 0) != 0) { + return terrno; + } + } + + int32_t bufLen = tsnprintf(buf, sizeof(buf), " [\"%s\", \"%s\", %d]%s\n", colName, tDataTypes[colType].name, + tDataTypes[colType].bytes, last ? "" : ","); + if (taosWriteFile(pBuf->filePtr, buf, bufLen) != bufLen) { + return terrno; + } + + if (last) { + if (taosAnalJsonBufWriteStr(pBuf, "],\n", 0) != 0) { + return terrno; + } + } + + return 0; +} + +static int32_t taosAnalJsonBufWriteDataBegin(SAnalBuf *pBuf) { + return taosAnalJsonBufWriteStr(pBuf, "\"data\": [\n", 0); +} + +static int32_t taosAnalJsonBufWriteStrUseCol(SAnalBuf *pBuf, const char *buf, int32_t bufLen, int32_t colIndex) { + if (bufLen <= 0) { + bufLen = strlen(buf); + } + + if (pBuf->bufType == ANAL_BUF_TYPE_JSON) { + if (taosWriteFile(pBuf->filePtr, buf, bufLen) != bufLen) { + return terrno; + } + } else { + if (taosWriteFile(pBuf->pCols[colIndex].filePtr, buf, bufLen) != bufLen) { + return terrno; + } + } + + return 0; +} + +static int32_t taosAnalJsonBufWriteColBegin(SAnalBuf *pBuf, int32_t colIndex) { + return taosAnalJsonBufWriteStrUseCol(pBuf, "[\n", 0, colIndex); +} + +static int32_t taosAnalJsonBufWriteColEnd(SAnalBuf *pBuf, int32_t colIndex) { + if (colIndex == pBuf->numOfCols - 1) { + return taosAnalJsonBufWriteStrUseCol(pBuf, "\n]\n", 0, colIndex); + + } else { + return taosAnalJsonBufWriteStrUseCol(pBuf, "\n],\n", 0, colIndex); + } +} + +static int32_t taosAnalJsonBufWriteColData(SAnalBuf *pBuf, int32_t colIndex, int32_t colType, void *colValue) { + char buf[64]; + int32_t bufLen = 0; + + if (pBuf->pCols[colIndex].numOfRows != 0) { + buf[bufLen] = ','; + buf[bufLen + 1] = '\n'; + buf[bufLen + 2] = 0; + bufLen += 2; + } + + switch (colType) { + case TSDB_DATA_TYPE_BOOL: + bufLen += tsnprintf(buf + bufLen, sizeof(buf) - bufLen, "%d", (*((int8_t *)colValue) == 1) ? 1 : 0); + break; + case TSDB_DATA_TYPE_TINYINT: + bufLen += tsnprintf(buf + bufLen, sizeof(buf) - bufLen, "%d", *(int8_t *)colValue); + break; + case TSDB_DATA_TYPE_UTINYINT: + bufLen += tsnprintf(buf + bufLen, sizeof(buf) - bufLen, "%u", *(uint8_t *)colValue); + break; + case TSDB_DATA_TYPE_SMALLINT: + bufLen += tsnprintf(buf + bufLen, sizeof(buf) - bufLen, "%d", *(int16_t *)colValue); + break; + case TSDB_DATA_TYPE_USMALLINT: + bufLen += tsnprintf(buf + bufLen, sizeof(buf) - bufLen, "%u", *(uint16_t *)colValue); + break; + case TSDB_DATA_TYPE_INT: + bufLen += tsnprintf(buf + bufLen, sizeof(buf) - bufLen, "%d", *(int32_t *)colValue); + break; + case TSDB_DATA_TYPE_UINT: + bufLen += tsnprintf(buf + bufLen, sizeof(buf) - bufLen, "%u", *(uint32_t *)colValue); + break; + case TSDB_DATA_TYPE_BIGINT: + case TSDB_DATA_TYPE_TIMESTAMP: + bufLen += tsnprintf(buf + bufLen, sizeof(buf) - bufLen, "%" PRId64 "", *(int64_t *)colValue); + break; + case TSDB_DATA_TYPE_UBIGINT: + bufLen += tsnprintf(buf + bufLen, sizeof(buf) - bufLen, "%" PRIu64 "", *(uint64_t *)colValue); + break; + case TSDB_DATA_TYPE_FLOAT: + bufLen += tsnprintf(buf + bufLen, sizeof(buf) - bufLen, "%f", GET_FLOAT_VAL(colValue)); + break; + case TSDB_DATA_TYPE_DOUBLE: + bufLen += tsnprintf(buf + bufLen, sizeof(buf) - bufLen, "%f", GET_DOUBLE_VAL(colValue)); + break; + default: + buf[bufLen] = '\0'; + } + + pBuf->pCols[colIndex].numOfRows++; + return taosAnalJsonBufWriteStrUseCol(pBuf, buf, bufLen, colIndex); +} + +static int32_t taosAnalJsonBufWriteDataEnd(SAnalBuf *pBuf) { + int32_t code = 0; + char *pCont = NULL; + int64_t contLen = 0; + + if (pBuf->bufType == ANAL_BUF_TYPE_JSON_COL) { + for (int32_t i = 0; i < pBuf->numOfCols; ++i) { + SAnalColBuf *pCol = &pBuf->pCols[i]; + + code = taosFsyncFile(pCol->filePtr); + if (code != 0) return code; + + code = taosCloseFile(&pCol->filePtr); + if (code != 0) return code; + + code = taosAnalJsonBufGetCont(pBuf->pCols[i].fileName, &pCont, &contLen); + if (code != 0) return code; + + code = taosAnalJsonBufWriteStr(pBuf, pCont, contLen); + if (code != 0) return code; + + taosMemoryFreeClear(pCont); + contLen = 0; + } + } + + return taosAnalJsonBufWriteStr(pBuf, "],\n", 0); +} + +static int32_t taosAnalJsonBufWriteEnd(SAnalBuf *pBuf) { + int32_t code = taosAnalJsonBufWriteOptInt(pBuf, "rows", pBuf->pCols[0].numOfRows); + if (code != 0) return code; + + return taosAnalJsonBufWriteStr(pBuf, "\"protocol\": 1.0\n}", 0); +} + +int32_t taosAnalJsonBufClose(SAnalBuf *pBuf) { + int32_t code = taosAnalJsonBufWriteEnd(pBuf); + if (code != 0) return code; + + if (pBuf->filePtr != NULL) { + code = taosFsyncFile(pBuf->filePtr); + if (code != 0) return code; + code = taosCloseFile(&pBuf->filePtr); + if (code != 0) return code; + } + + if (pBuf->bufType == ANAL_BUF_TYPE_JSON_COL) { + for (int32_t i = 0; i < pBuf->numOfCols; ++i) { + SAnalColBuf *pCol = &pBuf->pCols[i]; + if (pCol->filePtr != NULL) { + code = taosFsyncFile(pCol->filePtr); + if (code != 0) return code; + code = taosCloseFile(&pCol->filePtr); + if (code != 0) return code; + } + } + } + + return 0; +} + +void taosAnalBufDestroy(SAnalBuf *pBuf) { + if (pBuf->fileName[0] != 0) { + if (pBuf->filePtr != NULL) (void)taosCloseFile(&pBuf->filePtr); + // taosRemoveFile(pBuf->fileName); + pBuf->fileName[0] = 0; + } + + if (pBuf->bufType == ANAL_BUF_TYPE_JSON_COL) { + for (int32_t i = 0; i < pBuf->numOfCols; ++i) { + SAnalColBuf *pCol = &pBuf->pCols[i]; + if (pCol->fileName[0] != 0) { + if (pCol->filePtr != NULL) (void)taosCloseFile(&pCol->filePtr); + if (taosRemoveFile(pCol->fileName) != 0) { + uError("failed to remove file %s", pCol->fileName); + } + pCol->fileName[0] = 0; + } + } + } + + taosMemoryFreeClear(pBuf->pCols); + pBuf->numOfCols = 0; +} + +int32_t tsosAnalBufOpen(SAnalBuf *pBuf, int32_t numOfCols) { + if (pBuf->bufType == ANAL_BUF_TYPE_JSON || pBuf->bufType == ANAL_BUF_TYPE_JSON_COL) { + return tsosAnalJsonBufOpen(pBuf, numOfCols); + } else { + return TSDB_CODE_ANAL_BUF_INVALID_TYPE; + } +} + +int32_t taosAnalBufWriteOptStr(SAnalBuf *pBuf, const char *optName, const char *optVal) { + if (pBuf->bufType == ANAL_BUF_TYPE_JSON || pBuf->bufType == ANAL_BUF_TYPE_JSON_COL) { + return taosAnalJsonBufWriteOptStr(pBuf, optName, optVal); + } else { + return TSDB_CODE_ANAL_BUF_INVALID_TYPE; + } +} + +int32_t taosAnalBufWriteOptInt(SAnalBuf *pBuf, const char *optName, int64_t optVal) { + if (pBuf->bufType == ANAL_BUF_TYPE_JSON || pBuf->bufType == ANAL_BUF_TYPE_JSON_COL) { + return taosAnalJsonBufWriteOptInt(pBuf, optName, optVal); + } else { + return TSDB_CODE_ANAL_BUF_INVALID_TYPE; + } +} + +int32_t taosAnalBufWriteOptFloat(SAnalBuf *pBuf, const char *optName, float optVal) { + if (pBuf->bufType == ANAL_BUF_TYPE_JSON || pBuf->bufType == ANAL_BUF_TYPE_JSON_COL) { + return taosAnalJsonBufWriteOptFloat(pBuf, optName, optVal); + } else { + return TSDB_CODE_ANAL_BUF_INVALID_TYPE; + } +} + +int32_t taosAnalBufWriteColMeta(SAnalBuf *pBuf, int32_t colIndex, int32_t colType, const char *colName) { + if (pBuf->bufType == ANAL_BUF_TYPE_JSON || pBuf->bufType == ANAL_BUF_TYPE_JSON_COL) { + return taosAnalJsonBufWriteColMeta(pBuf, colIndex, colType, colName); + } else { + return TSDB_CODE_ANAL_BUF_INVALID_TYPE; + } +} + +int32_t taosAnalBufWriteDataBegin(SAnalBuf *pBuf) { + if (pBuf->bufType == ANAL_BUF_TYPE_JSON || pBuf->bufType == ANAL_BUF_TYPE_JSON_COL) { + return taosAnalJsonBufWriteDataBegin(pBuf); + } else { + return TSDB_CODE_ANAL_BUF_INVALID_TYPE; + } +} + +int32_t taosAnalBufWriteColBegin(SAnalBuf *pBuf, int32_t colIndex) { + if (pBuf->bufType == ANAL_BUF_TYPE_JSON || pBuf->bufType == ANAL_BUF_TYPE_JSON_COL) { + return taosAnalJsonBufWriteColBegin(pBuf, colIndex); + } else { + return TSDB_CODE_ANAL_BUF_INVALID_TYPE; + } +} + +int32_t taosAnalBufWriteColData(SAnalBuf *pBuf, int32_t colIndex, int32_t colType, void *colValue) { + if (pBuf->bufType == ANAL_BUF_TYPE_JSON || pBuf->bufType == ANAL_BUF_TYPE_JSON_COL) { + return taosAnalJsonBufWriteColData(pBuf, colIndex, colType, colValue); + } else { + return TSDB_CODE_ANAL_BUF_INVALID_TYPE; + } +} + +int32_t taosAnalBufWriteColEnd(SAnalBuf *pBuf, int32_t colIndex) { + if (pBuf->bufType == ANAL_BUF_TYPE_JSON || pBuf->bufType == ANAL_BUF_TYPE_JSON_COL) { + return taosAnalJsonBufWriteColEnd(pBuf, colIndex); + } else { + return TSDB_CODE_ANAL_BUF_INVALID_TYPE; + } +} + +int32_t taosAnalBufWriteDataEnd(SAnalBuf *pBuf) { + if (pBuf->bufType == ANAL_BUF_TYPE_JSON || pBuf->bufType == ANAL_BUF_TYPE_JSON_COL) { + return taosAnalJsonBufWriteDataEnd(pBuf); + } else { + return TSDB_CODE_ANAL_BUF_INVALID_TYPE; + } +} + +int32_t taosAnalBufClose(SAnalBuf *pBuf) { + if (pBuf->bufType == ANAL_BUF_TYPE_JSON || pBuf->bufType == ANAL_BUF_TYPE_JSON_COL) { + return taosAnalJsonBufClose(pBuf); + } else { + return TSDB_CODE_ANAL_BUF_INVALID_TYPE; + } +} + +static int32_t taosAnalBufGetCont(SAnalBuf *pBuf, char **ppCont, int64_t *pContLen) { + *ppCont = NULL; + *pContLen = 0; + + if (pBuf->bufType == ANAL_BUF_TYPE_JSON || pBuf->bufType == ANAL_BUF_TYPE_JSON_COL) { + return taosAnalJsonBufGetCont(pBuf->fileName, ppCont, pContLen); + } else { + return TSDB_CODE_ANAL_BUF_INVALID_TYPE; + } +} + +#else + +int32_t taosAnalInit() { return 0; } +void taosAnalCleanup() {} +SJson *taosAnalSendReqRetJson(const char *url, EAnalHttpType type, SAnalBuf *pBuf) { return NULL; } + +int32_t taosAnalGetAlgoUrl(const char *algoName, EAnalAlgoType type, char *url, int32_t urlLen) { return 0; } +bool taosAnalGetOptStr(const char *option, const char *optName, char *optValue, int32_t optMaxLen) { return true; } +bool taosAnalGetOptInt(const char *option, const char *optName, int32_t *optValue) { return true; } +int64_t taosAnalGetVersion() { return 0; } +void taosAnalUpdate(int64_t newVer, SHashObj *pHash) {} + +int32_t tsosAnalBufOpen(SAnalBuf *pBuf, int32_t numOfCols) { return 0; } +int32_t taosAnalBufWriteOptStr(SAnalBuf *pBuf, const char *optName, const char *optVal) { return 0; } +int32_t taosAnalBufWriteOptInt(SAnalBuf *pBuf, const char *optName, int64_t optVal) { return 0; } +int32_t taosAnalBufWriteOptFloat(SAnalBuf *pBuf, const char *optName, float optVal) { return 0; } +int32_t taosAnalBufWriteColMeta(SAnalBuf *pBuf, int32_t colIndex, int32_t colType, const char *colName) { return 0; } +int32_t taosAnalBufWriteDataBegin(SAnalBuf *pBuf) { return 0; } +int32_t taosAnalBufWriteColBegin(SAnalBuf *pBuf, int32_t colIndex) { return 0; } +int32_t taosAnalBufWriteColData(SAnalBuf *pBuf, int32_t colIndex, int32_t colType, void *colValue) { return 0; } +int32_t taosAnalBufWriteColEnd(SAnalBuf *pBuf, int32_t colIndex) { return 0; } +int32_t taosAnalBufWriteDataEnd(SAnalBuf *pBuf) { return 0; } +int32_t taosAnalBufClose(SAnalBuf *pBuf) { return 0; } +void taosAnalBufDestroy(SAnalBuf *pBuf) {} + +const char *taosAnalAlgoStr(EAnalAlgoType algoType) { return 0; } +EAnalAlgoType taosAnalAlgoInt(const char *algoName) { return 0; } +const char *taosAnalAlgoUrlStr(EAnalAlgoType algoType) { return 0; } + +#endif \ No newline at end of file diff --git a/source/util/src/terror.c b/source/util/src/terror.c index 1c94a5f2e4..ad43426efa 100644 --- a/source/util/src/terror.c +++ b/source/util/src/terror.c @@ -345,6 +345,22 @@ TAOS_DEFINE_ERROR(TSDB_CODE_MND_MULTI_REPLICA_SOURCE_DB, "Stream temporarily do TAOS_DEFINE_ERROR(TSDB_CODE_MND_TOO_MANY_STREAMS, "Too many streams") TAOS_DEFINE_ERROR(TSDB_CODE_MND_INVALID_TARGET_TABLE, "Cannot write the same stable as other stream") +TAOS_DEFINE_ERROR(TSDB_CODE_MND_ANODE_ALREADY_EXIST, "Anode already exists") +TAOS_DEFINE_ERROR(TSDB_CODE_MND_ANODE_NOT_EXIST, "Anode not there") +TAOS_DEFINE_ERROR(TSDB_CODE_MND_ANODE_TOO_LONG_URL, "Anode too long url") +TAOS_DEFINE_ERROR(TSDB_CODE_MND_ANODE_INVALID_PROTOCOL, "Anode invalid protocol") +TAOS_DEFINE_ERROR(TSDB_CODE_MND_ANODE_INVALID_ALGO_TYPE, "Anode invalid algorithm type") +TAOS_DEFINE_ERROR(TSDB_CODE_MND_ANODE_INVALID_VERSION, "Anode invalid version") +TAOS_DEFINE_ERROR(TSDB_CODE_MND_ANODE_TOO_MANY_ALGO, "Anode too many algorithm") +TAOS_DEFINE_ERROR(TSDB_CODE_MND_ANODE_TOO_LONG_ALGO_NAME, "Anode too long algorithm name") +TAOS_DEFINE_ERROR(TSDB_CODE_MND_ANODE_TOO_MANY_ALGO_TYPE, "Anode too many algorithm type") + +TAOS_DEFINE_ERROR(TSDB_CODE_ANAL_URL_RSP_IS_NULL, "Analysis url response is NULL") +TAOS_DEFINE_ERROR(TSDB_CODE_ANAL_URL_CANT_ACCESS, "Analysis url can't access") +TAOS_DEFINE_ERROR(TSDB_CODE_ANAL_ALGO_NOT_FOUND, "Analysis algorithm not found") +TAOS_DEFINE_ERROR(TSDB_CODE_ANAL_ALGO_NOT_LOAD, "Analysis algorithm not loaded") +TAOS_DEFINE_ERROR(TSDB_CODE_ANAL_BUF_INVALID_TYPE, "Analysis invalid buffer type") + // mnode-sma TAOS_DEFINE_ERROR(TSDB_CODE_MND_SMA_ALREADY_EXIST, "SMA already exists") TAOS_DEFINE_ERROR(TSDB_CODE_MND_SMA_NOT_EXIST, "sma not exist") @@ -709,6 +725,11 @@ TAOS_DEFINE_ERROR(TSDB_CODE_PAR_TBNAME_DUPLICATED, "Table name duplicat TAOS_DEFINE_ERROR(TSDB_CODE_PAR_TAG_NAME_DUPLICATED, "Tag name duplicated") TAOS_DEFINE_ERROR(TSDB_CODE_PAR_NOT_ALLOWED_DIFFERENT_BY_ROW_FUNC, "Some functions cannot appear in the select list at the same time") TAOS_DEFINE_ERROR(TSDB_CODE_PAR_REGULAR_EXPRESSION_ERROR, "Syntax error in regular expression") +TAOS_DEFINE_ERROR(TSDB_CODE_PAR_INVALID_ANOMALY_WIN_TYPE, "ANOMALY_WINDOW only support mathable column") +TAOS_DEFINE_ERROR(TSDB_CODE_PAR_INVALID_ANOMALY_WIN_COL, "ANOMALY_WINDOW not support on tag column") +TAOS_DEFINE_ERROR(TSDB_CODE_PAR_INVALID_ANOMALY_WIN_OPT, "ANOMALY_WINDOW option should include algo field") +TAOS_DEFINE_ERROR(TSDB_CODE_PAR_INVALID_FORECAST_CLAUSE, "Invalid forecast clause") +TAOS_DEFINE_ERROR(TSDB_CODE_PAR_REGULAR_EXPRESSION_ERROR, "Syntax error in regular expression") TAOS_DEFINE_ERROR(TSDB_CODE_PAR_INTERNAL_ERROR, "Parser internal error") //planner diff --git a/source/util/src/tjson.c b/source/util/src/tjson.c index 0f2504ff5e..7e95a842ff 100644 --- a/source/util/src/tjson.c +++ b/source/util/src/tjson.c @@ -194,6 +194,10 @@ int32_t tjsonGetObjectValueString(const SJson* pJson, char** pValueString) { return TSDB_CODE_SUCCESS; } +void tjsonGetObjectValueBigInt(const SJson* pJson, int64_t* pVal) { *pVal = (int64_t)((cJSON*)pJson)->valuedouble; } + +void tjsonGetObjectValueDouble(const SJson* pJson, double* pVal) { *pVal = ((cJSON*)pJson)->valuedouble; } + int32_t tjsonGetStringValue(const SJson* pJson, const char* pName, char* pVal) { char* p = cJSON_GetStringValue(tjsonGetObjectItem((cJSON*)pJson, pName)); if (NULL == p) { @@ -203,6 +207,19 @@ int32_t tjsonGetStringValue(const SJson* pJson, const char* pName, char* pVal) { return TSDB_CODE_SUCCESS; } +int32_t tjsonGetStringValue2(const SJson* pJson, const char* pName, char* pVal, int32_t maxLen) { + char* p = cJSON_GetStringValue(tjsonGetObjectItem((cJSON*)pJson, pName)); + if (NULL == p) { + return TSDB_CODE_SUCCESS; + } + int32_t len = strlen(p); + if (len >= maxLen - 1) { + return TSDB_CODE_OUT_OF_MEMORY; + } + strcpy(pVal, p); + return TSDB_CODE_SUCCESS; +} + int32_t tjsonDupStringValue(const SJson* pJson, const char* pName, char** pVal) { char* p = cJSON_GetStringValue(tjsonGetObjectItem((cJSON*)pJson, pName)); if (NULL == p) { diff --git a/tests/develop-test/2-query/table_count_scan.py b/tests/develop-test/2-query/table_count_scan.py index 38e35a175e..b2b48c1f0b 100644 --- a/tests/develop-test/2-query/table_count_scan.py +++ b/tests/develop-test/2-query/table_count_scan.py @@ -65,7 +65,7 @@ class TDTestCase: tdSql.query('select count(*),db_name, stable_name from information_schema.ins_tables group by db_name, stable_name;') tdSql.checkRows(3) - tdSql.checkData(0, 0, 32) + tdSql.checkData(0, 0, 34) tdSql.checkData(0, 1, 'information_schema') tdSql.checkData(0, 2, None) tdSql.checkData(1, 0, 3) @@ -77,7 +77,7 @@ class TDTestCase: tdSql.query('select count(1) v,db_name, stable_name from information_schema.ins_tables group by db_name, stable_name order by v desc;') tdSql.checkRows(3) - tdSql.checkData(0, 0, 32) + tdSql.checkData(0, 0, 34) tdSql.checkData(0, 1, 'information_schema') tdSql.checkData(0, 2, None) tdSql.checkData(1, 0, 5) @@ -93,7 +93,7 @@ class TDTestCase: tdSql.checkData(1, 1, 'performance_schema') tdSql.checkData(0, 0, 3) tdSql.checkData(0, 1, 'tbl_count') - tdSql.checkData(2, 0, 32) + tdSql.checkData(2, 0, 34) tdSql.checkData(2, 1, 'information_schema') tdSql.query("select count(*) from information_schema.ins_tables where db_name='tbl_count'") @@ -106,7 +106,7 @@ class TDTestCase: tdSql.query('select count(*) from information_schema.ins_tables') tdSql.checkRows(1) - tdSql.checkData(0, 0, 40) + tdSql.checkData(0, 0, 42) tdSql.execute('create table stba (ts timestamp, c1 bool, c2 tinyint, c3 smallint, c4 int, c5 bigint, c6 float, c7 double, c8 binary(10), c9 nchar(10), c10 tinyint unsigned, c11 smallint unsigned, c12 int unsigned, c13 bigint unsigned) TAGS(t1 int, t2 binary(10), t3 double);') @@ -189,7 +189,7 @@ class TDTestCase: tdSql.checkData(2, 0, 5) tdSql.checkData(2, 1, 'performance_schema') tdSql.checkData(2, 2, None) - tdSql.checkData(3, 0, 32) + tdSql.checkData(3, 0, 34) tdSql.checkData(3, 1, 'information_schema') tdSql.checkData(3, 2, None) @@ -204,7 +204,7 @@ class TDTestCase: tdSql.checkData(2, 0, 5) tdSql.checkData(2, 1, 'performance_schema') tdSql.checkData(2, 2, None) - tdSql.checkData(3, 0, 32) + tdSql.checkData(3, 0, 34) tdSql.checkData(3, 1, 'information_schema') tdSql.checkData(3, 2, None) @@ -215,7 +215,7 @@ class TDTestCase: tdSql.checkData(0, 1, 'tbl_count') tdSql.checkData(1, 0, 5) tdSql.checkData(1, 1, 'performance_schema') - tdSql.checkData(2, 0, 32) + tdSql.checkData(2, 0, 34) tdSql.checkData(2, 1, 'information_schema') tdSql.query("select count(*) from information_schema.ins_tables where db_name='tbl_count'") @@ -228,7 +228,7 @@ class TDTestCase: tdSql.query('select count(*) from information_schema.ins_tables') tdSql.checkRows(1) - tdSql.checkData(0, 0, 41) + tdSql.checkData(0, 0, 43) tdSql.execute('drop database tbl_count') diff --git a/tests/script/tsim/query/sys_tbname.sim b/tests/script/tsim/query/sys_tbname.sim index dabe4fcdde..9736893428 100644 --- a/tests/script/tsim/query/sys_tbname.sim +++ b/tests/script/tsim/query/sys_tbname.sim @@ -58,7 +58,7 @@ endi sql select tbname from information_schema.ins_tables; print $rows $data00 -if $rows != 41 then +if $rows != 43 then return -1 endi if $data00 != @ins_tables@ then diff --git a/tests/script/tsim/query/tableCount.sim b/tests/script/tsim/query/tableCount.sim index 5a3dd0714f..87f72eb3b6 100644 --- a/tests/script/tsim/query/tableCount.sim +++ b/tests/script/tsim/query/tableCount.sim @@ -53,7 +53,7 @@ sql select stable_name,count(table_name) from information_schema.ins_tables grou if $rows != 3 then return -1 endi -if $data01 != 38 then +if $data01 != 40 then return -1 endi if $data11 != 10 then @@ -72,7 +72,7 @@ endi if $data11 != 5 then return -1 endi -if $data21 != 32 then +if $data21 != 34 then return -1 endi if $data31 != 5 then @@ -97,7 +97,7 @@ endi if $data42 != 3 then return -1 endi -if $data52 != 32 then +if $data52 != 34 then return -1 endi if $data62 != 5 then diff --git a/tests/system-test/0-others/information_schema.py b/tests/system-test/0-others/information_schema.py index f59410b552..01e416bb26 100644 --- a/tests/system-test/0-others/information_schema.py +++ b/tests/system-test/0-others/information_schema.py @@ -61,7 +61,7 @@ class TDTestCase: self.ins_list = ['ins_dnodes','ins_mnodes','ins_qnodes','ins_snodes','ins_cluster','ins_databases','ins_functions',\ 'ins_indexes','ins_stables','ins_tables','ins_tags','ins_columns','ins_users','ins_grants','ins_vgroups','ins_configs','ins_dnode_variables',\ 'ins_topics','ins_subscriptions','ins_streams','ins_stream_tasks','ins_vnodes','ins_user_privileges','ins_views', - 'ins_compacts', 'ins_compact_details', 'ins_grants_full','ins_grants_logs', 'ins_machines', 'ins_arbgroups', 'ins_tsmas', "ins_encryptions"] + 'ins_compacts', 'ins_compact_details', 'ins_grants_full','ins_grants_logs', 'ins_machines', 'ins_arbgroups', 'ins_tsmas', "ins_encryptions", "ins_anodes", "ins_anodes_full"] self.perf_list = ['perf_connections','perf_queries','perf_consumers','perf_trans','perf_apps'] def insert_data(self,column_dict,tbname,row_num): insert_sql = self.setsql.set_insertsql(column_dict,tbname,self.binary_str,self.nchar_str) @@ -222,7 +222,7 @@ class TDTestCase: tdSql.query("select * from information_schema.ins_columns where db_name ='information_schema'") tdLog.info(len(tdSql.queryResult)) - tdSql.checkEqual(True, len(tdSql.queryResult) in range(272, 273)) + tdSql.checkEqual(True, len(tdSql.queryResult) in range(280, 281)) tdSql.query("select * from information_schema.ins_columns where db_name ='performance_schema'") tdSql.checkEqual(56, len(tdSql.queryResult))