From a54019211f9171511c023b1a37fa3ce6e356d703 Mon Sep 17 00:00:00 2001 From: sima Date: Wed, 31 Jul 2024 14:42:38 +0800 Subject: [PATCH] feat:[TS-4893] Support MYSQL functions. Add more functions: - Numeric Functions: PI(),ROUND(),TRUNC(),EXP(),LN(),SIGN(),DEGREES(),RADIANS(). - String Functions: CHAR(),ASCII(),POSITION(),TRIM(),REPLACE(),REPEAT(). - Date and Time Functions: WEEKDAY(),DAYOFWEEK(),WEEK(),WEEKOFYEAR(). - Aggregate Functions: VAR_POP(). Modify some functions: - ROUND(): support round to given decimal places. - CHAR_LENGTH(): support calculate multi-byte character's length. - TIMEDIFF(): result will be negative when expr1 < expr2. - STDDEV(): add alias name STDDEV_POP(). - SUBSTR(): add alias name SUBSTRING(). support new syntax SUBSTRING/SUBSTR(expr FROM pos [FOR len]). --- include/common/ttokendef.h | 231 +- include/libs/function/functionMgt.h | 28 +- include/libs/nodes/querynodes.h | 7 + include/libs/scalar/scalar.h | 22 +- include/util/taoserror.h | 1 + .../dnode/mnode/impl/test/stream/stream.cpp | 3 +- source/libs/function/inc/builtinsimpl.h | 17 +- source/libs/function/src/builtins.c | 700 +- source/libs/function/src/builtinsimpl.c | 162 +- source/libs/nodes/src/nodesCodeFuncs.c | 8 +- source/libs/nodes/src/nodesMsgFuncs.c | 7 + source/libs/parser/inc/parAst.h | 5 + source/libs/parser/inc/sql.y | 39 +- source/libs/parser/src/parAstCreater.c | 67 + source/libs/parser/src/parTokenizer.c | 8 + source/libs/parser/src/sql.c | 14159 ++++++++-------- source/libs/scalar/inc/sclInt.h | 46 + source/libs/scalar/src/sclfunc.c | 1499 +- source/util/src/terror.c | 1 + tests/army/query/query_basic.py | 4 +- tests/script/tsim/scalar/tsConvert.sim | 2 +- tests/system-test/1-insert/precisionNS.py | 32 +- tests/system-test/1-insert/precisionUS.py | 14 +- .../1-insert/test_stmt_set_tbname_tag.py | 8 +- tests/system-test/2-query/round.py | 8 +- tests/system-test/2-query/substr.py | 2 +- 26 files changed, 9290 insertions(+), 7790 deletions(-) diff --git a/include/common/ttokendef.h b/include/common/ttokendef.h index 41802d5400..c22808e033 100644 --- a/include/common/ttokendef.h +++ b/include/common/ttokendef.h @@ -281,118 +281,125 @@ #define TK_IROWTS 263 #define TK_ISFILLED 264 #define TK_CAST 265 -#define TK_NOW 266 -#define TK_TODAY 267 -#define TK_TIMEZONE 268 -#define TK_CLIENT_VERSION 269 -#define TK_SERVER_VERSION 270 -#define TK_SERVER_STATUS 271 -#define TK_CURRENT_USER 272 -#define TK_CASE 273 -#define TK_WHEN 274 -#define TK_THEN 275 -#define TK_ELSE 276 -#define TK_BETWEEN 277 -#define TK_IS 278 -#define TK_NK_LT 279 -#define TK_NK_GT 280 -#define TK_NK_LE 281 -#define TK_NK_GE 282 -#define TK_NK_NE 283 -#define TK_MATCH 284 -#define TK_NMATCH 285 -#define TK_CONTAINS 286 -#define TK_IN 287 -#define TK_JOIN 288 -#define TK_INNER 289 -#define TK_LEFT 290 -#define TK_RIGHT 291 -#define TK_OUTER 292 -#define TK_SEMI 293 -#define TK_ANTI 294 -#define TK_ASOF 295 -#define TK_WINDOW 296 -#define TK_WINDOW_OFFSET 297 -#define TK_JLIMIT 298 -#define TK_SELECT 299 -#define TK_NK_HINT 300 -#define TK_DISTINCT 301 -#define TK_WHERE 302 -#define TK_PARTITION 303 -#define TK_BY 304 -#define TK_SESSION 305 -#define TK_STATE_WINDOW 306 -#define TK_EVENT_WINDOW 307 -#define TK_COUNT_WINDOW 308 -#define TK_SLIDING 309 -#define TK_FILL 310 -#define TK_VALUE 311 -#define TK_VALUE_F 312 -#define TK_NONE 313 -#define TK_PREV 314 -#define TK_NULL_F 315 -#define TK_LINEAR 316 -#define TK_NEXT 317 -#define TK_HAVING 318 -#define TK_RANGE 319 -#define TK_EVERY 320 -#define TK_ORDER 321 -#define TK_SLIMIT 322 -#define TK_SOFFSET 323 -#define TK_LIMIT 324 -#define TK_OFFSET 325 -#define TK_ASC 326 -#define TK_NULLS 327 -#define TK_ABORT 328 -#define TK_AFTER 329 -#define TK_ATTACH 330 -#define TK_BEFORE 331 -#define TK_BEGIN 332 -#define TK_BITAND 333 -#define TK_BITNOT 334 -#define TK_BITOR 335 -#define TK_BLOCKS 336 -#define TK_CHANGE 337 -#define TK_COMMA 338 -#define TK_CONCAT 339 -#define TK_CONFLICT 340 -#define TK_COPY 341 -#define TK_DEFERRED 342 -#define TK_DELIMITERS 343 -#define TK_DETACH 344 -#define TK_DIVIDE 345 -#define TK_DOT 346 -#define TK_EACH 347 -#define TK_FAIL 348 -#define TK_FOR 349 -#define TK_GLOB 350 -#define TK_ID 351 -#define TK_IMMEDIATE 352 -#define TK_IMPORT 353 -#define TK_INITIALLY 354 -#define TK_INSTEAD 355 -#define TK_ISNULL 356 -#define TK_MODULES 357 -#define TK_NK_BITNOT 358 -#define TK_NK_SEMI 359 -#define TK_NOTNULL 360 -#define TK_OF 361 -#define TK_PLUS 362 -#define TK_PRIVILEGE 363 -#define TK_RAISE 364 -#define TK_RESTRICT 365 -#define TK_ROW 366 -#define TK_STAR 367 -#define TK_STATEMENT 368 -#define TK_STRICT 369 -#define TK_STRING 370 -#define TK_TIMES 371 -#define TK_VALUES 372 -#define TK_VARIABLE 373 -#define TK_WAL 374 -#define TK_ENCODE 375 -#define TK_COMPRESS 376 -#define TK_LEVEL 377 +#define TK_POSITION 266 +#define TK_IN 267 +#define TK_FOR 268 +#define TK_NOW 269 +#define TK_TODAY 270 +#define TK_SUBSTR 271 +#define TK_SUBSTRING 272 +#define TK_BOTH 273 +#define TK_TRAILING 274 +#define TK_LEADING 275 +#define TK_TIMEZONE 276 +#define TK_CLIENT_VERSION 277 +#define TK_SERVER_VERSION 278 +#define TK_SERVER_STATUS 279 +#define TK_CURRENT_USER 280 +#define TK_PI 281 +#define TK_CASE 282 +#define TK_WHEN 283 +#define TK_THEN 284 +#define TK_ELSE 285 +#define TK_BETWEEN 286 +#define TK_IS 287 +#define TK_NK_LT 288 +#define TK_NK_GT 289 +#define TK_NK_LE 290 +#define TK_NK_GE 291 +#define TK_NK_NE 292 +#define TK_MATCH 293 +#define TK_NMATCH 294 +#define TK_CONTAINS 295 +#define TK_JOIN 296 +#define TK_INNER 297 +#define TK_LEFT 298 +#define TK_RIGHT 299 +#define TK_OUTER 300 +#define TK_SEMI 301 +#define TK_ANTI 302 +#define TK_ASOF 303 +#define TK_WINDOW 304 +#define TK_WINDOW_OFFSET 305 +#define TK_JLIMIT 306 +#define TK_SELECT 307 +#define TK_NK_HINT 308 +#define TK_DISTINCT 309 +#define TK_WHERE 310 +#define TK_PARTITION 311 +#define TK_BY 312 +#define TK_SESSION 313 +#define TK_STATE_WINDOW 314 +#define TK_EVENT_WINDOW 315 +#define TK_COUNT_WINDOW 316 +#define TK_SLIDING 317 +#define TK_FILL 318 +#define TK_VALUE 319 +#define TK_VALUE_F 320 +#define TK_NONE 321 +#define TK_PREV 322 +#define TK_NULL_F 323 +#define TK_LINEAR 324 +#define TK_NEXT 325 +#define TK_HAVING 326 +#define TK_RANGE 327 +#define TK_EVERY 328 +#define TK_ORDER 329 +#define TK_SLIMIT 330 +#define TK_SOFFSET 331 +#define TK_LIMIT 332 +#define TK_OFFSET 333 +#define TK_ASC 334 +#define TK_NULLS 335 +#define TK_ABORT 336 +#define TK_AFTER 337 +#define TK_ATTACH 338 +#define TK_BEFORE 339 +#define TK_BEGIN 340 +#define TK_BITAND 341 +#define TK_BITNOT 342 +#define TK_BITOR 343 +#define TK_BLOCKS 344 +#define TK_CHANGE 345 +#define TK_COMMA 346 +#define TK_CONCAT 347 +#define TK_CONFLICT 348 +#define TK_COPY 349 +#define TK_DEFERRED 350 +#define TK_DELIMITERS 351 +#define TK_DETACH 352 +#define TK_DIVIDE 353 +#define TK_DOT 354 +#define TK_EACH 355 +#define TK_FAIL 356 +#define TK_GLOB 357 +#define TK_ID 358 +#define TK_IMMEDIATE 359 +#define TK_IMPORT 360 +#define TK_INITIALLY 361 +#define TK_INSTEAD 362 +#define TK_ISNULL 363 +#define TK_MODULES 364 +#define TK_NK_BITNOT 365 +#define TK_NK_SEMI 366 +#define TK_NOTNULL 367 +#define TK_OF 368 +#define TK_PLUS 369 +#define TK_PRIVILEGE 370 +#define TK_RAISE 371 +#define TK_RESTRICT 372 +#define TK_ROW 373 +#define TK_STAR 374 +#define TK_STATEMENT 375 +#define TK_STRICT 376 +#define TK_STRING 377 +#define TK_TIMES 378 +#define TK_VALUES 379 +#define TK_VARIABLE 380 +#define TK_WAL 381 +#define TK_ENCODE 382 +#define TK_COMPRESS 383 +#define TK_LEVEL 384 #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 1da1cbf716..905f1c2575 100644 --- a/include/libs/function/functionMgt.h +++ b/include/libs/function/functionMgt.h @@ -45,6 +45,7 @@ typedef enum EFunctionType { FUNCTION_TYPE_TWA, FUNCTION_TYPE_HISTOGRAM, FUNCTION_TYPE_HYPERLOGLOG, + FUNCTION_TYPE_STDVAR, // nonstandard SQL function FUNCTION_TYPE_BOTTOM = 500, @@ -77,6 +78,15 @@ typedef enum EFunctionType { FUNCTION_TYPE_ASIN, FUNCTION_TYPE_ACOS, FUNCTION_TYPE_ATAN, + FUNCTION_TYPE_PI, + FUNCTION_TYPE_EXP, + FUNCTION_TYPE_LN, + FUNCTION_TYPE_MOD, + FUNCTION_TYPE_RAND, + FUNCTION_TYPE_SIGN, + FUNCTION_TYPE_DEGREES, + FUNCTION_TYPE_RADIANS, + FUNCTION_TYPE_TRUNCATE, // string function FUNCTION_TYPE_LENGTH = 1500, @@ -89,6 +99,13 @@ typedef enum EFunctionType { FUNCTION_TYPE_RTRIM, FUNCTION_TYPE_SUBSTR, FUNCTION_TYPE_MD5, + FUNCTION_TYPE_CHAR, + FUNCTION_TYPE_ASCII, + FUNCTION_TYPE_POSITION, + FUNCTION_TYPE_TRIM, + FUNCTION_TYPE_REPLACE, + FUNCTION_TYPE_REPEAT, + FUNCTION_TYPE_SUBSTR_IDX, // conversion function FUNCTION_TYPE_CAST = 2000, @@ -104,6 +121,10 @@ typedef enum EFunctionType { FUNCTION_TYPE_TIMETRUNCATE, FUNCTION_TYPE_TIMEZONE, FUNCTION_TYPE_TODAY, + FUNCTION_TYPE_WEEK, + FUNCTION_TYPE_WEEKDAY, + FUNCTION_TYPE_WEEKOFYEAR, + FUNCTION_TYPE_DAYOFWEEK, // system function FUNCTION_TYPE_DATABASE = 3000, @@ -162,8 +183,9 @@ typedef enum EFunctionType { FUNCTION_TYPE_LAST_MERGE, FUNCTION_TYPE_AVG_PARTIAL, FUNCTION_TYPE_AVG_MERGE, - FUNCTION_TYPE_STDDEV_PARTIAL, + FUNCTION_TYPE_STD_PARTIAL, FUNCTION_TYPE_STDDEV_MERGE, + FUNCTION_TYPE_STDVAR_MERGE, FUNCTION_TYPE_IRATE_PARTIAL, FUNCTION_TYPE_IRATE_MERGE, FUNCTION_TYPE_AVG_STATE, @@ -174,8 +196,8 @@ typedef enum EFunctionType { FUNCTION_TYPE_LAST_STATE_MERGE, FUNCTION_TYPE_SPREAD_STATE, FUNCTION_TYPE_SPREAD_STATE_MERGE, - FUNCTION_TYPE_STDDEV_STATE, - FUNCTION_TYPE_STDDEV_STATE_MERGE, + FUNCTION_TYPE_STD_STATE, + FUNCTION_TYPE_STD_STATE_MERGE, FUNCTION_TYPE_HYPERLOGLOG_STATE, FUNCTION_TYPE_HYPERLOGLOG_STATE_MERGE, diff --git a/include/libs/nodes/querynodes.h b/include/libs/nodes/querynodes.h index 198163582b..4bf0663def 100644 --- a/include/libs/nodes/querynodes.h +++ b/include/libs/nodes/querynodes.h @@ -170,6 +170,12 @@ typedef struct SNodeListNode { SNodeList* pNodeList; } SNodeListNode; +typedef enum ETrimType { + TRIM_TYPE_LEADING = 1, + TRIM_TYPE_TRAILING, + TRIM_TYPE_BOTH, +} ETrimType; + typedef struct SFunctionNode { SExprNode node; // QUERY_NODE_FUNCTION char functionName[TSDB_FUNC_NAME_LEN]; @@ -181,6 +187,7 @@ typedef struct SFunctionNode { int32_t pkBytes; bool hasOriginalFunc; int32_t originalFuncId; + ETrimType trimType; } SFunctionNode; typedef struct STableNode { diff --git a/include/libs/scalar/scalar.h b/include/libs/scalar/scalar.h index bee8d2e943..70b44a4b52 100644 --- a/include/libs/scalar/scalar.h +++ b/include/libs/scalar/scalar.h @@ -61,6 +61,15 @@ int32_t atanFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutp int32_t ceilFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput); int32_t floorFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput); int32_t roundFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput); +int32_t truncFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput); + +int32_t piFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput); +int32_t expFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput); +int32_t lnFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput); +int32_t modFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput); +int32_t signFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput); +int32_t degreesFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput); +int32_t radiansFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput); /* String functions */ int32_t lengthFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput); @@ -73,6 +82,13 @@ int32_t ltrimFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOut int32_t rtrimFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput); int32_t substrFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput); int32_t md5Function(SScalarParam* pInput, int32_t inputNum, SScalarParam* pOutput); +int32_t charFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput); +int32_t asciiFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput); +int32_t positionFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput); +int32_t trimFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput); +int32_t replaceFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput); +int32_t repeatFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput); +int32_t substrIdxFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput); /* Conversion functions */ int32_t castFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput); @@ -89,6 +105,10 @@ int32_t timeDiffFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *p int32_t nowFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput); int32_t todayFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput); int32_t timezoneFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput); +int32_t weekdayFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput); +int32_t dayofweekFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput); +int32_t weekFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput); +int32_t weekofyearFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput); bool getTimePseudoFuncEnv(struct SFunctionNode *pFunc, SFuncExecEnv *pEnv); @@ -106,7 +126,7 @@ int32_t sumScalarFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam * int32_t minScalarFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput); int32_t maxScalarFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput); int32_t avgScalarFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput); -int32_t stddevScalarFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput); +int32_t stdScalarFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput); int32_t leastSQRScalarFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput); int32_t percentileScalarFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput); int32_t apercentileScalarFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput); diff --git a/include/util/taoserror.h b/include/util/taoserror.h index b8098cc96e..1911c48d26 100644 --- a/include/util/taoserror.h +++ b/include/util/taoserror.h @@ -877,6 +877,7 @@ int32_t taosGetErrSize(); #define TSDB_CODE_FUNC_TIME_UNIT_TOO_SMALL TAOS_DEF_ERROR_CODE(0, 0x280B) #define TSDB_CODE_FUNC_INVALID_VALUE_RANGE TAOS_DEF_ERROR_CODE(0, 0x280C) #define TSDB_CODE_FUNC_SETUP_ERROR TAOS_DEF_ERROR_CODE(0, 0x280D) +#define TSDB_CODE_FUNC_INVALID_RES_LENGTH TAOS_DEF_ERROR_CODE(0, 0x280E) //udf diff --git a/source/dnode/mnode/impl/test/stream/stream.cpp b/source/dnode/mnode/impl/test/stream/stream.cpp index 1ec319381d..6f46f04cdd 100644 --- a/source/dnode/mnode/impl/test/stream/stream.cpp +++ b/source/dnode/mnode/impl/test/stream/stream.cpp @@ -258,8 +258,7 @@ TEST_F(StreamTest, kill_checkpoint_trans) { } TEST_F(StreamTest, plan_Test) { - char* ast = "{\"NodeType\":\"101\",\"Name\":\"SelectStmt\",\"SelectStmt\":{\"Distinct\":false,\"Projections\":[{\"NodeType\":\"5\",\"Name\":\"Function\",\"Function\":{\"DataType\":{\"Type\":\"9\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"8\"},\"AliasName\":\"#expr_1\",\"UserAlias\":\"_wstart\",\"Name\":\"_wstart\",\"Id\":\"89\",\"Type\":\"3505\",\"UdfBufSize\":\"0\"}},{\"NodeType\":\"5\",\"Name\":\"Function\",\"Function\":{\"DataType\":{\"Type\":\"5\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"8\"},\"AliasName\":\"#expr_2\",\"UserAlias\":\"sum(voltage)\",\"Name\":\"sum\",\"Id\":\"1\",\"Type\":\"14\",\"Parameters\":[{\"NodeType\":\"1\",\"Name\":\"Column\",\"Column\":{\"DataType\":{\"Type\":\"4\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"4\"},\"AliasName\":\"voltage\",\"UserAlias\":\"voltage\",\"TableId\":\"6555383776122680534\",\"TableType\":\"1\",\"ColId\":\"3\",\"ProjId\":\"0\",\"ColType\":\"1\",\"DbName\":\"test\",\"TableName\":\"meters\",\"TableAlias\":\"meters\",\"ColName\":\"voltage\",\"DataBlockId\":\"0\",\"SlotId\":\"0\"}}],\"UdfBufSize\":\"0\"}},{\"NodeType\":\"5\",\"Name\":\"Function\",\"Function\":{\"DataType\":{\"Type\":\"4\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"4\"},\"AliasName\":\"#expr_3\",\"UserAlias\":\"groupid\",\"Name\":\"_group_key\",\"Id\":\"96\",\"Type\":\"3754\",\"Parameters\":[{\"NodeType\":\"1\",\"Name\":\"Column\",\"Column\":{\"DataType\":{\"Type\":\"4\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"4\"},\"AliasName\":\"#expr_3\",\"UserAlias\":\"groupid\",\"TableId\":\"6555383776122680534\",\"TableType\":\"1\",\"ColId\":\"5\",\"ProjId\":\"0\",\"ColType\":\"2\",\"DbName\":\"test\",\"TableName\":\"meters\",\"TableAlias\":\"meters\",\"ColName\":\"groupid\",\"DataBlockId\":\"0\",\"SlotId\":\"0\"}}],\"UdfBufSize\":\"0\"}}],\"From\":{\"NodeType\":\"6\",\"Name\":\"RealTable\",\"RealTable\":{\"DataType\":{\"Type\":\"0\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"0\"},\"AliasName\":\"\",\"UserAlias\":\"\",\"DbName\":\"test\",\"tableName\":\"meters\",\"tableAlias\":\"meters\",\"MetaSize\":\"475\",\"Meta\":{\"VgId\":\"0\",\"TableType\":\"1\",\"Uid\":\"6555383776122680534\",\"Suid\":\"6555383776122680534\",\"Sversion\":\"1\",\"Tversion\":\"1\",\"ComInfo\":{\"NumOfTags\":\"2\",\"Precision\":\"0\",\"NumOfColumns\":\"4\",\"RowSize\":\"20\"},\"ColSchemas\":[{\"Type\":\"9\",\"ColId\":\"1\",\"bytes\":\"8\",\"Name\":\"ts\"},{\"Type\":\"6\",\"ColId\":\"2\",\"bytes\":\"4\",\"Name\":\"current\"},{\"Type\":\"4\",\"ColId\":\"3\",\"bytes\":\"4\",\"Name\":\"voltage\"},{\"Type\":\"6\",\"ColId\":\"4\",\"bytes\":\"4\",\"Name\":\"phase\"},{\"Type\":\"4\",\"ColId\":\"5\",\"bytes\":\"4\",\"Name\":\"groupid\"},{\"Type\":\"8\",\"ColId\":\"6\",\"bytes\":\"26\",\"Name\":\"location\"}]},\"VgroupsInfoSize\":\"1340\",\"VgroupsInfo\":{\"Num\":\"2\",\"Vgroups\":[{\"VgId\":\"2\",\"HashBegin\":\"0\",\"HashEnd\":\"2147483646\",\"EpSet\":{\"InUse\":\"0\",\"NumOfEps\":\"1\",\"Eps\":[{\"Fqdn\":\"localhost\",\"Port\":\"6030\"}]},\"NumOfTable\":\"0\"},{\"VgId\":\"3\",\"HashBegin\":\"2147483647\",\"HashEnd\":\"4294967295\",\"EpSet\":{\"InUse\":\"0\",\"NumOfEps\":\"1\",\"Eps\":[{\"Fqdn\":\"localhost\",\"Port\":\"6030\"}]},\"NumOfTable\":\"0\"}]}}},\"PartitionBy\":[{\"NodeType\":\"1\",\"Name\":\"Column\",\"Column\":{\"DataType\":{\"Type\":\"4\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"4\"},\"AliasName\":\"groupid\",\"UserAlias\":\"groupid\",\"TableId\":\"6555383776122680534\",\"TableType\":\"1\",\"ColId\":\"5\",\"ProjId\":\"0\",\"ColType\":\"2\",\"DbName\":\"test\",\"TableName\":\"meters\",\"TableAlias\":\"meters\",\"ColName\":\"groupid\",\"DataBlockId\":\"0\",\"SlotId\":\"0\"}}],\"Window\":{\"NodeType\":\"14\",\"Name\":\"IntervalWindow\",\"IntervalWindow\":{\"Interval\":{\"NodeType\":\"2\",\"Name\":\"Value\",\"Value\":{\"DataType\":{\"Type\":\"5\",\"Precision\":\"0\",\"Scale\":\"115\",\"Bytes\":\"8\"},\"AliasName\":\"c804c3a15ebe05b5baf40ad5ee12be1f\",\"UserAlias\":\"2s\",\"LiteralSize\":\"2\",\"Literal\":\"2s\",\"Duration\":true,\"Translate\":true,\"NotReserved\":false,\"IsNull\":false,\"Unit\":\"115\",\"Datum\":\"2000\"}},\"TsPk\":{\"NodeType\":\"1\",\"Name\":\"Column\",\"Column\":{\"DataType\":{\"Type\":\"9\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"8\"},\"AliasName\":\"ts\",\"UserAlias\":\"ts\",\"TableId\":\"6555383776122680534\",\"TableType\":\"1\",\"ColId\":\"1\",\"ProjId\":\"0\",\"ColType\":\"1\",\"DbName\":\"test\",\"TableName\":\"meters\",\"TableAlias\":\"meters\",\"ColName\":\"ts\",\"DataBlockId\":\"0\",\"SlotId\":\"0\"}}}},\"StmtName\":\"0x1580095ba\",\"HasAggFuncs\":true}}"; - // char* ast = "{\"NodeType\":\"101\",\"Name\":\"SelectStmt\",\"SelectStmt\":{\"Distinct\":false,\"Projections\":[{\"NodeType\":\"5\",\"Name\":\"Function\",\"Function\":{\"DataType\":{\"Type\":\"9\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"8\"},\"AliasName\":\"#expr_1\",\"UserAlias\":\"wstart\",\"Name\":\"_wstart\",\"Id\":\"89\",\"Type\":\"3505\",\"UdfBufSize\":\"0\"}},{\"NodeType\":\"5\",\"Name\":\"Function\",\"Function\":{\"DataType\":{\"Type\":\"2\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"1\"},\"AliasName\":\"#expr_2\",\"UserAlias\":\"min(c1)\",\"Name\":\"min\",\"Id\":\"2\",\"Type\":\"8\",\"Parameters\":[{\"NodeType\":\"1\",\"Name\":\"Column\",\"Column\":{\"DataType\":{\"Type\":\"2\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"1\"},\"AliasName\":\"c1\",\"UserAlias\":\"c1\",\"TableId\":\"5129202035162885657\",\"TableType\":\"1\",\"ColId\":\"2\",\"ProjId\":\"0\",\"ColType\":\"1\",\"DbName\":\"test\",\"TableName\":\"at_once_interval_ext_stb\",\"TableAlias\":\"at_once_interval_ext_stb\",\"ColName\":\"c1\",\"DataBlockId\":\"0\",\"SlotId\":\"0\"}}],\"UdfBufSize\":\"0\"}},{\"NodeType\":\"5\",\"Name\":\"Function\",\"Function\":{\"DataType\":{\"Type\":\"3\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"2\"},\"AliasName\":\"#expr_3\",\"UserAlias\":\"max(c2)\",\"Name\":\"max\",\"Id\":\"3\",\"Type\":\"7\",\"Parameters\":[{\"NodeType\":\"1\",\"Name\":\"Column\",\"Column\":{\"DataType\":{\"Type\":\"3\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"2\"},\"AliasName\":\"c2\",\"UserAlias\":\"c2\",\"TableId\":\"5129202035162885657\",\"TableType\":\"1\",\"ColId\":\"3\",\"ProjId\":\"0\",\"ColType\":\"1\",\"DbName\":\"test\",\"TableName\":\"at_once_interval_ext_stb\",\"TableAlias\":\"at_once_interval_ext_stb\",\"ColName\":\"c2\",\"DataBlockId\":\"0\",\"SlotId\":\"0\"}}],\"UdfBufSize\":\"0\"}},{\"NodeType\":\"5\",\"Name\":\"Function\",\"Function\":{\"DataType\":{\"Type\":\"4\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"4\"},\"AliasName\":\"\",\"UserAlias\":\"\",\"Name\":\"cast\",\"Id\":\"77\",\"Type\":\"2000\",\"Parameters\":[{\"NodeType\":\"5\",\"Name\":\"Function\",\"Function\":{\"DataType\":{\"Type\":\"5\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"8\"},\"AliasName\":\"#expr_4\",\"UserAlias\":\"sum(c3)\",\"Name\":\"sum\",\"Id\":\"1\",\"Type\":\"14\",\"Parameters\":[{\"NodeType\":\"1\",\"Name\":\"Column\",\"Column\":{\"DataType\":{\"Type\":\"4\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"4\"},\"AliasName\":\"c3\",\"UserAlias\":\"c3\",\"TableId\":\"5129202035162885657\",\"TableType\":\"1\",\"ColId\":\"4\",\"ProjId\":\"0\",\"ColType\":\"1\",\"DbName\":\"test\",\"TableName\":\"at_once_interval_ext_stb\",\"TableAlias\":\"at_once_interval_ext_stb\",\"ColName\":\"c3\",\"DataBlockId\":\"0\",\"SlotId\":\"0\"}}],\"UdfBufSize\":\"0\"}},{\"NodeType\":\"2\",\"Name\":\"Value\",\"Value\":{\"DataType\":{\"Type\":\"2\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"1\"},\"AliasName\":\"\",\"UserAlias\":\"\",\"LiteralSize\":\"0\",\"Duration\":false,\"Translate\":true,\"NotReserved\":true,\"IsNull\":false,\"Unit\":\"0\",\"Datum\":\"0\"}}],\"UdfBufSize\":\"0\"}},{\"NodeType\":\"5\",\"Name\":\"Function\",\"Function\":{\"DataType\":{\"Type\":\"5\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"8\"},\"AliasName\":\"#expr_5\",\"UserAlias\":\"first(c4)\",\"Name\":\"first\",\"Id\":\"33\",\"Type\":\"504\",\"Parameters\":[{\"NodeType\":\"1\",\"Name\":\"Column\",\"Column\":{\"DataType\":{\"Type\":\"5\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"8\"},\"AliasName\":\"c4\",\"UserAlias\":\"c4\",\"TableId\":\"5129202035162885657\",\"TableType\":\"1\",\"ColId\":\"5\",\"ProjId\":\"0\",\"ColType\":\"1\",\"DbName\":\"test\",\"TableName\":\"at_once_interval_ext_stb\",\"TableAlias\":\"at_once_interval_ext_stb\",\"ColName\":\"c4\",\"DataBlockId\":\"0\",\"SlotId\":\"0\"}},{\"NodeType\":\"1\",\"Name\":\"Column\",\"Column\":{\"DataType\":{\"Type\":\"9\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"8\"},\"AliasName\":\"ts\",\"UserAlias\":\"ts\",\"TableId\":\"5129202035162885657\",\"TableType\":\"1\",\"ColId\":\"1\",\"ProjId\":\"0\",\"ColType\":\"1\",\"DbName\":\"test\",\"TableName\":\"at_once_interval_ext_stb\",\"TableAlias\":\"at_once_interval_ext_stb\",\"ColName\":\"ts\",\"DataBlockId\":\"0\",\"SlotId\":\"0\"}}],\"UdfBufSize\":\"0\"}},{\"NodeType\":\"5\",\"Name\":\"Function\",\"Function\":{\"DataType\":{\"Type\":\"11\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"1\"},\"AliasName\":\"#expr_6\",\"UserAlias\":\"last(c5)\",\"Name\":\"last\",\"Id\":\"36\",\"Type\":\"506\",\"Parameters\":[{\"NodeType\":\"1\",\"Name\":\"Column\",\"Column\":{\"DataType\":{\"Type\":\"11\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"1\"},\"AliasName\":\"c5\",\"UserAlias\":\"c5\",\"TableId\":\"5129202035162885657\",\"TableType\":\"1\",\"ColId\":\"6\",\"ProjId\":\"0\",\"ColType\":\"1\",\"DbName\":\"test\",\"TableName\":\"at_once_interval_ext_stb\",\"TableAlias\":\"at_once_interval_ext_stb\",\"ColName\":\"c5\",\"DataBlockId\":\"0\",\"SlotId\":\"0\"}},{\"NodeType\":\"1\",\"Name\":\"Column\",\"Column\":{\"DataType\":{\"Type\":\"9\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"8\"},\"AliasName\":\"ts\",\"UserAlias\":\"ts\",\"TableId\":\"5129202035162885657\",\"TableType\":\"1\",\"ColId\":\"1\",\"ProjId\":\"0\",\"ColType\":\"1\",\"DbName\":\"test\",\"TableName\":\"at_once_interval_ext_stb\",\"TableAlias\":\"at_once_interval_ext_stb\",\"ColName\":\"ts\",\"DataBlockId\":\"0\",\"SlotId\":\"0\"}}],\"UdfBufSize\":\"0\"}},{\"NodeType\":\"5\",\"Name\":\"Function\",\"Function\":{\"DataType\":{\"Type\":\"12\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"2\"},\"AliasName\":\"\",\"UserAlias\":\"\",\"Name\":\"cast\",\"Id\":\"77\",\"Type\":\"2000\",\"Parameters\":[{\"NodeType\":\"5\",\"Name\":\"Function\",\"Function\":{\"DataType\":{\"Type\":\"7\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"8\"},\"AliasName\":\"#expr_7\",\"UserAlias\":\"apercentile(c6, 50)\",\"Name\":\"apercentile\",\"Id\":\"12\",\"Type\":\"1\",\"Parameters\":[{\"NodeType\":\"1\",\"Name\":\"Column\",\"Column\":{\"DataType\":{\"Type\":\"12\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"2\"},\"AliasName\":\"c6\",\"UserAlias\":\"c6\",\"TableId\":\"5129202035162885657\",\"TableType\":\"1\",\"ColId\":\"7\",\"ProjId\":\"0\",\"ColType\":\"1\",\"DbName\":\"test\",\"TableName\":\"at_once_interval_ext_stb\",\"TableAlias\":\"at_once_interval_ext_stb\",\"ColName\":\"c6\",\"DataBlockId\":\"0\",\"SlotId\":\"0\"}},{\"NodeType\":\"2\",\"Name\":\"Value\",\"Value\":{\"DataType\":{\"Type\":\"5\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"8\"},\"AliasName\":\"c0c7c76d30bd3dcaefc96f40275bdc0a\",\"UserAlias\":\"50\",\"LiteralSize\":\"2\",\"Literal\":\"50\",\"Duration\":false,\"Translate\":true,\"NotReserved\":true,\"IsNull\":false,\"Unit\":\"0\",\"Datum\":\"50\"}}],\"UdfBufSize\":\"0\"}},{\"NodeType\":\"2\",\"Name\":\"Value\",\"Value\":{\"DataType\":{\"Type\":\"2\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"1\"},\"AliasName\":\"\",\"UserAlias\":\"\",\"LiteralSize\":\"0\",\"Duration\":false,\"Translate\":true,\"NotReserved\":true,\"IsNull\":false,\"Unit\":\"0\",\"Datum\":\"0\"}}],\"UdfBufSize\":\"0\"}},{\"NodeType\":\"5\",\"Name\":\"Function\",\"Function\":{\"DataType\":{\"Type\":\"13\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"4\"},\"AliasName\":\"\",\"UserAlias\":\"\",\"Name\":\"cast\",\"Id\":\"77\",\"Type\":\"2000\",\"Parameters\":[{\"NodeType\":\"5\",\"Name\":\"Function\",\"Function\":{\"DataType\":{\"Type\":\"7\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"8\"},\"AliasName\":\"#expr_8\",\"UserAlias\":\"avg(c7)\",\"Name\":\"avg\",\"Id\":\"8\",\"Type\":\"2\",\"Parameters\":[{\"NodeType\":\"1\",\"Name\":\"Column\",\"Column\":{\"DataType\":{\"Type\":\"13\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"4\"},\"AliasName\":\"c7\",\"UserAlias\":\"c7\",\"TableId\":\"5129202035162885657\",\"TableType\":\"1\",\"ColId\":\"8\",\"ProjId\":\"0\",\"ColType\":\"1\",\"DbName\":\"test\",\"TableName\":\"at_once_interval_ext_stb\",\"TableAlias\":\"at_once_interval_ext_stb\",\"ColName\":\"c7\",\"DataBlockId\":\"0\",\"SlotId\":\"0\"}}],\"UdfBufSize\":\"0\"}},{\"NodeType\":\"2\",\"Name\":\"Value\",\"Value\":{\"DataType\":{\"Type\":\"2\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"1\"},\"AliasName\":\"\",\"UserAlias\":\"\",\"LiteralSize\":\"0\",\"Duration\":false,\"Translate\":true,\"NotReserved\":true,\"IsNull\":false,\"Unit\":\"0\",\"Datum\":\"0\"}}],\"UdfBufSize\":\"0\"}},{\"NodeType\":\"5\",\"Name\":\"Function\",\"Function\":{\"DataType\":{\"Type\":\"14\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"8\"},\"AliasName\":\"\",\"UserAlias\":\"\",\"Name\":\"cast\",\"Id\":\"77\",\"Type\":\"2000\",\"Parameters\":[{\"NodeType\":\"5\",\"Name\":\"Function\",\"Function\":{\"DataType\":{\"Type\":\"5\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"8\"},\"AliasName\":\"#expr_9\",\"UserAlias\":\"count(c8)\",\"Name\":\"count\",\"Id\":\"0\",\"Type\":\"3\",\"Parameters\":[{\"NodeType\":\"1\",\"Name\":\"Column\",\"Column\":{\"DataType\":{\"Type\":\"14\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"8\"},\"AliasName\":\"c8\",\"UserAlias\":\"c8\",\"TableId\":\"5129202035162885657\",\"TableType\":\"1\",\"ColId\":\"9\",\"ProjId\":\"0\",\"ColType\":\"1\",\"DbName\":\"test\",\"TableName\":\"at_once_interval_ext_stb\",\"TableAlias\":\"at_once_interval_ext_stb\",\"ColName\":\"c8\",\"DataBlockId\":\"0\",\"SlotId\":\"0\"}}],\"UdfBufSize\":\"0\"}},{\"NodeType\":\"2\",\"Name\":\"Value\",\"Value\":{\"DataType\":{\"Type\":\"2\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"1\"},\"AliasName\":\"\",\"UserAlias\":\"\",\"LiteralSize\":\"0\",\"Duration\":false,\"Translate\":true,\"NotReserved\":true,\"IsNull\":false,\"Unit\":\"0\",\"Datum\":\"0\"}}],\"UdfBufSize\":\"0\"}},{\"NodeType\":\"5\",\"Name\":\"Function\",\"Function\":{\"DataType\":{\"Type\":\"6\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"4\"},\"AliasName\":\"\",\"UserAlias\":\"\",\"Name\":\"cast\",\"Id\":\"77\",\"Type\":\"2000\",\"Parameters\":[{\"NodeType\":\"5\",\"Name\":\"Function\",\"Function\":{\"DataType\":{\"Type\":\"7\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"8\"},\"AliasName\":\"#expr_10\",\"UserAlias\":\"spread(c1)\",\"Name\":\"spread\",\"Id\":\"17\",\"Type\":\"11\",\"Parameters\":[{\"NodeType\":\"1\",\"Name\":\"Column\",\"Column\":{\"DataType\":{\"Type\":\"2\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"1\"},\"AliasName\":\"c1\",\"UserAlias\":\"c1\",\"TableId\":\"5129202035162885657\",\"TableType\":\"1\",\"ColId\":\"2\",\"ProjId\":\"0\",\"ColType\":\"1\",\"DbName\":\"test\",\"TableName\":\"at_once_interval_ext_stb\",\"TableAlias\":\"at_once_interval_ext_stb\",\"ColName\":\"c1\",\"DataBlockId\":\"0\",\"SlotId\":\"0\"}}],\"UdfBufSize\":\"0\"}},{\"NodeType\":\"2\",\"Name\":\"Value\",\"Value\":{\"DataType\":{\"Type\":\"2\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"1\"},\"AliasName\":\"\",\"UserAlias\":\"\",\"LiteralSize\":\"0\",\"Duration\":false,\"Translate\":true,\"NotReserved\":true,\"IsNull\":false,\"Unit\":\"0\",\"Datum\":\"0\"}}],\"UdfBufSize\":\"0\"}},{\"NodeType\":\"5\",\"Name\":\"Function\",\"Function\":{\"DataType\":{\"Type\":\"7\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"8\"},\"AliasName\":\"#expr_11\",\"UserAlias\":\"stddev(c2)\",\"Name\":\"stddev\",\"Id\":\"4\",\"Type\":\"12\",\"Parameters\":[{\"NodeType\":\"1\",\"Name\":\"Column\",\"Column\":{\"DataType\":{\"Type\":\"3\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"2\"},\"AliasName\":\"c2\",\"UserAlias\":\"c2\",\"TableId\":\"5129202035162885657\",\"TableType\":\"1\",\"ColId\":\"3\",\"ProjId\":\"0\",\"ColType\":\"1\",\"DbName\":\"test\",\"TableName\":\"at_once_interval_ext_stb\",\"TableAlias\":\"at_once_interval_ext_stb\",\"ColName\":\"c2\",\"DataBlockId\":\"0\",\"SlotId\":\"0\"}}],\"UdfBufSize\":\"0\"}},{\"NodeType\":\"5\",\"Name\":\"Function\",\"Function\":{\"DataType\":{\"Type\":\"8\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"8\"},\"AliasName\":\"\",\"UserAlias\":\"\",\"Name\":\"cast\",\"Id\":\"77\",\"Type\":\"2000\",\"Parameters\":[{\"NodeType\":\"5\",\"Name\":\"Function\",\"Function\":{\"DataType\":{\"Type\":\"5\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"8\"},\"AliasName\":\"#expr_12\",\"UserAlias\":\"hyperloglog(c11)\",\"Name\":\"hyperloglog\",\"Id\":\"43\",\"Type\":\"17\",\"Parameters\":[{\"NodeType\":\"1\",\"Name\":\"Column\",\"Column\":{\"DataType\":{\"Type\":\"8\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"8\"},\"AliasName\":\"c11\",\"UserAlias\":\"c11\",\"TableId\":\"5129202035162885657\",\"TableType\":\"1\",\"ColId\":\"12\",\"ProjId\":\"0\",\"ColType\":\"1\",\"DbName\":\"test\",\"TableName\":\"at_once_interval_ext_stb\",\"TableAlias\":\"at_once_interval_ext_stb\",\"ColName\":\"c11\",\"DataBlockId\":\"0\",\"SlotId\":\"0\"}}],\"UdfBufSize\":\"0\"}},{\"NodeType\":\"2\",\"Name\":\"Value\",\"Value\":{\"DataType\":{\"Type\":\"2\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"1\"},\"AliasName\":\"\",\"UserAlias\":\"\",\"LiteralSize\":\"0\",\"Duration\":false,\"Translate\":true,\"NotReserved\":true,\"IsNull\":false,\"Unit\":\"0\",\"Datum\":\"0\"}}],\"UdfBufSize\":\"0\"}},{\"NodeType\":\"5\",\"Name\":\"Function\",\"Function\":{\"DataType\":{\"Type\":\"10\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"26\"},\"AliasName\":\"\",\"UserAlias\":\"\",\"Name\":\"cast\",\"Id\":\"77\",\"Type\":\"2000\",\"Parameters\":[{\"NodeType\":\"5\",\"Name\":\"Function\",\"Function\":{\"DataType\":{\"Type\":\"5\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"8\"},\"AliasName\":\"#expr_13\",\"UserAlias\":\"timediff(1, 0, 1h)\",\"Name\":\"timediff\",\"Id\":\"81\",\"Type\":\"2501\",\"Parameters\":[{\"NodeType\":\"2\",\"Name\":\"Value\",\"Value\":{\"DataType\":{\"Type\":\"5\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"8\"},\"AliasName\":\"c4ca4238a0b923820dcc509a6f75849b\",\"UserAlias\":\"1\",\"LiteralSize\":\"1\",\"Literal\":\"1\",\"Duration\":false,\"Translate\":true,\"NotReserved\":false,\"IsNull\":false,\"Unit\":\"0\",\"Datum\":\"1\"}},{\"NodeType\":\"2\",\"Name\":\"Value\",\"Value\":{\"DataType\":{\"Type\":\"5\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"8\"},\"AliasName\":\"cfcd208495d565ef66e7dff9f98764da\",\"UserAlias\":\"0\",\"LiteralSize\":\"1\",\"Literal\":\"0\",\"Duration\":false,\"Translate\":true,\"NotReserved\":false,\"IsNull\":false,\"Unit\":\"0\",\"Datum\":\"0\"}},{\"NodeType\":\"2\",\"Name\":\"Value\",\"Value\":{\"DataType\":{\"Type\":\"5\",\"Precision\":\"0\",\"Scale\":\"104\",\"Bytes\":\"8\"},\"AliasName\":\"7c68645d71b803bf0ba2f22519f73e08\",\"UserAlias\":\"1h\",\"LiteralSize\":\"2\",\"Literal\":\"1h\",\"Duration\":true,\"Translate\":true,\"NotReserved\":false,\"IsNull\":false,\"Unit\":\"104\",\"Datum\":\"3600000\"}},{\"NodeType\":\"2\",\"Name\":\"Value\",\"Value\":{\"DataType\":{\"Type\":\"2\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"1\"},\"AliasName\":\"\",\"UserAlias\":\"\",\"LiteralSize\":\"0\",\"Duration\":false,\"Translate\":true,\"NotReserved\":true,\"IsNull\":false,\"Unit\":\"0\",\"Datum\":\"0\"}}],\"UdfBufSize\":\"0\"}},{\"NodeType\":\"2\",\"Name\":\"Value\",\"Value\":{\"DataType\":{\"Type\":\"2\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"1\"},\"AliasName\":\"\",\"UserAlias\":\"\",\"LiteralSize\":\"0\",\"Duration\":false,\"Translate\":true,\"NotReserved\":true,\"IsNull\":false,\"Unit\":\"0\",\"Datum\":\"0\"}}],\"UdfBufSize\":\"0\"}},{\"NodeType\":\"5\",\"Name\":\"Function\",\"Function\":{\"DataType\":{\"Type\":\"1\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"1\"},\"AliasName\":\"\",\"UserAlias\":\"\",\"Name\":\"cast\",\"Id\":\"77\",\"Type\":\"2000\",\"Parameters\":[{\"NodeType\":\"5\",\"Name\":\"Function\",\"Function\":{\"DataType\":{\"Type\":\"8\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"96\"},\"AliasName\":\"#expr_14\",\"UserAlias\":\"timezone()\",\"Name\":\"timezone\",\"Id\":\"84\",\"Type\":\"2503\",\"UdfBufSize\":\"0\"}},{\"NodeType\":\"2\",\"Name\":\"Value\",\"Value\":{\"DataType\":{\"Type\":\"2\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"1\"},\"AliasName\":\"\",\"UserAlias\":\"\",\"LiteralSize\":\"0\",\"Duration\":false,\"Translate\":true,\"NotReserved\":true,\"IsNull\":false,\"Unit\":\"0\",\"Datum\":\"0\"}}],\"UdfBufSize\":\"0\"}}],\"From\":{\"NodeType\":\"6\",\"Name\":\"RealTable\",\"RealTable\":{\"DataType\":{\"Type\":\"0\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"0\"},\"AliasName\":\"\",\"UserAlias\":\"\",\"DbName\":\"test\",\"tableName\":\"at_once_interval_ext_stb\",\"tableAlias\":\"at_once_interval_ext_stb\",\"MetaSize\":\"2008\",\"Meta\":{\"VgId\":\"0\",\"TableType\":\"1\",\"Uid\":\"5129202035162885657\",\"Suid\":\"5129202035162885657\",\"Sversion\":\"1\",\"Tversion\":\"1\",\"ComInfo\":{\"NumOfTags\":\"13\",\"Precision\":\"0\",\"NumOfColumns\":\"14\",\"RowSize\":\"85\"},\"ColSchemas\":[{\"Type\":\"9\",\"ColId\":\"1\",\"bytes\":\"8\",\"Name\":\"ts\"},{\"Type\":\"2\",\"ColId\":\"2\",\"bytes\":\"1\",\"Name\":\"c1\"},{\"Type\":\"3\",\"ColId\":\"3\",\"bytes\":\"2\",\"Name\":\"c2\"},{\"Type\":\"4\",\"ColId\":\"4\",\"bytes\":\"4\",\"Name\":\"c3\"},{\"Type\":\"5\",\"ColId\":\"5\",\"bytes\":\"8\",\"Name\":\"c4\"},{\"Type\":\"11\",\"ColId\":\"6\",\"bytes\":\"1\",\"Name\":\"c5\"},{\"Type\":\"12\",\"ColId\":\"7\",\"bytes\":\"2\",\"Name\":\"c6\"},{\"Type\":\"13\",\"ColId\":\"8\",\"bytes\":\"4\",\"Name\":\"c7\"},{\"Type\":\"14\",\"ColId\":\"9\",\"bytes\":\"8\",\"Name\":\"c8\"},{\"Type\":\"6\",\"ColId\":\"10\",\"bytes\":\"4\",\"Name\":\"c9\"},{\"Type\":\"7\",\"ColId\":\"11\",\"bytes\":\"8\",\"Name\":\"c10\"},{\"Type\":\"8\",\"ColId\":\"12\",\"bytes\":\"8\",\"Name\":\"c11\"},{\"Type\":\"10\",\"ColId\":\"13\",\"bytes\":\"26\",\"Name\":\"c12\"},{\"Type\":\"1\",\"ColId\":\"14\",\"bytes\":\"1\",\"Name\":\"c13\"},{\"Type\":\"2\",\"ColId\":\"15\",\"bytes\":\"1\",\"Name\":\"t1\"},{\"Type\":\"3\",\"ColId\":\"16\",\"bytes\":\"2\",\"Name\":\"t2\"},{\"Type\":\"4\",\"ColId\":\"17\",\"bytes\":\"4\",\"Name\":\"t3\"},{\"Type\":\"5\",\"ColId\":\"18\",\"bytes\":\"8\",\"Name\":\"t4\"},{\"Type\":\"11\",\"ColId\":\"19\",\"bytes\":\"1\",\"Name\":\"t5\"},{\"Type\":\"12\",\"ColId\":\"20\",\"bytes\":\"2\",\"Name\":\"t6\"},{\"Type\":\"13\",\"ColId\":\"21\",\"bytes\":\"4\",\"Name\":\"t7\"},{\"Type\":\"14\",\"ColId\":\"22\",\"bytes\":\"8\",\"Name\":\"t8\"},{\"Type\":\"6\",\"ColId\":\"23\",\"bytes\":\"4\",\"Name\":\"t9\"},{\"Type\":\"7\",\"ColId\":\"24\",\"bytes\":\"8\",\"Name\":\"t10\"},{\"Type\":\"8\",\"ColId\":\"25\",\"bytes\":\"8\",\"Name\":\"t11\"},{\"Type\":\"10\",\"ColId\":\"26\",\"bytes\":\"26\",\"Name\":\"t12\"},{\"Type\":\"1\",\"ColId\":\"27\",\"bytes\":\"1\",\"Name\":\"t13\"}]},\"VgroupsInfoSize\":\"1340\",\"VgroupsInfo\":{\"Num\":\"2\",\"Vgroups\":[{\"VgId\":\"14\",\"HashBegin\":\"0\",\"HashEnd\":\"2147483646\",\"EpSet\":{\"InUse\":\"0\",\"NumOfEps\":\"1\",\"Eps\":[{\"Fqdn\":\"localhost\",\"Port\":\"6030\"}]},\"NumOfTable\":\"0\"},{\"VgId\":\"15\",\"HashBegin\":\"2147483647\",\"HashEnd\":\"4294967295\",\"EpSet\":{\"InUse\":\"0\",\"NumOfEps\":\"1\",\"Eps\":[{\"Fqdn\":\"localhost\",\"Port\":\"6030\"}]},\"NumOfTable\":\"0\"}]}}},\"Tags\":[{\"NodeType\":\"2\",\"Name\":\"Value\",\"Value\":{\"DataType\":{\"Type\":\"0\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"1\"},\"AliasName\":\"\",\"UserAlias\":\"\",\"LiteralSize\":\"0\",\"Duration\":false,\"Translate\":false,\"NotReserved\":false,\"IsNull\":true,\"Unit\":\"0\"}},{\"NodeType\":\"2\",\"Name\":\"Value\",\"Value\":{\"DataType\":{\"Type\":\"0\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"1\"},\"AliasName\":\"\",\"UserAlias\":\"\",\"LiteralSize\":\"0\",\"Duration\":false,\"Translate\":false,\"NotReserved\":false,\"IsNull\":true,\"Unit\":\"0\"}},{\"NodeType\":\"2\",\"Name\":\"Value\",\"Value\":{\"DataType\":{\"Type\":\"0\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"1\"},\"AliasName\":\"\",\"UserAlias\":\"\",\"LiteralSize\":\"0\",\"Duration\":false,\"Translate\":false,\"NotReserved\":false,\"IsNull\":true,\"Unit\":\"0\"}},{\"NodeType\":\"2\",\"Name\":\"Value\",\"Value\":{\"DataType\":{\"Type\":\"0\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"1\"},\"AliasName\":\"\",\"UserAlias\":\"\",\"LiteralSize\":\"0\",\"Duration\":false,\"Translate\":false,\"NotReserved\":false,\"IsNull\":true,\"Unit\":\"0\"}},{\"NodeType\":\"2\",\"Name\":\"Value\",\"Value\":{\"DataType\":{\"Type\":\"0\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"1\"},\"AliasName\":\"\",\"UserAlias\":\"\",\"LiteralSize\":\"0\",\"Duration\":false,\"Translate\":false,\"NotReserved\":false,\"IsNull\":true,\"Unit\":\"0\"}},{\"NodeType\":\"2\",\"Name\":\"Value\",\"Value\":{\"DataType\":{\"Type\":\"0\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"1\"},\"AliasName\":\"\",\"UserAlias\":\"\",\"LiteralSize\":\"0\",\"Duration\":false,\"Translate\":false,\"NotReserved\":false,\"IsNull\":true,\"Unit\":\"0\"}},{\"NodeType\":\"2\",\"Name\":\"Value\",\"Value\":{\"DataType\":{\"Type\":\"0\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"1\"},\"AliasName\":\"\",\"UserAlias\":\"\",\"LiteralSize\":\"0\",\"Duration\":false,\"Translate\":false,\"NotReserved\":false,\"IsNull\":true,\"Unit\":\"0\"}},{\"NodeType\":\"2\",\"Name\":\"Value\",\"Value\":{\"DataType\":{\"Type\":\"0\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"1\"},\"AliasName\":\"\",\"UserAlias\":\"\",\"LiteralSize\":\"0\",\"Duration\":false,\"Translate\":false,\"NotReserved\":false,\"IsNull\":true,\"Unit\":\"0\"}},{\"NodeType\":\"2\",\"Name\":\"Value\",\"Value\":{\"DataType\":{\"Type\":\"0\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"1\"},\"AliasName\":\"\",\"UserAlias\":\"\",\"LiteralSize\":\"0\",\"Duration\":false,\"Translate\":false,\"NotReserved\":false,\"IsNull\":true,\"Unit\":\"0\"}},{\"NodeType\":\"2\",\"Name\":\"Value\",\"Value\":{\"DataType\":{\"Type\":\"0\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"1\"},\"AliasName\":\"\",\"UserAlias\":\"\",\"LiteralSize\":\"0\",\"Duration\":false,\"Translate\":false,\"NotReserved\":false,\"IsNull\":true,\"Unit\":\"0\"}},{\"NodeType\":\"2\",\"Name\":\"Value\",\"Value\":{\"DataType\":{\"Type\":\"0\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"1\"},\"AliasName\":\"\",\"UserAlias\":\"\",\"LiteralSize\":\"0\",\"Duration\":false,\"Translate\":false,\"NotReserved\":false,\"IsNull\":true,\"Unit\":\"0\"}},{\"NodeType\":\"2\",\"Name\":\"Value\",\"Value\":{\"DataType\":{\"Type\":\"0\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"1\"},\"AliasName\":\"\",\"UserAlias\":\"\",\"LiteralSize\":\"0\",\"Duration\":false,\"Translate\":false,\"NotReserved\":false,\"IsNull\":true,\"Unit\":\"0\"}},{\"NodeType\":\"2\",\"Name\":\"Value\",\"Value\":{\"DataType\":{\"Type\":\"0\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"1\"},\"AliasName\":\"\",\"UserAlias\":\"\",\"LiteralSize\":\"0\",\"Duration\":false,\"Translate\":false,\"NotReserved\":false,\"IsNull\":true,\"Unit\":\"0\"}}],\"Window\":{\"NodeType\":\"14\",\"Name\":\"IntervalWindow\",\"IntervalWindow\":{\"Interval\":{\"NodeType\":\"2\",\"Name\":\"Value\",\"Value\":{\"DataType\":{\"Type\":\"5\",\"Precision\":\"0\",\"Scale\":\"115\",\"Bytes\":\"8\"},\"AliasName\":\"1fd7635317edfeca9054894ac9ef9b5e\",\"UserAlias\":\"14s\",\"LiteralSize\":\"3\",\"Literal\":\"14s\",\"Duration\":true,\"Translate\":true,\"NotReserved\":false,\"IsNull\":false,\"Unit\":\"115\",\"Datum\":\"14000\"}},\"TsPk\":{\"NodeType\":\"1\",\"Name\":\"Column\",\"Column\":{\"DataType\":{\"Type\":\"9\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"8\"},\"AliasName\":\"ts\",\"UserAlias\":\"ts\",\"TableId\":\"5129202035162885657\",\"TableType\":\"1\",\"ColId\":\"1\",\"ProjId\":\"0\",\"ColType\":\"1\",\"DbName\":\"test\",\"TableName\":\"at_once_interval_ext_stb\",\"TableAlias\":\"at_once_interval_ext_stb\",\"ColName\":\"ts\",\"DataBlockId\":\"0\",\"SlotId\":\"0\"}}}},\"StmtName\":\"0x150146d14\",\"HasAggFuncs\":true}}"; + char* ast = "{\"NodeType\":\"101\",\"Name\":\"SelectStmt\",\"SelectStmt\":{\"Distinct\":false,\"Projections\":[{\"NodeType\":\"5\",\"Name\":\"Function\",\"Function\":{\"DataType\":{\"Type\":\"9\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"8\"},\"AliasName\":\"#expr_1\",\"UserAlias\":\"_wstart\",\"Name\":\"_wstart\",\"Id\":\"125\",\"Type\":\"3505\",\"UdfBufSize\":\"0\"}},{\"NodeType\":\"5\",\"Name\":\"Function\",\"Function\":{\"DataType\":{\"Type\":\"5\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"8\"},\"AliasName\":\"#expr_2\",\"UserAlias\":\"sum(voltage)\",\"Name\":\"sum\",\"Id\":\"1\",\"Type\":\"14\",\"Parameters\":[{\"NodeType\":\"1\",\"Name\":\"Column\",\"Column\":{\"DataType\":{\"Type\":\"4\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"4\"},\"AliasName\":\"voltage\",\"UserAlias\":\"voltage\",\"TableId\":\"6555383776122680534\",\"TableType\":\"1\",\"ColId\":\"3\",\"ProjId\":\"0\",\"ColType\":\"1\",\"DbName\":\"test\",\"TableName\":\"meters\",\"TableAlias\":\"meters\",\"ColName\":\"voltage\",\"DataBlockId\":\"0\",\"SlotId\":\"0\"}}],\"UdfBufSize\":\"0\"}},{\"NodeType\":\"5\",\"Name\":\"Function\",\"Function\":{\"DataType\":{\"Type\":\"4\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"4\"},\"AliasName\":\"#expr_3\",\"UserAlias\":\"groupid\",\"Name\":\"_group_key\",\"Id\":\"118\",\"Type\":\"3754\",\"Parameters\":[{\"NodeType\":\"1\",\"Name\":\"Column\",\"Column\":{\"DataType\":{\"Type\":\"4\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"4\"},\"AliasName\":\"#expr_3\",\"UserAlias\":\"groupid\",\"TableId\":\"6555383776122680534\",\"TableType\":\"1\",\"ColId\":\"5\",\"ProjId\":\"0\",\"ColType\":\"2\",\"DbName\":\"test\",\"TableName\":\"meters\",\"TableAlias\":\"meters\",\"ColName\":\"groupid\",\"DataBlockId\":\"0\",\"SlotId\":\"0\"}}],\"UdfBufSize\":\"0\"}}],\"From\":{\"NodeType\":\"6\",\"Name\":\"RealTable\",\"RealTable\":{\"DataType\":{\"Type\":\"0\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"0\"},\"AliasName\":\"\",\"UserAlias\":\"\",\"DbName\":\"test\",\"tableName\":\"meters\",\"tableAlias\":\"meters\",\"MetaSize\":\"475\",\"Meta\":{\"VgId\":\"0\",\"TableType\":\"1\",\"Uid\":\"6555383776122680534\",\"Suid\":\"6555383776122680534\",\"Sversion\":\"1\",\"Tversion\":\"1\",\"ComInfo\":{\"NumOfTags\":\"2\",\"Precision\":\"0\",\"NumOfColumns\":\"4\",\"RowSize\":\"20\"},\"ColSchemas\":[{\"Type\":\"9\",\"ColId\":\"1\",\"bytes\":\"8\",\"Name\":\"ts\"},{\"Type\":\"6\",\"ColId\":\"2\",\"bytes\":\"4\",\"Name\":\"current\"},{\"Type\":\"4\",\"ColId\":\"3\",\"bytes\":\"4\",\"Name\":\"voltage\"},{\"Type\":\"6\",\"ColId\":\"4\",\"bytes\":\"4\",\"Name\":\"phase\"},{\"Type\":\"4\",\"ColId\":\"5\",\"bytes\":\"4\",\"Name\":\"groupid\"},{\"Type\":\"8\",\"ColId\":\"6\",\"bytes\":\"26\",\"Name\":\"location\"}]},\"VgroupsInfoSize\":\"1340\",\"VgroupsInfo\":{\"Num\":\"2\",\"Vgroups\":[{\"VgId\":\"2\",\"HashBegin\":\"0\",\"HashEnd\":\"2147483646\",\"EpSet\":{\"InUse\":\"0\",\"NumOfEps\":\"1\",\"Eps\":[{\"Fqdn\":\"localhost\",\"Port\":\"6030\"}]},\"NumOfTable\":\"0\"},{\"VgId\":\"3\",\"HashBegin\":\"2147483647\",\"HashEnd\":\"4294967295\",\"EpSet\":{\"InUse\":\"0\",\"NumOfEps\":\"1\",\"Eps\":[{\"Fqdn\":\"localhost\",\"Port\":\"6030\"}]},\"NumOfTable\":\"0\"}]}}},\"PartitionBy\":[{\"NodeType\":\"1\",\"Name\":\"Column\",\"Column\":{\"DataType\":{\"Type\":\"4\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"4\"},\"AliasName\":\"groupid\",\"UserAlias\":\"groupid\",\"TableId\":\"6555383776122680534\",\"TableType\":\"1\",\"ColId\":\"5\",\"ProjId\":\"0\",\"ColType\":\"2\",\"DbName\":\"test\",\"TableName\":\"meters\",\"TableAlias\":\"meters\",\"ColName\":\"groupid\",\"DataBlockId\":\"0\",\"SlotId\":\"0\"}}],\"Window\":{\"NodeType\":\"14\",\"Name\":\"IntervalWindow\",\"IntervalWindow\":{\"Interval\":{\"NodeType\":\"2\",\"Name\":\"Value\",\"Value\":{\"DataType\":{\"Type\":\"5\",\"Precision\":\"0\",\"Scale\":\"115\",\"Bytes\":\"8\"},\"AliasName\":\"c804c3a15ebe05b5baf40ad5ee12be1f\",\"UserAlias\":\"2s\",\"LiteralSize\":\"2\",\"Literal\":\"2s\",\"Duration\":true,\"Translate\":true,\"NotReserved\":false,\"IsNull\":false,\"Unit\":\"115\",\"Datum\":\"2000\"}},\"TsPk\":{\"NodeType\":\"1\",\"Name\":\"Column\",\"Column\":{\"DataType\":{\"Type\":\"9\",\"Precision\":\"0\",\"Scale\":\"0\",\"Bytes\":\"8\"},\"AliasName\":\"ts\",\"UserAlias\":\"ts\",\"TableId\":\"6555383776122680534\",\"TableType\":\"1\",\"ColId\":\"1\",\"ProjId\":\"0\",\"ColType\":\"1\",\"DbName\":\"test\",\"TableName\":\"meters\",\"TableAlias\":\"meters\",\"ColName\":\"ts\",\"DataBlockId\":\"0\",\"SlotId\":\"0\"}}}},\"StmtName\":\"0x1580095ba\",\"HasAggFuncs\":true}}"; SNode * pAst = NULL; SQueryPlan *pPlan = NULL; diff --git a/source/libs/function/inc/builtinsimpl.h b/source/libs/function/inc/builtinsimpl.h index 274ef61feb..7403a4ce31 100644 --- a/source/libs/function/inc/builtinsimpl.h +++ b/source/libs/function/inc/builtinsimpl.h @@ -96,19 +96,20 @@ int32_t avgInvertFunction(SqlFunctionCtx* pCtx); int32_t avgCombine(SqlFunctionCtx* pDestCtx, SqlFunctionCtx* pSourceCtx); int32_t getAvgInfoSize(); -bool getStddevFuncEnv(struct SFunctionNode* pFunc, SFuncExecEnv* pEnv); -int32_t stddevFunctionSetup(SqlFunctionCtx* pCtx, SResultRowEntryInfo* pResultInfo); -int32_t stddevFunction(SqlFunctionCtx* pCtx); -int32_t stddevFunctionMerge(SqlFunctionCtx* pCtx); +bool getStdFuncEnv(struct SFunctionNode* pFunc, SFuncExecEnv* pEnv); +int32_t stdFunctionSetup(SqlFunctionCtx* pCtx, SResultRowEntryInfo* pResultInfo); +int32_t stdFunction(SqlFunctionCtx* pCtx); +int32_t stdFunctionMerge(SqlFunctionCtx* pCtx); int32_t stddevFinalize(SqlFunctionCtx* pCtx, SSDataBlock* pBlock); -int32_t stddevPartialFinalize(SqlFunctionCtx* pCtx, SSDataBlock* pBlock); +int32_t stdvarFinalize(SqlFunctionCtx* pCtx, SSDataBlock* pBlock); +int32_t stdPartialFinalize(SqlFunctionCtx* pCtx, SSDataBlock* pBlock); #ifdef BUILD_NO_CALL -int32_t stddevInvertFunction(SqlFunctionCtx* pCtx); +int32_t stdInvertFunction(SqlFunctionCtx* pCtx); #endif -int32_t stddevCombine(SqlFunctionCtx* pDestCtx, SqlFunctionCtx* pSourceCtx); -int32_t getStddevInfoSize(); +int32_t stdCombine(SqlFunctionCtx* pDestCtx, SqlFunctionCtx* pSourceCtx); +int32_t getStdInfoSize(); bool getLeastSQRFuncEnv(struct SFunctionNode* pFunc, SFuncExecEnv* pEnv); int32_t leastSQRFunctionSetup(SqlFunctionCtx* pCtx, SResultRowEntryInfo* pResultInfo); diff --git a/source/libs/function/src/builtins.c b/source/libs/function/src/builtins.c index 8c809a5052..edb25d12c2 100644 --- a/source/libs/function/src/builtins.c +++ b/source/libs/function/src/builtins.c @@ -247,7 +247,7 @@ static int32_t addTimezoneParam(SNodeList* pList) { return TSDB_CODE_SUCCESS; } -static int32_t addDbPrecisonParam(SNodeList** pList, uint8_t precision) { +static int32_t addUint8Param(SNodeList** pList, uint8_t param) { SValueNode* pVal = NULL; int32_t code = nodesMakeNode(QUERY_NODE_VALUE, (SNode**)&pVal); if (pVal == NULL) { @@ -259,9 +259,9 @@ static int32_t addDbPrecisonParam(SNodeList** pList, uint8_t precision) { pVal->notReserved = true; pVal->node.resType.type = TSDB_DATA_TYPE_TINYINT; pVal->node.resType.bytes = tDataTypes[TSDB_DATA_TYPE_TINYINT].bytes; - pVal->node.resType.precision = precision; - pVal->datum.i = (int64_t)precision; - pVal->typeData = (int64_t)precision; + pVal->node.resType.precision = param; + pVal->datum.i = (int64_t)param; + pVal->typeData = (int64_t)param; code = nodesListMakeAppend(pList, (SNode*)pVal); if (TSDB_CODE_SUCCESS != code) { @@ -493,7 +493,7 @@ static int32_t translateAvgStateMerge(SFunctionNode* pFunc, char* pErrBuf, int32 return TSDB_CODE_SUCCESS; } -static int32_t translateStddevPartial(SFunctionNode* pFunc, char* pErrBuf, int32_t len) { +static int32_t translateStdPartial(SFunctionNode* pFunc, char* pErrBuf, int32_t len) { if (1 != LIST_LENGTH(pFunc->pParameterList)) { return invaildFuncParaNumErrMsg(pErrBuf, len, pFunc->functionName); } @@ -503,11 +503,11 @@ static int32_t translateStddevPartial(SFunctionNode* pFunc, char* pErrBuf, int32 return invaildFuncParaTypeErrMsg(pErrBuf, len, pFunc->functionName); } - pFunc->node.resType = (SDataType){.bytes = getStddevInfoSize() + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_BINARY}; + pFunc->node.resType = (SDataType){.bytes = getStdInfoSize() + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_BINARY}; return TSDB_CODE_SUCCESS; } -static int32_t translateStddevMerge(SFunctionNode* pFunc, char* pErrBuf, int32_t len) { +static int32_t translateStdMerge(SFunctionNode* pFunc, char* pErrBuf, int32_t len) { if (1 != LIST_LENGTH(pFunc->pParameterList)) { return invaildFuncParaNumErrMsg(pErrBuf, len, pFunc->functionName); } @@ -522,7 +522,7 @@ static int32_t translateStddevMerge(SFunctionNode* pFunc, char* pErrBuf, int32_t return TSDB_CODE_SUCCESS; } -static int32_t translateStddevState(SFunctionNode* pFunc, char* pErrBuf, int32_t len) { +static int32_t translateStdState(SFunctionNode* pFunc, char* pErrBuf, int32_t len) { if (1 != LIST_LENGTH(pFunc->pParameterList)) { return invaildFuncParaNumErrMsg(pErrBuf, len, pFunc->functionName); } @@ -532,11 +532,11 @@ static int32_t translateStddevState(SFunctionNode* pFunc, char* pErrBuf, int32_t return invaildFuncParaTypeErrMsg(pErrBuf, len, pFunc->functionName); } - pFunc->node.resType = (SDataType){.bytes = getStddevInfoSize() + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_BINARY}; + pFunc->node.resType = (SDataType){.bytes = getStdInfoSize() + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_BINARY}; return TSDB_CODE_SUCCESS; } -static int32_t translateStddevStateMerge(SFunctionNode* pFunc, char* pErrBuf, int32_t len) { +static int32_t translateStdStateMerge(SFunctionNode* pFunc, char* pErrBuf, int32_t len) { if (1 != LIST_LENGTH(pFunc->pParameterList)) { return invaildFuncParaNumErrMsg(pErrBuf, len, pFunc->functionName); } @@ -546,7 +546,7 @@ static int32_t translateStddevStateMerge(SFunctionNode* pFunc, char* pErrBuf, in return invaildFuncParaTypeErrMsg(pErrBuf, len, pFunc->functionName); } - pFunc->node.resType = (SDataType){.bytes = getStddevInfoSize() + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_BINARY}; + pFunc->node.resType = (SDataType){.bytes = getStdInfoSize() + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_BINARY}; return TSDB_CODE_SUCCESS; } @@ -563,7 +563,7 @@ static int32_t translateNowToday(SFunctionNode* pFunc, char* pErrBuf, int32_t le // add database precision as param uint8_t dbPrec = pFunc->node.resType.precision; - int32_t code = addDbPrecisonParam(&pFunc->pParameterList, dbPrec); + int32_t code = addUint8Param(&pFunc->pParameterList, dbPrec); if (code != TSDB_CODE_SUCCESS) { return code; } @@ -573,6 +573,53 @@ static int32_t translateNowToday(SFunctionNode* pFunc, char* pErrBuf, int32_t le return TSDB_CODE_SUCCESS; } +static int32_t translatePi(SFunctionNode* pFunc, char* pErrBuf, int32_t len) { + pFunc->node.resType = + (SDataType){.bytes = tDataTypes[TSDB_DATA_TYPE_DOUBLE].bytes, .type = TSDB_DATA_TYPE_DOUBLE}; + return TSDB_CODE_SUCCESS; +} + +static int32_t translateRound(SFunctionNode* pFunc, char* pErrBuf, int32_t len) { + if (2 != LIST_LENGTH(pFunc->pParameterList) && 1 != LIST_LENGTH(pFunc->pParameterList)) { + return invaildFuncParaNumErrMsg(pErrBuf, len, pFunc->functionName); + } + + uint8_t paraType = getSDataTypeFromNode(nodesListGetNode(pFunc->pParameterList, 0))->type; + if (!IS_NUMERIC_TYPE(paraType) && !IS_NULL_TYPE(paraType)) { + return invaildFuncParaTypeErrMsg(pErrBuf, len, pFunc->functionName); + } else if (IS_NULL_TYPE(paraType)) { + paraType = TSDB_DATA_TYPE_BIGINT; + } + + if (2 == LIST_LENGTH(pFunc->pParameterList)) { + uint8_t paraType2 = getSDataTypeFromNode(nodesListGetNode(pFunc->pParameterList, 1))->type; + if (!IS_NUMERIC_TYPE(paraType2) && !IS_NULL_TYPE(paraType2)) { + return invaildFuncParaTypeErrMsg(pErrBuf, len, pFunc->functionName); + } + } + pFunc->node.resType = (SDataType){.bytes = tDataTypes[paraType].bytes, .type = paraType}; + return TSDB_CODE_SUCCESS; +} + +static int32_t translateTrunc(SFunctionNode* pFunc, char* pErrBuf, int32_t len) { + if (2 != LIST_LENGTH(pFunc->pParameterList)) { + return invaildFuncParaNumErrMsg(pErrBuf, len, pFunc->functionName); + } + + uint8_t paraType = getSDataTypeFromNode(nodesListGetNode(pFunc->pParameterList, 0))->type; + if (!IS_NUMERIC_TYPE(paraType) && !IS_NULL_TYPE(paraType)) { + return invaildFuncParaTypeErrMsg(pErrBuf, len, pFunc->functionName); + } + + uint8_t paraType2 = getSDataTypeFromNode(nodesListGetNode(pFunc->pParameterList, 1))->type; + if (!IS_NUMERIC_TYPE(paraType2) && !IS_NULL_TYPE(paraType2)) { + return invaildFuncParaTypeErrMsg(pErrBuf, len, pFunc->functionName); + } + + pFunc->node.resType = (SDataType){.bytes = tDataTypes[paraType].bytes, .type = paraType}; + return TSDB_CODE_SUCCESS; +} + static int32_t translateTimePseudoColumn(SFunctionNode* pFunc, char* pErrBuf, int32_t len) { // pseudo column do not need to check parameters @@ -1745,7 +1792,7 @@ static int32_t translateIrate(SFunctionNode* pFunc, char* pErrBuf, int32_t len) // add database precision as param uint8_t dbPrec = pFunc->node.resType.precision; - int32_t code = addDbPrecisonParam(&pFunc->pParameterList, dbPrec); + int32_t code = addUint8Param(&pFunc->pParameterList, dbPrec); if (code != TSDB_CODE_SUCCESS) { return code; } @@ -1776,7 +1823,7 @@ static int32_t translateIrateImpl(SFunctionNode* pFunc, char* pErrBuf, int32_t l // add database precision as param uint8_t dbPrec = pFunc->node.resType.precision; - int32_t code = addDbPrecisonParam(&pFunc->pParameterList, dbPrec); + int32_t code = addUint8Param(&pFunc->pParameterList, dbPrec); if (code != TSDB_CODE_SUCCESS) { return code; } @@ -2032,7 +2079,22 @@ static int32_t translateLength(SFunctionNode* pFunc, char* pErrBuf, int32_t len) return invaildFuncParaNumErrMsg(pErrBuf, len, pFunc->functionName); } - if (!IS_STR_DATA_TYPE(getSDataTypeFromNode(nodesListGetNode(pFunc->pParameterList, 0))->type)) { + uint8_t paraType = getSDataTypeFromNode(nodesListGetNode(pFunc->pParameterList, 0))->type; + if (!IS_STR_DATA_TYPE(paraType) && !IS_NULL_TYPE(paraType)) { + return invaildFuncParaTypeErrMsg(pErrBuf, len, pFunc->functionName); + } + + pFunc->node.resType = (SDataType){.bytes = tDataTypes[TSDB_DATA_TYPE_BIGINT].bytes, .type = TSDB_DATA_TYPE_BIGINT}; + return TSDB_CODE_SUCCESS; +} + +static int32_t translateCharLength(SFunctionNode* pFunc, char* pErrBuf, int32_t len) { + if (1 != LIST_LENGTH(pFunc->pParameterList)) { + return invaildFuncParaNumErrMsg(pErrBuf, len, pFunc->functionName); + } + + uint8_t paraType = getSDataTypeFromNode(nodesListGetNode(pFunc->pParameterList, 0))->type; + if (paraType == TSDB_DATA_TYPE_VARBINARY || (!IS_STR_DATA_TYPE(paraType) && !IS_NULL_TYPE(paraType))) { return invaildFuncParaTypeErrMsg(pErrBuf, len, pFunc->functionName); } @@ -2124,31 +2186,182 @@ static int32_t translateSubstr(SFunctionNode* pFunc, char* pErrBuf, int32_t len) uint8_t para0Type = pPara0->resType.type; uint8_t para1Type = pPara1->resType.type; - if (TSDB_DATA_TYPE_VARBINARY == para0Type || !IS_STR_DATA_TYPE(para0Type) || !IS_INTEGER_TYPE(para1Type)) { + if (TSDB_DATA_TYPE_VARBINARY == para0Type || + (!IS_STR_DATA_TYPE(para0Type) && !IS_NULL_TYPE(para0Type)) || + (!IS_INTEGER_TYPE(para1Type) && !IS_NULL_TYPE(para1Type))) { return invaildFuncParaTypeErrMsg(pErrBuf, len, pFunc->functionName); } - if (((SValueNode*)pPara1)->datum.i == 0) { - return invaildFuncParaValueErrMsg(pErrBuf, len, pFunc->functionName); - } - if (3 == numOfParams) { SExprNode* pPara2 = (SExprNode*)nodesListGetNode(pFunc->pParameterList, 2); uint8_t para2Type = pPara2->resType.type; - if (!IS_INTEGER_TYPE(para2Type)) { + if (!IS_INTEGER_TYPE(para2Type) && !IS_NULL_TYPE(para2Type)) { return invaildFuncParaTypeErrMsg(pErrBuf, len, pFunc->functionName); } int64_t v = ((SValueNode*)pPara2)->datum.i; - if (v < 0) { - return invaildFuncParaValueErrMsg(pErrBuf, len, pFunc->functionName); - } } pFunc->node.resType = (SDataType){.bytes = pPara0->resType.bytes, .type = pPara0->resType.type}; return TSDB_CODE_SUCCESS; } +static int32_t translateSubstrIdx(SFunctionNode* pFunc, char* pErrBuf, int32_t len) { + if (3 != LIST_LENGTH(pFunc->pParameterList)) { + return invaildFuncParaNumErrMsg(pErrBuf, len, pFunc->functionName); + } + + SExprNode* pPara0 = (SExprNode*)nodesListGetNode(pFunc->pParameterList, 0); + SExprNode* pPara1 = (SExprNode*)nodesListGetNode(pFunc->pParameterList, 1); + SExprNode* pPara2 = (SExprNode*)nodesListGetNode(pFunc->pParameterList, 2); + + uint8_t para0Type = pPara0->resType.type; + uint8_t para1Type = pPara1->resType.type; + uint8_t para2Type = pPara2->resType.type; + if (TSDB_DATA_TYPE_VARBINARY == para0Type || (!IS_STR_DATA_TYPE(para0Type) && !IS_NULL_TYPE(para0Type)) || + TSDB_DATA_TYPE_VARBINARY == para1Type || (!IS_STR_DATA_TYPE(para1Type) && !IS_NULL_TYPE(para1Type)) || + (!IS_INTEGER_TYPE(para2Type) && !IS_NULL_TYPE(para2Type))) { + return invaildFuncParaTypeErrMsg(pErrBuf, len, pFunc->functionName); + } + + pFunc->node.resType = (SDataType){.bytes = pPara0->resType.bytes, .type = pPara0->resType.type}; + return TSDB_CODE_SUCCESS; +} + +static int32_t translateChar(SFunctionNode* pFunc, char* pErrBuf, int32_t len) { + SNode *node; + FOREACH(node, pFunc->pParameterList) { + uint8_t paraType = getSDataTypeFromNode(node)->type; + if (paraType == TSDB_DATA_TYPE_VARBINARY || + (!IS_STR_DATA_TYPE(paraType) && !IS_NUMERIC_TYPE(paraType) && !IS_NULL_TYPE(paraType))) { + return invaildFuncParaTypeErrMsg(pErrBuf, len, pFunc->functionName); + } + } + + int32_t numOfParams = LIST_LENGTH(pFunc->pParameterList); + pFunc->node.resType = (SDataType){.bytes = 4 * numOfParams + 2, .type = TSDB_DATA_TYPE_VARCHAR}; + return TSDB_CODE_SUCCESS; +} + +static int32_t translateAscii(SFunctionNode* pFunc, char* pErrBuf, int32_t len) { + if (1 != LIST_LENGTH(pFunc->pParameterList)) { + return invaildFuncParaNumErrMsg(pErrBuf, len, pFunc->functionName); + } + + uint8_t paraType = getSDataTypeFromNode(nodesListGetNode(pFunc->pParameterList, 0))->type; + if (paraType == TSDB_DATA_TYPE_VARBINARY || + (!IS_STR_DATA_TYPE(paraType) && !IS_NULL_TYPE(paraType))) { + return invaildFuncParaTypeErrMsg(pErrBuf, len, pFunc->functionName); + } + + pFunc->node.resType = (SDataType){.bytes = tDataTypes[TSDB_DATA_TYPE_UTINYINT].bytes, .type = TSDB_DATA_TYPE_UTINYINT}; + return TSDB_CODE_SUCCESS; +} + +static int32_t translatePosition(SFunctionNode* pFunc, char* pErrBuf, int32_t len) { + if (2 != LIST_LENGTH(pFunc->pParameterList)) { + return invaildFuncParaNumErrMsg(pErrBuf, len, pFunc->functionName); + } + + uint8_t para0Type = getSDataTypeFromNode(nodesListGetNode(pFunc->pParameterList, 0))->type; + if (para0Type == TSDB_DATA_TYPE_VARBINARY || + (!IS_STR_DATA_TYPE(para0Type) && !IS_NULL_TYPE(para0Type))) { + return invaildFuncParaTypeErrMsg(pErrBuf, len, pFunc->functionName); + } + + uint8_t para1Type = getSDataTypeFromNode(nodesListGetNode(pFunc->pParameterList, 1))->type; + if (para1Type == TSDB_DATA_TYPE_VARBINARY || + (!IS_STR_DATA_TYPE(para1Type) && !IS_NULL_TYPE(para1Type))) { + return invaildFuncParaTypeErrMsg(pErrBuf, len, pFunc->functionName); + } + + pFunc->node.resType = (SDataType){.bytes = tDataTypes[TSDB_DATA_TYPE_BIGINT].bytes, .type = TSDB_DATA_TYPE_BIGINT}; + return TSDB_CODE_SUCCESS; +} + +static int32_t translateTrim(SFunctionNode* pFunc, char* pErrBuf, int32_t len) { + if (2 != LIST_LENGTH(pFunc->pParameterList) && 1 != LIST_LENGTH(pFunc->pParameterList)) { + return invaildFuncParaNumErrMsg(pErrBuf, len, pFunc->functionName); + } + + uint8_t para0Type = getSDataTypeFromNode(nodesListGetNode(pFunc->pParameterList, 0))->type; + if (para0Type == TSDB_DATA_TYPE_VARBINARY || + (!IS_STR_DATA_TYPE(para0Type) && !IS_NULL_TYPE(para0Type))) { + return invaildFuncParaTypeErrMsg(pErrBuf, len, pFunc->functionName); + } + + int32_t resLen = getSDataTypeFromNode(nodesListGetNode(pFunc->pParameterList, 0))->bytes; + uint8_t type = para0Type; + + if (2 == LIST_LENGTH(pFunc->pParameterList)) { + uint8_t para1Type = getSDataTypeFromNode(nodesListGetNode(pFunc->pParameterList, 1))->type; + if (para1Type == TSDB_DATA_TYPE_VARBINARY || + (!IS_STR_DATA_TYPE(para1Type) && !IS_NULL_TYPE(para1Type))) { + return invaildFuncParaTypeErrMsg(pErrBuf, len, pFunc->functionName); + } + resLen = getSDataTypeFromNode(nodesListGetNode(pFunc->pParameterList, 1))->bytes; + type = para1Type; + } + if (type == TSDB_DATA_TYPE_NCHAR) { + resLen *= TSDB_NCHAR_SIZE; + } + uint8_t trimType = pFunc->trimType; + int32_t code = addUint8Param(&pFunc->pParameterList, trimType); + if (code != TSDB_CODE_SUCCESS) { + return code; + } + pFunc->node.resType = (SDataType){.bytes = resLen, .type = type}; + return TSDB_CODE_SUCCESS; +} + +static int32_t translateReplace(SFunctionNode* pFunc, char* pErrBuf, int32_t len) { + if (3 != LIST_LENGTH(pFunc->pParameterList)) { + return invaildFuncParaNumErrMsg(pErrBuf, len, pFunc->functionName); + } + + for (int32_t i = 0; i < 3; ++i) { + uint8_t paraType = getSDataTypeFromNode(nodesListGetNode(pFunc->pParameterList, i))->type; + if (paraType == TSDB_DATA_TYPE_VARBINARY || + (!IS_STR_DATA_TYPE(paraType) && !IS_NULL_TYPE(paraType))) { + return invaildFuncParaTypeErrMsg(pErrBuf, len, pFunc->functionName); + } + } + + uint8_t type = getSDataTypeFromNode(nodesListGetNode(pFunc->pParameterList, 0))->type; + int32_t orgLen = getSDataTypeFromNode(nodesListGetNode(pFunc->pParameterList, 0))->bytes; + int32_t fromLen = getSDataTypeFromNode(nodesListGetNode(pFunc->pParameterList, 1))->bytes; + int32_t toLen = getSDataTypeFromNode(nodesListGetNode(pFunc->pParameterList, 2))->bytes; + + int32_t resLen = orgLen + orgLen / fromLen * (toLen - fromLen); + pFunc->node.resType = (SDataType){.bytes = resLen, .type = type}; + return TSDB_CODE_SUCCESS; +} + +static int32_t translateRepeat(SFunctionNode* pFunc, char* pErrBuf, int32_t len) { + if (2 != LIST_LENGTH(pFunc->pParameterList)) { + return invaildFuncParaNumErrMsg(pErrBuf, len, pFunc->functionName); + } + + uint8_t para0Type = getSDataTypeFromNode(nodesListGetNode(pFunc->pParameterList, 0))->type; + if (para0Type == TSDB_DATA_TYPE_VARBINARY || + (!IS_STR_DATA_TYPE(para0Type) && !IS_NULL_TYPE(para0Type))) { + return invaildFuncParaTypeErrMsg(pErrBuf, len, pFunc->functionName); + } + + uint8_t para1Type = getSDataTypeFromNode(nodesListGetNode(pFunc->pParameterList, 1))->type; + if (!IS_INTEGER_TYPE(para1Type) && !IS_NULL_TYPE(para1Type)) { + return invaildFuncParaTypeErrMsg(pErrBuf, len, pFunc->functionName); + } + + uint8_t type = getSDataTypeFromNode(nodesListGetNode(pFunc->pParameterList, 0))->type; + int32_t orgLen = getSDataTypeFromNode(nodesListGetNode(pFunc->pParameterList, 0))->bytes; + int32_t count = TMAX((int32_t)((SValueNode*)nodesListGetNode(pFunc->pParameterList, 1))->datum.i, 1); + + int32_t resLen = orgLen * count; + pFunc->node.resType = (SDataType){.bytes = resLen, .type = type}; + return TSDB_CODE_SUCCESS; +} + static int32_t translateCast(SFunctionNode* pFunc, char* pErrBuf, int32_t len) { // The number of parameters has been limited by the syntax definition @@ -2180,7 +2393,7 @@ static int32_t translateCast(SFunctionNode* pFunc, char* pErrBuf, int32_t len) { // add database precision as param uint8_t dbPrec = pFunc->node.resType.precision; - int32_t code = addDbPrecisonParam(&pFunc->pParameterList, dbPrec); + int32_t code = addUint8Param(&pFunc->pParameterList, dbPrec); if (code != TSDB_CODE_SUCCESS) { return code; } @@ -2251,7 +2464,7 @@ static int32_t translateToUnixtimestamp(SFunctionNode* pFunc, char* pErrBuf, int // add database precision as param uint8_t dbPrec = pFunc->node.resType.precision; - int32_t code = addDbPrecisonParam(&pFunc->pParameterList, dbPrec); + int32_t code = addUint8Param(&pFunc->pParameterList, dbPrec); if (code != TSDB_CODE_SUCCESS) { return code; } @@ -2325,7 +2538,7 @@ static int32_t translateTimeTruncate(SFunctionNode* pFunc, char* pErrBuf, int32_ // add database precision as param - code = addDbPrecisonParam(&pFunc->pParameterList, dbPrec); + code = addUint8Param(&pFunc->pParameterList, dbPrec); if (code != TSDB_CODE_SUCCESS) { return code; } @@ -2375,7 +2588,7 @@ static int32_t translateTimeDiff(SFunctionNode* pFunc, char* pErrBuf, int32_t le } } - int32_t code = addDbPrecisonParam(&pFunc->pParameterList, dbPrec); + int32_t code = addUint8Param(&pFunc->pParameterList, dbPrec); if (code != TSDB_CODE_SUCCESS) { return code; } @@ -2384,6 +2597,91 @@ static int32_t translateTimeDiff(SFunctionNode* pFunc, char* pErrBuf, int32_t le return TSDB_CODE_SUCCESS; } +static int32_t translateWeekday(SFunctionNode* pFunc, char* pErrBuf, int32_t len) { + if (1 != LIST_LENGTH(pFunc->pParameterList)) { + return invaildFuncParaNumErrMsg(pErrBuf, len, pFunc->functionName); + } + + uint8_t para1Type = getSDataTypeFromNode(nodesListGetNode(pFunc->pParameterList, 0))->type; + if ((!IS_STR_DATA_TYPE(para1Type) && !IS_INTEGER_TYPE(para1Type) && + !IS_TIMESTAMP_TYPE(para1Type) && !IS_NULL_TYPE(para1Type))) { + return invaildFuncParaTypeErrMsg(pErrBuf, len, pFunc->functionName); + } + + // add database precision as param + uint8_t dbPrec = pFunc->node.resType.precision; + + int32_t code = addUint8Param(&pFunc->pParameterList, dbPrec); + if (code != TSDB_CODE_SUCCESS) { + return code; + } + + pFunc->node.resType = + (SDataType){.bytes = tDataTypes[TSDB_DATA_TYPE_BIGINT].bytes, .type = TSDB_DATA_TYPE_BIGINT}; + return TSDB_CODE_SUCCESS; +} + +static int32_t translateWeek(SFunctionNode* pFunc, char* pErrBuf, int32_t len) { + if (1 != LIST_LENGTH(pFunc->pParameterList) && 2 != LIST_LENGTH(pFunc->pParameterList)) { + return invaildFuncParaNumErrMsg(pErrBuf, len, pFunc->functionName); + } + + uint8_t para1Type = getSDataTypeFromNode(nodesListGetNode(pFunc->pParameterList, 0))->type; + if ((!IS_STR_DATA_TYPE(para1Type) && !IS_INTEGER_TYPE(para1Type) && + !IS_TIMESTAMP_TYPE(para1Type)) && !IS_NULL_TYPE(para1Type)) { + return invaildFuncParaTypeErrMsg(pErrBuf, len, pFunc->functionName); + } + + if (2 == LIST_LENGTH(pFunc->pParameterList)) { + uint8_t para2Type = getSDataTypeFromNode(nodesListGetNode(pFunc->pParameterList, 1))->type; + if (!IS_INTEGER_TYPE(para2Type) && !IS_NULL_TYPE(para2Type)) { + return invaildFuncParaTypeErrMsg(pErrBuf, len, pFunc->functionName); + } + if (IS_INTEGER_TYPE(para2Type)) { + SValueNode* pValue = (SValueNode*)nodesListGetNode(pFunc->pParameterList, 1); + if (pValue->datum.i < 0 || pValue->datum.i > 7) { + return invaildFuncParaValueErrMsg(pErrBuf, len, pFunc->functionName); + } + } + } + + // add database precision as param + uint8_t dbPrec = pFunc->node.resType.precision; + + int32_t code = addUint8Param(&pFunc->pParameterList, dbPrec); + if (code != TSDB_CODE_SUCCESS) { + return code; + } + + pFunc->node.resType = + (SDataType){.bytes = tDataTypes[TSDB_DATA_TYPE_BIGINT].bytes, .type = TSDB_DATA_TYPE_BIGINT}; + return TSDB_CODE_SUCCESS; +} + +static int32_t translateWeekofyear(SFunctionNode* pFunc, char* pErrBuf, int32_t len) { + if (1 != LIST_LENGTH(pFunc->pParameterList)) { + return invaildFuncParaNumErrMsg(pErrBuf, len, pFunc->functionName); + } + + uint8_t para1Type = getSDataTypeFromNode(nodesListGetNode(pFunc->pParameterList, 0))->type; + if ((!IS_STR_DATA_TYPE(para1Type) && !IS_INTEGER_TYPE(para1Type) && + !IS_TIMESTAMP_TYPE(para1Type)) && !IS_NULL_TYPE(para1Type)) { + return invaildFuncParaTypeErrMsg(pErrBuf, len, pFunc->functionName); + } + + // add database precision as param + uint8_t dbPrec = pFunc->node.resType.precision; + + int32_t code = addUint8Param(&pFunc->pParameterList, dbPrec); + if (code != TSDB_CODE_SUCCESS) { + return code; + } + + pFunc->node.resType = + (SDataType){.bytes = tDataTypes[TSDB_DATA_TYPE_BIGINT].bytes, .type = TSDB_DATA_TYPE_BIGINT}; + return TSDB_CODE_SUCCESS; +} + static int32_t translateToJson(SFunctionNode* pFunc, char* pErrBuf, int32_t len) { if (1 != LIST_LENGTH(pFunc->pParameterList)) { return invaildFuncParaNumErrMsg(pErrBuf, len, pFunc->functionName); @@ -2618,54 +2916,106 @@ const SBuiltinFuncDefinition funcMgtBuiltins[] = { .pStateFunc = "max", .pMergeFunc = "max" }, + { + .name = "stddev_pop", + .type = FUNCTION_TYPE_STDDEV, + .classification = FUNC_MGT_AGG_FUNC | FUNC_MGT_TSMA_FUNC, + .translateFunc = translateInNumOutDou, + .getEnvFunc = getStdFuncEnv, + .initFunc = stdFunctionSetup, + .processFunc = stdFunction, + .sprocessFunc = stdScalarFunction, + .finalizeFunc = stddevFinalize, + #ifdef BUILD_NO_CALL + .invertFunc = stdInvertFunction, + #endif + .combineFunc = stdCombine, + .pPartialFunc = "_std_partial", + .pStateFunc = "_std_state", + .pMergeFunc = "_stddev_merge" + }, { .name = "stddev", .type = FUNCTION_TYPE_STDDEV, .classification = FUNC_MGT_AGG_FUNC | FUNC_MGT_TSMA_FUNC, .translateFunc = translateInNumOutDou, - .getEnvFunc = getStddevFuncEnv, - .initFunc = stddevFunctionSetup, - .processFunc = stddevFunction, - .sprocessFunc = stddevScalarFunction, + .getEnvFunc = getStdFuncEnv, + .initFunc = stdFunctionSetup, + .processFunc = stdFunction, + .sprocessFunc = stdScalarFunction, .finalizeFunc = stddevFinalize, #ifdef BUILD_NO_CALL - .invertFunc = stddevInvertFunction, + .invertFunc = stdInvertFunction, #endif - .combineFunc = stddevCombine, - .pPartialFunc = "_stddev_partial", - .pStateFunc = "_stddev_state", + .combineFunc = stdCombine, + .pPartialFunc = "_std_partial", + .pStateFunc = "_std_state", .pMergeFunc = "_stddev_merge" }, { - .name = "_stddev_partial", - .type = FUNCTION_TYPE_STDDEV_PARTIAL, + .name = "var_pop", + .type = FUNCTION_TYPE_STDVAR, + .classification = FUNC_MGT_AGG_FUNC | FUNC_MGT_TSMA_FUNC, + .translateFunc = translateInNumOutDou, + .getEnvFunc = getStdFuncEnv, + .initFunc = stdFunctionSetup, + .processFunc = stdFunction, + .sprocessFunc = stdScalarFunction, + .finalizeFunc = stdvarFinalize, + #ifdef BUILD_NO_CALL + .invertFunc = stdInvertFunction, + #endif + .combineFunc = stdCombine, + .pPartialFunc = "_std_partial", + .pStateFunc = "_std_state", + .pMergeFunc = "_stdvar_merge" + }, + { + .name = "_std_partial", + .type = FUNCTION_TYPE_STD_PARTIAL, .classification = FUNC_MGT_AGG_FUNC, - .translateFunc = translateStddevPartial, - .getEnvFunc = getStddevFuncEnv, - .initFunc = stddevFunctionSetup, - .processFunc = stddevFunction, - .finalizeFunc = stddevPartialFinalize, + .translateFunc = translateStdPartial, + .getEnvFunc = getStdFuncEnv, + .initFunc = stdFunctionSetup, + .processFunc = stdFunction, + .finalizeFunc = stdPartialFinalize, #ifdef BUILD_NO_CALL - .invertFunc = stddevInvertFunction, + .invertFunc = stdInvertFunction, #endif - .combineFunc = stddevCombine, + .combineFunc = stdCombine, }, { .name = "_stddev_merge", .type = FUNCTION_TYPE_STDDEV_MERGE, .classification = FUNC_MGT_AGG_FUNC, - .translateFunc = translateStddevMerge, - .getEnvFunc = getStddevFuncEnv, - .initFunc = stddevFunctionSetup, - .processFunc = stddevFunctionMerge, + .translateFunc = translateStdMerge, + .getEnvFunc = getStdFuncEnv, + .initFunc = stdFunctionSetup, + .processFunc = stdFunctionMerge, .finalizeFunc = stddevFinalize, #ifdef BUILD_NO_CALL - .invertFunc = stddevInvertFunction, + .invertFunc = stdInvertFunction, #endif - .combineFunc = stddevCombine, - .pPartialFunc = "_stddev_state_merge", + .combineFunc = stdCombine, + .pPartialFunc = "_std_state_merge", .pMergeFunc = "_stddev_merge", }, + { + .name = "_stdvar_merge", + .type = FUNCTION_TYPE_STDVAR_MERGE, + .classification = FUNC_MGT_AGG_FUNC, + .translateFunc = translateStdMerge, + .getEnvFunc = getStdFuncEnv, + .initFunc = stdFunctionSetup, + .processFunc = stdFunctionMerge, + .finalizeFunc = stdvarFinalize, + #ifdef BUILD_NO_CALL + .invertFunc = stdInvertFunction, + #endif + .combineFunc = stdCombine, + .pPartialFunc = "_std_state_merge", + .pMergeFunc = "_stdvar_merge", + }, { .name = "leastsquares", .type = FUNCTION_TYPE_LEASTSQUARES, @@ -3409,7 +3759,7 @@ const SBuiltinFuncDefinition funcMgtBuiltins[] = { .name = "round", .type = FUNCTION_TYPE_ROUND, .classification = FUNC_MGT_SCALAR_FUNC, - .translateFunc = translateInOutNum, + .translateFunc = translateRound, .getEnvFunc = NULL, .initFunc = NULL, .sprocessFunc = roundFunction, @@ -3475,6 +3825,96 @@ const SBuiltinFuncDefinition funcMgtBuiltins[] = { .sprocessFunc = atanFunction, .finalizeFunc = NULL }, + { + .name = "pi", + .type = FUNCTION_TYPE_PI, + .classification = FUNC_MGT_SCALAR_FUNC, + .translateFunc = translatePi, + .getEnvFunc = NULL, + .initFunc = NULL, + .sprocessFunc = piFunction, + .finalizeFunc = NULL + }, + { + .name = "exp", + .type = FUNCTION_TYPE_EXP, + .classification = FUNC_MGT_SCALAR_FUNC, + .translateFunc = translateInNumOutDou, + .getEnvFunc = NULL, + .initFunc = NULL, + .sprocessFunc = expFunction, + .finalizeFunc = NULL + }, + { + .name = "ln", + .type = FUNCTION_TYPE_LN, + .classification = FUNC_MGT_SCALAR_FUNC, + .translateFunc = translateInNumOutDou, + .getEnvFunc = NULL, + .initFunc = NULL, + .sprocessFunc = lnFunction, + .finalizeFunc = NULL + }, + { + .name = "mod", + .type = FUNCTION_TYPE_MOD, + .classification = FUNC_MGT_SCALAR_FUNC, + .translateFunc = translateIn2NumOutDou, + .getEnvFunc = NULL, + .initFunc = NULL, + .sprocessFunc = modFunction, + .finalizeFunc = NULL + }, + { + .name = "sign", + .type = FUNCTION_TYPE_SIGN, + .classification = FUNC_MGT_SCALAR_FUNC, + .translateFunc = translateInOutNum, + .getEnvFunc = NULL, + .initFunc = NULL, + .sprocessFunc = signFunction, + .finalizeFunc = NULL + }, + { + .name = "degrees", + .type = FUNCTION_TYPE_DEGREES, + .classification = FUNC_MGT_SCALAR_FUNC, + .translateFunc = translateInNumOutDou, + .getEnvFunc = NULL, + .initFunc = NULL, + .sprocessFunc = degreesFunction, + .finalizeFunc = NULL + }, + { + .name = "radians", + .type = FUNCTION_TYPE_RADIANS, + .classification = FUNC_MGT_SCALAR_FUNC, + .translateFunc = translateInNumOutDou, + .getEnvFunc = NULL, + .initFunc = NULL, + .sprocessFunc = radiansFunction, + .finalizeFunc = NULL + }, + { + .name = "truncate", + .type = FUNCTION_TYPE_TRUNCATE, + .classification = FUNC_MGT_SCALAR_FUNC, + .translateFunc = translateTrunc, + .getEnvFunc = NULL, + .initFunc = NULL, + .sprocessFunc = truncFunction, + .finalizeFunc = NULL + }, + { + .name = "trunc", + .type = FUNCTION_TYPE_TRUNCATE, + .classification = FUNC_MGT_SCALAR_FUNC, + .translateFunc = translateTrunc, + .getEnvFunc = NULL, + .initFunc = NULL, + .sprocessFunc = truncFunction, + .finalizeFunc = NULL + }, { .name = "length", .type = FUNCTION_TYPE_LENGTH, @@ -3489,7 +3929,7 @@ const SBuiltinFuncDefinition funcMgtBuiltins[] = { .name = "char_length", .type = FUNCTION_TYPE_CHAR_LENGTH, .classification = FUNC_MGT_SCALAR_FUNC | FUNC_MGT_STRING_FUNC, - .translateFunc = translateLength, + .translateFunc = translateCharLength, .getEnvFunc = NULL, .initFunc = NULL, .sprocessFunc = charLengthFunction, @@ -3565,6 +4005,26 @@ const SBuiltinFuncDefinition funcMgtBuiltins[] = { .sprocessFunc = substrFunction, .finalizeFunc = NULL }, + { + .name = "substring", + .type = FUNCTION_TYPE_SUBSTR, + .classification = FUNC_MGT_SCALAR_FUNC | FUNC_MGT_STRING_FUNC, + .translateFunc = translateSubstr, + .getEnvFunc = NULL, + .initFunc = NULL, + .sprocessFunc = substrFunction, + .finalizeFunc = NULL + }, + { + .name = "substring_index", + .type = FUNCTION_TYPE_SUBSTR_IDX, + .classification = FUNC_MGT_SCALAR_FUNC | FUNC_MGT_STRING_FUNC, + .translateFunc = translateSubstrIdx, + .getEnvFunc = NULL, + .initFunc = NULL, + .sprocessFunc = substrIdxFunction, + .finalizeFunc = NULL + }, { .name = "cast", .type = FUNCTION_TYPE_CAST, @@ -3575,6 +4035,66 @@ const SBuiltinFuncDefinition funcMgtBuiltins[] = { .sprocessFunc = castFunction, .finalizeFunc = NULL }, + { + .name = "char", + .type = FUNCTION_TYPE_CHAR, + .classification = FUNC_MGT_SCALAR_FUNC | FUNC_MGT_STRING_FUNC, + .translateFunc = translateChar, + .getEnvFunc = NULL, + .initFunc = NULL, + .sprocessFunc = charFunction, + .finalizeFunc = NULL + }, + { + .name = "ascii", + .type = FUNCTION_TYPE_ASCII, + .classification = FUNC_MGT_SCALAR_FUNC | FUNC_MGT_STRING_FUNC, + .translateFunc = translateAscii, + .getEnvFunc = NULL, + .initFunc = NULL, + .sprocessFunc = asciiFunction, + .finalizeFunc = NULL + }, + { + .name = "position", + .type = FUNCTION_TYPE_POSITION, + .classification = FUNC_MGT_SCALAR_FUNC | FUNC_MGT_STRING_FUNC, + .translateFunc = translatePosition, + .getEnvFunc = NULL, + .initFunc = NULL, + .sprocessFunc = positionFunction, + .finalizeFunc = NULL + }, + { + .name = "trim", + .type = FUNCTION_TYPE_TRIM, + .classification = FUNC_MGT_SCALAR_FUNC | FUNC_MGT_STRING_FUNC, + .translateFunc = translateTrim, + .getEnvFunc = NULL, + .initFunc = NULL, + .sprocessFunc = trimFunction, + .finalizeFunc = NULL + }, + { + .name = "replace", + .type = FUNCTION_TYPE_REPLACE, + .classification = FUNC_MGT_SCALAR_FUNC | FUNC_MGT_STRING_FUNC, + .translateFunc = translateReplace, + .getEnvFunc = NULL, + .initFunc = NULL, + .sprocessFunc = replaceFunction, + .finalizeFunc = NULL + }, + { + .name = "repeat", + .type = FUNCTION_TYPE_REPEAT, + .classification = FUNC_MGT_SCALAR_FUNC | FUNC_MGT_STRING_FUNC, + .translateFunc = translateRepeat, + .getEnvFunc = NULL, + .initFunc = NULL, + .sprocessFunc = repeatFunction, + .finalizeFunc = NULL + }, { .name = "to_iso8601", .type = FUNCTION_TYPE_TO_ISO8601, @@ -3645,6 +4165,46 @@ const SBuiltinFuncDefinition funcMgtBuiltins[] = { .sprocessFunc = timezoneFunction, .finalizeFunc = NULL }, + { + .name = "weekday", + .type = FUNCTION_TYPE_WEEKDAY, + .classification = FUNC_MGT_SCALAR_FUNC, + .translateFunc = translateWeekday, + .getEnvFunc = NULL, + .initFunc = NULL, + .sprocessFunc = weekdayFunction, + .finalizeFunc = NULL + }, + { + .name = "dayofweek", + .type = FUNCTION_TYPE_DAYOFWEEK, + .classification = FUNC_MGT_SCALAR_FUNC, + .translateFunc = translateWeekday, + .getEnvFunc = NULL, + .initFunc = NULL, + .sprocessFunc = dayofweekFunction, + .finalizeFunc = NULL + }, + { + .name = "week", + .type = FUNCTION_TYPE_WEEK, + .classification = FUNC_MGT_SCALAR_FUNC, + .translateFunc = translateWeek, + .getEnvFunc = NULL, + .initFunc = NULL, + .sprocessFunc = weekFunction, + .finalizeFunc = NULL + }, + { + .name = "weekofyear", + .type = FUNCTION_TYPE_WEEKOFYEAR, + .classification = FUNC_MGT_SCALAR_FUNC, + .translateFunc = translateWeekofyear, + .getEnvFunc = NULL, + .initFunc = NULL, + .sprocessFunc = weekofyearFunction, + .finalizeFunc = NULL + }, { .name = "tbname", .type = FUNCTION_TYPE_TBNAME, @@ -3998,26 +4558,26 @@ const SBuiltinFuncDefinition funcMgtBuiltins[] = { .finalizeFunc = NULL }, { - .name = "_stddev_state", - .type = FUNCTION_TYPE_STDDEV_STATE, + .name = "_std_state", + .type = FUNCTION_TYPE_STD_STATE, .classification = FUNC_MGT_AGG_FUNC | FUNC_MGT_TSMA_FUNC, - .translateFunc = translateStddevState, - .getEnvFunc = getStddevFuncEnv, - .initFunc = stddevFunctionSetup, - .processFunc = stddevFunction, - .finalizeFunc = stddevPartialFinalize, - .pPartialFunc = "_stddev_partial", - .pMergeFunc = "_stddev_state_merge", + .translateFunc = translateStdState, + .getEnvFunc = getStdFuncEnv, + .initFunc = stdFunctionSetup, + .processFunc = stdFunction, + .finalizeFunc = stdPartialFinalize, + .pPartialFunc = "_std_partial", + .pMergeFunc = "_std_state_merge", }, { - .name = "_stddev_state_merge", - .type = FUNCTION_TYPE_STDDEV_STATE_MERGE, + .name = "_std_state_merge", + .type = FUNCTION_TYPE_STD_STATE_MERGE, .classification = FUNC_MGT_AGG_FUNC | FUNC_MGT_TSMA_FUNC, - .translateFunc = translateStddevStateMerge, - .getEnvFunc = getStddevFuncEnv, - .initFunc = stddevFunctionSetup, - .processFunc = stddevFunctionMerge, - .finalizeFunc = stddevPartialFinalize, + .translateFunc = translateStdStateMerge, + .getEnvFunc = getStdFuncEnv, + .initFunc = stdFunctionSetup, + .processFunc = stdFunctionMerge, + .finalizeFunc = stdPartialFinalize, }, { .name = "_avg_state", diff --git a/source/libs/function/src/builtinsimpl.c b/source/libs/function/src/builtinsimpl.c index 242c68913c..2d664e5d31 100644 --- a/source/libs/function/src/builtinsimpl.c +++ b/source/libs/function/src/builtinsimpl.c @@ -63,7 +63,7 @@ typedef struct STopBotRes { STopBotResItem* pItems; } STopBotRes; -typedef struct SStddevRes { +typedef struct SStdRes { double result; int64_t count; union { @@ -77,7 +77,7 @@ typedef struct SStddevRes { uint64_t usum; }; int16_t type; -} SStddevRes; +} SStdRes; typedef struct SLeastSQRInfo { double matrix[2][3]; @@ -1300,14 +1300,14 @@ int32_t maxCombine(SqlFunctionCtx* pDestCtx, SqlFunctionCtx* pSourceCtx) { return minMaxCombine(pDestCtx, pSourceCtx, 0); } -int32_t getStddevInfoSize() { return (int32_t)sizeof(SStddevRes); } +int32_t getStdInfoSize() { return (int32_t)sizeof(SStdRes); } -bool getStddevFuncEnv(SFunctionNode* pFunc, SFuncExecEnv* pEnv) { - pEnv->calcMemSize = sizeof(SStddevRes); +bool getStdFuncEnv(SFunctionNode* pFunc, SFuncExecEnv* pEnv) { + pEnv->calcMemSize = sizeof(SStdRes); return true; } -int32_t stddevFunctionSetup(SqlFunctionCtx* pCtx, SResultRowEntryInfo* pResultInfo) { +int32_t stdFunctionSetup(SqlFunctionCtx* pCtx, SResultRowEntryInfo* pResultInfo) { if (pResultInfo->initialized) { return TSDB_CODE_SUCCESS; } @@ -1315,20 +1315,20 @@ int32_t stddevFunctionSetup(SqlFunctionCtx* pCtx, SResultRowEntryInfo* pResultIn return TSDB_CODE_FUNC_SETUP_ERROR; } - SStddevRes* pRes = GET_ROWCELL_INTERBUF(pResultInfo); - (void)memset(pRes, 0, sizeof(SStddevRes)); + SStdRes* pRes = GET_ROWCELL_INTERBUF(pResultInfo); + (void)memset(pRes, 0, sizeof(SStdRes)); return TSDB_CODE_SUCCESS; } -int32_t stddevFunction(SqlFunctionCtx* pCtx) { +int32_t stdFunction(SqlFunctionCtx* pCtx) { int32_t numOfElem = 0; // Only the pre-computing information loaded and actual data does not loaded SInputColumnInfoData* pInput = &pCtx->input; int32_t type = pInput->pData[0]->info.type; - SStddevRes* pStddevRes = GET_ROWCELL_INTERBUF(GET_RES_INFO(pCtx)); - pStddevRes->type = type; + SStdRes* pStdRes = GET_ROWCELL_INTERBUF(GET_RES_INFO(pCtx)); + pStdRes->type = type; // computing based on the true data block SColumnInfoData* pCol = pInput->pData[0]; @@ -1350,9 +1350,9 @@ int32_t stddevFunction(SqlFunctionCtx* pCtx) { } numOfElem += 1; - pStddevRes->count += 1; - pStddevRes->isum += plist[i]; - pStddevRes->quadraticISum += plist[i] * plist[i]; + pStdRes->count += 1; + pStdRes->isum += plist[i]; + pStdRes->quadraticISum += plist[i] * plist[i]; } break; @@ -1366,9 +1366,9 @@ int32_t stddevFunction(SqlFunctionCtx* pCtx) { } numOfElem += 1; - pStddevRes->count += 1; - pStddevRes->isum += plist[i]; - pStddevRes->quadraticISum += plist[i] * plist[i]; + pStdRes->count += 1; + pStdRes->isum += plist[i]; + pStdRes->quadraticISum += plist[i] * plist[i]; } break; } @@ -1381,9 +1381,9 @@ int32_t stddevFunction(SqlFunctionCtx* pCtx) { } numOfElem += 1; - pStddevRes->count += 1; - pStddevRes->isum += plist[i]; - pStddevRes->quadraticISum += plist[i] * plist[i]; + pStdRes->count += 1; + pStdRes->isum += plist[i]; + pStdRes->quadraticISum += plist[i] * plist[i]; } break; @@ -1397,9 +1397,9 @@ int32_t stddevFunction(SqlFunctionCtx* pCtx) { } numOfElem += 1; - pStddevRes->count += 1; - pStddevRes->isum += plist[i]; - pStddevRes->quadraticISum += plist[i] * plist[i]; + pStdRes->count += 1; + pStdRes->isum += plist[i]; + pStdRes->quadraticISum += plist[i] * plist[i]; } break; } @@ -1412,9 +1412,9 @@ int32_t stddevFunction(SqlFunctionCtx* pCtx) { } numOfElem += 1; - pStddevRes->count += 1; - pStddevRes->usum += plist[i]; - pStddevRes->quadraticUSum += plist[i] * plist[i]; + pStdRes->count += 1; + pStdRes->usum += plist[i]; + pStdRes->quadraticUSum += plist[i] * plist[i]; } break; @@ -1428,9 +1428,9 @@ int32_t stddevFunction(SqlFunctionCtx* pCtx) { } numOfElem += 1; - pStddevRes->count += 1; - pStddevRes->usum += plist[i]; - pStddevRes->quadraticUSum += plist[i] * plist[i]; + pStdRes->count += 1; + pStdRes->usum += plist[i]; + pStdRes->quadraticUSum += plist[i] * plist[i]; } break; } @@ -1443,9 +1443,9 @@ int32_t stddevFunction(SqlFunctionCtx* pCtx) { } numOfElem += 1; - pStddevRes->count += 1; - pStddevRes->usum += plist[i]; - pStddevRes->quadraticUSum += plist[i] * plist[i]; + pStdRes->count += 1; + pStdRes->usum += plist[i]; + pStdRes->quadraticUSum += plist[i] * plist[i]; } break; @@ -1459,9 +1459,9 @@ int32_t stddevFunction(SqlFunctionCtx* pCtx) { } numOfElem += 1; - pStddevRes->count += 1; - pStddevRes->usum += plist[i]; - pStddevRes->quadraticUSum += plist[i] * plist[i]; + pStdRes->count += 1; + pStdRes->usum += plist[i]; + pStdRes->quadraticUSum += plist[i] * plist[i]; } break; } @@ -1474,9 +1474,9 @@ int32_t stddevFunction(SqlFunctionCtx* pCtx) { } numOfElem += 1; - pStddevRes->count += 1; - pStddevRes->dsum += plist[i]; - pStddevRes->quadraticDSum += plist[i] * plist[i]; + pStdRes->count += 1; + pStdRes->dsum += plist[i]; + pStdRes->quadraticDSum += plist[i] * plist[i]; } break; } @@ -1489,9 +1489,9 @@ int32_t stddevFunction(SqlFunctionCtx* pCtx) { } numOfElem += 1; - pStddevRes->count += 1; - pStddevRes->dsum += plist[i]; - pStddevRes->quadraticDSum += plist[i] * plist[i]; + pStdRes->count += 1; + pStdRes->dsum += plist[i]; + pStdRes->quadraticDSum += plist[i] * plist[i]; } break; } @@ -1506,7 +1506,7 @@ _stddev_over: return TSDB_CODE_SUCCESS; } -static void stddevTransferInfo(SStddevRes* pInput, SStddevRes* pOutput) { +static void stdTransferInfo(SStdRes* pInput, SStdRes* pOutput) { if (IS_NULL_TYPE(pInput->type)) { return; } @@ -1525,7 +1525,7 @@ static void stddevTransferInfo(SStddevRes* pInput, SStddevRes* pOutput) { pOutput->count += pInput->count; } -int32_t stddevFunctionMerge(SqlFunctionCtx* pCtx) { +int32_t stdFunctionMerge(SqlFunctionCtx* pCtx) { SInputColumnInfoData* pInput = &pCtx->input; SColumnInfoData* pCol = pInput->pData[0]; @@ -1538,13 +1538,13 @@ int32_t stddevFunctionMerge(SqlFunctionCtx* pCtx) { return TSDB_CODE_FUNC_FUNTION_PARA_TYPE; } - SStddevRes* pInfo = GET_ROWCELL_INTERBUF(GET_RES_INFO(pCtx)); + SStdRes* pInfo = GET_ROWCELL_INTERBUF(GET_RES_INFO(pCtx)); for (int32_t i = pInput->startRowIndex; i < pInput->startRowIndex + pInput->numOfRows; ++i) { if (colDataIsNull_s(pCol, i)) continue; char* data = colDataGetData(pCol, i); - SStddevRes* pInputInfo = (SStddevRes*)varDataVal(data); - stddevTransferInfo(pInputInfo, pInfo); + SStdRes* pInputInfo = (SStdRes*)varDataVal(data); + stdTransferInfo(pInputInfo, pInfo); } SET_VAL(GET_RES_INFO(pCtx), 1, 1); @@ -1552,14 +1552,14 @@ int32_t stddevFunctionMerge(SqlFunctionCtx* pCtx) { } #ifdef BUILD_NO_CALL -int32_t stddevInvertFunction(SqlFunctionCtx* pCtx) { +int32_t stdInvertFunction(SqlFunctionCtx* pCtx) { int32_t numOfElem = 0; // Only the pre-computing information loaded and actual data does not loaded SInputColumnInfoData* pInput = &pCtx->input; int32_t type = pInput->pData[0]->info.type; - SStddevRes* pStddevRes = GET_ROWCELL_INTERBUF(GET_RES_INFO(pCtx)); + SStdRes* pStdRes = GET_ROWCELL_INTERBUF(GET_RES_INFO(pCtx)); // computing based on the true data block SColumnInfoData* pCol = pInput->pData[0]; @@ -1569,43 +1569,43 @@ int32_t stddevInvertFunction(SqlFunctionCtx* pCtx) { switch (type) { case TSDB_DATA_TYPE_TINYINT: { - LIST_STDDEV_SUB_N(pStddevRes->isum, int8_t); + LIST_STDDEV_SUB_N(pStdRes->isum, int8_t); break; } case TSDB_DATA_TYPE_SMALLINT: { - LIST_STDDEV_SUB_N(pStddevRes->isum, int16_t); + LIST_STDDEV_SUB_N(pStdRes->isum, int16_t); break; } case TSDB_DATA_TYPE_INT: { - LIST_STDDEV_SUB_N(pStddevRes->isum, int32_t); + LIST_STDDEV_SUB_N(pStdRes->isum, int32_t); break; } case TSDB_DATA_TYPE_BIGINT: { - LIST_STDDEV_SUB_N(pStddevRes->isum, int64_t); + LIST_STDDEV_SUB_N(pStdRes->isum, int64_t); break; } case TSDB_DATA_TYPE_UTINYINT: { - LIST_STDDEV_SUB_N(pStddevRes->isum, uint8_t); + LIST_STDDEV_SUB_N(pStdRes->isum, uint8_t); break; } case TSDB_DATA_TYPE_USMALLINT: { - LIST_STDDEV_SUB_N(pStddevRes->isum, uint16_t); + LIST_STDDEV_SUB_N(pStdRes->isum, uint16_t); break; } case TSDB_DATA_TYPE_UINT: { - LIST_STDDEV_SUB_N(pStddevRes->isum, uint32_t); + LIST_STDDEV_SUB_N(pStdRes->isum, uint32_t); break; } case TSDB_DATA_TYPE_UBIGINT: { - LIST_STDDEV_SUB_N(pStddevRes->isum, uint64_t); + LIST_STDDEV_SUB_N(pStdRes->isum, uint64_t); break; } case TSDB_DATA_TYPE_FLOAT: { - LIST_STDDEV_SUB_N(pStddevRes->dsum, float); + LIST_STDDEV_SUB_N(pStdRes->dsum, float); break; } case TSDB_DATA_TYPE_DOUBLE: { - LIST_STDDEV_SUB_N(pStddevRes->dsum, double); + LIST_STDDEV_SUB_N(pStdRes->dsum, double); break; } default: @@ -1620,7 +1620,7 @@ int32_t stddevInvertFunction(SqlFunctionCtx* pCtx) { int32_t stddevFinalize(SqlFunctionCtx* pCtx, SSDataBlock* pBlock) { SInputColumnInfoData* pInput = &pCtx->input; - SStddevRes* pStddevRes = GET_ROWCELL_INTERBUF(GET_RES_INFO(pCtx)); + SStdRes* pStddevRes = GET_ROWCELL_INTERBUF(GET_RES_INFO(pCtx)); int32_t type = pStddevRes->type; double avg; @@ -1648,10 +1648,40 @@ int32_t stddevFinalize(SqlFunctionCtx* pCtx, SSDataBlock* pBlock) { return functionFinalize(pCtx, pBlock); } -int32_t stddevPartialFinalize(SqlFunctionCtx* pCtx, SSDataBlock* pBlock) { +int32_t stdvarFinalize(SqlFunctionCtx* pCtx, SSDataBlock* pBlock) { + SInputColumnInfoData* pInput = &pCtx->input; + SStdRes* pStdvarRes = GET_ROWCELL_INTERBUF(GET_RES_INFO(pCtx)); + int32_t type = pStdvarRes->type; + double avg; + + if (pStdvarRes->count == 0) { + GET_RES_INFO(pCtx)->numOfRes = 0; + return functionFinalize(pCtx, pBlock); + } + + if (IS_SIGNED_NUMERIC_TYPE(type)) { + avg = pStdvarRes->isum / ((double)pStdvarRes->count); + pStdvarRes->result = fabs(pStdvarRes->quadraticISum / ((double)pStdvarRes->count) - avg * avg); + } else if (IS_UNSIGNED_NUMERIC_TYPE(type)) { + avg = pStdvarRes->usum / ((double)pStdvarRes->count); + pStdvarRes->result = fabs(pStdvarRes->quadraticUSum / ((double)pStdvarRes->count) - avg * avg); + } else { + avg = pStdvarRes->dsum / ((double)pStdvarRes->count); + pStdvarRes->result = fabs(pStdvarRes->quadraticDSum / ((double)pStdvarRes->count) - avg * avg); + } + + // check for overflow + if (isinf(pStdvarRes->result) || isnan(pStdvarRes->result)) { + GET_RES_INFO(pCtx)->numOfRes = 0; + } + + return functionFinalize(pCtx, pBlock); +} + +int32_t stdPartialFinalize(SqlFunctionCtx* pCtx, SSDataBlock* pBlock) { SResultRowEntryInfo* pResInfo = GET_RES_INFO(pCtx); - SStddevRes* pInfo = GET_ROWCELL_INTERBUF(GET_RES_INFO(pCtx)); - int32_t resultBytes = getStddevInfoSize(); + SStdRes* pInfo = GET_ROWCELL_INTERBUF(GET_RES_INFO(pCtx)); + int32_t resultBytes = getStdInfoSize(); char* res = taosMemoryCalloc(resultBytes + VARSTR_HEADER_SIZE, sizeof(char)); if (NULL == res) { @@ -1673,15 +1703,15 @@ int32_t stddevPartialFinalize(SqlFunctionCtx* pCtx, SSDataBlock* pBlock) { return code; } -int32_t stddevCombine(SqlFunctionCtx* pDestCtx, SqlFunctionCtx* pSourceCtx) { +int32_t stdCombine(SqlFunctionCtx* pDestCtx, SqlFunctionCtx* pSourceCtx) { SResultRowEntryInfo* pDResInfo = GET_RES_INFO(pDestCtx); - SStddevRes* pDBuf = GET_ROWCELL_INTERBUF(pDResInfo); + SStdRes* pDBuf = GET_ROWCELL_INTERBUF(pDResInfo); SResultRowEntryInfo* pSResInfo = GET_RES_INFO(pSourceCtx); - SStddevRes* pSBuf = GET_ROWCELL_INTERBUF(pSResInfo); + SStdRes* pSBuf = GET_ROWCELL_INTERBUF(pSResInfo); int16_t type = pDBuf->type == TSDB_DATA_TYPE_NULL ? pSBuf->type : pDBuf->type; - stddevTransferInfo(pSBuf, pDBuf); + stdTransferInfo(pSBuf, pDBuf); pDResInfo->numOfRes = TMAX(pDResInfo->numOfRes, pSResInfo->numOfRes); pDResInfo->isNullRes &= pSResInfo->isNullRes; diff --git a/source/libs/nodes/src/nodesCodeFuncs.c b/source/libs/nodes/src/nodesCodeFuncs.c index b34d1b9a70..1425df5c5a 100644 --- a/source/libs/nodes/src/nodesCodeFuncs.c +++ b/source/libs/nodes/src/nodesCodeFuncs.c @@ -4254,6 +4254,7 @@ static const char* jkFunctionHasPk = "HasPk"; static const char* jkFunctionPkBytes = "PkBytes"; static const char* jkFunctionIsMergeFunc = "IsMergeFunc"; static const char* jkFunctionMergeFuncOf = "MergeFuncOf"; +static const char* jkFunctionTrimType = "TrimType"; static int32_t functionNodeToJson(const void* pObj, SJson* pJson) { const SFunctionNode* pNode = (const SFunctionNode*)pObj; @@ -4286,7 +4287,9 @@ static int32_t functionNodeToJson(const void* pObj, SJson* pJson) { if (TSDB_CODE_SUCCESS == code) { code = tjsonAddIntegerToObject(pJson, jkFunctionMergeFuncOf, pNode->originalFuncId); } - + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddIntegerToObject(pJson, jkFunctionTrimType, pNode->trimType); + } return code; } @@ -4321,6 +4324,9 @@ static int32_t jsonToFunctionNode(const SJson* pJson, void* pObj) { if (TSDB_CODE_SUCCESS == code) { code = tjsonGetIntValue(pJson, jkFunctionMergeFuncOf, &pNode->originalFuncId); } + if (TSDB_CODE_SUCCESS == code) { + tjsonGetNumberValue(pJson, jkFunctionTrimType, pNode->trimType, code); + } return code; } diff --git a/source/libs/nodes/src/nodesMsgFuncs.c b/source/libs/nodes/src/nodesMsgFuncs.c index 2d3f2b1f3a..b3568e914e 100644 --- a/source/libs/nodes/src/nodesMsgFuncs.c +++ b/source/libs/nodes/src/nodesMsgFuncs.c @@ -1112,6 +1112,7 @@ enum { FUNCTION_NODE_PK_BYTES, FUNCTION_CODE_IS_MERGE_FUNC, FUNCTION_CODE_MERGE_FUNC_OF, + FUNCTION_CODE_TRIM_TYPE, }; static int32_t functionNodeToMsg(const void* pObj, STlvEncoder* pEncoder) { @@ -1145,6 +1146,9 @@ static int32_t functionNodeToMsg(const void* pObj, STlvEncoder* pEncoder) { if (TSDB_CODE_SUCCESS == code) { code = tlvEncodeI32(pEncoder, FUNCTION_CODE_MERGE_FUNC_OF, pNode->originalFuncId); } + if (TSDB_CODE_SUCCESS == code) { + code = tlvEncodeEnum(pEncoder, FUNCTION_CODE_TRIM_TYPE, pNode->trimType); + } return code; } @@ -1186,6 +1190,9 @@ static int32_t msgToFunctionNode(STlvDecoder* pDecoder, void* pObj) { case FUNCTION_CODE_MERGE_FUNC_OF: code = tlvDecodeI32(pTlv, &pNode->originalFuncId); break; + case FUNCTION_CODE_TRIM_TYPE: + code = tlvDecodeEnum(pTlv, &pNode->trimType, sizeof(pNode->trimType)); + break; default: break; } diff --git a/source/libs/parser/inc/parAst.h b/source/libs/parser/inc/parAst.h index 579317a2fc..4686b90d46 100644 --- a/source/libs/parser/inc/parAst.h +++ b/source/libs/parser/inc/parAst.h @@ -136,6 +136,11 @@ SNode* createBetweenAnd(SAstCreateContext* pCxt, SNode* pExpr, SNode* pLeft, SNode* createNotBetweenAnd(SAstCreateContext* pCxt, SNode* pExpr, SNode* pLeft, SNode* pRight); SNode* createFunctionNode(SAstCreateContext* pCxt, const SToken* pFuncName, SNodeList* pParameterList); SNode* createCastFunctionNode(SAstCreateContext* pCxt, SNode* pExpr, SDataType dt); +SNode* createPositionFunctionNode(SAstCreateContext* pCxt, SNode* pExpr, SNode* pExpr2); +SNode* createTrimFunctionNode(SAstCreateContext* pCxt, SNode* pExpr, ETrimType type); +SNode* createTrimFunctionNodeExt(SAstCreateContext* pCxt, SNode* pExpr, SNode* pExpr2, ETrimType type); +SNode* createSubstrFunctionNode(SAstCreateContext* pCxt, SNode* pExpr, SNode* pExpr2); +SNode* createSubstrFunctionNodeExt(SAstCreateContext* pCxt, SNode* pExpr, SNode* pExpr2, SNode* pExpr3); SNode* createNodeListNode(SAstCreateContext* pCxt, SNodeList* pList); SNode* createNodeListNodeEx(SAstCreateContext* pCxt, SNode* p1, SNode* p2); SNode* createRealTableNode(SAstCreateContext* pCxt, SToken* pDbName, SToken* pTableName, SToken* pTableAlias); diff --git a/source/libs/parser/inc/sql.y b/source/libs/parser/inc/sql.y index f2d804df27..05c1c95aad 100644 --- a/source/libs/parser/inc/sql.y +++ b/source/libs/parser/inc/sql.y @@ -1183,19 +1183,45 @@ pseudo_column(A) ::= IROWTS(B). 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)); } -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)); } +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)); } function_expression(A) ::= - CAST(B) NK_LP expr_or_subquery(C) AS type_name(D) NK_RP(E). { A = createRawExprNodeExt(pCxt, &B, &E, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, C), D)); } + CAST(B) NK_LP expr_or_subquery(C) AS type_name(D) NK_RP(E). { A = createRawExprNodeExt(pCxt, &B, &E, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, C), D)); } function_expression(A) ::= - CAST(B) NK_LP expr_or_subquery(C) AS type_name_default_len(D) NK_RP(E). { A = createRawExprNodeExt(pCxt, &B, &E, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, C), D)); } - -function_expression(A) ::= literal_func(B). { A = B; } + CAST(B) NK_LP expr_or_subquery(C) AS type_name_default_len(D) NK_RP(E). { A = createRawExprNodeExt(pCxt, &B, &E, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, C), D)); } +function_expression(A) ::= + POSITION(B) NK_LP expr_or_subquery(C) IN expr_or_subquery(D) NK_RP(E). { A = createRawExprNodeExt(pCxt, &B, &E, createPositionFunctionNode(pCxt, releaseRawExprNode(pCxt, C), releaseRawExprNode(pCxt, D))); } +function_expression(A) ::= + TRIM(B) NK_LP expr_or_subquery(C) NK_RP(D). { A = createRawExprNodeExt(pCxt, &B, &D, createTrimFunctionNode(pCxt, releaseRawExprNode(pCxt, C), TRIM_TYPE_BOTH)); } +function_expression(A) ::= + TRIM(B) NK_LP trim_specification_type(C) FROM expr_or_subquery(D) NK_RP(E). { A = createRawExprNodeExt(pCxt, &B, &E, createTrimFunctionNode(pCxt, releaseRawExprNode(pCxt, D), C)); } +function_expression(A) ::= + TRIM(B) NK_LP trim_specification_type(C) expr_or_subquery(D) FROM expr_or_subquery(E) NK_RP(F). { A = createRawExprNodeExt(pCxt, &B, &F, createTrimFunctionNodeExt(pCxt, releaseRawExprNode(pCxt, D), releaseRawExprNode(pCxt, E), C)); } +function_expression(A) ::= + substr_func(B) NK_LP expression_list(C) NK_RP(D). { A = createRawExprNodeExt(pCxt, &B, &D, createFunctionNode(pCxt, &B, C)); } +function_expression(A) ::= + substr_func(B) NK_LP expr_or_subquery(C) FROM expr_or_subquery(D) NK_RP(E). { A = createRawExprNodeExt(pCxt, &B, &E, createSubstrFunctionNode(pCxt, releaseRawExprNode(pCxt, C), releaseRawExprNode(pCxt, D))); } +function_expression(A) ::= + substr_func(B) NK_LP expr_or_subquery(C) FROM expr_or_subquery(D) FOR expr_or_subquery(E) NK_RP(F). { A = createRawExprNodeExt(pCxt, &B, &F, createSubstrFunctionNodeExt(pCxt, releaseRawExprNode(pCxt, C), releaseRawExprNode(pCxt, D), releaseRawExprNode(pCxt, E))); } +function_expression(A) ::= REPLACE(B) NK_LP expression_list(C) NK_RP(D). { A = createRawExprNodeExt(pCxt, &B, &D, createFunctionNode(pCxt, &B, C)); } +function_expression(A) ::= literal_func(B). { A = B; } literal_func(A) ::= noarg_func(B) NK_LP NK_RP(C). { A = createRawExprNodeExt(pCxt, &B, &C, createFunctionNode(pCxt, &B, NULL)); } literal_func(A) ::= NOW(B). { A = createRawExprNode(pCxt, &B, createFunctionNode(pCxt, &B, NULL)); } literal_func(A) ::= TODAY(B). { A = createRawExprNode(pCxt, &B, createFunctionNode(pCxt, &B, NULL)); } +%type substr_func { SToken } +%destructor substr_func { } +substr_func(A) ::= SUBSTR(B). { A = B; } +substr_func(A) ::= SUBSTRING(B). { A = B; } + +%type trim_specification_type ETrimType +%destructor trim_specification_type { } +trim_specification_type(A) ::= . { A = TRIM_TYPE_BOTH; } +trim_specification_type(A) ::= BOTH. { A = TRIM_TYPE_BOTH; } +trim_specification_type(A) ::= TRAILING. { A = TRIM_TYPE_TRAILING; } +trim_specification_type(A) ::= LEADING. { A = TRIM_TYPE_LEADING; } + %type noarg_func { SToken } %destructor noarg_func { } noarg_func(A) ::= NOW(B). { A = B; } @@ -1207,6 +1233,7 @@ noarg_func(A) ::= SERVER_VERSION(B). noarg_func(A) ::= SERVER_STATUS(B). { A = B; } noarg_func(A) ::= CURRENT_USER(B). { A = B; } noarg_func(A) ::= USER(B). { A = B; } +noarg_func(A) ::= PI(B). { A = B; } %type star_func { SToken } %destructor star_func { } diff --git a/source/libs/parser/src/parAstCreater.c b/source/libs/parser/src/parAstCreater.c index ee5f215d72..2bf82ba98f 100644 --- a/source/libs/parser/src/parAstCreater.c +++ b/source/libs/parser/src/parAstCreater.c @@ -997,6 +997,73 @@ SNode* createCastFunctionNode(SAstCreateContext* pCxt, SNode* pExpr, SDataType d return (SNode*)func; } +SNode* createPositionFunctionNode(SAstCreateContext* pCxt, SNode* pExpr, SNode* pExpr2) { + CHECK_PARSER_STATUS(pCxt); + SFunctionNode* func = NULL; + pCxt->errCode = nodesMakeNode(QUERY_NODE_FUNCTION, (SNode**)&func); + CHECK_MAKE_NODE(func); + strcpy(func->functionName, "position"); + pCxt->errCode = nodesListMakeAppend(&func->pParameterList, pExpr); + CHECK_PARSER_STATUS(pCxt); + pCxt->errCode = nodesListMakeAppend(&func->pParameterList, pExpr2); + CHECK_PARSER_STATUS(pCxt); + return (SNode*)func; +} + +SNode* createTrimFunctionNode(SAstCreateContext* pCxt, SNode* pExpr, ETrimType type) { + CHECK_PARSER_STATUS(pCxt); + SFunctionNode* func = NULL; + pCxt->errCode = nodesMakeNode(QUERY_NODE_FUNCTION, (SNode**)&func); + CHECK_MAKE_NODE(func); + strcpy(func->functionName, "trim"); + func->trimType = type; + pCxt->errCode = nodesListMakeAppend(&func->pParameterList, pExpr); + CHECK_PARSER_STATUS(pCxt); + return (SNode*)func; +} + +SNode* createTrimFunctionNodeExt(SAstCreateContext* pCxt, SNode* pExpr, SNode* pExpr2, ETrimType type) { + CHECK_PARSER_STATUS(pCxt); + SFunctionNode* func = NULL; + pCxt->errCode = nodesMakeNode(QUERY_NODE_FUNCTION, (SNode**)&func); + CHECK_MAKE_NODE(func); + strcpy(func->functionName, "trim"); + func->trimType = type; + pCxt->errCode = nodesListMakeAppend(&func->pParameterList, pExpr); + CHECK_PARSER_STATUS(pCxt); + pCxt->errCode = nodesListMakeAppend(&func->pParameterList, pExpr2); + CHECK_PARSER_STATUS(pCxt); + return (SNode*)func; +} + +SNode* createSubstrFunctionNode(SAstCreateContext* pCxt, SNode* pExpr, SNode* pExpr2) { + CHECK_PARSER_STATUS(pCxt); + SFunctionNode* func = NULL; + pCxt->errCode = nodesMakeNode(QUERY_NODE_FUNCTION, (SNode**)&func); + CHECK_MAKE_NODE(func); + strcpy(func->functionName, "substr"); + pCxt->errCode = nodesListMakeAppend(&func->pParameterList, pExpr); + CHECK_PARSER_STATUS(pCxt); + pCxt->errCode = nodesListMakeAppend(&func->pParameterList, pExpr2); + CHECK_PARSER_STATUS(pCxt); + return (SNode*)func; +} + +SNode* createSubstrFunctionNodeExt(SAstCreateContext* pCxt, SNode* pExpr, SNode* pExpr2, SNode* pExpr3) { + CHECK_PARSER_STATUS(pCxt); + SFunctionNode* func = NULL; + pCxt->errCode = nodesMakeNode(QUERY_NODE_FUNCTION, (SNode**)&func); + CHECK_MAKE_NODE(func); + strcpy(func->functionName, "substr"); + pCxt->errCode = nodesListMakeAppend(&func->pParameterList, pExpr); + CHECK_PARSER_STATUS(pCxt); + pCxt->errCode = nodesListMakeAppend(&func->pParameterList, pExpr2); + CHECK_PARSER_STATUS(pCxt); + pCxt->errCode = nodesListMakeAppend(&func->pParameterList, pExpr3); + CHECK_PARSER_STATUS(pCxt); + return (SNode*)func; +} + SNode* createNodeListNode(SAstCreateContext* pCxt, SNodeList* pList) { CHECK_PARSER_STATUS(pCxt); SNodeListNode* list = NULL; diff --git a/source/libs/parser/src/parTokenizer.c b/source/libs/parser/src/parTokenizer.c index deec310862..9bcc201443 100644 --- a/source/libs/parser/src/parTokenizer.c +++ b/source/libs/parser/src/parTokenizer.c @@ -52,6 +52,7 @@ static SKeyword keywordTable[] = { {"BNODE", TK_BNODE}, {"BNODES", TK_BNODES}, {"BOOL", TK_BOOL}, + {"BOTH", TK_BOTH}, {"BUFFER", TK_BUFFER}, {"BUFSIZE", TK_BUFSIZE}, {"BY", TK_BY}, @@ -111,6 +112,7 @@ static SKeyword keywordTable[] = { {"FLOAT", TK_FLOAT}, {"FLUSH", TK_FLUSH}, {"FROM", TK_FROM}, + {"FOR", TK_FOR}, {"FORCE", TK_FORCE}, {"FULL", TK_FULL}, {"FUNCTION", TK_FUNCTION}, @@ -148,6 +150,7 @@ static SKeyword keywordTable[] = { {"LAST", TK_LAST}, {"LAST_ROW", TK_LAST_ROW}, {"LEADER", TK_LEADER}, + {"LEADING", TK_LEADING}, {"LEFT", TK_LEFT}, {"LICENCES", TK_LICENCES}, {"LIKE", TK_LIKE}, @@ -191,6 +194,7 @@ static SKeyword keywordTable[] = { {"PARTITION_FIRST", TK_PARTITION_FIRST}, {"PASS", TK_PASS}, {"PORT", TK_PORT}, + {"POSITION", TK_POSITION}, {"PPS", TK_PPS}, {"PRIMARY", TK_PRIMARY}, {"PRECISION", TK_PRECISION}, @@ -201,6 +205,7 @@ static SKeyword keywordTable[] = { {"QTIME", TK_QTIME}, {"QUERIES", TK_QUERIES}, {"QUERY", TK_QUERY}, + {"PI", TK_PI}, {"RANGE", TK_RANGE}, {"RATIO", TK_RATIO}, {"PAUSE", TK_PAUSE}, @@ -250,6 +255,8 @@ static SKeyword keywordTable[] = { {"STT_TRIGGER", TK_STT_TRIGGER}, {"SUBSCRIBE", TK_SUBSCRIBE}, {"SUBSCRIPTIONS", TK_SUBSCRIPTIONS}, + {"SUBSTR", TK_SUBSTR}, + {"SUBSTRING", TK_SUBSTRING}, {"SUBTABLE", TK_SUBTABLE}, {"SYSINFO", TK_SYSINFO}, {"SYSTEM", TK_SYSTEM}, @@ -268,6 +275,7 @@ static SKeyword keywordTable[] = { {"TODAY", TK_TODAY}, {"TOPIC", TK_TOPIC}, {"TOPICS", TK_TOPICS}, + {"TRAILING", TK_TRAILING}, {"TRANSACTION", TK_TRANSACTION}, {"TRANSACTIONS", TK_TRANSACTIONS}, {"TRIGGER", TK_TRIGGER}, diff --git a/source/libs/parser/src/sql.c b/source/libs/parser/src/sql.c index 26c5465b8c..0492288fd6 100644 --- a/source/libs/parser/src/sql.c +++ b/source/libs/parser/src/sql.c @@ -1,5 +1,6 @@ /* This file is automatically generated by Lemon from input grammar -** source file "sql.y". */ +** source file "sql.y". +*/ /* ** 2000-05-29 ** @@ -25,8 +26,6 @@ ** input grammar file: */ /************ Begin %include sections from the grammar ************************/ -#line 11 "sql.y" - #include #include #include @@ -42,7 +41,6 @@ #include "parAst.h" #define YYSTACKDEPTH 0 -#line 46 "sql.c" /**************** End of %include directives **********************************/ /* These constants specify the various numeric values for terminal symbols. ***************** Begin token definitions *************************************/ @@ -312,118 +310,125 @@ #define TK_IROWTS 263 #define TK_ISFILLED 264 #define TK_CAST 265 -#define TK_NOW 266 -#define TK_TODAY 267 -#define TK_TIMEZONE 268 -#define TK_CLIENT_VERSION 269 -#define TK_SERVER_VERSION 270 -#define TK_SERVER_STATUS 271 -#define TK_CURRENT_USER 272 -#define TK_CASE 273 -#define TK_WHEN 274 -#define TK_THEN 275 -#define TK_ELSE 276 -#define TK_BETWEEN 277 -#define TK_IS 278 -#define TK_NK_LT 279 -#define TK_NK_GT 280 -#define TK_NK_LE 281 -#define TK_NK_GE 282 -#define TK_NK_NE 283 -#define TK_MATCH 284 -#define TK_NMATCH 285 -#define TK_CONTAINS 286 -#define TK_IN 287 -#define TK_JOIN 288 -#define TK_INNER 289 -#define TK_LEFT 290 -#define TK_RIGHT 291 -#define TK_OUTER 292 -#define TK_SEMI 293 -#define TK_ANTI 294 -#define TK_ASOF 295 -#define TK_WINDOW 296 -#define TK_WINDOW_OFFSET 297 -#define TK_JLIMIT 298 -#define TK_SELECT 299 -#define TK_NK_HINT 300 -#define TK_DISTINCT 301 -#define TK_WHERE 302 -#define TK_PARTITION 303 -#define TK_BY 304 -#define TK_SESSION 305 -#define TK_STATE_WINDOW 306 -#define TK_EVENT_WINDOW 307 -#define TK_COUNT_WINDOW 308 -#define TK_SLIDING 309 -#define TK_FILL 310 -#define TK_VALUE 311 -#define TK_VALUE_F 312 -#define TK_NONE 313 -#define TK_PREV 314 -#define TK_NULL_F 315 -#define TK_LINEAR 316 -#define TK_NEXT 317 -#define TK_HAVING 318 -#define TK_RANGE 319 -#define TK_EVERY 320 -#define TK_ORDER 321 -#define TK_SLIMIT 322 -#define TK_SOFFSET 323 -#define TK_LIMIT 324 -#define TK_OFFSET 325 -#define TK_ASC 326 -#define TK_NULLS 327 -#define TK_ABORT 328 -#define TK_AFTER 329 -#define TK_ATTACH 330 -#define TK_BEFORE 331 -#define TK_BEGIN 332 -#define TK_BITAND 333 -#define TK_BITNOT 334 -#define TK_BITOR 335 -#define TK_BLOCKS 336 -#define TK_CHANGE 337 -#define TK_COMMA 338 -#define TK_CONCAT 339 -#define TK_CONFLICT 340 -#define TK_COPY 341 -#define TK_DEFERRED 342 -#define TK_DELIMITERS 343 -#define TK_DETACH 344 -#define TK_DIVIDE 345 -#define TK_DOT 346 -#define TK_EACH 347 -#define TK_FAIL 348 -#define TK_FOR 349 -#define TK_GLOB 350 -#define TK_ID 351 -#define TK_IMMEDIATE 352 -#define TK_IMPORT 353 -#define TK_INITIALLY 354 -#define TK_INSTEAD 355 -#define TK_ISNULL 356 -#define TK_MODULES 357 -#define TK_NK_BITNOT 358 -#define TK_NK_SEMI 359 -#define TK_NOTNULL 360 -#define TK_OF 361 -#define TK_PLUS 362 -#define TK_PRIVILEGE 363 -#define TK_RAISE 364 -#define TK_RESTRICT 365 -#define TK_ROW 366 -#define TK_STAR 367 -#define TK_STATEMENT 368 -#define TK_STRICT 369 -#define TK_STRING 370 -#define TK_TIMES 371 -#define TK_VALUES 372 -#define TK_VARIABLE 373 -#define TK_WAL 374 -#define TK_ENCODE 375 -#define TK_COMPRESS 376 -#define TK_LEVEL 377 +#define TK_POSITION 266 +#define TK_IN 267 +#define TK_FOR 268 +#define TK_NOW 269 +#define TK_TODAY 270 +#define TK_SUBSTR 271 +#define TK_SUBSTRING 272 +#define TK_BOTH 273 +#define TK_TRAILING 274 +#define TK_LEADING 275 +#define TK_TIMEZONE 276 +#define TK_CLIENT_VERSION 277 +#define TK_SERVER_VERSION 278 +#define TK_SERVER_STATUS 279 +#define TK_CURRENT_USER 280 +#define TK_PI 281 +#define TK_CASE 282 +#define TK_WHEN 283 +#define TK_THEN 284 +#define TK_ELSE 285 +#define TK_BETWEEN 286 +#define TK_IS 287 +#define TK_NK_LT 288 +#define TK_NK_GT 289 +#define TK_NK_LE 290 +#define TK_NK_GE 291 +#define TK_NK_NE 292 +#define TK_MATCH 293 +#define TK_NMATCH 294 +#define TK_CONTAINS 295 +#define TK_JOIN 296 +#define TK_INNER 297 +#define TK_LEFT 298 +#define TK_RIGHT 299 +#define TK_OUTER 300 +#define TK_SEMI 301 +#define TK_ANTI 302 +#define TK_ASOF 303 +#define TK_WINDOW 304 +#define TK_WINDOW_OFFSET 305 +#define TK_JLIMIT 306 +#define TK_SELECT 307 +#define TK_NK_HINT 308 +#define TK_DISTINCT 309 +#define TK_WHERE 310 +#define TK_PARTITION 311 +#define TK_BY 312 +#define TK_SESSION 313 +#define TK_STATE_WINDOW 314 +#define TK_EVENT_WINDOW 315 +#define TK_COUNT_WINDOW 316 +#define TK_SLIDING 317 +#define TK_FILL 318 +#define TK_VALUE 319 +#define TK_VALUE_F 320 +#define TK_NONE 321 +#define TK_PREV 322 +#define TK_NULL_F 323 +#define TK_LINEAR 324 +#define TK_NEXT 325 +#define TK_HAVING 326 +#define TK_RANGE 327 +#define TK_EVERY 328 +#define TK_ORDER 329 +#define TK_SLIMIT 330 +#define TK_SOFFSET 331 +#define TK_LIMIT 332 +#define TK_OFFSET 333 +#define TK_ASC 334 +#define TK_NULLS 335 +#define TK_ABORT 336 +#define TK_AFTER 337 +#define TK_ATTACH 338 +#define TK_BEFORE 339 +#define TK_BEGIN 340 +#define TK_BITAND 341 +#define TK_BITNOT 342 +#define TK_BITOR 343 +#define TK_BLOCKS 344 +#define TK_CHANGE 345 +#define TK_COMMA 346 +#define TK_CONCAT 347 +#define TK_CONFLICT 348 +#define TK_COPY 349 +#define TK_DEFERRED 350 +#define TK_DELIMITERS 351 +#define TK_DETACH 352 +#define TK_DIVIDE 353 +#define TK_DOT 354 +#define TK_EACH 355 +#define TK_FAIL 356 +#define TK_GLOB 357 +#define TK_ID 358 +#define TK_IMMEDIATE 359 +#define TK_IMPORT 360 +#define TK_INITIALLY 361 +#define TK_INSTEAD 362 +#define TK_ISNULL 363 +#define TK_MODULES 364 +#define TK_NK_BITNOT 365 +#define TK_NK_SEMI 366 +#define TK_NOTNULL 367 +#define TK_OF 368 +#define TK_PLUS 369 +#define TK_PRIVILEGE 370 +#define TK_RAISE 371 +#define TK_RESTRICT 372 +#define TK_ROW 373 +#define TK_STAR 374 +#define TK_STATEMENT 375 +#define TK_STRICT 376 +#define TK_STRING 377 +#define TK_TIMES 378 +#define TK_VALUES 379 +#define TK_VARIABLE 380 +#define TK_WAL 381 +#define TK_ENCODE 382 +#define TK_COMPRESS 383 +#define TK_LEVEL 384 #endif /**************** End token definitions ***************************************/ @@ -450,7 +455,7 @@ ** the minor type might be the name of the identifier. ** Each non-terminal can have a different minor type. ** Terminal symbols all have the same minor type, though. -** This macros defines the minor type for terminal +** This macros defines the minor type for terminal ** symbols. ** YYMINORTYPE is the data type used for all minor types. ** This is typically a union of many types, one of @@ -464,6 +469,9 @@ ** ParseARG_STORE Code to store %extra_argument into yypParser ** ParseARG_FETCH Code to extract %extra_argument from yypParser ** ParseCTX_* As ParseARG_ except for %extra_context +** YYREALLOC Name of the realloc() function to use +** YYFREE Name of the free() function to use +** YYDYNSTACK True if stack space should be extended on heap ** YYERRORSYMBOL is the code number of the error symbol. If not ** defined, then do no error processing. ** YYNSTATE the combined number of states. @@ -477,63 +485,71 @@ ** YY_NO_ACTION The yy_action[] code for no-op ** YY_MIN_REDUCE Minimum value for reduce actions ** YY_MAX_REDUCE Maximum value for reduce actions +** YY_MIN_DSTRCTR Minimum symbol value that has a destructor +** YY_MAX_DSTRCTR Maximum symbol value that has a destructor */ #ifndef INTERFACE # define INTERFACE 1 #endif /************* Begin control #defines *****************************************/ #define YYCODETYPE unsigned short int -#define YYNOCODE 558 +#define YYNOCODE 567 #define YYACTIONTYPE unsigned short int -#define ParseTOKENTYPE SToken +#define ParseTOKENTYPE SToken typedef union { int yyinit; ParseTOKENTYPE yy0; - SAlterOption yy101; - bool yy209; - SNodeList* yy316; - SNode* yy416; - EOrder yy506; - EJoinSubType yy630; - EShowKind yy681; - int32_t yy820; - EOperatorType yy848; - STokenPair yy849; - EFillMode yy882; - SShowTablesOption yy925; + 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; - EJoinType yy972; - int8_t yy1043; - ENullOrder yy1045; - int64_t yy1089; - SToken yy1109; + EOrder yy974; } YYMINORTYPE; #ifndef YYSTACKDEPTH #define YYSTACKDEPTH 100 #endif #define ParseARG_SDECL SAstCreateContext* pCxt ; -#define ParseARG_PDECL , SAstCreateContext* pCxt -#define ParseARG_PARAM ,pCxt +#define ParseARG_PDECL , SAstCreateContext* pCxt +#define ParseARG_PARAM ,pCxt #define ParseARG_FETCH SAstCreateContext* pCxt =yypParser->pCxt ; #define ParseARG_STORE yypParser->pCxt =pCxt ; +#define YYREALLOC realloc +#define YYFREE free +#define YYDYNSTACK 0 #define ParseCTX_SDECL #define ParseCTX_PDECL #define ParseCTX_PARAM #define ParseCTX_FETCH #define ParseCTX_STORE #define YYFALLBACK 1 -#define YYNSTATE 979 -#define YYNRULE 755 -#define YYNRULE_WITH_ACTION 755 -#define YYNTOKEN 378 -#define YY_MAX_SHIFT 978 -#define YY_MIN_SHIFTREDUCE 1448 -#define YY_MAX_SHIFTREDUCE 2202 -#define YY_ERROR_ACTION 2203 -#define YY_ACCEPT_ACTION 2204 -#define YY_NO_ACTION 2205 -#define YY_MIN_REDUCE 2206 -#define YY_MAX_REDUCE 2960 +#define YYNSTATE 1004 +#define YYNRULE 770 +#define YYNRULE_WITH_ACTION 770 +#define YYNTOKEN 385 +#define YY_MAX_SHIFT 1003 +#define YY_MIN_SHIFTREDUCE 1487 +#define YY_MAX_SHIFTREDUCE 2256 +#define YY_ERROR_ACTION 2257 +#define YY_ACCEPT_ACTION 2258 +#define YY_NO_ACTION 2259 +#define YY_MIN_REDUCE 2260 +#define YY_MAX_REDUCE 3029 +#define YY_MIN_DSTRCTR 386 +#define YY_MAX_DSTRCTR 566 /************* End control #defines *******************************************/ #define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0]))) @@ -549,11 +565,27 @@ typedef union { # define yytestcase(X) #endif +/* Macro to determine if stack space has the ability to grow using +** heap memory. +*/ +#if YYSTACKDEPTH<=0 || YYDYNSTACK +# define YYGROWABLESTACK 1 +#else +# define YYGROWABLESTACK 0 +#endif + +/* Guarantee a minimum number of initial stack slots. + */ +#if YYSTACKDEPTH<=0 +# undef YYSTACKDEPTH +# define YYSTACKDEPTH 2 /* Need a minimum stack size */ +#endif + /* Next are the tables used to determine what action to take based on the ** current state and lookahead token. These tables are used to implement ** functions that take a state number and lookahead value and return an -** action integer. +** action integer. ** ** Suppose the action integer is N. Then the action is determined as ** follows @@ -600,906 +632,1097 @@ typedef union { ** yy_default[] Default action for each state. ** *********** Begin parsing tables **********************************************/ -#define YY_ACTTAB_COUNT (3018) +#define YY_ACTTAB_COUNT (3934) static const YYACTIONTYPE yy_action[] = { - /* 0 */ 2711, 2403, 647, 543, 2569, 648, 2254, 2569, 542, 37, - /* 10 */ 340, 550, 47, 45, 2119, 2401, 2736, 652, 798, 211, - /* 20 */ 476, 471, 1940, 649, 2567, 855, 2926, 2566, 855, 2715, - /* 30 */ 2711, 813, 124, 810, 157, 2461, 1938, 787, 2028, 2405, - /* 40 */ 1965, 495, 2416, 2694, 797, 218, 493, 40, 39, 2927, - /* 50 */ 799, 46, 44, 43, 42, 41, 2736, 764, 748, 2715, - /* 60 */ 2754, 612, 610, 2123, 415, 2926, 2754, 232, 2023, 1965, - /* 70 */ 788, 851, 868, 502, 501, 19, 2701, 527, 850, 2717, - /* 80 */ 2719, 473, 1946, 2932, 218, 810, 157, 2569, 2927, 799, - /* 90 */ 873, 2645, 460, 2616, 1966, 47, 45, 1947, 810, 157, - /* 100 */ 2754, 478, 482, 476, 2695, 1940, 482, 2566, 855, 2717, - /* 110 */ 2720, 670, 975, 873, 435, 15, 2701, 873, 850, 1938, - /* 120 */ 873, 2028, 868, 2735, 810, 157, 2774, 43, 42, 41, - /* 130 */ 121, 2737, 854, 2739, 2740, 849, 1965, 873, 786, 2204, - /* 140 */ 657, 2608, 200, 655, 2828, 515, 648, 2254, 472, 2824, - /* 150 */ 2229, 2023, 2030, 2031, 812, 187, 2836, 2837, 19, 155, - /* 160 */ 2841, 14, 13, 2735, 2057, 1946, 2774, 482, 219, 114, - /* 170 */ 121, 2737, 854, 2739, 2740, 849, 2875, 873, 873, 2736, - /* 180 */ 159, 488, 168, 2799, 2828, 869, 2414, 929, 472, 2824, - /* 190 */ 2373, 2001, 2011, 254, 851, 975, 2264, 650, 15, 2262, - /* 200 */ 256, 2029, 2032, 841, 650, 148, 2262, 194, 2836, 809, - /* 210 */ 2701, 149, 808, 693, 840, 531, 1941, 50, 1939, 2926, - /* 220 */ 127, 2836, 2837, 2754, 155, 2841, 1712, 1713, 508, 2058, - /* 230 */ 2474, 62, 868, 507, 868, 2030, 2031, 797, 218, 2701, - /* 240 */ 2002, 850, 2927, 799, 533, 529, 188, 2836, 2837, 817, - /* 250 */ 155, 2841, 1944, 1945, 1998, 172, 2000, 2003, 2004, 2005, - /* 260 */ 2006, 2007, 2008, 2009, 2010, 846, 871, 870, 2022, 2024, - /* 270 */ 2025, 2026, 2027, 2, 2001, 2011, 2071, 2094, 443, 1950, - /* 280 */ 9, 1968, 764, 207, 2029, 2032, 2735, 331, 332, 2774, - /* 290 */ 2926, 491, 330, 121, 2737, 854, 2739, 2740, 849, 1941, - /* 300 */ 873, 1939, 2301, 1999, 1998, 2946, 747, 2828, 2932, 218, - /* 310 */ 2542, 472, 2824, 2927, 799, 2418, 36, 474, 2052, 2053, - /* 320 */ 2054, 2055, 2056, 2060, 2061, 2062, 2063, 50, 910, 174, - /* 330 */ 173, 907, 906, 905, 171, 1944, 1945, 1998, 54, 2000, - /* 340 */ 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 846, 871, - /* 350 */ 870, 2022, 2024, 2025, 2026, 2027, 2, 12, 47, 45, - /* 360 */ 2398, 422, 2736, 1909, 2474, 183, 476, 291, 1940, 388, - /* 370 */ 394, 290, 441, 2451, 869, 2414, 744, 813, 2228, 714, - /* 380 */ 713, 712, 1938, 2472, 2028, 667, 704, 154, 708, 392, - /* 390 */ 76, 2094, 707, 75, 148, 487, 486, 706, 711, 453, - /* 400 */ 452, 324, 698, 705, 421, 2207, 2754, 451, 701, 700, - /* 410 */ 699, 2091, 2092, 2093, 2023, 324, 252, 629, 627, 624, - /* 420 */ 622, 19, 2701, 192, 850, 317, 138, 663, 1946, 137, - /* 430 */ 136, 135, 134, 133, 132, 131, 130, 129, 2701, 2931, - /* 440 */ 2474, 47, 45, 2033, 2556, 103, 668, 2926, 469, 476, - /* 450 */ 430, 1940, 1966, 458, 322, 736, 2474, 1965, 975, 2472, - /* 460 */ 798, 15, 62, 1493, 481, 1938, 2930, 2028, 2926, 2735, - /* 470 */ 2927, 2929, 2774, 1908, 926, 2472, 121, 2737, 854, 2739, - /* 480 */ 2740, 849, 1500, 873, 869, 2414, 797, 218, 200, 381, - /* 490 */ 2828, 2927, 799, 666, 472, 2824, 2388, 2023, 2030, 2031, - /* 500 */ 185, 63, 2218, 2094, 499, 490, 489, 1495, 1498, 1499, - /* 510 */ 138, 1946, 207, 137, 136, 135, 134, 133, 132, 131, - /* 520 */ 130, 129, 2876, 62, 2848, 2091, 2092, 2093, 2848, 2848, - /* 530 */ 2848, 2848, 2848, 734, 2931, 480, 182, 2001, 2011, 2543, - /* 540 */ 207, 975, 2926, 928, 48, 495, 2416, 2029, 2032, 728, - /* 550 */ 2617, 732, 730, 288, 287, 88, 87, 546, 2285, 783, - /* 560 */ 231, 2930, 1941, 1965, 1939, 2927, 2928, 2542, 869, 2414, - /* 570 */ 912, 40, 39, 538, 536, 46, 44, 43, 42, 41, - /* 580 */ 715, 2030, 2031, 1969, 1813, 1814, 418, 497, 223, 525, - /* 590 */ 2467, 2469, 521, 517, 513, 510, 539, 697, 1944, 1945, - /* 600 */ 1998, 696, 2000, 2003, 2004, 2005, 2006, 2007, 2008, 2009, - /* 610 */ 2010, 846, 871, 870, 2022, 2024, 2025, 2026, 2027, 2, - /* 620 */ 2001, 2011, 2096, 2097, 2098, 2099, 2100, 66, 1786, 1787, - /* 630 */ 2029, 2032, 100, 1812, 1815, 1673, 2848, 2091, 2092, 2093, - /* 640 */ 2848, 2848, 2848, 2848, 2848, 1941, 324, 1939, 2206, 62, - /* 650 */ 1664, 902, 901, 900, 1668, 899, 1670, 1671, 898, 895, - /* 660 */ 2410, 1679, 892, 1681, 1682, 889, 886, 883, 789, 784, - /* 670 */ 777, 773, 147, 146, 145, 144, 143, 142, 141, 140, - /* 680 */ 139, 1944, 1945, 1998, 238, 2000, 2003, 2004, 2005, 2006, - /* 690 */ 2007, 2008, 2009, 2010, 846, 871, 870, 2022, 2024, 2025, - /* 700 */ 2026, 2027, 2, 47, 45, 1623, 2736, 324, 869, 2414, - /* 710 */ 912, 476, 1969, 1940, 46, 44, 43, 42, 41, 1622, - /* 720 */ 1520, 851, 1519, 2883, 714, 713, 712, 1938, 55, 2028, - /* 730 */ 94, 704, 154, 708, 2002, 93, 153, 707, 62, 745, - /* 740 */ 869, 2414, 706, 711, 453, 452, 2931, 2736, 705, 541, - /* 750 */ 2754, 540, 451, 701, 700, 699, 214, 12, 1521, 2023, - /* 760 */ 547, 2038, 851, 1968, 2896, 479, 2701, 1965, 850, 2494, - /* 770 */ 879, 40, 39, 1946, 181, 46, 44, 43, 42, 41, - /* 780 */ 644, 498, 664, 539, 606, 2419, 47, 45, 748, 642, - /* 790 */ 181, 2754, 638, 634, 476, 617, 1940, 1999, 869, 2414, - /* 800 */ 2474, 2419, 92, 975, 559, 2538, 48, 2701, 496, 850, - /* 810 */ 1938, 2511, 2028, 2735, 2468, 2469, 2774, 1970, 548, 2472, - /* 820 */ 121, 2737, 854, 2739, 2740, 849, 1611, 873, 869, 2414, - /* 830 */ 565, 2538, 2946, 324, 2828, 869, 2414, 381, 472, 2824, - /* 840 */ 869, 2414, 2023, 2030, 2031, 839, 665, 2562, 567, 869, - /* 850 */ 2414, 2152, 243, 3, 2735, 581, 1946, 2774, 234, 2187, - /* 860 */ 669, 121, 2737, 854, 2739, 2740, 849, 53, 873, 582, - /* 870 */ 750, 2608, 1613, 2946, 1946, 2828, 100, 605, 242, 472, - /* 880 */ 2824, 51, 2001, 2011, 236, 213, 975, 596, 2538, 15, - /* 890 */ 903, 603, 2029, 2032, 446, 40, 39, 459, 2616, 46, - /* 900 */ 44, 43, 42, 41, 2409, 274, 12, 1941, 10, 1939, - /* 910 */ 780, 779, 2150, 2151, 2153, 2154, 2155, 878, 877, 876, - /* 920 */ 29, 193, 324, 2144, 589, 2521, 2030, 2031, 2059, 2227, - /* 930 */ 687, 683, 679, 675, 2390, 273, 322, 2145, 2002, 588, - /* 940 */ 834, 241, 2800, 1944, 1945, 1998, 1970, 2000, 2003, 2004, - /* 950 */ 2005, 2006, 2007, 2008, 2009, 2010, 846, 871, 870, 2022, - /* 960 */ 2024, 2025, 2026, 2027, 2, 2001, 2011, 84, 419, 557, - /* 970 */ 1963, 2194, 2474, 869, 2414, 2029, 2032, 594, 869, 2414, - /* 980 */ 445, 101, 587, 2143, 160, 2116, 271, 586, 614, 2701, - /* 990 */ 1941, 825, 1939, 583, 2406, 585, 869, 2414, 2411, 763, - /* 1000 */ 184, 1999, 292, 2164, 573, 836, 616, 2800, 2347, 869, - /* 1010 */ 2414, 420, 575, 40, 39, 34, 294, 46, 44, 43, - /* 1020 */ 42, 41, 2049, 553, 2843, 2064, 1944, 1945, 1998, 302, - /* 1030 */ 2000, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 846, - /* 1040 */ 871, 870, 2022, 2024, 2025, 2026, 2027, 2, 869, 2414, - /* 1050 */ 2840, 40, 39, 259, 522, 46, 44, 43, 42, 41, - /* 1060 */ 1940, 1969, 270, 1502, 444, 324, 261, 268, 816, 1964, - /* 1070 */ 869, 2414, 266, 661, 1938, 113, 561, 2298, 225, 910, - /* 1080 */ 174, 173, 907, 906, 905, 171, 2736, 1867, 1868, 2193, - /* 1090 */ 335, 258, 40, 39, 1523, 1524, 46, 44, 43, 42, - /* 1100 */ 41, 851, 2407, 775, 689, 688, 2930, 2549, 2528, 1500, - /* 1110 */ 602, 601, 600, 599, 598, 593, 592, 591, 590, 427, - /* 1120 */ 1946, 2163, 580, 579, 578, 577, 576, 570, 569, 568, - /* 1130 */ 2754, 563, 562, 442, 2226, 1498, 1499, 554, 1774, 1775, - /* 1140 */ 60, 691, 690, 182, 1793, 78, 2701, 805, 850, 158, - /* 1150 */ 975, 761, 2799, 2417, 946, 945, 944, 943, 505, 2135, - /* 1160 */ 942, 941, 162, 936, 935, 934, 933, 932, 931, 930, - /* 1170 */ 161, 924, 923, 922, 504, 503, 919, 918, 917, 198, - /* 1180 */ 197, 916, 500, 915, 914, 913, 1969, 502, 501, 869, - /* 1190 */ 2414, 2736, 1965, 2735, 2701, 2225, 2774, 1954, 2224, 91, - /* 1200 */ 121, 2737, 854, 2739, 2740, 849, 851, 873, 2919, 830, - /* 1210 */ 721, 1947, 2946, 2028, 2828, 2223, 33, 2222, 472, 2824, - /* 1220 */ 2221, 2736, 40, 39, 2220, 735, 46, 44, 43, 42, - /* 1230 */ 41, 1627, 869, 2414, 221, 2754, 851, 104, 2860, 869, - /* 1240 */ 2414, 2641, 2217, 2023, 289, 1626, 869, 2414, 1520, 2476, - /* 1250 */ 1519, 2701, 342, 850, 1941, 2701, 1939, 1946, 2701, 862, - /* 1260 */ 724, 374, 2216, 450, 449, 2754, 863, 718, 716, 869, - /* 1270 */ 2414, 1841, 869, 2414, 286, 2701, 303, 2701, 710, 709, - /* 1280 */ 2701, 2701, 2115, 850, 2701, 2215, 1521, 838, 181, 867, - /* 1290 */ 1944, 1945, 370, 940, 938, 1970, 2474, 2214, 2735, 2420, - /* 1300 */ 2843, 2774, 2701, 2234, 968, 121, 2737, 854, 2739, 2740, - /* 1310 */ 849, 802, 873, 2213, 2622, 2473, 164, 2946, 2212, 2828, - /* 1320 */ 72, 619, 2701, 472, 2824, 71, 2839, 105, 2735, 2211, - /* 1330 */ 2210, 2774, 2654, 792, 150, 121, 2737, 854, 2739, 2740, - /* 1340 */ 849, 2736, 873, 448, 447, 2701, 695, 2946, 90, 2828, - /* 1350 */ 425, 424, 35, 472, 2824, 2209, 851, 2701, 40, 39, - /* 1360 */ 483, 380, 46, 44, 43, 42, 41, 697, 2196, 2197, - /* 1370 */ 2843, 696, 2736, 2701, 492, 293, 2028, 904, 2701, 908, - /* 1380 */ 2465, 909, 2465, 1606, 2465, 2754, 764, 851, 2391, 2701, - /* 1390 */ 2701, 1955, 279, 1950, 2926, 277, 2838, 2283, 738, 1857, - /* 1400 */ 737, 2701, 2105, 850, 615, 1949, 2023, 281, 2736, 164, - /* 1410 */ 280, 283, 2932, 218, 282, 2701, 2754, 2927, 799, 717, - /* 1420 */ 1970, 163, 2655, 851, 801, 299, 1999, 1958, 1960, 1607, - /* 1430 */ 285, 702, 2701, 284, 850, 387, 771, 49, 703, 806, - /* 1440 */ 2266, 871, 870, 2022, 2024, 2025, 2026, 2027, 2735, 2274, - /* 1450 */ 2272, 2774, 2754, 2722, 1604, 121, 2737, 854, 2739, 2740, - /* 1460 */ 849, 1602, 873, 49, 201, 172, 2418, 2803, 2701, 2828, - /* 1470 */ 850, 719, 722, 472, 2824, 2387, 764, 14, 13, 2735, - /* 1480 */ 212, 119, 2774, 116, 2926, 209, 121, 2737, 854, 2739, - /* 1490 */ 2740, 849, 1865, 873, 1948, 964, 329, 77, 2801, 64, - /* 1500 */ 2828, 49, 2932, 218, 472, 2824, 2348, 2927, 799, 1584, - /* 1510 */ 49, 77, 169, 349, 348, 2735, 2219, 2724, 2774, 2139, - /* 1520 */ 2149, 920, 121, 2737, 854, 2739, 2740, 849, 2889, 873, - /* 1530 */ 150, 172, 351, 350, 835, 192, 2828, 2736, 353, 352, - /* 1540 */ 472, 2824, 355, 354, 1576, 1673, 2148, 308, 815, 318, - /* 1550 */ 357, 356, 851, 781, 1931, 1585, 1907, 811, 359, 358, - /* 1560 */ 1664, 902, 901, 900, 1668, 899, 1670, 1671, 845, 844, - /* 1570 */ 310, 1679, 843, 1681, 1682, 842, 886, 883, 746, 333, - /* 1580 */ 822, 2754, 2065, 1557, 2012, 361, 360, 1952, 485, 484, - /* 1590 */ 1932, 363, 362, 1810, 1800, 345, 978, 2701, 74, 850, - /* 1600 */ 881, 803, 365, 364, 871, 870, 2022, 2024, 2025, 2026, - /* 1610 */ 2027, 921, 741, 866, 1655, 378, 367, 366, 2736, 170, - /* 1620 */ 910, 174, 173, 907, 906, 905, 171, 369, 368, 1558, - /* 1630 */ 966, 208, 749, 851, 1574, 152, 172, 2755, 2340, 2255, - /* 1640 */ 962, 958, 954, 950, 2735, 373, 151, 2774, 2879, 778, - /* 1650 */ 2339, 122, 2737, 854, 2739, 2740, 849, 169, 873, 465, - /* 1660 */ 785, 819, 2754, 461, 2547, 2828, 764, 506, 814, 2827, - /* 1670 */ 2824, 524, 2261, 2462, 2926, 793, 1951, 757, 2701, 794, - /* 1680 */ 850, 386, 2880, 1686, 2890, 320, 764, 2548, 315, 323, - /* 1690 */ 514, 120, 2932, 218, 2926, 2374, 346, 2927, 799, 2736, - /* 1700 */ 40, 39, 1694, 5, 46, 44, 43, 42, 41, 439, - /* 1710 */ 509, 1963, 2932, 218, 851, 1973, 523, 2927, 799, 1701, - /* 1720 */ 534, 227, 764, 2736, 226, 2735, 535, 826, 2774, 1699, - /* 1730 */ 2926, 537, 122, 2737, 854, 2739, 2740, 849, 848, 873, - /* 1740 */ 175, 229, 2736, 2754, 379, 1834, 2828, 551, 2932, 218, - /* 1750 */ 837, 2824, 1964, 2927, 799, 558, 240, 851, 560, 2701, - /* 1760 */ 564, 850, 566, 571, 608, 584, 2540, 2754, 595, 597, - /* 1770 */ 604, 607, 344, 609, 832, 620, 621, 327, 618, 246, - /* 1780 */ 245, 623, 326, 2701, 625, 850, 2754, 626, 249, 628, - /* 1790 */ 630, 1971, 4, 645, 656, 653, 257, 1966, 646, 658, - /* 1800 */ 654, 296, 2701, 96, 850, 1972, 852, 659, 1974, 2774, - /* 1810 */ 2736, 662, 660, 122, 2737, 854, 2739, 2740, 849, 260, - /* 1820 */ 873, 263, 1975, 265, 97, 851, 1976, 2828, 98, 2557, - /* 1830 */ 2735, 434, 2824, 2774, 2563, 692, 671, 410, 2737, 854, - /* 1840 */ 2739, 2740, 849, 847, 873, 833, 2793, 99, 272, 2735, - /* 1850 */ 2736, 694, 2774, 2404, 2754, 126, 186, 2737, 854, 2739, - /* 1860 */ 2740, 849, 276, 873, 2400, 851, 725, 278, 726, 413, - /* 1870 */ 2701, 177, 850, 123, 740, 2736, 2402, 2397, 178, 179, - /* 1880 */ 102, 742, 295, 1967, 751, 125, 2631, 752, 382, 758, - /* 1890 */ 851, 2609, 165, 300, 2754, 759, 2628, 2627, 753, 782, - /* 1900 */ 756, 820, 298, 765, 2886, 8, 768, 2867, 791, 766, - /* 1910 */ 2701, 769, 850, 767, 2895, 2894, 191, 2735, 2736, 2754, - /* 1920 */ 2774, 309, 305, 307, 189, 2737, 854, 2739, 2740, 849, - /* 1930 */ 796, 873, 311, 851, 313, 2701, 795, 850, 314, 466, - /* 1940 */ 2949, 807, 2925, 2847, 2736, 804, 156, 312, 2113, 316, - /* 1950 */ 1968, 2111, 204, 325, 166, 818, 383, 2735, 2577, 851, - /* 1960 */ 2774, 2844, 2754, 2576, 186, 2737, 854, 2739, 2740, 849, - /* 1970 */ 1, 873, 384, 2575, 470, 823, 824, 167, 2701, 831, - /* 1980 */ 850, 828, 2735, 800, 2947, 2774, 2736, 338, 2754, 122, - /* 1990 */ 2737, 854, 2739, 2740, 849, 61, 873, 2809, 858, 856, - /* 2000 */ 860, 851, 463, 2828, 2701, 385, 850, 861, 2825, 319, - /* 2010 */ 343, 112, 2887, 220, 2415, 115, 389, 2693, 1472, 2692, - /* 2020 */ 971, 2688, 2687, 2736, 2679, 2735, 875, 970, 2774, 2678, - /* 2030 */ 2754, 372, 411, 2737, 854, 2739, 2740, 849, 851, 873, - /* 2040 */ 2670, 2669, 2685, 2684, 176, 972, 2701, 375, 850, 967, - /* 2050 */ 376, 2735, 2676, 52, 2774, 2675, 974, 2664, 404, 2737, - /* 2060 */ 854, 2739, 2740, 849, 393, 873, 2663, 2754, 2682, 2681, - /* 2070 */ 464, 2673, 2672, 423, 2661, 2660, 2658, 414, 391, 2657, - /* 2080 */ 744, 2466, 431, 2701, 432, 850, 426, 401, 412, 402, - /* 2090 */ 2653, 2652, 2651, 2735, 85, 2646, 2774, 511, 512, 1891, - /* 2100 */ 411, 2737, 854, 2739, 2740, 849, 1892, 873, 224, 790, - /* 2110 */ 2736, 516, 2644, 518, 519, 520, 1890, 2643, 2642, 440, - /* 2120 */ 2640, 526, 2639, 528, 2638, 848, 530, 2637, 1878, 532, - /* 2130 */ 2735, 2613, 2736, 2774, 228, 2612, 230, 189, 2737, 854, - /* 2140 */ 2739, 2740, 849, 86, 873, 1837, 2590, 851, 1836, 2589, - /* 2150 */ 2588, 544, 545, 2587, 2754, 2586, 2530, 549, 1773, 2736, - /* 2160 */ 2527, 552, 2526, 2520, 555, 556, 2517, 233, 2516, 2515, - /* 2170 */ 2701, 2514, 850, 89, 851, 2519, 2754, 2518, 2513, 2512, - /* 2180 */ 235, 2510, 2509, 2508, 572, 2507, 237, 574, 2505, 2504, - /* 2190 */ 2503, 2502, 2701, 2501, 850, 2525, 2736, 2948, 2500, 2499, - /* 2200 */ 2498, 2523, 2506, 2754, 2497, 2496, 2495, 2493, 2492, 2491, - /* 2210 */ 2490, 851, 2489, 2488, 2487, 239, 475, 2735, 2486, 2701, - /* 2220 */ 2774, 850, 2485, 2736, 410, 2737, 854, 2739, 2740, 849, - /* 2230 */ 2484, 873, 2483, 2794, 95, 2555, 2524, 2522, 851, 2735, - /* 2240 */ 2754, 2482, 2774, 477, 2481, 2736, 411, 2737, 854, 2739, - /* 2250 */ 2740, 849, 2480, 873, 244, 1779, 2701, 2479, 850, 611, - /* 2260 */ 851, 2478, 2477, 2475, 613, 1624, 2735, 2754, 428, 2774, - /* 2270 */ 1628, 429, 2736, 411, 2737, 854, 2739, 2740, 849, 2305, - /* 2280 */ 873, 2304, 2303, 2701, 2302, 850, 1620, 851, 247, 2754, - /* 2290 */ 2300, 248, 250, 251, 2297, 631, 632, 633, 2296, 636, - /* 2300 */ 635, 2289, 637, 739, 639, 2701, 2774, 850, 640, 2736, - /* 2310 */ 406, 2737, 854, 2739, 2740, 849, 2754, 873, 641, 2276, - /* 2320 */ 2250, 643, 253, 2721, 851, 199, 1501, 81, 210, 651, - /* 2330 */ 2735, 2249, 2701, 2774, 850, 2611, 255, 396, 2737, 854, - /* 2340 */ 2739, 2740, 849, 82, 873, 2607, 2597, 2585, 262, 264, - /* 2350 */ 2736, 267, 2735, 2754, 2584, 2774, 2561, 269, 2554, 395, - /* 2360 */ 2737, 854, 2739, 2740, 849, 851, 873, 2392, 2299, 2701, - /* 2370 */ 2295, 850, 1550, 672, 674, 673, 2293, 676, 677, 2735, - /* 2380 */ 678, 2291, 2774, 681, 680, 2736, 397, 2737, 854, 2739, - /* 2390 */ 2740, 849, 2288, 873, 2754, 684, 682, 685, 2271, 686, - /* 2400 */ 851, 2269, 2270, 2268, 2246, 2394, 1705, 1706, 2393, 1610, - /* 2410 */ 2701, 1609, 850, 73, 1608, 1605, 2735, 2736, 275, 2774, - /* 2420 */ 2286, 1603, 1601, 403, 2737, 854, 2739, 2740, 849, 2754, - /* 2430 */ 873, 1600, 851, 1599, 2284, 1598, 2736, 1592, 454, 455, - /* 2440 */ 937, 2275, 1597, 939, 456, 2701, 720, 850, 1594, 1593, - /* 2450 */ 1591, 851, 2273, 457, 2245, 723, 2244, 2735, 2243, 727, - /* 2460 */ 2774, 2754, 2242, 729, 407, 2737, 854, 2739, 2740, 849, - /* 2470 */ 2241, 873, 731, 2240, 1872, 733, 1874, 2701, 1871, 850, - /* 2480 */ 2754, 128, 2736, 2610, 1862, 1876, 56, 28, 743, 67, - /* 2490 */ 1847, 2606, 2735, 1843, 297, 2774, 2701, 851, 850, 398, - /* 2500 */ 2737, 854, 2739, 2740, 849, 2596, 873, 57, 1845, 754, - /* 2510 */ 755, 2583, 301, 2582, 2736, 1822, 180, 2931, 760, 1821, - /* 2520 */ 770, 762, 20, 6, 2735, 2166, 2754, 2774, 462, 851, - /* 2530 */ 17, 408, 2737, 854, 2739, 2740, 849, 2140, 873, 30, - /* 2540 */ 304, 772, 2701, 2735, 850, 774, 2774, 7, 215, 306, - /* 2550 */ 399, 2737, 854, 2739, 2740, 849, 776, 873, 2754, 21, - /* 2560 */ 22, 203, 2147, 190, 202, 31, 32, 2134, 2722, 23, - /* 2570 */ 83, 216, 2106, 2108, 2701, 2104, 850, 65, 2736, 217, - /* 2580 */ 24, 2186, 2187, 2088, 18, 2181, 2180, 467, 2185, 2735, - /* 2590 */ 2184, 468, 2774, 851, 2087, 321, 409, 2737, 854, 2739, - /* 2600 */ 2740, 849, 2736, 873, 58, 59, 2581, 195, 2560, 106, - /* 2610 */ 107, 2559, 328, 108, 2142, 205, 334, 851, 69, 2553, - /* 2620 */ 827, 2735, 2754, 337, 2774, 821, 829, 2736, 400, 2737, - /* 2630 */ 854, 2739, 2740, 849, 109, 873, 25, 2040, 2701, 336, - /* 2640 */ 850, 11, 851, 2039, 13, 1956, 2754, 2015, 2050, 196, - /* 2650 */ 2014, 888, 206, 1991, 891, 339, 894, 897, 38, 2552, - /* 2660 */ 110, 2013, 2701, 16, 850, 859, 853, 2736, 26, 2389, - /* 2670 */ 864, 2754, 347, 1983, 27, 70, 865, 857, 341, 111, - /* 2680 */ 79, 880, 851, 2779, 116, 2735, 2778, 2701, 2774, 850, - /* 2690 */ 872, 2736, 416, 2737, 854, 2739, 2740, 849, 2017, 873, - /* 2700 */ 68, 2202, 874, 2201, 2199, 2200, 851, 1687, 494, 2735, - /* 2710 */ 882, 2754, 2774, 1684, 884, 885, 417, 2737, 854, 2739, - /* 2720 */ 2740, 849, 887, 873, 890, 1683, 1680, 2701, 1674, 850, - /* 2730 */ 893, 1672, 2736, 896, 2735, 2754, 1678, 2774, 371, 1677, - /* 2740 */ 117, 2748, 2737, 854, 2739, 2740, 849, 851, 873, 118, - /* 2750 */ 1676, 2701, 1700, 850, 1675, 80, 1696, 1588, 1548, 911, - /* 2760 */ 1587, 1586, 1583, 1580, 1579, 1578, 1577, 1575, 1573, 1572, - /* 2770 */ 925, 1618, 2736, 1571, 2735, 1617, 2754, 2774, 222, 927, - /* 2780 */ 1569, 2747, 2737, 854, 2739, 2740, 849, 851, 873, 1568, - /* 2790 */ 1567, 1566, 2701, 1565, 850, 1564, 1563, 1614, 2735, 2736, - /* 2800 */ 1612, 2774, 1560, 1559, 1556, 2746, 2737, 854, 2739, 2740, - /* 2810 */ 849, 1555, 873, 1554, 851, 1553, 2754, 2294, 2736, 947, - /* 2820 */ 949, 2292, 951, 2290, 948, 952, 953, 956, 955, 957, - /* 2830 */ 2287, 959, 2701, 851, 850, 960, 2267, 961, 963, 2735, - /* 2840 */ 2265, 965, 2774, 2754, 1490, 2239, 436, 2737, 854, 2739, - /* 2850 */ 2740, 849, 1478, 873, 1473, 969, 1480, 377, 973, 2701, - /* 2860 */ 1942, 850, 2754, 390, 976, 2205, 977, 2205, 2205, 2205, - /* 2870 */ 2205, 2205, 2205, 2205, 2205, 2205, 2205, 2205, 2701, 2735, - /* 2880 */ 850, 2205, 2774, 2736, 2205, 2205, 437, 2737, 854, 2739, - /* 2890 */ 2740, 849, 2205, 873, 2205, 2205, 2736, 2205, 851, 2205, - /* 2900 */ 2205, 2205, 2205, 2205, 2205, 2205, 2735, 2205, 2205, 2774, - /* 2910 */ 2205, 851, 2205, 433, 2737, 854, 2739, 2740, 849, 2205, - /* 2920 */ 873, 2205, 2205, 2205, 2205, 2735, 2205, 2754, 2774, 2205, - /* 2930 */ 2205, 2205, 438, 2737, 854, 2739, 2740, 849, 2205, 873, - /* 2940 */ 2754, 2205, 2205, 2701, 2205, 850, 2205, 2205, 2205, 2205, - /* 2950 */ 2205, 2205, 2205, 2205, 2205, 2205, 2701, 2205, 850, 2205, - /* 2960 */ 2205, 2205, 2205, 2205, 2205, 2205, 2205, 2205, 2205, 2205, - /* 2970 */ 2205, 2205, 2205, 2205, 2205, 2205, 2205, 2205, 2205, 2205, - /* 2980 */ 2205, 2205, 2205, 2205, 2205, 2205, 2205, 2205, 2205, 2205, - /* 2990 */ 852, 2205, 2205, 2774, 2205, 2205, 2205, 406, 2737, 854, - /* 3000 */ 2739, 2740, 849, 2735, 873, 2205, 2774, 2205, 2205, 2205, - /* 3010 */ 405, 2737, 854, 2739, 2740, 849, 2205, 873, + /* 0 */ 819, 668, 3000, 676, 669, 2308, 669, 2308, 2995, 2472, + /* 10 */ 2995, 954, 57, 55, 2427, 56, 54, 53, 52, 51, + /* 20 */ 497, 2261, 1979, 2623, 2004, 462, 818, 228, 769, 2999, + /* 30 */ 217, 2996, 820, 2996, 2998, 501, 1977, 490, 2081, 2352, + /* 40 */ 217, 2790, 148, 2620, 880, 147, 146, 145, 144, 143, + /* 50 */ 142, 141, 140, 139, 580, 2592, 834, 2596, 50, 49, + /* 60 */ 831, 167, 56, 54, 53, 52, 51, 2596, 2076, 148, + /* 70 */ 765, 863, 147, 146, 145, 144, 143, 142, 141, 140, + /* 80 */ 139, 893, 1985, 50, 49, 2808, 755, 56, 54, 53, + /* 90 */ 52, 51, 50, 49, 2695, 2008, 56, 54, 53, 52, + /* 100 */ 51, 2755, 749, 875, 753, 751, 298, 297, 244, 688, + /* 110 */ 678, 2662, 1000, 893, 691, 58, 971, 970, 969, 968, + /* 120 */ 526, 248, 967, 966, 172, 961, 960, 959, 958, 957, + /* 130 */ 956, 955, 171, 949, 948, 947, 525, 524, 944, 943, + /* 140 */ 942, 208, 207, 941, 521, 940, 939, 938, 2789, 42, + /* 150 */ 350, 2836, 2084, 2085, 808, 131, 2791, 879, 2793, 2794, + /* 160 */ 874, 2459, 2748, 862, 898, 514, 2217, 104, 2610, 210, + /* 170 */ 689, 2897, 103, 50, 49, 492, 2893, 56, 54, 53, + /* 180 */ 52, 51, 2790, 2808, 204, 2905, 830, 768, 159, 829, + /* 190 */ 3000, 2040, 2050, 341, 342, 229, 2995, 876, 340, 766, + /* 200 */ 2060, 2083, 2086, 2944, 2260, 50, 49, 2007, 60, 56, + /* 210 */ 54, 53, 52, 51, 818, 228, 1980, 2170, 1978, 2996, + /* 220 */ 820, 2177, 9, 861, 503, 503, 2808, 2004, 157, 156, + /* 230 */ 155, 154, 153, 152, 151, 150, 149, 898, 898, 102, + /* 240 */ 454, 893, 2755, 2258, 875, 935, 184, 183, 932, 931, + /* 250 */ 930, 181, 1983, 1984, 2037, 807, 2039, 2042, 2043, 2044, + /* 260 */ 2045, 2046, 2047, 2048, 2049, 871, 864, 2004, 224, 896, + /* 270 */ 895, 2067, 2068, 2070, 2071, 2072, 2075, 2077, 2078, 2079, + /* 280 */ 2080, 2082, 2, 57, 55, 2173, 684, 2790, 673, 2789, + /* 290 */ 2111, 497, 2836, 1979, 670, 687, 131, 2791, 879, 2793, + /* 300 */ 2794, 874, 873, 2241, 862, 898, 742, 1977, 169, 2081, + /* 310 */ 178, 2868, 2897, 2189, 831, 167, 492, 2893, 50, 49, + /* 320 */ 893, 756, 56, 54, 53, 52, 51, 3000, 571, 2009, + /* 330 */ 2623, 2808, 529, 2148, 72, 2995, 60, 528, 219, 2076, + /* 340 */ 299, 2148, 863, 33, 499, 2004, 19, 2755, 665, 875, + /* 350 */ 2620, 880, 43, 1985, 2999, 2112, 745, 663, 2996, 2997, + /* 360 */ 659, 655, 72, 739, 737, 2749, 57, 55, 72, 264, + /* 370 */ 296, 894, 2468, 671, 497, 2316, 1979, 2206, 633, 631, + /* 380 */ 332, 434, 769, 1000, 242, 76, 15, 2565, 785, 1532, + /* 390 */ 1977, 158, 2081, 202, 2789, 327, 2995, 2836, 2041, 714, + /* 400 */ 334, 429, 2791, 879, 2793, 2794, 874, 872, 1539, 862, + /* 410 */ 898, 854, 2862, 2355, 3001, 228, 82, 124, 12, 2996, + /* 420 */ 820, 81, 2076, 2084, 2085, 863, 2218, 518, 503, 19, + /* 430 */ 2521, 2523, 2117, 1534, 1537, 1538, 1985, 833, 197, 2905, + /* 440 */ 2906, 898, 165, 2910, 801, 800, 2204, 2205, 2207, 2208, + /* 450 */ 2209, 41, 494, 2106, 2107, 2108, 2109, 2110, 2114, 2115, + /* 460 */ 2116, 2038, 2040, 2050, 771, 2662, 1000, 2005, 562, 15, + /* 470 */ 561, 61, 2083, 2086, 2917, 2145, 2146, 2147, 2917, 2917, + /* 480 */ 2917, 2917, 2917, 2145, 2146, 2147, 2765, 1980, 1985, 1978, + /* 490 */ 735, 734, 733, 194, 861, 192, 72, 725, 164, 729, + /* 500 */ 809, 2401, 560, 728, 516, 2470, 2084, 2085, 727, 732, + /* 510 */ 472, 471, 904, 1650, 726, 2769, 1825, 1826, 470, 722, + /* 520 */ 721, 720, 2169, 1983, 1984, 2037, 334, 2039, 2042, 2043, + /* 530 */ 2044, 2045, 2046, 2047, 2048, 2049, 871, 864, 2452, 441, + /* 540 */ 896, 895, 2067, 2068, 182, 2040, 2050, 2075, 2077, 2078, + /* 550 */ 2079, 2080, 2082, 2, 334, 2083, 2086, 685, 608, 1652, + /* 560 */ 334, 469, 468, 607, 1712, 2771, 2773, 493, 302, 2148, + /* 570 */ 1980, 606, 1978, 221, 831, 167, 2445, 861, 898, 1703, + /* 580 */ 927, 926, 925, 1707, 924, 1709, 1710, 923, 920, 2515, + /* 590 */ 1718, 917, 1720, 1721, 914, 911, 908, 50, 49, 1751, + /* 600 */ 1752, 56, 54, 53, 52, 51, 1983, 1984, 2037, 173, + /* 610 */ 2039, 2042, 2043, 2044, 2045, 2046, 2047, 2048, 2049, 871, + /* 620 */ 864, 686, 2616, 896, 895, 2067, 2068, 64, 2912, 2623, + /* 630 */ 2075, 2077, 2078, 2079, 2080, 2082, 2, 12, 57, 55, + /* 640 */ 509, 467, 466, 391, 716, 2790, 497, 301, 1979, 2621, + /* 650 */ 880, 300, 804, 1906, 1907, 1712, 2909, 831, 167, 195, + /* 660 */ 876, 2272, 1977, 334, 2081, 718, 903, 902, 901, 717, + /* 670 */ 1703, 927, 926, 925, 1707, 924, 1709, 1710, 870, 869, + /* 680 */ 2790, 1718, 868, 1720, 1721, 867, 911, 908, 334, 2808, + /* 690 */ 1559, 2283, 1558, 2005, 2076, 876, 2548, 863, 137, 2905, + /* 700 */ 2906, 19, 165, 2910, 2671, 2755, 163, 875, 1985, 217, + /* 710 */ 2917, 2145, 2146, 2147, 2917, 2917, 2917, 2917, 2917, 894, + /* 720 */ 2468, 57, 55, 2087, 2808, 113, 548, 2765, 1560, 497, + /* 730 */ 449, 1979, 2282, 477, 2037, 757, 2597, 2092, 1000, 520, + /* 740 */ 2755, 15, 875, 2004, 134, 1977, 1559, 2081, 1558, 1562, + /* 750 */ 1563, 2755, 2789, 516, 2470, 2836, 2769, 586, 2592, 416, + /* 760 */ 2791, 879, 2793, 2794, 874, 723, 31, 862, 898, 810, + /* 770 */ 805, 798, 794, 894, 2468, 617, 2592, 2076, 2084, 2085, + /* 780 */ 863, 198, 2905, 2906, 1560, 165, 2910, 2789, 1643, 2708, + /* 790 */ 2836, 1985, 2755, 158, 131, 2791, 879, 2793, 2794, 874, + /* 800 */ 500, 719, 862, 898, 479, 2670, 2771, 2774, 2872, 191, + /* 810 */ 2897, 246, 894, 2468, 492, 2893, 94, 2040, 2050, 898, + /* 820 */ 2473, 1000, 1948, 937, 58, 1852, 1853, 2083, 2086, 251, + /* 830 */ 50, 49, 233, 170, 56, 54, 53, 52, 51, 735, + /* 840 */ 734, 733, 1980, 2460, 1978, 785, 725, 164, 729, 861, + /* 850 */ 928, 610, 728, 2995, 508, 507, 46, 727, 732, 472, + /* 860 */ 471, 2084, 2085, 726, 552, 2709, 609, 470, 722, 721, + /* 870 */ 720, 3001, 228, 2281, 1851, 1854, 2996, 820, 1983, 1984, + /* 880 */ 2037, 110, 2039, 2042, 2043, 2044, 2045, 2046, 2047, 2048, + /* 890 */ 2049, 871, 864, 554, 550, 896, 895, 2067, 2068, 465, + /* 900 */ 2040, 2050, 2075, 2077, 2078, 2079, 2080, 2082, 2, 2463, + /* 910 */ 2083, 2086, 50, 49, 2041, 174, 56, 54, 53, 52, + /* 920 */ 51, 785, 266, 894, 2468, 1980, 671, 1978, 2316, 2995, + /* 930 */ 2008, 519, 861, 2755, 894, 2468, 2528, 12, 512, 10, + /* 940 */ 191, 564, 2007, 65, 460, 2528, 563, 3001, 228, 2008, + /* 950 */ 762, 2473, 2996, 820, 568, 2526, 894, 2468, 384, 523, + /* 960 */ 522, 1983, 1984, 2037, 838, 2039, 2042, 2043, 2044, 2045, + /* 970 */ 2046, 2047, 2048, 2049, 871, 864, 569, 2038, 896, 895, + /* 980 */ 2067, 2068, 2528, 1986, 724, 2075, 2077, 2078, 2079, 2080, + /* 990 */ 2082, 2, 57, 55, 1979, 2790, 2528, 785, 1896, 1662, + /* 1000 */ 497, 846, 1979, 784, 488, 2995, 785, 1641, 1977, 1539, + /* 1010 */ 834, 894, 2468, 1661, 2995, 2526, 1977, 855, 2081, 2869, + /* 1020 */ 2057, 894, 2468, 3001, 228, 894, 2468, 37, 2996, 820, + /* 1030 */ 2248, 588, 3001, 228, 819, 1537, 1538, 2996, 820, 2808, + /* 1040 */ 2280, 602, 2995, 168, 2790, 690, 2868, 391, 2076, 2522, + /* 1050 */ 2523, 863, 894, 2468, 1985, 2755, 857, 875, 2869, 876, + /* 1060 */ 818, 228, 1985, 50, 49, 2996, 820, 56, 54, 53, + /* 1070 */ 52, 51, 603, 50, 49, 57, 55, 56, 54, 53, + /* 1080 */ 52, 51, 866, 497, 1000, 1979, 710, 709, 2808, 638, + /* 1090 */ 712, 711, 1000, 865, 123, 58, 894, 2468, 2530, 1977, + /* 1100 */ 2755, 2081, 2789, 223, 2755, 2836, 875, 478, 2670, 131, + /* 1110 */ 2791, 879, 2793, 2794, 874, 332, 604, 862, 898, 2279, + /* 1120 */ 1947, 2461, 231, 210, 627, 2897, 53, 52, 51, 492, + /* 1130 */ 2893, 2076, 2084, 2085, 863, 313, 38, 2150, 2151, 2152, + /* 1140 */ 2153, 2154, 50, 49, 70, 1985, 56, 54, 53, 52, + /* 1150 */ 51, 2789, 511, 510, 2836, 782, 2247, 2945, 196, 2791, + /* 1160 */ 879, 2793, 2794, 874, 2009, 1989, 862, 898, 2528, 894, + /* 1170 */ 2468, 2040, 2050, 894, 2468, 1000, 502, 2004, 58, 2755, + /* 1180 */ 191, 2083, 2086, 2009, 894, 2468, 115, 2526, 1980, 2465, + /* 1190 */ 1978, 2474, 253, 304, 894, 2468, 1980, 2457, 1978, 40, + /* 1200 */ 894, 2468, 2676, 861, 312, 50, 49, 786, 2955, 56, + /* 1210 */ 54, 53, 52, 51, 837, 2084, 2085, 626, 252, 2912, + /* 1220 */ 345, 2455, 50, 49, 1983, 1984, 56, 54, 53, 52, + /* 1230 */ 51, 624, 1983, 1984, 2037, 2278, 2039, 2042, 2043, 2044, + /* 1240 */ 2045, 2046, 2047, 2048, 2049, 871, 864, 2908, 135, 896, + /* 1250 */ 895, 2067, 2068, 636, 2040, 2050, 2075, 2077, 2078, 2079, + /* 1260 */ 2080, 2082, 2, 303, 2083, 2086, 50, 49, 1666, 1541, + /* 1270 */ 56, 54, 53, 52, 51, 2003, 284, 894, 2468, 1980, + /* 1280 */ 2444, 1978, 1665, 50, 49, 2442, 861, 56, 54, 53, + /* 1290 */ 52, 51, 203, 894, 2468, 2755, 390, 851, 894, 2468, + /* 1300 */ 192, 708, 704, 700, 696, 44, 283, 2441, 731, 730, + /* 1310 */ 2471, 894, 2468, 352, 2999, 1983, 1984, 2037, 887, 2039, + /* 1320 */ 2042, 2043, 2044, 2045, 2046, 2047, 2048, 2049, 871, 864, + /* 1330 */ 2061, 888, 896, 895, 2067, 2068, 14, 13, 2113, 2075, + /* 1340 */ 2077, 2078, 2079, 2080, 2082, 2, 57, 55, 2041, 2277, + /* 1350 */ 2198, 438, 111, 2002, 497, 767, 1979, 281, 640, 937, + /* 1360 */ 615, 50, 49, 464, 2199, 56, 54, 53, 52, 51, + /* 1370 */ 1977, 635, 2081, 1003, 50, 49, 894, 2468, 56, 54, + /* 1380 */ 53, 52, 51, 894, 2468, 2528, 398, 594, 2276, 637, + /* 1390 */ 2505, 2058, 388, 517, 439, 596, 892, 951, 965, 963, + /* 1400 */ 45, 2275, 2076, 380, 2526, 863, 574, 991, 218, 2755, + /* 1410 */ 2197, 2038, 2912, 2699, 2274, 2118, 1985, 987, 983, 979, + /* 1420 */ 975, 2008, 383, 2004, 269, 935, 184, 183, 932, 931, + /* 1430 */ 930, 181, 110, 280, 39, 174, 929, 271, 278, 2519, + /* 1440 */ 2907, 543, 933, 276, 682, 2519, 1000, 463, 2755, 15, + /* 1450 */ 1988, 2125, 935, 184, 183, 932, 931, 930, 181, 582, + /* 1460 */ 2464, 2755, 268, 2271, 2270, 235, 953, 536, 130, 2269, + /* 1470 */ 2268, 50, 49, 356, 2755, 56, 54, 53, 52, 51, + /* 1480 */ 309, 770, 2056, 835, 2267, 823, 2084, 2085, 2266, 934, + /* 1490 */ 2603, 2582, 2519, 623, 622, 621, 620, 619, 614, 613, + /* 1500 */ 612, 611, 446, 813, 847, 601, 600, 599, 598, 597, + /* 1510 */ 591, 590, 589, 2265, 584, 583, 461, 2264, 1904, 2528, + /* 1520 */ 575, 1813, 1814, 2755, 2755, 2040, 2050, 1832, 114, 2755, + /* 1530 */ 2755, 2288, 993, 2250, 2251, 2083, 2086, 785, 2527, 785, + /* 1540 */ 2575, 2263, 792, 289, 2755, 2995, 287, 2995, 2755, 354, + /* 1550 */ 1980, 853, 1978, 3, 337, 88, 718, 861, 222, 336, + /* 1560 */ 717, 160, 1880, 3001, 228, 3001, 228, 63, 2996, 820, + /* 1570 */ 2996, 820, 2159, 2755, 759, 100, 758, 2755, 306, 2055, + /* 1580 */ 291, 1645, 293, 290, 578, 292, 1983, 1984, 2037, 1623, + /* 1590 */ 2039, 2042, 2043, 2044, 2045, 2046, 2047, 2048, 2049, 871, + /* 1600 */ 864, 2755, 2339, 896, 895, 2067, 2068, 59, 826, 101, + /* 1610 */ 2075, 2077, 2078, 2079, 2080, 2082, 2, 193, 59, 211, + /* 1620 */ 295, 2790, 404, 294, 736, 2193, 397, 1646, 2337, 2328, + /* 1630 */ 2326, 2776, 1991, 182, 339, 1624, 876, 87, 2318, 59, + /* 1640 */ 822, 402, 86, 14, 13, 85, 74, 2790, 1596, 59, + /* 1650 */ 738, 740, 743, 860, 1987, 2009, 440, 2038, 59, 59, + /* 1660 */ 359, 358, 876, 2472, 2952, 2808, 2273, 87, 262, 650, + /* 1670 */ 648, 645, 643, 361, 360, 363, 362, 179, 365, 364, + /* 1680 */ 129, 2755, 126, 875, 160, 182, 367, 366, 369, 368, + /* 1690 */ 2203, 2808, 371, 370, 1597, 2778, 373, 372, 375, 374, + /* 1700 */ 945, 2202, 318, 377, 376, 379, 378, 2755, 84, 875, + /* 1710 */ 906, 180, 182, 2402, 72, 161, 836, 343, 179, 202, + /* 1720 */ 843, 2958, 2059, 1615, 946, 2320, 328, 802, 2789, 2119, + /* 1730 */ 320, 2836, 2062, 832, 2809, 131, 2791, 879, 2793, 2794, + /* 1740 */ 874, 2051, 1849, 862, 898, 162, 2394, 1613, 2393, 3015, + /* 1750 */ 1839, 2897, 2309, 73, 2789, 492, 2893, 2836, 2948, 2790, + /* 1760 */ 355, 131, 2791, 879, 2793, 2794, 874, 891, 1694, 862, + /* 1770 */ 898, 799, 484, 806, 876, 3015, 2965, 2897, 480, 840, + /* 1780 */ 989, 492, 2893, 824, 2601, 527, 545, 778, 2315, 814, + /* 1790 */ 2516, 396, 2949, 1725, 1733, 1740, 2959, 815, 1738, 330, + /* 1800 */ 325, 185, 333, 2808, 2602, 2790, 5, 98, 97, 567, + /* 1810 */ 2428, 535, 241, 530, 458, 2002, 2012, 544, 237, 2755, + /* 1820 */ 876, 875, 796, 556, 555, 559, 557, 558, 1873, 239, + /* 1830 */ 2103, 2003, 523, 522, 389, 2790, 1990, 236, 437, 572, + /* 1840 */ 250, 546, 1993, 579, 542, 538, 534, 531, 560, 2808, + /* 1850 */ 876, 581, 2988, 585, 629, 587, 1986, 605, 2081, 592, + /* 1860 */ 616, 2594, 625, 618, 628, 2755, 2789, 875, 641, 2836, + /* 1870 */ 630, 642, 639, 131, 2791, 879, 2793, 2794, 874, 2808, + /* 1880 */ 255, 862, 898, 256, 644, 646, 2790, 3015, 2076, 2897, + /* 1890 */ 647, 259, 2010, 492, 2893, 2755, 649, 875, 666, 651, + /* 1900 */ 4, 876, 1985, 2929, 667, 674, 334, 675, 827, 2005, + /* 1910 */ 677, 679, 2789, 267, 2011, 2836, 680, 106, 270, 131, + /* 1920 */ 2791, 879, 2793, 2794, 874, 2013, 273, 862, 898, 681, + /* 1930 */ 2808, 683, 859, 3015, 275, 2897, 2014, 2617, 2015, 492, + /* 1940 */ 2893, 107, 2789, 108, 2611, 2836, 2755, 109, 875, 131, + /* 1950 */ 2791, 879, 2793, 2794, 874, 282, 692, 862, 898, 713, + /* 1960 */ 136, 444, 443, 3015, 746, 2897, 715, 2458, 747, 492, + /* 1970 */ 2893, 504, 2685, 286, 2454, 288, 432, 2682, 187, 133, + /* 1980 */ 2456, 2451, 188, 189, 761, 513, 2681, 2081, 112, 763, + /* 1990 */ 2006, 305, 175, 2789, 773, 2790, 2836, 392, 2663, 774, + /* 2000 */ 131, 2791, 879, 2793, 2794, 874, 772, 308, 862, 898, + /* 2010 */ 876, 777, 310, 780, 3015, 789, 2897, 2076, 803, 2964, + /* 2020 */ 492, 2893, 841, 315, 2963, 2790, 812, 779, 317, 8, + /* 2030 */ 790, 201, 321, 2936, 319, 788, 1994, 322, 1989, 2808, + /* 2040 */ 876, 787, 817, 324, 323, 816, 3018, 485, 828, 825, + /* 2050 */ 2916, 2994, 326, 166, 329, 2755, 2007, 875, 2913, 2790, + /* 2060 */ 2167, 2165, 1, 214, 335, 230, 176, 839, 2631, 2808, + /* 2070 */ 2630, 2629, 1997, 1999, 876, 489, 393, 394, 844, 177, + /* 2080 */ 845, 849, 852, 71, 2878, 2755, 883, 875, 395, 896, + /* 2090 */ 895, 881, 348, 885, 2747, 2469, 2075, 2077, 2078, 2079, + /* 2100 */ 2080, 2082, 2789, 2808, 886, 2836, 353, 122, 125, 131, + /* 2110 */ 2791, 879, 2793, 2794, 874, 2746, 2742, 862, 898, 2755, + /* 2120 */ 2741, 875, 382, 2870, 995, 2897, 1511, 996, 399, 492, + /* 2130 */ 2893, 900, 2789, 997, 186, 2836, 2733, 2732, 2724, 131, + /* 2140 */ 2791, 879, 2793, 2794, 874, 385, 2790, 862, 898, 2723, + /* 2150 */ 992, 999, 2739, 856, 2738, 2897, 386, 2730, 2729, 492, + /* 2160 */ 2893, 876, 2718, 2717, 450, 1970, 2789, 1946, 2736, 2836, + /* 2170 */ 2735, 2727, 2726, 132, 2791, 879, 2793, 2794, 874, 2715, + /* 2180 */ 2714, 862, 898, 2712, 442, 2711, 2520, 420, 431, 2897, + /* 2190 */ 2808, 421, 2790, 2896, 2893, 62, 401, 451, 445, 506, + /* 2200 */ 505, 1971, 403, 2707, 2706, 2705, 2755, 876, 875, 95, + /* 2210 */ 2700, 532, 765, 1930, 433, 533, 1931, 234, 896, 895, + /* 2220 */ 537, 2698, 2790, 539, 540, 2075, 2077, 2078, 2079, 2080, + /* 2230 */ 2082, 541, 1929, 2697, 2696, 459, 2808, 876, 2694, 2693, + /* 2240 */ 2692, 551, 547, 549, 2691, 553, 1917, 2667, 238, 2666, + /* 2250 */ 240, 1876, 2755, 2789, 875, 96, 2836, 1875, 2644, 2643, + /* 2260 */ 132, 2791, 879, 2793, 2794, 874, 2808, 2642, 862, 898, + /* 2270 */ 565, 2641, 566, 2640, 2584, 570, 2897, 1812, 2581, 573, + /* 2280 */ 858, 2893, 2755, 2580, 875, 2574, 2790, 576, 2571, 577, + /* 2290 */ 2570, 2569, 243, 99, 2568, 2573, 245, 2572, 2567, 877, + /* 2300 */ 2566, 876, 2836, 2564, 2563, 2562, 132, 2791, 879, 2793, + /* 2310 */ 2794, 874, 247, 2790, 862, 898, 593, 2561, 595, 2559, + /* 2320 */ 2558, 2557, 2897, 2556, 2555, 2579, 453, 2893, 876, 2789, + /* 2330 */ 2808, 2554, 2836, 2553, 2552, 2577, 199, 2791, 879, 2793, + /* 2340 */ 2794, 874, 2560, 2551, 862, 898, 2755, 2550, 875, 2549, + /* 2350 */ 2790, 2547, 2546, 2545, 2544, 2543, 2542, 2808, 249, 2541, + /* 2360 */ 105, 2540, 2539, 2538, 2537, 876, 1818, 2534, 2533, 254, + /* 2370 */ 632, 2532, 634, 2755, 2609, 875, 2578, 2576, 2536, 2535, + /* 2380 */ 2531, 2529, 1663, 2359, 447, 2358, 257, 1667, 448, 2357, + /* 2390 */ 258, 2356, 2354, 2789, 2808, 260, 2836, 821, 3016, 2790, + /* 2400 */ 132, 2791, 879, 2793, 2794, 874, 1659, 261, 862, 898, + /* 2410 */ 2755, 2351, 875, 654, 876, 2350, 2897, 658, 652, 2343, + /* 2420 */ 2789, 2894, 656, 2836, 660, 2330, 653, 196, 2791, 879, + /* 2430 */ 2793, 2794, 874, 664, 482, 862, 898, 662, 657, 2304, + /* 2440 */ 91, 661, 263, 2808, 1540, 209, 2303, 92, 2790, 2775, + /* 2450 */ 220, 672, 265, 2665, 2661, 2651, 2639, 2789, 272, 2755, + /* 2460 */ 2836, 875, 274, 876, 430, 2791, 879, 2793, 2794, 874, + /* 2470 */ 2638, 277, 862, 898, 2615, 279, 2790, 2956, 693, 2347, + /* 2480 */ 1589, 2353, 2349, 483, 2608, 2446, 694, 695, 697, 699, + /* 2490 */ 2790, 876, 2808, 2345, 698, 701, 2342, 705, 702, 2325, + /* 2500 */ 2323, 703, 706, 2324, 707, 876, 2789, 2322, 2755, 2836, + /* 2510 */ 875, 1745, 2790, 430, 2791, 879, 2793, 2794, 874, 2300, + /* 2520 */ 2808, 862, 898, 2448, 1744, 2447, 83, 873, 285, 2340, + /* 2530 */ 1649, 1648, 2338, 1647, 2808, 1631, 2755, 1644, 875, 2329, + /* 2540 */ 1642, 1640, 1639, 473, 474, 1638, 1637, 962, 1636, 964, + /* 2550 */ 2755, 1633, 875, 1632, 1630, 2789, 2808, 475, 2836, 2327, + /* 2560 */ 476, 2299, 423, 2791, 879, 2793, 2794, 874, 2298, 744, + /* 2570 */ 862, 898, 2755, 2297, 875, 754, 741, 748, 2296, 750, + /* 2580 */ 2295, 2790, 752, 2789, 2294, 138, 2836, 1911, 1913, 1915, + /* 2590 */ 199, 2791, 879, 2793, 2794, 874, 876, 2789, 862, 898, + /* 2600 */ 2836, 32, 1910, 2664, 415, 2791, 879, 2793, 2794, 874, + /* 2610 */ 66, 307, 862, 898, 2660, 811, 67, 2790, 764, 2789, + /* 2620 */ 2650, 1882, 2836, 1901, 1884, 2808, 429, 2791, 879, 2793, + /* 2630 */ 2794, 874, 876, 1886, 862, 898, 311, 2863, 775, 77, + /* 2640 */ 190, 2755, 776, 875, 1861, 2790, 2637, 2636, 3000, 17, + /* 2650 */ 781, 1860, 3017, 783, 21, 34, 6, 7, 2220, 314, + /* 2660 */ 876, 2808, 791, 2194, 481, 495, 316, 797, 795, 793, + /* 2670 */ 22, 23, 213, 2201, 2188, 225, 2776, 2755, 200, 875, + /* 2680 */ 2158, 36, 212, 2160, 35, 93, 226, 24, 2789, 2808, + /* 2690 */ 2162, 2836, 227, 75, 25, 430, 2791, 879, 2793, 2794, + /* 2700 */ 874, 491, 2240, 862, 898, 2755, 2241, 875, 2235, 2234, + /* 2710 */ 486, 2239, 2238, 487, 331, 2142, 2141, 69, 18, 205, + /* 2720 */ 2635, 2614, 68, 116, 2789, 117, 2790, 2836, 338, 496, + /* 2730 */ 215, 413, 2791, 879, 2793, 2794, 874, 2613, 2196, 862, + /* 2740 */ 898, 876, 344, 118, 842, 79, 2607, 848, 347, 346, + /* 2750 */ 119, 26, 2789, 2094, 2790, 2836, 11, 13, 850, 430, + /* 2760 */ 2791, 879, 2793, 2794, 874, 2093, 349, 862, 898, 876, + /* 2770 */ 2808, 1995, 27, 28, 20, 47, 206, 913, 2104, 216, + /* 2780 */ 2054, 2053, 916, 2030, 919, 922, 2755, 2052, 875, 878, + /* 2790 */ 2790, 884, 120, 48, 16, 2606, 2443, 29, 2808, 2022, + /* 2800 */ 30, 80, 889, 882, 351, 876, 121, 2256, 357, 126, + /* 2810 */ 498, 890, 89, 2847, 2755, 2846, 875, 2064, 897, 78, + /* 2820 */ 899, 2255, 2254, 2790, 1726, 2253, 905, 907, 515, 1723, + /* 2830 */ 909, 910, 1717, 2789, 2808, 1722, 2836, 912, 876, 1719, + /* 2840 */ 430, 2791, 879, 2793, 2794, 874, 915, 1713, 862, 898, + /* 2850 */ 2755, 918, 875, 921, 1711, 127, 381, 128, 1739, 1716, + /* 2860 */ 90, 760, 1735, 1715, 2836, 1587, 2790, 2808, 425, 2791, + /* 2870 */ 879, 2793, 2794, 874, 1627, 1626, 862, 898, 1714, 936, + /* 2880 */ 1625, 876, 1622, 2755, 1619, 875, 1618, 1617, 1657, 1616, + /* 2890 */ 1614, 1612, 1611, 1610, 1656, 950, 952, 2789, 232, 2790, + /* 2900 */ 2836, 1653, 1608, 1605, 407, 2791, 879, 2793, 2794, 874, + /* 2910 */ 2808, 1607, 862, 898, 876, 1606, 1604, 1593, 1603, 1602, + /* 2920 */ 1651, 1599, 1598, 1595, 1594, 1592, 2755, 2348, 875, 972, + /* 2930 */ 2789, 973, 2346, 2836, 974, 976, 978, 405, 2791, 879, + /* 2940 */ 2793, 2794, 874, 2808, 2344, 862, 898, 980, 977, 982, + /* 2950 */ 981, 2341, 984, 986, 2321, 985, 988, 2319, 990, 2755, + /* 2960 */ 1529, 875, 2293, 2790, 1512, 1517, 994, 1519, 387, 998, + /* 2970 */ 2259, 1981, 400, 2789, 1001, 1002, 2836, 2259, 876, 2259, + /* 2980 */ 408, 2791, 879, 2793, 2794, 874, 2790, 2259, 862, 898, + /* 2990 */ 2259, 2259, 2259, 2259, 2259, 2259, 2259, 2259, 2259, 2259, + /* 3000 */ 2259, 876, 2259, 2259, 2259, 2259, 2789, 2808, 2259, 2836, + /* 3010 */ 2259, 2259, 2259, 422, 2791, 879, 2793, 2794, 874, 2259, + /* 3020 */ 2259, 862, 898, 2755, 2259, 875, 2259, 2259, 2259, 2259, + /* 3030 */ 2808, 2259, 2790, 2259, 2259, 2259, 2259, 2259, 2259, 2259, + /* 3040 */ 2259, 2259, 2259, 2259, 2259, 2259, 2755, 876, 875, 2259, + /* 3050 */ 2259, 2259, 2259, 2259, 2790, 2259, 2259, 2259, 2259, 2259, + /* 3060 */ 2259, 2259, 2259, 2259, 2259, 2259, 2259, 2259, 2790, 876, + /* 3070 */ 2789, 2259, 2259, 2836, 2259, 2259, 2808, 409, 2791, 879, + /* 3080 */ 2793, 2794, 874, 876, 2259, 862, 898, 2259, 2259, 2259, + /* 3090 */ 2259, 2259, 2755, 2789, 875, 2259, 2836, 2259, 2808, 2259, + /* 3100 */ 426, 2791, 879, 2793, 2794, 874, 2259, 2259, 862, 898, + /* 3110 */ 2259, 2259, 2808, 2259, 2755, 2259, 875, 2259, 2259, 2259, + /* 3120 */ 2259, 2259, 2259, 2259, 2259, 2259, 2259, 2259, 2755, 2259, + /* 3130 */ 875, 2259, 2259, 2259, 2259, 2259, 2259, 2259, 2259, 2789, + /* 3140 */ 2259, 2259, 2836, 2259, 2790, 2259, 410, 2791, 879, 2793, + /* 3150 */ 2794, 874, 2259, 2259, 862, 898, 2259, 2259, 2259, 876, + /* 3160 */ 2259, 2789, 2259, 2259, 2836, 2259, 2259, 2259, 427, 2791, + /* 3170 */ 879, 2793, 2794, 874, 2259, 2789, 862, 898, 2836, 2790, + /* 3180 */ 2259, 2259, 411, 2791, 879, 2793, 2794, 874, 2808, 2259, + /* 3190 */ 862, 898, 2259, 2259, 876, 2259, 2259, 2259, 2259, 2259, + /* 3200 */ 2259, 2259, 2259, 2259, 2755, 2259, 875, 2259, 2259, 2259, + /* 3210 */ 2259, 2259, 2790, 2259, 2259, 2259, 2259, 2259, 2259, 2259, + /* 3220 */ 2259, 2259, 2259, 2808, 2259, 2259, 2259, 876, 2259, 2259, + /* 3230 */ 2259, 2259, 2259, 2259, 2259, 2259, 2259, 2259, 2259, 2755, + /* 3240 */ 2259, 875, 2259, 2259, 2259, 2259, 2259, 2259, 2259, 2259, + /* 3250 */ 2259, 2789, 2259, 2259, 2836, 2790, 2808, 2259, 428, 2791, + /* 3260 */ 879, 2793, 2794, 874, 2259, 2259, 862, 898, 2259, 2259, + /* 3270 */ 876, 2259, 2755, 2259, 875, 2259, 2259, 2259, 2259, 2259, + /* 3280 */ 2259, 2259, 2259, 2259, 2259, 2259, 2789, 2259, 2790, 2836, + /* 3290 */ 2259, 2259, 2259, 412, 2791, 879, 2793, 2794, 874, 2808, + /* 3300 */ 2259, 862, 898, 876, 2259, 2259, 2259, 2259, 2259, 2259, + /* 3310 */ 2259, 2259, 2259, 2259, 2259, 2755, 2259, 875, 2259, 2789, + /* 3320 */ 2259, 2259, 2836, 2259, 2259, 2259, 406, 2791, 879, 2793, + /* 3330 */ 2794, 874, 2808, 2259, 862, 898, 2259, 2259, 2259, 2259, + /* 3340 */ 2259, 2259, 2259, 2259, 2259, 2259, 2259, 2259, 2755, 2259, + /* 3350 */ 875, 2259, 2790, 2259, 2259, 2259, 2259, 2259, 2259, 2259, + /* 3360 */ 2259, 2259, 2789, 2259, 2259, 2836, 2259, 876, 2259, 414, + /* 3370 */ 2791, 879, 2793, 2794, 874, 2790, 2259, 862, 898, 2259, + /* 3380 */ 2259, 2259, 2259, 2259, 2259, 2259, 2259, 2259, 2259, 2259, + /* 3390 */ 876, 2259, 2259, 2259, 2259, 2789, 2808, 2259, 2836, 2259, + /* 3400 */ 2259, 2259, 417, 2791, 879, 2793, 2794, 874, 2259, 2259, + /* 3410 */ 862, 898, 2755, 2259, 875, 2259, 2259, 2259, 2259, 2808, + /* 3420 */ 2259, 2790, 2259, 2259, 2259, 2259, 2259, 2259, 2259, 2259, + /* 3430 */ 2259, 2259, 2259, 2259, 2259, 2755, 876, 875, 2259, 2259, + /* 3440 */ 2259, 2259, 2259, 2790, 2259, 2259, 2259, 2259, 2259, 2259, + /* 3450 */ 2259, 2259, 2259, 2259, 2259, 2259, 2259, 2790, 876, 2789, + /* 3460 */ 2259, 2259, 2836, 2259, 2259, 2808, 418, 2791, 879, 2793, + /* 3470 */ 2794, 874, 876, 2259, 862, 898, 2259, 2259, 2259, 2259, + /* 3480 */ 2259, 2755, 2789, 875, 2259, 2836, 2259, 2808, 2259, 419, + /* 3490 */ 2791, 879, 2793, 2794, 874, 2259, 2259, 862, 898, 2259, + /* 3500 */ 2259, 2808, 2259, 2755, 2259, 875, 2259, 2259, 2259, 2259, + /* 3510 */ 2259, 2259, 2259, 2259, 2259, 2259, 2259, 2755, 2259, 875, + /* 3520 */ 2259, 2259, 2259, 2259, 2259, 2259, 2259, 2259, 2789, 2259, + /* 3530 */ 2259, 2836, 2259, 2790, 2259, 435, 2791, 879, 2793, 2794, + /* 3540 */ 874, 2259, 2259, 862, 898, 2259, 2259, 2259, 876, 2259, + /* 3550 */ 2789, 2259, 2259, 2836, 2259, 2259, 2259, 436, 2791, 879, + /* 3560 */ 2793, 2794, 874, 2259, 2789, 862, 898, 2836, 2790, 2259, + /* 3570 */ 2259, 2802, 2791, 879, 2793, 2794, 874, 2808, 2259, 862, + /* 3580 */ 898, 2259, 2259, 876, 2259, 2259, 2259, 2259, 2259, 2259, + /* 3590 */ 2259, 2259, 2259, 2755, 2259, 875, 2259, 2259, 2259, 2259, + /* 3600 */ 2259, 2790, 2259, 2259, 2259, 2259, 2259, 2259, 2259, 2259, + /* 3610 */ 2259, 2259, 2808, 2259, 2259, 2259, 876, 2259, 2259, 2259, + /* 3620 */ 2259, 2259, 2259, 2259, 2259, 2259, 2259, 2259, 2755, 2259, + /* 3630 */ 875, 2259, 2259, 2259, 2259, 2259, 2259, 2259, 2259, 2259, + /* 3640 */ 2789, 2259, 2259, 2836, 2790, 2808, 2259, 2801, 2791, 879, + /* 3650 */ 2793, 2794, 874, 2259, 2259, 862, 898, 2259, 2259, 876, + /* 3660 */ 2259, 2755, 2259, 875, 2259, 2259, 2259, 2259, 2259, 2259, + /* 3670 */ 2259, 2259, 2259, 2259, 2259, 2789, 2259, 2790, 2836, 2259, + /* 3680 */ 2259, 2259, 2800, 2791, 879, 2793, 2794, 874, 2808, 2259, + /* 3690 */ 862, 898, 876, 2259, 2259, 2259, 2259, 2259, 2259, 2259, + /* 3700 */ 2259, 2259, 2259, 2259, 2755, 2259, 875, 2259, 2789, 2259, + /* 3710 */ 2259, 2836, 2259, 2259, 2259, 455, 2791, 879, 2793, 2794, + /* 3720 */ 874, 2808, 2259, 862, 898, 2259, 2259, 2259, 2259, 2259, + /* 3730 */ 2259, 2259, 2259, 2259, 2259, 2259, 2259, 2755, 2259, 875, + /* 3740 */ 2259, 2790, 2259, 2259, 2259, 2259, 2259, 2259, 2259, 2259, + /* 3750 */ 2259, 2789, 2259, 2259, 2836, 2259, 876, 2259, 456, 2791, + /* 3760 */ 879, 2793, 2794, 874, 2790, 2259, 862, 898, 2259, 2259, + /* 3770 */ 2259, 2259, 2259, 2259, 2259, 2259, 2259, 2259, 2259, 876, + /* 3780 */ 2259, 2259, 2259, 2259, 2789, 2808, 2259, 2836, 2259, 2259, + /* 3790 */ 2259, 452, 2791, 879, 2793, 2794, 874, 2259, 2259, 862, + /* 3800 */ 898, 2755, 2259, 875, 2259, 2259, 2259, 2259, 2808, 2259, + /* 3810 */ 2790, 2259, 2259, 2259, 2259, 2259, 2259, 2259, 2259, 2259, + /* 3820 */ 2259, 2259, 2259, 2259, 2755, 876, 875, 2259, 2259, 2259, + /* 3830 */ 2259, 2259, 2259, 2259, 2259, 2259, 2259, 2259, 2259, 2259, + /* 3840 */ 2259, 2259, 2259, 2259, 2259, 2259, 2259, 2259, 2789, 2259, + /* 3850 */ 2259, 2836, 2259, 2259, 2808, 457, 2791, 879, 2793, 2794, + /* 3860 */ 874, 2259, 2259, 862, 898, 2259, 2259, 2259, 2259, 2259, + /* 3870 */ 2755, 877, 875, 2259, 2836, 2259, 2259, 2259, 425, 2791, + /* 3880 */ 879, 2793, 2794, 874, 2259, 2259, 862, 898, 2259, 2259, + /* 3890 */ 2259, 2259, 2259, 2259, 2259, 2259, 2259, 2259, 2259, 2259, + /* 3900 */ 2259, 2259, 2259, 2259, 2259, 2259, 2259, 2259, 2259, 2259, + /* 3910 */ 2259, 2259, 2259, 2259, 2259, 2259, 2259, 2789, 2259, 2259, + /* 3920 */ 2836, 2259, 2259, 2259, 424, 2791, 879, 2793, 2794, 874, + /* 3930 */ 2259, 2259, 862, 898, }; static const YYCODETYPE yy_lookahead[] = { - /* 0 */ 412, 426, 390, 467, 443, 393, 394, 443, 472, 510, - /* 10 */ 511, 395, 12, 13, 14, 426, 381, 14, 521, 424, - /* 20 */ 20, 457, 22, 20, 463, 464, 529, 463, 464, 441, - /* 30 */ 412, 396, 425, 395, 396, 440, 36, 396, 38, 428, - /* 40 */ 20, 434, 435, 428, 547, 548, 431, 8, 9, 552, - /* 50 */ 553, 12, 13, 14, 15, 16, 381, 521, 395, 441, - /* 60 */ 425, 445, 446, 14, 448, 529, 425, 451, 68, 20, - /* 70 */ 20, 396, 20, 12, 13, 75, 441, 73, 443, 491, - /* 80 */ 492, 493, 82, 547, 548, 395, 396, 443, 552, 553, - /* 90 */ 502, 0, 485, 486, 20, 12, 13, 36, 395, 396, - /* 100 */ 425, 457, 491, 20, 428, 22, 491, 463, 464, 491, - /* 110 */ 492, 74, 112, 502, 75, 115, 441, 502, 443, 36, - /* 120 */ 502, 38, 20, 488, 395, 396, 491, 14, 15, 16, - /* 130 */ 495, 496, 497, 498, 499, 500, 20, 502, 497, 378, - /* 140 */ 477, 478, 507, 390, 509, 54, 393, 394, 513, 514, - /* 150 */ 381, 68, 152, 153, 516, 517, 518, 519, 75, 521, - /* 160 */ 522, 1, 2, 488, 125, 82, 491, 491, 533, 117, - /* 170 */ 495, 496, 497, 498, 499, 500, 541, 502, 502, 381, - /* 180 */ 505, 36, 507, 508, 509, 395, 396, 411, 513, 514, - /* 190 */ 414, 191, 192, 391, 396, 112, 398, 395, 115, 397, - /* 200 */ 391, 201, 202, 426, 395, 415, 397, 517, 518, 519, - /* 210 */ 441, 521, 522, 423, 437, 211, 216, 115, 218, 529, - /* 220 */ 517, 518, 519, 425, 521, 522, 152, 153, 467, 190, - /* 230 */ 425, 115, 20, 472, 20, 152, 153, 547, 548, 441, - /* 240 */ 191, 443, 552, 553, 240, 241, 517, 518, 519, 444, - /* 250 */ 521, 522, 252, 253, 254, 33, 256, 257, 258, 259, - /* 260 */ 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, - /* 270 */ 270, 271, 272, 273, 191, 192, 116, 155, 420, 218, - /* 280 */ 44, 20, 521, 425, 201, 202, 488, 146, 147, 491, - /* 290 */ 529, 36, 151, 495, 496, 497, 498, 499, 500, 216, - /* 300 */ 502, 218, 0, 254, 254, 507, 20, 509, 547, 548, - /* 310 */ 452, 513, 514, 552, 553, 426, 277, 278, 279, 280, - /* 320 */ 281, 282, 283, 284, 285, 286, 287, 115, 145, 146, - /* 330 */ 147, 148, 149, 150, 151, 252, 253, 254, 116, 256, - /* 340 */ 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, - /* 350 */ 267, 268, 269, 270, 271, 272, 273, 274, 12, 13, - /* 360 */ 426, 427, 381, 218, 425, 18, 20, 147, 22, 417, - /* 370 */ 23, 151, 433, 421, 395, 396, 487, 396, 381, 77, - /* 380 */ 78, 79, 36, 444, 38, 395, 84, 85, 86, 42, - /* 390 */ 43, 155, 90, 46, 415, 250, 251, 95, 96, 97, - /* 400 */ 98, 299, 423, 101, 57, 0, 425, 105, 106, 107, - /* 410 */ 108, 289, 290, 291, 68, 299, 69, 70, 71, 72, - /* 420 */ 73, 75, 441, 523, 443, 525, 21, 20, 82, 24, - /* 430 */ 25, 26, 27, 28, 29, 30, 31, 32, 441, 521, - /* 440 */ 425, 12, 13, 14, 454, 225, 456, 529, 433, 20, - /* 450 */ 230, 22, 20, 233, 193, 235, 425, 20, 112, 444, - /* 460 */ 521, 115, 115, 4, 433, 36, 548, 38, 529, 488, - /* 470 */ 552, 553, 491, 218, 13, 444, 495, 496, 497, 498, - /* 480 */ 499, 500, 23, 502, 395, 396, 547, 548, 507, 425, - /* 490 */ 509, 552, 553, 20, 513, 514, 0, 68, 152, 153, - /* 500 */ 380, 154, 382, 155, 415, 250, 251, 48, 49, 50, - /* 510 */ 21, 82, 425, 24, 25, 26, 27, 28, 29, 30, - /* 520 */ 31, 32, 541, 115, 288, 289, 290, 291, 292, 293, - /* 530 */ 294, 295, 296, 21, 521, 420, 425, 191, 192, 452, - /* 540 */ 425, 112, 529, 82, 115, 434, 435, 201, 202, 37, - /* 550 */ 486, 39, 40, 41, 42, 208, 209, 210, 0, 196, - /* 560 */ 213, 548, 216, 20, 218, 552, 553, 452, 395, 396, - /* 570 */ 74, 8, 9, 226, 227, 12, 13, 14, 15, 16, - /* 580 */ 22, 152, 153, 20, 152, 153, 239, 439, 415, 242, - /* 590 */ 442, 443, 245, 246, 247, 248, 249, 145, 252, 253, - /* 600 */ 254, 149, 256, 257, 258, 259, 260, 261, 262, 263, - /* 610 */ 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, - /* 620 */ 191, 192, 292, 293, 294, 295, 296, 4, 191, 192, - /* 630 */ 201, 202, 404, 201, 202, 112, 288, 289, 290, 291, - /* 640 */ 292, 293, 294, 295, 296, 216, 299, 218, 0, 115, - /* 650 */ 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, - /* 660 */ 432, 138, 139, 140, 141, 142, 143, 144, 305, 306, - /* 670 */ 307, 308, 24, 25, 26, 27, 28, 29, 30, 31, - /* 680 */ 32, 252, 253, 254, 68, 256, 257, 258, 259, 260, - /* 690 */ 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, - /* 700 */ 271, 272, 273, 12, 13, 22, 381, 299, 395, 396, - /* 710 */ 74, 20, 20, 22, 12, 13, 14, 15, 16, 36, - /* 720 */ 20, 396, 22, 398, 77, 78, 79, 36, 415, 38, - /* 730 */ 114, 84, 85, 86, 191, 119, 36, 90, 115, 126, - /* 740 */ 395, 396, 95, 96, 97, 98, 3, 381, 101, 215, - /* 750 */ 425, 217, 105, 106, 107, 108, 193, 274, 58, 68, - /* 760 */ 415, 14, 396, 20, 398, 416, 441, 20, 443, 0, - /* 770 */ 228, 8, 9, 82, 425, 12, 13, 14, 15, 16, - /* 780 */ 54, 416, 395, 249, 91, 436, 12, 13, 395, 63, - /* 790 */ 425, 425, 66, 67, 20, 112, 22, 254, 395, 396, - /* 800 */ 425, 436, 186, 112, 395, 396, 115, 441, 433, 443, - /* 810 */ 36, 0, 38, 488, 442, 443, 491, 254, 415, 444, - /* 820 */ 495, 496, 497, 498, 499, 500, 36, 502, 395, 396, - /* 830 */ 395, 396, 507, 299, 509, 395, 396, 425, 513, 514, - /* 840 */ 395, 396, 68, 152, 153, 75, 459, 460, 415, 395, - /* 850 */ 396, 252, 159, 33, 488, 415, 82, 491, 449, 116, - /* 860 */ 415, 495, 496, 497, 498, 499, 500, 47, 502, 415, - /* 870 */ 477, 478, 82, 507, 82, 509, 404, 184, 185, 513, - /* 880 */ 514, 115, 191, 192, 449, 193, 112, 395, 396, 115, - /* 890 */ 126, 198, 201, 202, 422, 8, 9, 485, 486, 12, - /* 900 */ 13, 14, 15, 16, 432, 38, 274, 216, 276, 218, - /* 910 */ 311, 312, 313, 314, 315, 316, 317, 375, 376, 377, - /* 920 */ 33, 54, 299, 22, 155, 0, 152, 153, 190, 381, - /* 930 */ 63, 64, 65, 66, 0, 68, 193, 36, 191, 170, - /* 940 */ 506, 449, 508, 252, 253, 254, 254, 256, 257, 258, - /* 950 */ 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, - /* 960 */ 269, 270, 271, 272, 273, 191, 192, 402, 18, 44, - /* 970 */ 20, 208, 425, 395, 396, 201, 202, 27, 395, 396, - /* 980 */ 30, 114, 171, 82, 419, 4, 119, 176, 38, 441, - /* 990 */ 216, 444, 218, 415, 429, 184, 395, 396, 415, 52, - /* 1000 */ 405, 254, 146, 116, 54, 506, 56, 508, 413, 395, - /* 1010 */ 396, 61, 62, 8, 9, 277, 415, 12, 13, 14, - /* 1020 */ 15, 16, 252, 73, 494, 287, 252, 253, 254, 415, - /* 1030 */ 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, - /* 1040 */ 266, 267, 268, 269, 270, 271, 272, 273, 395, 396, - /* 1050 */ 520, 8, 9, 186, 44, 12, 13, 14, 15, 16, - /* 1060 */ 22, 20, 195, 14, 114, 299, 199, 200, 415, 20, - /* 1070 */ 395, 396, 205, 206, 36, 402, 126, 0, 68, 145, - /* 1080 */ 146, 147, 148, 149, 150, 151, 381, 231, 232, 326, - /* 1090 */ 415, 224, 8, 9, 59, 60, 12, 13, 14, 15, - /* 1100 */ 16, 396, 429, 398, 400, 401, 3, 157, 158, 23, - /* 1110 */ 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, - /* 1120 */ 82, 116, 172, 173, 174, 175, 176, 177, 178, 179, - /* 1130 */ 425, 181, 182, 183, 381, 49, 50, 187, 188, 189, - /* 1140 */ 193, 400, 401, 425, 194, 126, 441, 33, 443, 505, - /* 1150 */ 112, 204, 508, 435, 77, 78, 79, 80, 81, 116, - /* 1160 */ 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, - /* 1170 */ 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, - /* 1180 */ 103, 104, 105, 106, 107, 108, 20, 12, 13, 395, - /* 1190 */ 396, 381, 20, 488, 441, 381, 491, 22, 381, 180, - /* 1200 */ 495, 496, 497, 498, 499, 500, 396, 502, 398, 415, - /* 1210 */ 4, 36, 507, 38, 509, 381, 2, 381, 513, 514, - /* 1220 */ 381, 381, 8, 9, 381, 19, 12, 13, 14, 15, - /* 1230 */ 16, 22, 395, 396, 193, 425, 396, 186, 398, 395, - /* 1240 */ 396, 0, 381, 68, 38, 36, 395, 396, 20, 0, - /* 1250 */ 22, 441, 415, 443, 216, 441, 218, 82, 441, 415, - /* 1260 */ 54, 34, 381, 41, 42, 425, 415, 61, 62, 395, - /* 1270 */ 396, 220, 395, 396, 68, 441, 68, 441, 409, 410, - /* 1280 */ 441, 441, 301, 443, 441, 381, 58, 112, 425, 415, - /* 1290 */ 252, 253, 415, 409, 410, 254, 425, 381, 488, 436, - /* 1300 */ 494, 491, 441, 384, 385, 495, 496, 497, 498, 499, - /* 1310 */ 500, 33, 502, 381, 421, 444, 33, 507, 381, 509, - /* 1320 */ 114, 112, 441, 513, 514, 119, 520, 119, 488, 381, - /* 1330 */ 381, 491, 467, 13, 33, 495, 496, 497, 498, 499, - /* 1340 */ 500, 381, 502, 121, 122, 441, 124, 507, 47, 509, - /* 1350 */ 12, 13, 2, 513, 514, 381, 396, 441, 8, 9, - /* 1360 */ 22, 426, 12, 13, 14, 15, 16, 145, 152, 153, - /* 1370 */ 494, 149, 381, 441, 36, 482, 38, 438, 441, 438, - /* 1380 */ 441, 438, 441, 36, 441, 425, 521, 396, 0, 441, - /* 1390 */ 441, 216, 120, 218, 529, 123, 520, 0, 234, 116, - /* 1400 */ 236, 441, 82, 443, 155, 36, 68, 120, 381, 33, - /* 1410 */ 123, 120, 547, 548, 123, 441, 425, 552, 553, 22, - /* 1420 */ 254, 33, 467, 396, 321, 426, 254, 252, 253, 82, - /* 1430 */ 120, 13, 441, 123, 443, 426, 33, 33, 13, 325, - /* 1440 */ 0, 266, 267, 268, 269, 270, 271, 272, 488, 0, - /* 1450 */ 0, 491, 425, 51, 36, 495, 496, 497, 498, 499, - /* 1460 */ 500, 36, 502, 33, 33, 33, 426, 507, 441, 509, - /* 1470 */ 443, 22, 22, 513, 514, 0, 521, 1, 2, 488, - /* 1480 */ 473, 115, 491, 117, 529, 244, 495, 496, 497, 498, - /* 1490 */ 499, 500, 116, 502, 36, 55, 33, 33, 507, 33, - /* 1500 */ 509, 33, 547, 548, 513, 514, 413, 552, 553, 36, - /* 1510 */ 33, 33, 33, 12, 13, 488, 382, 115, 491, 116, - /* 1520 */ 116, 13, 495, 496, 497, 498, 499, 500, 453, 502, - /* 1530 */ 33, 33, 12, 13, 507, 523, 509, 381, 12, 13, - /* 1540 */ 513, 514, 12, 13, 36, 112, 116, 116, 116, 556, - /* 1550 */ 12, 13, 396, 545, 216, 82, 218, 524, 12, 13, - /* 1560 */ 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, - /* 1570 */ 538, 138, 139, 140, 141, 142, 143, 144, 1, 116, - /* 1580 */ 116, 425, 116, 36, 116, 12, 13, 218, 250, 251, - /* 1590 */ 252, 12, 13, 116, 116, 116, 19, 441, 33, 443, - /* 1600 */ 33, 323, 12, 13, 266, 267, 268, 269, 270, 271, - /* 1610 */ 272, 13, 467, 116, 116, 38, 12, 13, 381, 33, - /* 1620 */ 145, 146, 147, 148, 149, 150, 151, 12, 13, 82, - /* 1630 */ 53, 54, 467, 396, 36, 399, 33, 425, 412, 394, - /* 1640 */ 63, 64, 65, 66, 488, 68, 33, 491, 453, 544, - /* 1650 */ 412, 495, 496, 497, 498, 499, 500, 33, 502, 544, - /* 1660 */ 544, 544, 425, 466, 453, 509, 521, 399, 467, 513, - /* 1670 */ 514, 489, 396, 440, 529, 528, 218, 474, 441, 528, - /* 1680 */ 443, 116, 453, 116, 453, 549, 521, 453, 515, 531, - /* 1690 */ 54, 114, 547, 548, 529, 414, 119, 552, 553, 381, - /* 1700 */ 8, 9, 116, 302, 12, 13, 14, 15, 16, 490, - /* 1710 */ 468, 20, 547, 548, 396, 20, 395, 552, 553, 116, - /* 1720 */ 233, 404, 521, 381, 484, 488, 479, 150, 491, 116, - /* 1730 */ 529, 479, 495, 496, 497, 498, 499, 500, 396, 502, - /* 1740 */ 116, 404, 381, 425, 470, 214, 509, 395, 547, 548, - /* 1750 */ 513, 514, 20, 552, 553, 396, 47, 396, 450, 441, - /* 1760 */ 396, 443, 450, 447, 190, 395, 395, 425, 396, 450, - /* 1770 */ 447, 447, 195, 447, 197, 113, 408, 200, 111, 395, - /* 1780 */ 407, 395, 205, 441, 110, 443, 425, 406, 395, 395, - /* 1790 */ 395, 20, 52, 388, 479, 388, 404, 20, 392, 443, - /* 1800 */ 392, 224, 441, 404, 443, 20, 488, 397, 20, 491, - /* 1810 */ 381, 397, 469, 495, 496, 497, 498, 499, 500, 404, - /* 1820 */ 502, 404, 20, 404, 404, 396, 20, 509, 404, 454, - /* 1830 */ 488, 513, 514, 491, 460, 388, 395, 495, 496, 497, - /* 1840 */ 498, 499, 500, 501, 502, 503, 504, 404, 404, 488, - /* 1850 */ 381, 425, 491, 425, 425, 395, 495, 496, 497, 498, - /* 1860 */ 499, 500, 425, 502, 425, 396, 384, 425, 384, 388, - /* 1870 */ 441, 425, 443, 425, 237, 381, 425, 425, 425, 425, - /* 1880 */ 115, 483, 402, 20, 221, 193, 441, 222, 479, 468, - /* 1890 */ 396, 478, 481, 402, 425, 395, 441, 441, 476, 310, - /* 1900 */ 443, 309, 475, 542, 543, 318, 441, 540, 207, 303, - /* 1910 */ 441, 320, 443, 319, 537, 537, 537, 488, 381, 425, - /* 1920 */ 491, 539, 461, 461, 495, 496, 497, 498, 499, 500, - /* 1930 */ 298, 502, 536, 396, 534, 441, 297, 443, 468, 327, - /* 1940 */ 557, 324, 551, 527, 381, 322, 396, 535, 126, 526, - /* 1950 */ 20, 300, 397, 402, 402, 441, 461, 488, 441, 396, - /* 1960 */ 491, 494, 425, 441, 495, 496, 497, 498, 499, 500, - /* 1970 */ 532, 502, 461, 441, 441, 199, 458, 402, 441, 454, - /* 1980 */ 443, 441, 488, 554, 555, 491, 381, 402, 425, 495, - /* 1990 */ 496, 497, 498, 499, 500, 115, 502, 512, 441, 199, - /* 2000 */ 455, 396, 465, 509, 441, 421, 443, 454, 514, 550, - /* 2010 */ 402, 402, 543, 530, 396, 115, 395, 441, 22, 441, - /* 2020 */ 35, 441, 441, 381, 441, 488, 430, 383, 491, 441, - /* 2030 */ 425, 402, 495, 496, 497, 498, 499, 500, 396, 502, - /* 2040 */ 441, 441, 441, 441, 386, 37, 441, 387, 443, 40, - /* 2050 */ 389, 488, 441, 471, 491, 441, 388, 441, 495, 496, - /* 2060 */ 497, 498, 499, 500, 379, 502, 441, 425, 441, 441, - /* 2070 */ 465, 441, 441, 427, 441, 441, 441, 480, 403, 441, - /* 2080 */ 487, 441, 462, 441, 462, 443, 427, 418, 418, 418, - /* 2090 */ 0, 0, 0, 488, 47, 0, 491, 36, 243, 36, - /* 2100 */ 495, 496, 497, 498, 499, 500, 36, 502, 36, 546, - /* 2110 */ 381, 243, 0, 36, 36, 243, 36, 0, 0, 243, - /* 2120 */ 0, 36, 0, 36, 0, 396, 22, 0, 238, 36, - /* 2130 */ 488, 0, 381, 491, 224, 0, 224, 495, 496, 497, - /* 2140 */ 498, 499, 500, 225, 502, 218, 0, 396, 216, 0, - /* 2150 */ 0, 212, 211, 0, 425, 0, 158, 51, 51, 381, - /* 2160 */ 0, 36, 0, 0, 36, 54, 0, 51, 0, 0, - /* 2170 */ 441, 0, 443, 47, 396, 0, 425, 0, 0, 0, - /* 2180 */ 51, 0, 0, 0, 36, 0, 176, 176, 0, 0, - /* 2190 */ 0, 0, 441, 0, 443, 0, 381, 555, 0, 0, - /* 2200 */ 0, 0, 0, 425, 0, 0, 0, 0, 0, 0, - /* 2210 */ 0, 396, 0, 0, 0, 51, 465, 488, 0, 441, - /* 2220 */ 491, 443, 0, 381, 495, 496, 497, 498, 499, 500, - /* 2230 */ 0, 502, 0, 504, 47, 0, 0, 0, 396, 488, - /* 2240 */ 425, 0, 491, 465, 0, 381, 495, 496, 497, 498, - /* 2250 */ 499, 500, 0, 502, 158, 22, 441, 0, 443, 157, - /* 2260 */ 396, 0, 0, 0, 156, 22, 488, 425, 52, 491, - /* 2270 */ 22, 52, 381, 495, 496, 497, 498, 499, 500, 0, - /* 2280 */ 502, 0, 0, 441, 0, 443, 36, 396, 68, 425, - /* 2290 */ 0, 68, 68, 68, 0, 36, 54, 44, 0, 54, - /* 2300 */ 36, 0, 44, 488, 36, 441, 491, 443, 54, 381, - /* 2310 */ 495, 496, 497, 498, 499, 500, 425, 502, 44, 0, - /* 2320 */ 0, 36, 47, 51, 396, 33, 14, 44, 51, 51, - /* 2330 */ 488, 0, 441, 491, 443, 0, 45, 495, 496, 497, - /* 2340 */ 498, 499, 500, 44, 502, 0, 0, 0, 44, 207, - /* 2350 */ 381, 51, 488, 425, 0, 491, 0, 51, 0, 495, - /* 2360 */ 496, 497, 498, 499, 500, 396, 502, 0, 0, 441, - /* 2370 */ 0, 443, 76, 36, 44, 54, 0, 36, 54, 488, - /* 2380 */ 44, 0, 491, 54, 36, 381, 495, 496, 497, 498, - /* 2390 */ 499, 500, 0, 502, 425, 36, 44, 54, 0, 44, - /* 2400 */ 396, 0, 0, 0, 0, 0, 22, 36, 0, 22, - /* 2410 */ 441, 36, 443, 125, 36, 36, 488, 381, 123, 491, - /* 2420 */ 0, 36, 36, 495, 496, 497, 498, 499, 500, 425, - /* 2430 */ 502, 36, 396, 36, 0, 36, 381, 22, 22, 22, - /* 2440 */ 33, 0, 36, 33, 22, 441, 56, 443, 36, 36, - /* 2450 */ 36, 396, 0, 22, 0, 36, 0, 488, 0, 36, - /* 2460 */ 491, 425, 0, 36, 495, 496, 497, 498, 499, 500, - /* 2470 */ 0, 502, 36, 0, 36, 22, 36, 441, 36, 443, - /* 2480 */ 425, 20, 381, 0, 229, 116, 193, 115, 228, 115, - /* 2490 */ 223, 0, 488, 36, 51, 491, 441, 396, 443, 495, - /* 2500 */ 496, 497, 498, 499, 500, 0, 502, 193, 22, 22, - /* 2510 */ 193, 0, 199, 0, 381, 193, 219, 3, 203, 193, - /* 2520 */ 36, 203, 33, 52, 488, 116, 425, 491, 36, 396, - /* 2530 */ 304, 495, 496, 497, 498, 499, 500, 116, 502, 115, - /* 2540 */ 115, 115, 441, 488, 443, 113, 491, 52, 51, 116, - /* 2550 */ 495, 496, 497, 498, 499, 500, 111, 502, 425, 33, - /* 2560 */ 33, 33, 116, 115, 115, 115, 33, 116, 51, 304, - /* 2570 */ 115, 33, 82, 36, 441, 116, 443, 3, 381, 115, - /* 2580 */ 33, 116, 116, 116, 304, 36, 36, 36, 36, 488, - /* 2590 */ 36, 36, 491, 396, 116, 51, 495, 496, 497, 498, - /* 2600 */ 499, 500, 381, 502, 288, 33, 0, 51, 0, 115, - /* 2610 */ 44, 0, 116, 44, 116, 115, 115, 396, 115, 0, - /* 2620 */ 116, 488, 425, 115, 491, 196, 196, 381, 495, 496, - /* 2630 */ 497, 498, 499, 500, 44, 502, 33, 113, 441, 200, - /* 2640 */ 443, 275, 396, 113, 2, 22, 425, 116, 252, 51, - /* 2650 */ 116, 115, 51, 22, 115, 195, 115, 115, 115, 0, - /* 2660 */ 44, 116, 441, 115, 443, 196, 255, 381, 115, 0, - /* 2670 */ 22, 425, 51, 116, 115, 115, 118, 116, 115, 115, - /* 2680 */ 115, 36, 396, 115, 117, 488, 115, 441, 491, 443, - /* 2690 */ 115, 381, 495, 496, 497, 498, 499, 500, 116, 502, - /* 2700 */ 115, 22, 126, 22, 229, 22, 396, 116, 36, 488, - /* 2710 */ 115, 425, 491, 116, 36, 115, 495, 496, 497, 498, - /* 2720 */ 499, 500, 36, 502, 36, 116, 116, 441, 116, 443, - /* 2730 */ 36, 116, 381, 36, 488, 425, 137, 491, 33, 137, - /* 2740 */ 115, 495, 496, 497, 498, 499, 500, 396, 502, 115, - /* 2750 */ 137, 441, 36, 443, 137, 115, 22, 22, 76, 75, - /* 2760 */ 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, - /* 2770 */ 109, 82, 381, 36, 488, 82, 425, 491, 33, 109, - /* 2780 */ 36, 495, 496, 497, 498, 499, 500, 396, 502, 36, - /* 2790 */ 36, 22, 441, 36, 443, 36, 36, 82, 488, 381, - /* 2800 */ 36, 491, 36, 36, 36, 495, 496, 497, 498, 499, - /* 2810 */ 500, 36, 502, 22, 396, 36, 425, 0, 381, 36, - /* 2820 */ 44, 0, 36, 0, 54, 54, 44, 54, 36, 44, - /* 2830 */ 0, 36, 441, 396, 443, 54, 0, 44, 36, 488, - /* 2840 */ 0, 22, 491, 425, 36, 0, 495, 496, 497, 498, - /* 2850 */ 499, 500, 36, 502, 22, 33, 36, 22, 21, 441, - /* 2860 */ 22, 443, 425, 22, 21, 558, 20, 558, 558, 558, - /* 2870 */ 558, 558, 558, 558, 558, 558, 558, 558, 441, 488, - /* 2880 */ 443, 558, 491, 381, 558, 558, 495, 496, 497, 498, - /* 2890 */ 499, 500, 558, 502, 558, 558, 381, 558, 396, 558, - /* 2900 */ 558, 558, 558, 558, 558, 558, 488, 558, 558, 491, - /* 2910 */ 558, 396, 558, 495, 496, 497, 498, 499, 500, 558, - /* 2920 */ 502, 558, 558, 558, 558, 488, 558, 425, 491, 558, - /* 2930 */ 558, 558, 495, 496, 497, 498, 499, 500, 558, 502, - /* 2940 */ 425, 558, 558, 441, 558, 443, 558, 558, 558, 558, - /* 2950 */ 558, 558, 558, 558, 558, 558, 441, 558, 443, 558, - /* 2960 */ 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, - /* 2970 */ 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, - /* 2980 */ 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, - /* 2990 */ 488, 558, 558, 491, 558, 558, 558, 495, 496, 497, - /* 3000 */ 498, 499, 500, 488, 502, 558, 491, 558, 558, 558, - /* 3010 */ 495, 496, 497, 498, 499, 500, 558, 502, 558, 558, - /* 3020 */ 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, - /* 3030 */ 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, - /* 3040 */ 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, - /* 3050 */ 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, - /* 3060 */ 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, - /* 3070 */ 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, - /* 3080 */ 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, - /* 3090 */ 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, - /* 3100 */ 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, - /* 3110 */ 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, - /* 3120 */ 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, - /* 3130 */ 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, - /* 3140 */ 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, - /* 3150 */ 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, - /* 3160 */ 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, - /* 3170 */ 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, - /* 3180 */ 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, - /* 3190 */ 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, - /* 3200 */ 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, - /* 3210 */ 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, - /* 3220 */ 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, - /* 3230 */ 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, - /* 3240 */ 558, 558, 558, 558, 558, 378, 378, 378, 378, 378, - /* 3250 */ 378, 378, 378, 378, 378, 378, 378, 378, 378, 378, - /* 3260 */ 378, 378, 378, 378, 378, 378, 378, 378, 378, 378, - /* 3270 */ 378, 378, 378, 378, 378, 378, 378, 378, 378, 378, - /* 3280 */ 378, 378, 378, 378, 378, 378, 378, 378, 378, 378, - /* 3290 */ 378, 378, 378, 378, 378, 378, 378, 378, 378, 378, - /* 3300 */ 378, 378, 378, 378, 378, 378, 378, 378, 378, 378, - /* 3310 */ 378, 378, 378, 378, 378, 378, 378, 378, 378, 378, - /* 3320 */ 378, 378, 378, 378, 378, 378, 378, 378, 378, 378, - /* 3330 */ 378, 378, 378, 378, 378, 378, 378, 378, 378, 378, - /* 3340 */ 378, 378, 378, 378, 378, 378, 378, 378, 378, 378, - /* 3350 */ 378, 378, 378, 378, 378, 378, 378, 378, 378, 378, - /* 3360 */ 378, 378, 378, 378, 378, 378, 378, 378, 378, 378, - /* 3370 */ 378, 378, 378, 378, 378, 378, 378, 378, 378, 378, - /* 3380 */ 378, 378, 378, 378, 378, 378, 378, 378, 378, 378, - /* 3390 */ 378, 378, 378, 378, 378, 378, + /* 0 */ 530, 397, 530, 397, 400, 401, 400, 401, 538, 433, + /* 10 */ 538, 418, 12, 13, 421, 12, 13, 14, 15, 16, + /* 20 */ 20, 0, 22, 450, 20, 427, 556, 557, 402, 557, + /* 30 */ 432, 561, 562, 561, 562, 427, 36, 464, 38, 0, + /* 40 */ 432, 388, 21, 470, 471, 24, 25, 26, 27, 28, + /* 50 */ 29, 30, 31, 32, 402, 403, 403, 459, 8, 9, + /* 60 */ 402, 403, 12, 13, 14, 15, 16, 459, 68, 21, + /* 70 */ 494, 71, 24, 25, 26, 27, 28, 29, 30, 31, + /* 80 */ 32, 20, 82, 8, 9, 432, 21, 12, 13, 14, + /* 90 */ 15, 16, 8, 9, 0, 20, 12, 13, 14, 15, + /* 100 */ 16, 448, 37, 450, 39, 40, 41, 42, 456, 402, + /* 110 */ 484, 485, 112, 20, 74, 115, 77, 78, 79, 80, + /* 120 */ 81, 68, 83, 84, 85, 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, 495, 519, + /* 150 */ 520, 498, 152, 153, 403, 502, 503, 504, 505, 506, + /* 160 */ 507, 435, 435, 510, 511, 438, 116, 114, 461, 516, + /* 170 */ 463, 518, 119, 8, 9, 522, 523, 12, 13, 14, + /* 180 */ 15, 16, 388, 432, 526, 527, 528, 20, 530, 531, + /* 190 */ 3, 191, 192, 146, 147, 542, 538, 403, 151, 126, + /* 200 */ 116, 201, 202, 550, 0, 8, 9, 20, 115, 12, + /* 210 */ 13, 14, 15, 16, 556, 557, 216, 4, 218, 561, + /* 220 */ 562, 14, 44, 223, 498, 498, 432, 20, 24, 25, + /* 230 */ 26, 27, 28, 29, 30, 31, 32, 511, 511, 186, + /* 240 */ 75, 20, 448, 385, 450, 145, 146, 147, 148, 149, + /* 250 */ 150, 151, 252, 253, 254, 504, 256, 257, 258, 259, + /* 260 */ 260, 261, 262, 263, 264, 265, 266, 20, 193, 269, + /* 270 */ 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, + /* 280 */ 280, 281, 282, 12, 13, 14, 20, 388, 14, 495, + /* 290 */ 125, 20, 498, 22, 20, 20, 502, 503, 504, 505, + /* 300 */ 506, 507, 403, 116, 510, 511, 4, 36, 514, 38, + /* 310 */ 516, 517, 518, 116, 402, 403, 522, 523, 8, 9, + /* 320 */ 20, 19, 12, 13, 14, 15, 16, 530, 402, 254, + /* 330 */ 450, 432, 474, 155, 115, 538, 115, 479, 244, 68, + /* 340 */ 38, 155, 71, 33, 464, 20, 75, 448, 54, 450, + /* 350 */ 470, 471, 268, 82, 557, 190, 54, 63, 561, 562, + /* 360 */ 66, 67, 115, 61, 62, 435, 12, 13, 115, 398, + /* 370 */ 68, 402, 403, 402, 20, 404, 22, 252, 452, 453, + /* 380 */ 193, 455, 402, 112, 458, 4, 115, 0, 530, 4, + /* 390 */ 36, 422, 38, 532, 495, 534, 538, 498, 191, 430, + /* 400 */ 307, 502, 503, 504, 505, 506, 507, 508, 23, 510, + /* 410 */ 511, 512, 513, 0, 556, 557, 114, 117, 283, 561, + /* 420 */ 562, 119, 68, 152, 153, 71, 116, 446, 498, 75, + /* 430 */ 449, 450, 267, 48, 49, 50, 82, 525, 526, 527, + /* 440 */ 528, 511, 530, 531, 319, 320, 321, 322, 323, 324, + /* 450 */ 325, 286, 287, 288, 289, 290, 291, 292, 293, 294, + /* 460 */ 295, 254, 191, 192, 484, 485, 112, 20, 215, 115, + /* 470 */ 217, 115, 201, 202, 296, 297, 298, 299, 300, 301, + /* 480 */ 302, 303, 304, 297, 298, 299, 419, 216, 82, 218, + /* 490 */ 77, 78, 79, 412, 223, 432, 115, 84, 85, 86, + /* 500 */ 20, 420, 249, 90, 441, 442, 152, 153, 95, 96, + /* 510 */ 97, 98, 228, 36, 101, 448, 191, 192, 105, 106, + /* 520 */ 107, 108, 309, 252, 253, 254, 307, 256, 257, 258, + /* 530 */ 259, 260, 261, 262, 263, 264, 265, 266, 433, 434, + /* 540 */ 269, 270, 271, 272, 33, 191, 192, 276, 277, 278, + /* 550 */ 279, 280, 281, 282, 307, 201, 202, 402, 171, 82, + /* 560 */ 307, 41, 42, 176, 112, 498, 499, 500, 146, 155, + /* 570 */ 216, 184, 218, 431, 402, 403, 0, 223, 511, 127, + /* 580 */ 128, 129, 130, 131, 132, 133, 134, 135, 136, 447, + /* 590 */ 138, 139, 140, 141, 142, 143, 144, 8, 9, 152, + /* 600 */ 153, 12, 13, 14, 15, 16, 252, 253, 254, 33, + /* 610 */ 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, + /* 620 */ 266, 466, 467, 269, 270, 271, 272, 116, 501, 450, + /* 630 */ 276, 277, 278, 279, 280, 281, 282, 283, 12, 13, + /* 640 */ 36, 121, 122, 432, 124, 388, 20, 147, 22, 470, + /* 650 */ 471, 151, 196, 231, 232, 112, 529, 402, 403, 387, + /* 660 */ 403, 389, 36, 307, 38, 145, 382, 383, 384, 149, + /* 670 */ 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, + /* 680 */ 388, 138, 139, 140, 141, 142, 143, 144, 307, 432, + /* 690 */ 20, 388, 22, 20, 68, 403, 0, 71, 526, 527, + /* 700 */ 528, 75, 530, 531, 493, 448, 36, 450, 82, 432, + /* 710 */ 296, 297, 298, 299, 300, 301, 302, 303, 304, 402, + /* 720 */ 403, 12, 13, 14, 432, 225, 73, 419, 58, 20, + /* 730 */ 230, 22, 388, 233, 254, 235, 459, 14, 112, 422, + /* 740 */ 448, 115, 450, 20, 432, 36, 20, 38, 22, 59, + /* 750 */ 60, 448, 495, 441, 442, 498, 448, 402, 403, 502, + /* 760 */ 503, 504, 505, 506, 507, 13, 509, 510, 511, 313, + /* 770 */ 314, 315, 316, 402, 403, 402, 403, 68, 152, 153, + /* 780 */ 71, 526, 527, 528, 58, 530, 531, 495, 36, 474, + /* 790 */ 498, 82, 448, 422, 502, 503, 504, 505, 506, 507, + /* 800 */ 423, 430, 510, 511, 492, 493, 498, 499, 516, 432, + /* 810 */ 518, 456, 402, 403, 522, 523, 409, 191, 192, 511, + /* 820 */ 443, 112, 218, 74, 115, 152, 153, 201, 202, 456, + /* 830 */ 8, 9, 422, 426, 12, 13, 14, 15, 16, 77, + /* 840 */ 78, 79, 216, 436, 218, 530, 84, 85, 86, 223, + /* 850 */ 126, 155, 90, 538, 250, 251, 267, 95, 96, 97, + /* 860 */ 98, 152, 153, 101, 211, 474, 170, 105, 106, 107, + /* 870 */ 108, 556, 557, 388, 201, 202, 561, 562, 252, 253, + /* 880 */ 254, 411, 256, 257, 258, 259, 260, 261, 262, 263, + /* 890 */ 264, 265, 266, 240, 241, 269, 270, 271, 272, 429, + /* 900 */ 191, 192, 276, 277, 278, 279, 280, 281, 282, 439, + /* 910 */ 201, 202, 8, 9, 191, 33, 12, 13, 14, 15, + /* 920 */ 16, 530, 398, 402, 403, 216, 402, 218, 404, 538, + /* 930 */ 20, 423, 223, 448, 402, 403, 432, 283, 36, 285, + /* 940 */ 432, 474, 20, 422, 440, 432, 479, 556, 557, 20, + /* 950 */ 474, 443, 561, 562, 422, 451, 402, 403, 34, 12, + /* 960 */ 13, 252, 253, 254, 451, 256, 257, 258, 259, 260, + /* 970 */ 261, 262, 263, 264, 265, 266, 422, 254, 269, 270, + /* 980 */ 271, 272, 432, 36, 13, 276, 277, 278, 279, 280, + /* 990 */ 281, 282, 12, 13, 22, 388, 432, 530, 116, 22, + /* 1000 */ 20, 451, 22, 52, 440, 538, 530, 36, 36, 23, + /* 1010 */ 403, 402, 403, 36, 538, 451, 36, 515, 38, 517, + /* 1020 */ 116, 402, 403, 556, 557, 402, 403, 47, 561, 562, + /* 1030 */ 208, 422, 556, 557, 530, 49, 50, 561, 562, 432, + /* 1040 */ 388, 422, 538, 514, 388, 422, 517, 432, 68, 449, + /* 1050 */ 450, 71, 402, 403, 82, 448, 515, 450, 517, 403, + /* 1060 */ 556, 557, 82, 8, 9, 561, 562, 12, 13, 14, + /* 1070 */ 15, 16, 422, 8, 9, 12, 13, 12, 13, 14, + /* 1080 */ 15, 16, 433, 20, 112, 22, 407, 408, 432, 112, + /* 1090 */ 407, 408, 112, 444, 409, 115, 402, 403, 0, 36, + /* 1100 */ 448, 38, 495, 193, 448, 498, 450, 492, 493, 502, + /* 1110 */ 503, 504, 505, 506, 507, 193, 422, 510, 511, 388, + /* 1120 */ 218, 436, 193, 516, 91, 518, 14, 15, 16, 522, + /* 1130 */ 523, 68, 152, 153, 71, 68, 2, 300, 301, 302, + /* 1140 */ 303, 304, 8, 9, 193, 82, 12, 13, 14, 15, + /* 1150 */ 16, 495, 250, 251, 498, 204, 334, 550, 502, 503, + /* 1160 */ 504, 505, 506, 507, 254, 218, 510, 511, 432, 402, + /* 1170 */ 403, 191, 192, 402, 403, 112, 440, 20, 115, 448, + /* 1180 */ 432, 201, 202, 254, 402, 403, 119, 451, 216, 422, + /* 1190 */ 218, 443, 159, 422, 402, 403, 216, 433, 218, 2, + /* 1200 */ 402, 403, 428, 223, 422, 8, 9, 551, 552, 12, + /* 1210 */ 13, 14, 15, 16, 422, 152, 153, 184, 185, 501, + /* 1220 */ 422, 433, 8, 9, 252, 253, 12, 13, 14, 15, + /* 1230 */ 16, 198, 252, 253, 254, 388, 256, 257, 258, 259, + /* 1240 */ 260, 261, 262, 263, 264, 265, 266, 529, 193, 269, + /* 1250 */ 270, 271, 272, 155, 191, 192, 276, 277, 278, 279, + /* 1260 */ 280, 281, 282, 489, 201, 202, 8, 9, 22, 14, + /* 1270 */ 12, 13, 14, 15, 16, 20, 38, 402, 403, 216, + /* 1280 */ 0, 218, 36, 8, 9, 0, 223, 12, 13, 14, + /* 1290 */ 15, 16, 54, 402, 403, 448, 433, 422, 402, 403, + /* 1300 */ 432, 63, 64, 65, 66, 47, 68, 0, 416, 417, + /* 1310 */ 442, 402, 403, 422, 3, 252, 253, 254, 422, 256, + /* 1320 */ 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, + /* 1330 */ 116, 422, 269, 270, 271, 272, 1, 2, 190, 276, + /* 1340 */ 277, 278, 279, 280, 281, 282, 12, 13, 191, 388, + /* 1350 */ 22, 18, 114, 20, 20, 1, 22, 119, 112, 74, + /* 1360 */ 27, 8, 9, 30, 36, 12, 13, 14, 15, 16, + /* 1370 */ 36, 38, 38, 19, 8, 9, 402, 403, 12, 13, + /* 1380 */ 14, 15, 16, 402, 403, 432, 424, 54, 388, 56, + /* 1390 */ 428, 116, 38, 440, 61, 62, 422, 13, 416, 417, + /* 1400 */ 47, 388, 68, 422, 451, 71, 73, 53, 54, 448, + /* 1410 */ 82, 254, 501, 0, 388, 267, 82, 63, 64, 65, + /* 1420 */ 66, 20, 68, 20, 186, 145, 146, 147, 148, 149, + /* 1430 */ 150, 151, 411, 195, 286, 33, 445, 199, 200, 448, + /* 1440 */ 529, 44, 445, 205, 206, 448, 112, 114, 448, 115, + /* 1450 */ 36, 116, 145, 146, 147, 148, 149, 150, 151, 126, + /* 1460 */ 439, 448, 224, 388, 388, 68, 82, 54, 114, 388, + /* 1470 */ 388, 8, 9, 119, 448, 12, 13, 14, 15, 16, + /* 1480 */ 433, 474, 116, 474, 388, 33, 152, 153, 388, 445, + /* 1490 */ 157, 158, 448, 160, 161, 162, 163, 164, 165, 166, + /* 1500 */ 167, 168, 169, 13, 150, 172, 173, 174, 175, 176, + /* 1510 */ 177, 178, 179, 388, 181, 182, 183, 388, 116, 432, + /* 1520 */ 187, 188, 189, 448, 448, 191, 192, 194, 186, 448, + /* 1530 */ 448, 391, 392, 152, 153, 201, 202, 530, 451, 530, + /* 1540 */ 0, 388, 33, 120, 448, 538, 123, 538, 448, 195, + /* 1550 */ 216, 197, 218, 33, 200, 126, 145, 223, 480, 205, + /* 1560 */ 149, 33, 220, 556, 557, 556, 557, 47, 561, 562, + /* 1570 */ 561, 562, 82, 448, 234, 47, 236, 448, 224, 116, + /* 1580 */ 120, 36, 120, 123, 44, 123, 252, 253, 254, 36, + /* 1590 */ 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, + /* 1600 */ 266, 448, 0, 269, 270, 271, 272, 33, 33, 180, + /* 1610 */ 276, 277, 278, 279, 280, 281, 282, 18, 33, 33, + /* 1620 */ 120, 388, 23, 123, 22, 116, 433, 82, 0, 0, + /* 1630 */ 0, 51, 218, 33, 33, 82, 403, 33, 405, 33, + /* 1640 */ 329, 42, 43, 1, 2, 46, 33, 388, 36, 33, + /* 1650 */ 22, 22, 22, 75, 36, 254, 57, 254, 33, 33, + /* 1660 */ 12, 13, 403, 433, 405, 432, 389, 33, 69, 70, + /* 1670 */ 71, 72, 73, 12, 13, 12, 13, 33, 12, 13, + /* 1680 */ 115, 448, 117, 450, 33, 33, 12, 13, 12, 13, + /* 1690 */ 116, 432, 12, 13, 82, 115, 12, 13, 12, 13, + /* 1700 */ 13, 116, 116, 12, 13, 12, 13, 448, 33, 450, + /* 1710 */ 33, 33, 33, 420, 115, 33, 116, 116, 33, 532, + /* 1720 */ 116, 460, 116, 36, 13, 0, 565, 554, 495, 116, + /* 1730 */ 547, 498, 116, 533, 432, 502, 503, 504, 505, 506, + /* 1740 */ 507, 116, 116, 510, 511, 406, 419, 36, 419, 516, + /* 1750 */ 116, 518, 401, 154, 495, 522, 523, 498, 460, 388, + /* 1760 */ 116, 502, 503, 504, 505, 506, 507, 116, 116, 510, + /* 1770 */ 511, 553, 553, 553, 403, 516, 405, 518, 473, 553, + /* 1780 */ 55, 522, 523, 331, 460, 406, 496, 481, 403, 537, + /* 1790 */ 447, 116, 460, 116, 116, 116, 460, 537, 116, 558, + /* 1800 */ 524, 116, 540, 432, 460, 388, 310, 208, 209, 210, + /* 1810 */ 421, 54, 213, 475, 497, 20, 20, 402, 411, 448, + /* 1820 */ 403, 450, 405, 486, 233, 226, 227, 486, 214, 411, + /* 1830 */ 252, 20, 12, 13, 477, 388, 218, 491, 239, 402, + /* 1840 */ 47, 242, 22, 403, 245, 246, 247, 248, 249, 432, + /* 1850 */ 403, 457, 405, 403, 190, 457, 36, 402, 38, 454, + /* 1860 */ 403, 402, 454, 457, 454, 448, 495, 450, 113, 498, + /* 1870 */ 454, 415, 111, 502, 503, 504, 505, 506, 507, 432, + /* 1880 */ 414, 510, 511, 402, 402, 110, 388, 516, 68, 518, + /* 1890 */ 413, 402, 20, 522, 523, 448, 402, 450, 395, 402, + /* 1900 */ 52, 403, 82, 405, 399, 395, 307, 399, 333, 20, + /* 1910 */ 486, 450, 495, 411, 20, 498, 404, 411, 411, 502, + /* 1920 */ 503, 504, 505, 506, 507, 20, 411, 510, 511, 476, + /* 1930 */ 432, 404, 112, 516, 411, 518, 20, 467, 20, 522, + /* 1940 */ 523, 411, 495, 411, 461, 498, 448, 411, 450, 502, + /* 1950 */ 503, 504, 505, 506, 507, 411, 402, 510, 511, 395, + /* 1960 */ 402, 12, 13, 516, 391, 518, 432, 432, 391, 522, + /* 1970 */ 523, 22, 448, 432, 432, 432, 395, 448, 432, 432, + /* 1980 */ 432, 432, 432, 432, 237, 36, 448, 38, 115, 490, + /* 1990 */ 20, 409, 488, 495, 222, 388, 498, 486, 485, 483, + /* 2000 */ 502, 503, 504, 505, 506, 507, 221, 482, 510, 511, + /* 2010 */ 403, 450, 409, 402, 516, 448, 518, 68, 318, 546, + /* 2020 */ 522, 523, 317, 468, 546, 388, 207, 475, 468, 326, + /* 2030 */ 328, 546, 545, 549, 548, 327, 216, 544, 218, 432, + /* 2040 */ 403, 311, 306, 475, 543, 305, 566, 335, 332, 330, + /* 2050 */ 536, 560, 535, 403, 559, 448, 20, 450, 501, 388, + /* 2060 */ 126, 308, 541, 404, 409, 539, 409, 448, 448, 432, + /* 2070 */ 448, 448, 252, 253, 403, 448, 468, 468, 199, 409, + /* 2080 */ 465, 448, 461, 115, 521, 448, 448, 450, 428, 269, + /* 2090 */ 270, 199, 409, 462, 448, 403, 276, 277, 278, 279, + /* 2100 */ 280, 281, 495, 432, 461, 498, 409, 409, 115, 502, + /* 2110 */ 503, 504, 505, 506, 507, 448, 448, 510, 511, 448, + /* 2120 */ 448, 450, 409, 516, 390, 518, 22, 35, 402, 522, + /* 2130 */ 523, 437, 495, 37, 393, 498, 448, 448, 448, 502, + /* 2140 */ 503, 504, 505, 506, 507, 394, 388, 510, 511, 448, + /* 2150 */ 40, 395, 448, 516, 448, 518, 396, 448, 448, 522, + /* 2160 */ 523, 403, 448, 448, 469, 216, 495, 218, 448, 498, + /* 2170 */ 448, 448, 448, 502, 503, 504, 505, 506, 507, 448, + /* 2180 */ 448, 510, 511, 448, 434, 448, 448, 425, 425, 518, + /* 2190 */ 432, 425, 388, 522, 523, 478, 410, 469, 434, 250, + /* 2200 */ 251, 252, 386, 0, 0, 0, 448, 403, 450, 47, + /* 2210 */ 0, 36, 494, 36, 487, 243, 36, 36, 269, 270, + /* 2220 */ 243, 0, 388, 36, 36, 276, 277, 278, 279, 280, + /* 2230 */ 281, 243, 36, 0, 0, 243, 432, 403, 0, 0, + /* 2240 */ 0, 22, 36, 36, 0, 36, 238, 0, 224, 0, + /* 2250 */ 224, 218, 448, 495, 450, 225, 498, 216, 0, 0, + /* 2260 */ 502, 503, 504, 505, 506, 507, 432, 0, 510, 511, + /* 2270 */ 212, 0, 211, 0, 158, 51, 518, 51, 0, 36, + /* 2280 */ 522, 523, 448, 0, 450, 0, 388, 36, 0, 54, + /* 2290 */ 0, 0, 51, 47, 0, 0, 51, 0, 0, 495, + /* 2300 */ 0, 403, 498, 0, 0, 0, 502, 503, 504, 505, + /* 2310 */ 506, 507, 176, 388, 510, 511, 36, 0, 176, 0, + /* 2320 */ 0, 0, 518, 0, 0, 0, 522, 523, 403, 495, + /* 2330 */ 432, 0, 498, 0, 0, 0, 502, 503, 504, 505, + /* 2340 */ 506, 507, 0, 0, 510, 511, 448, 0, 450, 0, + /* 2350 */ 388, 0, 0, 0, 0, 0, 0, 432, 51, 0, + /* 2360 */ 47, 0, 0, 0, 0, 403, 22, 0, 0, 158, + /* 2370 */ 157, 0, 156, 448, 0, 450, 0, 0, 0, 0, + /* 2380 */ 0, 0, 22, 0, 52, 0, 68, 22, 52, 0, + /* 2390 */ 68, 0, 0, 495, 432, 68, 498, 563, 564, 388, + /* 2400 */ 502, 503, 504, 505, 506, 507, 36, 68, 510, 511, + /* 2410 */ 448, 0, 450, 44, 403, 0, 518, 44, 36, 0, + /* 2420 */ 495, 523, 36, 498, 36, 0, 54, 502, 503, 504, + /* 2430 */ 505, 506, 507, 36, 472, 510, 511, 44, 54, 0, + /* 2440 */ 44, 54, 47, 432, 14, 33, 0, 44, 388, 51, + /* 2450 */ 51, 51, 45, 0, 0, 0, 0, 495, 44, 448, + /* 2460 */ 498, 450, 207, 403, 502, 503, 504, 505, 506, 507, + /* 2470 */ 0, 51, 510, 511, 0, 51, 388, 552, 36, 0, + /* 2480 */ 76, 0, 0, 472, 0, 0, 54, 44, 36, 44, + /* 2490 */ 388, 403, 432, 0, 54, 36, 0, 36, 54, 0, + /* 2500 */ 0, 44, 54, 0, 44, 403, 495, 0, 448, 498, + /* 2510 */ 450, 36, 388, 502, 503, 504, 505, 506, 507, 0, + /* 2520 */ 432, 510, 511, 0, 22, 0, 125, 403, 123, 0, + /* 2530 */ 22, 36, 0, 36, 432, 22, 448, 36, 450, 0, + /* 2540 */ 36, 36, 36, 22, 22, 36, 36, 33, 36, 33, + /* 2550 */ 448, 36, 450, 36, 36, 495, 432, 22, 498, 0, + /* 2560 */ 22, 0, 502, 503, 504, 505, 506, 507, 0, 36, + /* 2570 */ 510, 511, 448, 0, 450, 22, 56, 36, 0, 36, + /* 2580 */ 0, 388, 36, 495, 0, 20, 498, 36, 36, 116, + /* 2590 */ 502, 503, 504, 505, 506, 507, 403, 495, 510, 511, + /* 2600 */ 498, 115, 36, 0, 502, 503, 504, 505, 506, 507, + /* 2610 */ 193, 51, 510, 511, 0, 555, 193, 388, 228, 495, + /* 2620 */ 0, 36, 498, 229, 22, 432, 502, 503, 504, 505, + /* 2630 */ 506, 507, 403, 223, 510, 511, 199, 513, 22, 115, + /* 2640 */ 219, 448, 193, 450, 193, 388, 0, 0, 3, 312, + /* 2650 */ 203, 193, 564, 203, 33, 115, 52, 52, 116, 115, + /* 2660 */ 403, 432, 36, 116, 36, 472, 116, 111, 113, 115, + /* 2670 */ 33, 33, 33, 116, 116, 51, 51, 448, 115, 450, + /* 2680 */ 116, 33, 115, 82, 115, 115, 33, 312, 495, 432, + /* 2690 */ 36, 498, 115, 3, 33, 502, 503, 504, 505, 506, + /* 2700 */ 507, 472, 116, 510, 511, 448, 116, 450, 36, 36, + /* 2710 */ 36, 36, 36, 36, 51, 116, 116, 33, 312, 51, + /* 2720 */ 0, 0, 296, 115, 495, 44, 388, 498, 116, 472, + /* 2730 */ 115, 502, 503, 504, 505, 506, 507, 0, 116, 510, + /* 2740 */ 511, 403, 115, 44, 196, 115, 0, 116, 115, 200, + /* 2750 */ 44, 33, 495, 113, 388, 498, 284, 2, 196, 502, + /* 2760 */ 503, 504, 505, 506, 507, 113, 195, 510, 511, 403, + /* 2770 */ 432, 22, 115, 115, 115, 115, 51, 115, 252, 51, + /* 2780 */ 116, 116, 115, 22, 115, 115, 448, 116, 450, 255, + /* 2790 */ 388, 196, 44, 115, 115, 0, 0, 115, 432, 116, + /* 2800 */ 115, 115, 22, 116, 115, 403, 115, 22, 51, 117, + /* 2810 */ 472, 118, 115, 115, 448, 115, 450, 116, 115, 115, + /* 2820 */ 126, 22, 22, 388, 116, 229, 36, 115, 36, 116, + /* 2830 */ 36, 115, 137, 495, 432, 116, 498, 36, 403, 116, + /* 2840 */ 502, 503, 504, 505, 506, 507, 36, 116, 510, 511, + /* 2850 */ 448, 36, 450, 36, 116, 115, 33, 115, 36, 137, + /* 2860 */ 115, 495, 22, 137, 498, 76, 388, 432, 502, 503, + /* 2870 */ 504, 505, 506, 507, 22, 36, 510, 511, 137, 75, + /* 2880 */ 36, 403, 36, 448, 36, 450, 36, 36, 82, 36, + /* 2890 */ 36, 36, 36, 36, 82, 109, 109, 495, 33, 388, + /* 2900 */ 498, 82, 36, 22, 502, 503, 504, 505, 506, 507, + /* 2910 */ 432, 36, 510, 511, 403, 36, 36, 22, 36, 36, + /* 2920 */ 36, 36, 36, 36, 36, 36, 448, 0, 450, 36, + /* 2930 */ 495, 54, 0, 498, 44, 36, 44, 502, 503, 504, + /* 2940 */ 505, 506, 507, 432, 0, 510, 511, 36, 54, 44, + /* 2950 */ 54, 0, 36, 44, 0, 54, 36, 0, 22, 448, + /* 2960 */ 36, 450, 0, 388, 22, 36, 33, 36, 22, 21, + /* 2970 */ 567, 22, 22, 495, 21, 20, 498, 567, 403, 567, + /* 2980 */ 502, 503, 504, 505, 506, 507, 388, 567, 510, 511, + /* 2990 */ 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, + /* 3000 */ 567, 403, 567, 567, 567, 567, 495, 432, 567, 498, + /* 3010 */ 567, 567, 567, 502, 503, 504, 505, 506, 507, 567, + /* 3020 */ 567, 510, 511, 448, 567, 450, 567, 567, 567, 567, + /* 3030 */ 432, 567, 388, 567, 567, 567, 567, 567, 567, 567, + /* 3040 */ 567, 567, 567, 567, 567, 567, 448, 403, 450, 567, + /* 3050 */ 567, 567, 567, 567, 388, 567, 567, 567, 567, 567, + /* 3060 */ 567, 567, 567, 567, 567, 567, 567, 567, 388, 403, + /* 3070 */ 495, 567, 567, 498, 567, 567, 432, 502, 503, 504, + /* 3080 */ 505, 506, 507, 403, 567, 510, 511, 567, 567, 567, + /* 3090 */ 567, 567, 448, 495, 450, 567, 498, 567, 432, 567, + /* 3100 */ 502, 503, 504, 505, 506, 507, 567, 567, 510, 511, + /* 3110 */ 567, 567, 432, 567, 448, 567, 450, 567, 567, 567, + /* 3120 */ 567, 567, 567, 567, 567, 567, 567, 567, 448, 567, + /* 3130 */ 450, 567, 567, 567, 567, 567, 567, 567, 567, 495, + /* 3140 */ 567, 567, 498, 567, 388, 567, 502, 503, 504, 505, + /* 3150 */ 506, 507, 567, 567, 510, 511, 567, 567, 567, 403, + /* 3160 */ 567, 495, 567, 567, 498, 567, 567, 567, 502, 503, + /* 3170 */ 504, 505, 506, 507, 567, 495, 510, 511, 498, 388, + /* 3180 */ 567, 567, 502, 503, 504, 505, 506, 507, 432, 567, + /* 3190 */ 510, 511, 567, 567, 403, 567, 567, 567, 567, 567, + /* 3200 */ 567, 567, 567, 567, 448, 567, 450, 567, 567, 567, + /* 3210 */ 567, 567, 388, 567, 567, 567, 567, 567, 567, 567, + /* 3220 */ 567, 567, 567, 432, 567, 567, 567, 403, 567, 567, + /* 3230 */ 567, 567, 567, 567, 567, 567, 567, 567, 567, 448, + /* 3240 */ 567, 450, 567, 567, 567, 567, 567, 567, 567, 567, + /* 3250 */ 567, 495, 567, 567, 498, 388, 432, 567, 502, 503, + /* 3260 */ 504, 505, 506, 507, 567, 567, 510, 511, 567, 567, + /* 3270 */ 403, 567, 448, 567, 450, 567, 567, 567, 567, 567, + /* 3280 */ 567, 567, 567, 567, 567, 567, 495, 567, 388, 498, + /* 3290 */ 567, 567, 567, 502, 503, 504, 505, 506, 507, 432, + /* 3300 */ 567, 510, 511, 403, 567, 567, 567, 567, 567, 567, + /* 3310 */ 567, 567, 567, 567, 567, 448, 567, 450, 567, 495, + /* 3320 */ 567, 567, 498, 567, 567, 567, 502, 503, 504, 505, + /* 3330 */ 506, 507, 432, 567, 510, 511, 567, 567, 567, 567, + /* 3340 */ 567, 567, 567, 567, 567, 567, 567, 567, 448, 567, + /* 3350 */ 450, 567, 388, 567, 567, 567, 567, 567, 567, 567, + /* 3360 */ 567, 567, 495, 567, 567, 498, 567, 403, 567, 502, + /* 3370 */ 503, 504, 505, 506, 507, 388, 567, 510, 511, 567, + /* 3380 */ 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, + /* 3390 */ 403, 567, 567, 567, 567, 495, 432, 567, 498, 567, + /* 3400 */ 567, 567, 502, 503, 504, 505, 506, 507, 567, 567, + /* 3410 */ 510, 511, 448, 567, 450, 567, 567, 567, 567, 432, + /* 3420 */ 567, 388, 567, 567, 567, 567, 567, 567, 567, 567, + /* 3430 */ 567, 567, 567, 567, 567, 448, 403, 450, 567, 567, + /* 3440 */ 567, 567, 567, 388, 567, 567, 567, 567, 567, 567, + /* 3450 */ 567, 567, 567, 567, 567, 567, 567, 388, 403, 495, + /* 3460 */ 567, 567, 498, 567, 567, 432, 502, 503, 504, 505, + /* 3470 */ 506, 507, 403, 567, 510, 511, 567, 567, 567, 567, + /* 3480 */ 567, 448, 495, 450, 567, 498, 567, 432, 567, 502, + /* 3490 */ 503, 504, 505, 506, 507, 567, 567, 510, 511, 567, + /* 3500 */ 567, 432, 567, 448, 567, 450, 567, 567, 567, 567, + /* 3510 */ 567, 567, 567, 567, 567, 567, 567, 448, 567, 450, + /* 3520 */ 567, 567, 567, 567, 567, 567, 567, 567, 495, 567, + /* 3530 */ 567, 498, 567, 388, 567, 502, 503, 504, 505, 506, + /* 3540 */ 507, 567, 567, 510, 511, 567, 567, 567, 403, 567, + /* 3550 */ 495, 567, 567, 498, 567, 567, 567, 502, 503, 504, + /* 3560 */ 505, 506, 507, 567, 495, 510, 511, 498, 388, 567, + /* 3570 */ 567, 502, 503, 504, 505, 506, 507, 432, 567, 510, + /* 3580 */ 511, 567, 567, 403, 567, 567, 567, 567, 567, 567, + /* 3590 */ 567, 567, 567, 448, 567, 450, 567, 567, 567, 567, + /* 3600 */ 567, 388, 567, 567, 567, 567, 567, 567, 567, 567, + /* 3610 */ 567, 567, 432, 567, 567, 567, 403, 567, 567, 567, + /* 3620 */ 567, 567, 567, 567, 567, 567, 567, 567, 448, 567, + /* 3630 */ 450, 567, 567, 567, 567, 567, 567, 567, 567, 567, + /* 3640 */ 495, 567, 567, 498, 388, 432, 567, 502, 503, 504, + /* 3650 */ 505, 506, 507, 567, 567, 510, 511, 567, 567, 403, + /* 3660 */ 567, 448, 567, 450, 567, 567, 567, 567, 567, 567, + /* 3670 */ 567, 567, 567, 567, 567, 495, 567, 388, 498, 567, + /* 3680 */ 567, 567, 502, 503, 504, 505, 506, 507, 432, 567, + /* 3690 */ 510, 511, 403, 567, 567, 567, 567, 567, 567, 567, + /* 3700 */ 567, 567, 567, 567, 448, 567, 450, 567, 495, 567, + /* 3710 */ 567, 498, 567, 567, 567, 502, 503, 504, 505, 506, + /* 3720 */ 507, 432, 567, 510, 511, 567, 567, 567, 567, 567, + /* 3730 */ 567, 567, 567, 567, 567, 567, 567, 448, 567, 450, + /* 3740 */ 567, 388, 567, 567, 567, 567, 567, 567, 567, 567, + /* 3750 */ 567, 495, 567, 567, 498, 567, 403, 567, 502, 503, + /* 3760 */ 504, 505, 506, 507, 388, 567, 510, 511, 567, 567, + /* 3770 */ 567, 567, 567, 567, 567, 567, 567, 567, 567, 403, + /* 3780 */ 567, 567, 567, 567, 495, 432, 567, 498, 567, 567, + /* 3790 */ 567, 502, 503, 504, 505, 506, 507, 567, 567, 510, + /* 3800 */ 511, 448, 567, 450, 567, 567, 567, 567, 432, 567, + /* 3810 */ 388, 567, 567, 567, 567, 567, 567, 567, 567, 567, + /* 3820 */ 567, 567, 567, 567, 448, 403, 450, 567, 567, 567, + /* 3830 */ 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, + /* 3840 */ 567, 567, 567, 567, 567, 567, 567, 567, 495, 567, + /* 3850 */ 567, 498, 567, 567, 432, 502, 503, 504, 505, 506, + /* 3860 */ 507, 567, 567, 510, 511, 567, 567, 567, 567, 567, + /* 3870 */ 448, 495, 450, 567, 498, 567, 567, 567, 502, 503, + /* 3880 */ 504, 505, 506, 507, 567, 567, 510, 511, 567, 567, + /* 3890 */ 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, + /* 3900 */ 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, + /* 3910 */ 567, 567, 567, 567, 567, 567, 567, 495, 567, 567, + /* 3920 */ 498, 567, 567, 567, 502, 503, 504, 505, 506, 507, + /* 3930 */ 567, 567, 510, 511, 385, 385, 385, 385, 385, 385, + /* 3940 */ 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, + /* 3950 */ 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, + /* 3960 */ 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, + /* 3970 */ 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, + /* 3980 */ 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, + /* 3990 */ 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, + /* 4000 */ 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, + /* 4010 */ 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, + /* 4020 */ 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, + /* 4030 */ 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, + /* 4040 */ 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, + /* 4050 */ 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, + /* 4060 */ 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, + /* 4070 */ 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, + /* 4080 */ 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, + /* 4090 */ 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, + /* 4100 */ 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, + /* 4110 */ 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, + /* 4120 */ 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, + /* 4130 */ 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, + /* 4140 */ 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, + /* 4150 */ 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, + /* 4160 */ 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, + /* 4170 */ 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, + /* 4180 */ 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, + /* 4190 */ 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, + /* 4200 */ 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, + /* 4210 */ 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, + /* 4220 */ 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, + /* 4230 */ 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, + /* 4240 */ 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, + /* 4250 */ 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, + /* 4260 */ 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, + /* 4270 */ 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, + /* 4280 */ 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, + /* 4290 */ 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, + /* 4300 */ 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, + /* 4310 */ 385, 385, 385, 385, 385, 385, 385, 385, 385, }; -#define YY_SHIFT_COUNT (978) +#define YY_SHIFT_COUNT (1003) #define YY_SHIFT_MIN (0) -#define YY_SHIFT_MAX (2846) +#define YY_SHIFT_MAX (2962) static const unsigned short int yy_shift_ofst[] = { - /* 0 */ 347, 0, 83, 0, 346, 346, 346, 346, 346, 346, - /* 10 */ 346, 346, 346, 346, 346, 346, 429, 691, 691, 774, - /* 20 */ 691, 691, 691, 691, 691, 691, 691, 691, 691, 691, - /* 30 */ 691, 691, 691, 691, 691, 691, 691, 691, 691, 691, - /* 40 */ 691, 691, 691, 691, 691, 691, 691, 691, 691, 691, - /* 50 */ 102, 116, 534, 212, 408, 766, 408, 408, 212, 212, - /* 60 */ 408, 1175, 408, 950, 1175, 623, 408, 20, 1338, 432, - /* 70 */ 432, 214, 214, 1338, 1338, 459, 459, 432, 437, 437, - /* 80 */ 74, 3, 3, 50, 52, 214, 214, 214, 214, 214, - /* 90 */ 214, 214, 214, 214, 214, 214, 286, 407, 473, 214, - /* 100 */ 214, 37, 20, 214, 286, 214, 20, 214, 214, 214, - /* 110 */ 214, 20, 214, 214, 214, 20, 214, 20, 20, 20, - /* 120 */ 636, 39, 39, 523, 523, 1433, 647, 236, 489, 1038, - /* 130 */ 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, - /* 140 */ 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1222, 743, - /* 150 */ 437, 74, 1035, 1035, 790, 261, 261, 261, 632, 632, - /* 160 */ 496, 461, 790, 37, 20, 613, 20, 20, 483, 20, - /* 170 */ 20, 792, 20, 792, 792, 764, 1227, 523, 523, 523, - /* 180 */ 523, 523, 523, 1577, 302, 405, 563, 348, 348, 763, - /* 190 */ 599, 363, 330, 700, 122, 49, 747, 61, 61, 1086, - /* 200 */ 692, 901, 901, 901, 947, 901, 543, 1041, 1228, 1010, - /* 210 */ 1049, 452, 1051, 1166, 1166, 1172, 1320, 1320, 1103, 820, - /* 220 */ 981, 1166, 461, 1401, 1636, 1691, 1695, 1487, 37, 1695, - /* 230 */ 37, 1531, 1691, 1732, 1709, 1732, 1709, 1574, 1691, 1732, - /* 240 */ 1691, 1709, 1574, 1574, 1574, 1662, 1667, 1691, 1691, 1674, - /* 250 */ 1691, 1691, 1691, 1771, 1740, 1771, 1740, 1695, 37, 37, - /* 260 */ 1777, 37, 1785, 1788, 37, 1785, 37, 1802, 37, 1806, - /* 270 */ 37, 37, 1691, 37, 1771, 20, 20, 20, 20, 20, - /* 280 */ 20, 20, 20, 20, 20, 20, 1691, 1227, 1227, 1771, - /* 290 */ 792, 792, 792, 1637, 1765, 1695, 636, 1863, 1665, 1663, - /* 300 */ 1777, 636, 1401, 1691, 792, 1589, 1592, 1589, 1592, 1587, - /* 310 */ 1701, 1589, 1591, 1594, 1606, 1401, 1632, 1639, 1612, 1617, - /* 320 */ 1623, 1732, 1930, 1822, 1651, 1785, 636, 636, 1592, 792, - /* 330 */ 792, 792, 792, 1592, 792, 1776, 636, 792, 1806, 636, - /* 340 */ 1880, 792, 1800, 1806, 636, 764, 636, 1732, 792, 792, - /* 350 */ 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, - /* 360 */ 792, 792, 792, 792, 792, 792, 792, 792, 792, 792, - /* 370 */ 1900, 792, 1691, 636, 1996, 1985, 2008, 2009, 1771, 3018, - /* 380 */ 3018, 3018, 3018, 3018, 3018, 3018, 3018, 3018, 3018, 3018, - /* 390 */ 3018, 1077, 867, 648, 1206, 887, 1005, 1043, 1214, 1350, - /* 400 */ 1692, 934, 1475, 1084, 1084, 1084, 1084, 1084, 1084, 1084, - /* 410 */ 1084, 1084, 183, 512, 220, 693, 702, 702, 4, 616, - /* 420 */ 811, 726, 542, 542, 145, 255, 542, 769, 683, 1209, - /* 430 */ 856, 141, 141, 113, 160, 738, 113, 113, 113, 91, - /* 440 */ 1241, 222, 925, 1301, 1019, 1249, 1388, 1272, 1287, 1291, - /* 450 */ 1310, 1347, 1418, 1425, 558, 1397, 1449, 1450, 1164, 1283, - /* 460 */ 1376, 1208, 1403, 1404, 1430, 1431, 1216, 1278, 1114, 1432, - /* 470 */ 1463, 1464, 1476, 1466, 770, 1468, 1402, 1477, 1478, 1479, - /* 480 */ 1497, 1498, 1501, 1520, 1526, 1530, 1538, 1546, 1573, 1579, - /* 490 */ 1590, 1604, 1615, 1565, 1567, 1586, 1603, 1613, 1624, 1366, - /* 500 */ 1473, 1369, 1458, 1508, 1598, 1547, 1440, 2090, 2091, 2092, - /* 510 */ 2047, 2095, 2061, 1855, 2063, 2070, 2072, 1868, 2112, 2077, - /* 520 */ 2078, 1872, 2080, 2117, 2118, 1876, 2120, 2085, 2122, 2087, - /* 530 */ 2124, 2104, 2127, 2093, 1890, 2131, 1910, 2135, 1912, 1918, - /* 540 */ 1927, 1932, 2146, 2149, 2150, 1939, 1941, 2153, 2155, 1998, - /* 550 */ 2106, 2107, 2160, 2125, 2162, 2163, 2128, 2111, 2166, 2116, - /* 560 */ 2168, 2126, 2169, 2171, 2175, 2129, 2177, 2178, 2179, 2181, - /* 570 */ 2182, 2183, 2010, 2148, 2185, 2011, 2188, 2189, 2190, 2191, - /* 580 */ 2193, 2195, 2198, 2199, 2200, 2201, 2202, 2204, 2205, 2206, - /* 590 */ 2207, 2208, 2209, 2210, 2212, 2213, 2164, 2214, 2187, 2218, - /* 600 */ 2222, 2230, 2232, 2235, 2236, 2237, 2241, 2244, 2233, 2252, - /* 610 */ 2096, 2257, 2102, 2261, 2108, 2262, 2263, 2243, 2216, 2248, - /* 620 */ 2219, 2279, 2220, 2281, 2223, 2250, 2282, 2224, 2284, 2225, - /* 630 */ 2290, 2294, 2259, 2242, 2253, 2298, 2264, 2245, 2258, 2301, - /* 640 */ 2268, 2254, 2274, 2319, 2285, 2320, 2275, 2283, 2292, 2272, - /* 650 */ 2277, 2312, 2278, 2331, 2291, 2299, 2335, 2345, 2346, 2347, - /* 660 */ 2304, 2142, 2354, 2272, 2300, 2356, 2272, 2306, 2358, 2367, - /* 670 */ 2296, 2368, 2370, 2337, 2321, 2330, 2376, 2341, 2324, 2336, - /* 680 */ 2381, 2348, 2329, 2352, 2392, 2359, 2343, 2355, 2398, 2401, - /* 690 */ 2402, 2403, 2404, 2405, 2288, 2295, 2371, 2384, 2408, 2387, - /* 700 */ 2375, 2378, 2379, 2385, 2386, 2395, 2397, 2399, 2406, 2407, - /* 710 */ 2410, 2412, 2413, 2415, 2414, 2420, 2416, 2434, 2417, 2441, - /* 720 */ 2422, 2390, 2452, 2431, 2419, 2454, 2456, 2458, 2423, 2462, - /* 730 */ 2427, 2470, 2436, 2473, 2453, 2461, 2438, 2440, 2442, 2369, - /* 740 */ 2372, 2483, 2293, 2255, 2260, 2374, 2267, 2272, 2443, 2491, - /* 750 */ 2314, 2457, 2486, 2505, 2297, 2487, 2317, 2313, 2511, 2513, - /* 760 */ 2322, 2315, 2326, 2318, 2514, 2489, 2226, 2424, 2409, 2425, - /* 770 */ 2421, 2484, 2492, 2426, 2471, 2432, 2495, 2445, 2433, 2526, - /* 780 */ 2527, 2446, 2448, 2449, 2450, 2451, 2528, 2497, 2517, 2455, - /* 790 */ 2533, 2265, 2490, 2459, 2538, 2464, 2537, 2465, 2466, 2574, - /* 800 */ 2547, 2280, 2549, 2550, 2551, 2552, 2554, 2555, 2467, 2478, - /* 810 */ 2544, 2316, 2572, 2556, 2606, 2608, 2494, 2566, 2496, 2498, - /* 820 */ 2500, 2501, 2429, 2503, 2611, 2569, 2439, 2619, 2504, 2508, - /* 830 */ 2430, 2590, 2460, 2603, 2524, 2366, 2530, 2642, 2623, 2396, - /* 840 */ 2531, 2534, 2536, 2539, 2541, 2542, 2543, 2545, 2598, 2548, - /* 850 */ 2553, 2601, 2557, 2631, 2411, 2559, 2560, 2659, 2561, 2563, - /* 860 */ 2469, 2616, 2564, 2567, 2669, 2648, 2558, 2565, 2272, 2621, - /* 870 */ 2568, 2571, 2582, 2575, 2585, 2576, 2679, 2681, 2683, 2475, - /* 880 */ 2591, 2645, 2672, 2595, 2597, 2678, 2600, 2609, 2686, 2536, - /* 890 */ 2610, 2688, 2539, 2612, 2694, 2541, 2615, 2697, 2542, 2599, - /* 900 */ 2602, 2613, 2617, 2625, 2705, 2634, 2716, 2640, 2705, 2705, - /* 910 */ 2734, 2682, 2684, 2735, 2724, 2725, 2726, 2727, 2728, 2729, - /* 920 */ 2730, 2731, 2732, 2733, 2737, 2689, 2661, 2693, 2670, 2745, - /* 930 */ 2744, 2753, 2754, 2769, 2757, 2759, 2760, 2715, 2407, 2764, - /* 940 */ 2410, 2766, 2767, 2768, 2775, 2791, 2779, 2817, 2783, 2770, - /* 950 */ 2776, 2821, 2786, 2771, 2782, 2823, 2792, 2773, 2785, 2830, - /* 960 */ 2795, 2781, 2793, 2836, 2802, 2840, 2819, 2808, 2845, 2832, - /* 970 */ 2822, 2816, 2820, 2835, 2837, 2838, 2841, 2843, 2846, + /* 0 */ 1599, 271, 354, 271, 626, 626, 626, 626, 626, 626, + /* 10 */ 626, 626, 626, 626, 626, 626, 709, 1063, 1063, 1334, + /* 20 */ 0, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, + /* 30 */ 1063, 980, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, + /* 40 */ 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, + /* 50 */ 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, + /* 60 */ 93, 247, 253, 221, 219, 356, 219, 219, 221, 221, + /* 70 */ 219, 1820, 219, 1333, 1820, 381, 219, 4, 1949, 673, + /* 80 */ 673, 61, 61, 1949, 1949, 385, 385, 673, 325, 325, + /* 90 */ 447, 274, 274, 480, 300, 61, 61, 61, 61, 61, + /* 100 */ 61, 61, 61, 61, 61, 61, 167, 266, 275, 61, + /* 110 */ 61, 40, 4, 61, 167, 61, 4, 61, 61, 61, + /* 120 */ 61, 4, 61, 61, 61, 4, 61, 4, 4, 4, + /* 130 */ 749, 165, 165, 452, 452, 543, 762, 178, 48, 972, + /* 140 */ 972, 972, 972, 972, 972, 972, 972, 972, 972, 972, + /* 150 */ 972, 972, 972, 972, 972, 972, 972, 972, 520, 187, + /* 160 */ 325, 447, 690, 690, 477, 922, 922, 922, 654, 654, + /* 170 */ 1285, 1384, 477, 40, 4, 73, 4, 4, 135, 4, + /* 180 */ 4, 406, 4, 406, 406, 724, 924, 452, 452, 452, + /* 190 */ 452, 452, 452, 1354, 413, 21, 75, 414, 414, 822, + /* 200 */ 125, 456, 837, 670, 186, 207, 723, 947, 947, 986, + /* 210 */ 910, 1328, 1328, 1328, 951, 1328, 1157, 929, 726, 1397, + /* 220 */ 1255, 1411, 1342, 1401, 1401, 1403, 1490, 1490, 1311, 1520, + /* 230 */ 213, 1401, 1384, 1496, 1757, 1795, 1796, 1591, 40, 1796, + /* 240 */ 40, 1614, 1795, 1811, 1793, 1811, 1793, 1664, 1795, 1811, + /* 250 */ 1795, 1793, 1664, 1664, 1664, 1755, 1761, 1795, 1795, 1775, + /* 260 */ 1795, 1795, 1795, 1872, 1848, 1872, 1848, 1796, 40, 40, + /* 270 */ 1889, 40, 1894, 1905, 40, 1894, 40, 1916, 40, 1918, + /* 280 */ 40, 40, 1795, 40, 1872, 4, 4, 4, 4, 4, + /* 290 */ 4, 4, 4, 4, 4, 4, 1795, 924, 924, 1872, + /* 300 */ 406, 406, 406, 1747, 1873, 1796, 749, 1970, 1772, 1785, + /* 310 */ 1889, 749, 1496, 1795, 406, 1700, 1705, 1700, 1705, 1703, + /* 320 */ 1819, 1700, 1702, 1708, 1730, 1496, 1736, 1740, 1712, 1716, + /* 330 */ 1719, 1811, 2036, 1934, 1753, 1894, 749, 749, 1705, 406, + /* 340 */ 406, 406, 406, 1705, 406, 1879, 749, 406, 1918, 749, + /* 350 */ 1968, 406, 1892, 1918, 749, 724, 749, 1811, 406, 406, + /* 360 */ 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, + /* 370 */ 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, + /* 380 */ 1993, 406, 1795, 749, 2104, 2092, 2096, 2110, 1872, 3934, + /* 390 */ 3934, 3934, 3934, 3934, 3934, 3934, 3934, 3934, 3934, 3934, + /* 400 */ 3934, 39, 1238, 204, 302, 310, 84, 50, 197, 904, + /* 410 */ 1134, 1197, 1214, 1258, 1275, 1353, 1366, 1463, 589, 1055, + /* 420 */ 1280, 1307, 1065, 1065, 1065, 1065, 1065, 1065, 1065, 1065, + /* 430 */ 1065, 100, 65, 500, 1033, 3, 3, 653, 53, 387, + /* 440 */ 294, 284, 284, 604, 902, 284, 696, 977, 1246, 422, + /* 450 */ 47, 47, 1112, 1335, 1148, 1112, 1112, 1112, 1413, 94, + /* 460 */ 511, 1540, 1528, 1429, 1098, 576, 1423, 1460, 1462, 1500, + /* 470 */ 1545, 752, 971, 1602, 1628, 1629, 1630, 1340, 882, 1402, + /* 480 */ 1067, 1509, 1574, 1585, 1586, 1381, 1452, 1575, 1600, 1601, + /* 490 */ 1604, 1606, 1642, 1613, 1578, 1616, 1625, 1580, 1626, 1634, + /* 500 */ 1644, 1651, 1652, 1648, 1661, 1663, 1666, 1674, 1676, 1680, + /* 510 */ 1684, 1686, 1691, 1693, 1675, 1677, 1678, 1679, 1682, 1685, + /* 520 */ 1565, 1553, 1414, 1618, 1687, 1711, 1612, 1725, 2203, 2204, + /* 530 */ 2205, 2162, 2210, 2175, 1972, 2177, 2180, 2181, 1977, 2221, + /* 540 */ 2187, 2188, 1988, 2196, 2233, 2234, 1992, 2238, 2206, 2239, + /* 550 */ 2207, 2240, 2219, 2244, 2209, 2008, 2247, 2024, 2249, 2026, + /* 560 */ 2030, 2033, 2041, 2258, 2259, 2267, 2058, 2061, 2271, 2273, + /* 570 */ 2116, 2224, 2226, 2278, 2243, 2283, 2285, 2251, 2235, 2288, + /* 580 */ 2241, 2290, 2246, 2291, 2294, 2295, 2245, 2297, 2298, 2300, + /* 590 */ 2303, 2304, 2305, 2136, 2280, 2317, 2142, 2319, 2320, 2321, + /* 600 */ 2323, 2324, 2325, 2331, 2333, 2334, 2335, 2342, 2343, 2347, + /* 610 */ 2349, 2351, 2352, 2353, 2354, 2355, 2356, 2307, 2359, 2313, + /* 620 */ 2361, 2362, 2363, 2364, 2374, 2376, 2377, 2378, 2379, 2344, + /* 630 */ 2367, 2211, 2368, 2213, 2371, 2216, 2380, 2381, 2360, 2332, + /* 640 */ 2365, 2336, 2383, 2318, 2385, 2322, 2370, 2389, 2327, 2391, + /* 650 */ 2339, 2392, 2411, 2382, 2372, 2369, 2415, 2386, 2384, 2373, + /* 660 */ 2419, 2388, 2387, 2393, 2425, 2397, 2439, 2395, 2396, 2412, + /* 670 */ 2398, 2399, 2430, 2400, 2446, 2407, 2403, 2453, 2454, 2455, + /* 680 */ 2456, 2414, 2255, 2470, 2398, 2420, 2474, 2398, 2424, 2484, + /* 690 */ 2485, 2404, 2481, 2482, 2442, 2432, 2443, 2479, 2452, 2440, + /* 700 */ 2445, 2493, 2459, 2444, 2457, 2496, 2461, 2448, 2460, 2499, + /* 710 */ 2500, 2503, 2507, 2519, 2523, 2401, 2405, 2475, 2502, 2525, + /* 720 */ 2508, 2495, 2497, 2501, 2504, 2505, 2506, 2509, 2510, 2512, + /* 730 */ 2514, 2516, 2515, 2517, 2513, 2518, 2529, 2521, 2532, 2522, + /* 740 */ 2539, 2535, 2520, 2559, 2538, 2533, 2561, 2568, 2573, 2541, + /* 750 */ 2578, 2543, 2580, 2546, 2584, 2553, 2565, 2551, 2552, 2566, + /* 760 */ 2473, 2486, 2603, 2417, 2394, 2390, 2524, 2410, 2398, 2560, + /* 770 */ 2614, 2423, 2585, 2602, 2620, 2421, 2616, 2449, 2437, 2646, + /* 780 */ 2647, 2451, 2447, 2458, 2450, 2645, 2621, 2337, 2540, 2542, + /* 790 */ 2544, 2547, 2626, 2628, 2554, 2604, 2555, 2605, 2556, 2550, + /* 800 */ 2637, 2638, 2557, 2563, 2567, 2569, 2558, 2639, 2624, 2625, + /* 810 */ 2570, 2648, 2375, 2601, 2564, 2653, 2577, 2654, 2586, 2590, + /* 820 */ 2690, 2661, 2406, 2672, 2673, 2674, 2675, 2676, 2677, 2599, + /* 830 */ 2600, 2663, 2426, 2684, 2668, 2720, 2721, 2608, 2681, 2612, + /* 840 */ 2622, 2615, 2627, 2548, 2630, 2737, 2699, 2549, 2746, 2631, + /* 850 */ 2633, 2562, 2706, 2571, 2718, 2640, 2472, 2652, 2755, 2749, + /* 860 */ 2526, 2657, 2658, 2659, 2660, 2664, 2665, 2662, 2667, 2669, + /* 870 */ 2670, 2678, 2671, 2725, 2679, 2682, 2728, 2683, 2761, 2534, + /* 880 */ 2685, 2686, 2795, 2687, 2689, 2595, 2748, 2691, 2692, 2796, + /* 890 */ 2780, 2693, 2697, 2398, 2757, 2698, 2700, 2701, 2703, 2704, + /* 900 */ 2694, 2785, 2799, 2800, 2596, 2708, 2790, 2792, 2712, 2713, + /* 910 */ 2794, 2716, 2719, 2801, 2662, 2723, 2810, 2667, 2731, 2815, + /* 920 */ 2669, 2738, 2817, 2670, 2695, 2722, 2726, 2741, 2740, 2823, + /* 930 */ 2742, 2822, 2745, 2823, 2823, 2840, 2789, 2804, 2852, 2839, + /* 940 */ 2844, 2846, 2848, 2850, 2851, 2853, 2854, 2855, 2856, 2857, + /* 950 */ 2806, 2786, 2812, 2787, 2865, 2866, 2875, 2879, 2881, 2880, + /* 960 */ 2882, 2883, 2819, 2514, 2884, 2516, 2885, 2886, 2887, 2888, + /* 970 */ 2895, 2889, 2927, 2893, 2877, 2890, 2932, 2899, 2894, 2892, + /* 980 */ 2944, 2911, 2896, 2905, 2951, 2916, 2901, 2909, 2954, 2920, + /* 990 */ 2957, 2936, 2924, 2962, 2942, 2933, 2929, 2931, 2946, 2948, + /* 1000 */ 2949, 2950, 2953, 2955, }; -#define YY_REDUCE_COUNT (390) -#define YY_REDUCE_MIN (-503) -#define YY_REDUCE_MAX (2515) +#define YY_REDUCE_COUNT (400) +#define YY_REDUCE_MIN (-530) +#define YY_REDUCE_MAX (3422) static const short yy_reduce_ofst[] = { - /* 0 */ -239, -365, -325, -19, -202, 325, 366, 705, 810, 840, - /* 10 */ 960, 991, 1027, 1156, 1237, 1318, 1342, 1361, 1429, 1494, - /* 20 */ 1469, 1537, 1605, 1563, 1642, 1729, 1751, 1778, 1815, 1842, - /* 30 */ 1864, 1891, 1928, 1969, 2004, 2036, 2055, 2101, 2133, 2197, - /* 40 */ 2221, 2246, 2286, 2310, 2351, 2391, 2418, 2437, 2502, 2515, - /* 50 */ -310, -61, -464, -362, 865, 955, 1145, 1165, -297, -271, - /* 60 */ 1201, -412, -503, -384, -382, -82, 13, -393, -385, -436, - /* 70 */ -356, -210, -21, -389, -324, -388, -247, -439, -142, 115, - /* 80 */ 148, -198, -191, -359, 89, 173, 313, 345, 403, 409, - /* 90 */ 435, 433, 440, 454, 578, 492, -337, 387, -10, 445, - /* 100 */ 583, 472, 412, 601, 393, 614, 15, 653, 675, 794, - /* 110 */ 837, 349, 844, 851, 874, 31, 877, 111, 375, 365, - /* 120 */ 565, -501, -501, -66, -111, -223, 595, -100, 120, -231, - /* 130 */ -3, 548, 753, 814, 817, 834, 836, 839, 843, 861, - /* 140 */ 881, 904, 916, 932, 937, 948, 949, 974, -405, 530, - /* 150 */ 87, 372, 704, 741, 869, 530, 806, 876, 434, 499, - /* 160 */ 673, -224, 884, 228, 64, 893, -195, 547, 644, 863, - /* 170 */ 718, 939, 871, 941, 943, -48, 919, -425, -411, 935, - /* 180 */ 999, 1009, 1040, 1007, 1093, 1134, 1075, 1012, 1012, 993, - /* 190 */ 1008, 1032, 1033, 1236, 1012, 1212, 1212, 1226, 1238, 1245, - /* 200 */ 1195, 1105, 1115, 1116, 1197, 1117, 1212, 1211, 1268, 1182, - /* 210 */ 1276, 1233, 1203, 1229, 1231, 1212, 1147, 1151, 1136, 1173, - /* 220 */ 1158, 1234, 1281, 1242, 1219, 1321, 1247, 1240, 1317, 1252, - /* 230 */ 1337, 1274, 1352, 1359, 1308, 1364, 1312, 1316, 1370, 1372, - /* 240 */ 1371, 1319, 1323, 1324, 1326, 1368, 1373, 1384, 1386, 1381, - /* 250 */ 1393, 1394, 1395, 1405, 1406, 1407, 1408, 1315, 1392, 1399, - /* 260 */ 1356, 1415, 1410, 1343, 1417, 1414, 1419, 1374, 1420, 1375, - /* 270 */ 1424, 1443, 1441, 1444, 1447, 1426, 1428, 1437, 1439, 1442, - /* 280 */ 1446, 1448, 1451, 1452, 1453, 1454, 1460, 1482, 1484, 1481, - /* 290 */ 1445, 1455, 1456, 1398, 1411, 1409, 1480, 1413, 1422, 1427, - /* 300 */ 1457, 1491, 1421, 1500, 1465, 1377, 1461, 1378, 1462, 1367, - /* 310 */ 1382, 1379, 1396, 1412, 1400, 1470, 1416, 1423, 1383, 1391, - /* 320 */ 1459, 1550, 1467, 1438, 1483, 1555, 1551, 1552, 1495, 1514, - /* 330 */ 1517, 1522, 1532, 1511, 1533, 1518, 1575, 1540, 1525, 1585, - /* 340 */ 1485, 1557, 1545, 1553, 1608, 1584, 1609, 1618, 1576, 1578, - /* 350 */ 1580, 1581, 1583, 1588, 1599, 1600, 1601, 1602, 1611, 1614, - /* 360 */ 1616, 1625, 1627, 1628, 1630, 1631, 1633, 1634, 1635, 1638, - /* 370 */ 1596, 1640, 1621, 1629, 1644, 1658, 1660, 1661, 1668, 1582, - /* 380 */ 1646, 1593, 1597, 1620, 1622, 1669, 1670, 1659, 1671, 1675, - /* 390 */ 1685, + /* 0 */ -142, -347, -206, 607, 1233, 1259, 1371, 1417, 1447, 1498, + /* 10 */ 292, 1607, 1637, 1671, 1758, 1804, -101, 656, 1834, 1898, + /* 20 */ 257, 1925, 1962, 2011, 2060, 2088, 2124, 2193, 2229, 2257, + /* 30 */ 2338, 2102, 2366, 2402, 2435, 2478, 2511, 2575, 2598, 2644, + /* 40 */ 2666, 2680, 2756, 2791, 2824, 2867, 2900, 2964, 2987, 3033, + /* 50 */ 3055, 3069, 3145, 3180, 3213, 3256, 3289, 3353, 3376, 3422, + /* 60 */ -342, 504, 467, -88, 315, 391, 476, 1007, 172, 255, + /* 70 */ 1009, 67, -530, -74, 308, -528, -203, 312, -273, -427, + /* 80 */ -120, -31, 371, -274, -70, -396, -394, 179, -402, -392, + /* 90 */ -19, -29, 524, -249, 317, 410, 521, 532, 554, -348, + /* 100 */ 355, 609, 619, 650, 694, 373, -374, 155, -293, 623, + /* 110 */ 767, 470, 615, 771, -20, 782, 564, 792, 798, 875, + /* 120 */ 891, 377, 896, 909, 974, 736, 981, 63, 953, 508, + /* 130 */ 407, -370, -370, 105, -424, 649, 81, -139, 272, 303, + /* 140 */ 344, 485, 652, 731, 847, 961, 1000, 1013, 1026, 1075, + /* 150 */ 1076, 1081, 1082, 1096, 1100, 1125, 1129, 1153, 142, 127, + /* 160 */ 277, 600, 679, 683, 892, 127, 718, 911, 502, 541, + /* 170 */ 685, -407, 982, 1021, 211, 774, 513, 550, 529, 748, + /* 180 */ 868, 991, 1087, 997, 1044, 962, 1140, 764, 788, 863, + /* 190 */ 1047, 1193, 1230, 1078, 1293, 1277, 1261, 1187, 1187, 1161, + /* 200 */ 1173, 1183, 1200, 1339, 1187, 1302, 1302, 1327, 1329, 1351, + /* 210 */ 1298, 1218, 1219, 1220, 1305, 1226, 1302, 1324, 1379, 1290, + /* 220 */ 1385, 1343, 1306, 1332, 1336, 1302, 1252, 1260, 1241, 1276, + /* 230 */ 1262, 1344, 1389, 1338, 1317, 1415, 1337, 1346, 1407, 1341, + /* 240 */ 1418, 1357, 1437, 1440, 1394, 1450, 1398, 1405, 1455, 1457, + /* 250 */ 1459, 1406, 1408, 1410, 1416, 1456, 1466, 1481, 1482, 1477, + /* 260 */ 1489, 1494, 1497, 1503, 1505, 1510, 1508, 1424, 1502, 1506, + /* 270 */ 1461, 1507, 1512, 1453, 1515, 1527, 1523, 1470, 1530, 1483, + /* 280 */ 1532, 1536, 1554, 1544, 1564, 1534, 1535, 1541, 1542, 1543, + /* 290 */ 1546, 1547, 1548, 1549, 1550, 1551, 1558, 1573, 1577, 1581, + /* 300 */ 1524, 1529, 1538, 1499, 1504, 1511, 1582, 1513, 1516, 1525, + /* 310 */ 1561, 1603, 1552, 1611, 1567, 1473, 1555, 1478, 1560, 1484, + /* 320 */ 1486, 1485, 1487, 1493, 1501, 1568, 1514, 1517, 1480, 1491, + /* 330 */ 1495, 1650, 1557, 1521, 1526, 1659, 1655, 1657, 1608, 1619, + /* 340 */ 1620, 1622, 1623, 1609, 1627, 1615, 1670, 1633, 1621, 1683, + /* 350 */ 1563, 1638, 1631, 1643, 1697, 1660, 1698, 1692, 1646, 1667, + /* 360 */ 1668, 1672, 1688, 1689, 1690, 1701, 1704, 1706, 1709, 1710, + /* 370 */ 1714, 1715, 1720, 1722, 1723, 1724, 1731, 1732, 1735, 1737, + /* 380 */ 1694, 1738, 1726, 1713, 1734, 1741, 1751, 1760, 1756, 1717, + /* 390 */ 1750, 1718, 1727, 1695, 1728, 1762, 1763, 1764, 1766, 1786, + /* 400 */ 1816, }; static const YYACTIONTYPE yy_default[] = { - /* 0 */ 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, - /* 10 */ 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, - /* 20 */ 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, - /* 30 */ 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, - /* 40 */ 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, - /* 50 */ 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, - /* 60 */ 2578, 2203, 2203, 2534, 2203, 2203, 2203, 2203, 2203, 2203, - /* 70 */ 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2541, 2541, - /* 80 */ 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, - /* 90 */ 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, - /* 100 */ 2203, 2309, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, - /* 110 */ 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, - /* 120 */ 2307, 2830, 2203, 2956, 2619, 2203, 2203, 2859, 2203, 2203, - /* 130 */ 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, - /* 140 */ 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2842, - /* 150 */ 2203, 2203, 2280, 2280, 2203, 2842, 2842, 2842, 2802, 2802, - /* 160 */ 2307, 2203, 2203, 2309, 2203, 2621, 2203, 2203, 2203, 2203, - /* 170 */ 2203, 2203, 2203, 2203, 2203, 2450, 2233, 2203, 2203, 2203, - /* 180 */ 2203, 2203, 2203, 2604, 2203, 2203, 2888, 2834, 2835, 2950, - /* 190 */ 2203, 2891, 2853, 2203, 2848, 2203, 2203, 2203, 2203, 2203, - /* 200 */ 2878, 2203, 2203, 2203, 2203, 2203, 2203, 2546, 2203, 2647, - /* 210 */ 2203, 2395, 2598, 2203, 2203, 2203, 2203, 2203, 2934, 2832, - /* 220 */ 2872, 2203, 2203, 2882, 2203, 2203, 2203, 2635, 2309, 2203, - /* 230 */ 2309, 2591, 2529, 2203, 2539, 2203, 2539, 2536, 2203, 2203, - /* 240 */ 2203, 2539, 2536, 2536, 2536, 2383, 2379, 2203, 2203, 2377, - /* 250 */ 2203, 2203, 2203, 2203, 2263, 2203, 2263, 2203, 2309, 2309, - /* 260 */ 2203, 2309, 2203, 2203, 2309, 2203, 2309, 2203, 2309, 2203, - /* 270 */ 2309, 2309, 2203, 2309, 2203, 2203, 2203, 2203, 2203, 2203, - /* 280 */ 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, - /* 290 */ 2203, 2203, 2203, 2633, 2614, 2203, 2307, 2203, 2602, 2600, - /* 300 */ 2203, 2307, 2882, 2203, 2203, 2904, 2899, 2904, 2899, 2918, - /* 310 */ 2914, 2904, 2923, 2920, 2884, 2882, 2865, 2861, 2953, 2940, - /* 320 */ 2936, 2203, 2203, 2870, 2868, 2203, 2307, 2307, 2899, 2203, - /* 330 */ 2203, 2203, 2203, 2899, 2203, 2203, 2307, 2203, 2203, 2307, - /* 340 */ 2203, 2203, 2203, 2203, 2307, 2203, 2307, 2203, 2203, 2203, - /* 350 */ 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, - /* 360 */ 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, - /* 370 */ 2412, 2203, 2203, 2307, 2203, 2235, 2237, 2247, 2203, 2593, - /* 380 */ 2956, 2619, 2624, 2574, 2574, 2453, 2453, 2956, 2453, 2310, - /* 390 */ 2208, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, - /* 400 */ 2203, 2203, 2203, 2917, 2916, 2753, 2203, 2806, 2805, 2804, - /* 410 */ 2795, 2752, 2408, 2203, 2203, 2203, 2751, 2750, 2203, 2203, - /* 420 */ 2203, 2203, 2399, 2396, 2203, 2203, 2421, 2203, 2203, 2203, - /* 430 */ 2203, 2565, 2564, 2744, 2203, 2203, 2745, 2743, 2742, 2203, - /* 440 */ 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, - /* 450 */ 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, - /* 460 */ 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2937, 2941, 2203, - /* 470 */ 2203, 2203, 2831, 2203, 2203, 2203, 2723, 2203, 2203, 2203, - /* 480 */ 2203, 2203, 2691, 2686, 2677, 2668, 2683, 2674, 2662, 2680, - /* 490 */ 2671, 2659, 2656, 2203, 2203, 2203, 2203, 2203, 2203, 2203, - /* 500 */ 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, - /* 510 */ 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, - /* 520 */ 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, - /* 530 */ 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, - /* 540 */ 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2535, - /* 550 */ 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, - /* 560 */ 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, - /* 570 */ 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, - /* 580 */ 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, - /* 590 */ 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, - /* 600 */ 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, - /* 610 */ 2203, 2203, 2203, 2203, 2550, 2203, 2203, 2203, 2203, 2203, - /* 620 */ 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, - /* 630 */ 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, - /* 640 */ 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2252, 2730, - /* 650 */ 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, - /* 660 */ 2203, 2203, 2203, 2733, 2203, 2203, 2734, 2203, 2203, 2203, - /* 670 */ 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, - /* 680 */ 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, - /* 690 */ 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, - /* 700 */ 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2354, - /* 710 */ 2353, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, - /* 720 */ 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, - /* 730 */ 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2735, - /* 740 */ 2203, 2203, 2203, 2203, 2618, 2203, 2203, 2725, 2203, 2203, - /* 750 */ 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, - /* 760 */ 2203, 2203, 2203, 2203, 2933, 2885, 2203, 2203, 2203, 2203, - /* 770 */ 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, - /* 780 */ 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2723, 2203, - /* 790 */ 2915, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2931, 2203, - /* 800 */ 2935, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2841, 2837, - /* 810 */ 2203, 2203, 2833, 2203, 2203, 2203, 2203, 2203, 2203, 2203, - /* 820 */ 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, - /* 830 */ 2203, 2203, 2203, 2792, 2203, 2203, 2203, 2826, 2203, 2203, - /* 840 */ 2203, 2203, 2449, 2448, 2447, 2446, 2203, 2203, 2203, 2203, - /* 850 */ 2203, 2203, 2735, 2203, 2738, 2203, 2203, 2203, 2203, 2203, - /* 860 */ 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2722, 2203, - /* 870 */ 2777, 2776, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, - /* 880 */ 2203, 2203, 2203, 2443, 2203, 2203, 2203, 2203, 2203, 2203, - /* 890 */ 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2427, - /* 900 */ 2425, 2424, 2423, 2203, 2460, 2203, 2203, 2203, 2456, 2455, - /* 910 */ 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, - /* 920 */ 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2328, - /* 930 */ 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2320, 2203, - /* 940 */ 2319, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, - /* 950 */ 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, - /* 960 */ 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, - /* 970 */ 2232, 2203, 2203, 2203, 2203, 2203, 2203, 2203, 2203, + /* 0 */ 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, + /* 10 */ 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, + /* 20 */ 2842, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, + /* 30 */ 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, + /* 40 */ 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, + /* 50 */ 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, + /* 60 */ 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, + /* 70 */ 2632, 2257, 2257, 2588, 2257, 2257, 2257, 2257, 2257, 2257, + /* 80 */ 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2595, 2595, + /* 90 */ 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, + /* 100 */ 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, + /* 110 */ 2257, 2363, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, + /* 120 */ 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, + /* 130 */ 2361, 2899, 2257, 3025, 2673, 2257, 2257, 2928, 2257, 2257, + /* 140 */ 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, + /* 150 */ 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2911, + /* 160 */ 2257, 2257, 2334, 2334, 2257, 2911, 2911, 2911, 2871, 2871, + /* 170 */ 2361, 2257, 2257, 2363, 2257, 2675, 2257, 2257, 2257, 2257, + /* 180 */ 2257, 2257, 2257, 2257, 2257, 2504, 2287, 2257, 2257, 2257, + /* 190 */ 2257, 2257, 2257, 2658, 2257, 2257, 2957, 2903, 2904, 3019, + /* 200 */ 2257, 2960, 2922, 2257, 2917, 2257, 2257, 2257, 2257, 2257, + /* 210 */ 2947, 2257, 2257, 2257, 2257, 2257, 2257, 2600, 2257, 2701, + /* 220 */ 2257, 2449, 2652, 2257, 2257, 2257, 2257, 2257, 3003, 2901, + /* 230 */ 2941, 2257, 2257, 2951, 2257, 2257, 2257, 2689, 2363, 2257, + /* 240 */ 2363, 2645, 2583, 2257, 2593, 2257, 2593, 2590, 2257, 2257, + /* 250 */ 2257, 2593, 2590, 2590, 2590, 2437, 2433, 2257, 2257, 2431, + /* 260 */ 2257, 2257, 2257, 2257, 2317, 2257, 2317, 2257, 2363, 2363, + /* 270 */ 2257, 2363, 2257, 2257, 2363, 2257, 2363, 2257, 2363, 2257, + /* 280 */ 2363, 2363, 2257, 2363, 2257, 2257, 2257, 2257, 2257, 2257, + /* 290 */ 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, + /* 300 */ 2257, 2257, 2257, 2687, 2668, 2257, 2361, 2257, 2656, 2654, + /* 310 */ 2257, 2361, 2951, 2257, 2257, 2973, 2968, 2973, 2968, 2987, + /* 320 */ 2983, 2973, 2992, 2989, 2953, 2951, 2934, 2930, 3022, 3009, + /* 330 */ 3005, 2257, 2257, 2939, 2937, 2257, 2361, 2361, 2968, 2257, + /* 340 */ 2257, 2257, 2257, 2968, 2257, 2257, 2361, 2257, 2257, 2361, + /* 350 */ 2257, 2257, 2257, 2257, 2361, 2257, 2361, 2257, 2257, 2257, + /* 360 */ 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, + /* 370 */ 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, + /* 380 */ 2466, 2257, 2257, 2361, 2257, 2289, 2291, 2301, 2257, 2647, + /* 390 */ 3025, 2673, 2678, 2628, 2628, 2507, 2507, 3025, 2507, 2364, + /* 400 */ 2262, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, + /* 410 */ 2257, 2257, 2257, 2806, 2257, 2257, 2257, 2257, 2257, 2257, + /* 420 */ 2257, 2257, 2986, 2985, 2807, 2257, 2875, 2874, 2873, 2864, + /* 430 */ 2806, 2462, 2257, 2257, 2257, 2805, 2804, 2257, 2257, 2257, + /* 440 */ 2257, 2453, 2450, 2257, 2257, 2475, 2257, 2257, 2257, 2257, + /* 450 */ 2619, 2618, 2798, 2257, 2257, 2799, 2797, 2796, 2257, 2257, + /* 460 */ 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, + /* 470 */ 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, + /* 480 */ 2257, 2257, 2257, 2257, 2257, 2257, 3006, 3010, 2257, 2257, + /* 490 */ 2257, 2257, 2900, 2257, 2257, 2257, 2257, 2777, 2257, 2257, + /* 500 */ 2257, 2257, 2257, 2745, 2740, 2731, 2722, 2737, 2728, 2716, + /* 510 */ 2734, 2725, 2713, 2710, 2257, 2257, 2257, 2257, 2257, 2257, + /* 520 */ 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, + /* 530 */ 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, + /* 540 */ 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, + /* 550 */ 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, + /* 560 */ 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, + /* 570 */ 2589, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, + /* 580 */ 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, + /* 590 */ 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, + /* 600 */ 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, + /* 610 */ 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, + /* 620 */ 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, + /* 630 */ 2257, 2257, 2257, 2257, 2257, 2604, 2257, 2257, 2257, 2257, + /* 640 */ 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, + /* 650 */ 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, + /* 660 */ 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2306, + /* 670 */ 2784, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, + /* 680 */ 2257, 2257, 2257, 2257, 2787, 2257, 2257, 2788, 2257, 2257, + /* 690 */ 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, + /* 700 */ 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, + /* 710 */ 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, + /* 720 */ 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, + /* 730 */ 2408, 2407, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, + /* 740 */ 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, + /* 750 */ 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, + /* 760 */ 2789, 2257, 2257, 2257, 2257, 2672, 2257, 2257, 2779, 2257, + /* 770 */ 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, + /* 780 */ 2257, 2257, 2257, 2257, 2257, 3002, 2954, 2257, 2257, 2257, + /* 790 */ 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, + /* 800 */ 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2777, + /* 810 */ 2257, 2984, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 3000, + /* 820 */ 2257, 3004, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2910, + /* 830 */ 2906, 2257, 2257, 2902, 2257, 2257, 2257, 2257, 2257, 2257, + /* 840 */ 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, + /* 850 */ 2257, 2257, 2257, 2257, 2861, 2257, 2257, 2257, 2895, 2257, + /* 860 */ 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2503, 2502, 2501, + /* 870 */ 2500, 2257, 2257, 2257, 2257, 2257, 2257, 2789, 2257, 2792, + /* 880 */ 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, + /* 890 */ 2257, 2257, 2257, 2776, 2257, 2839, 2838, 2257, 2257, 2257, + /* 900 */ 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2497, 2257, + /* 910 */ 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, + /* 920 */ 2257, 2257, 2257, 2257, 2481, 2479, 2478, 2477, 2257, 2514, + /* 930 */ 2257, 2257, 2257, 2510, 2509, 2257, 2257, 2257, 2257, 2257, + /* 940 */ 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, + /* 950 */ 2257, 2257, 2257, 2257, 2382, 2257, 2257, 2257, 2257, 2257, + /* 960 */ 2257, 2257, 2257, 2374, 2257, 2373, 2257, 2257, 2257, 2257, + /* 970 */ 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, + /* 980 */ 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, 2257, + /* 990 */ 2257, 2257, 2257, 2257, 2257, 2286, 2257, 2257, 2257, 2257, + /* 1000 */ 2257, 2257, 2257, 2257, }; /********** End of lemon-generated parsing tables *****************************/ -/* The next table maps tokens (terminal symbols) into fallback tokens. +/* The next table maps tokens (terminal symbols) into fallback tokens. ** If a construct like the following: -** +** ** %fallback ID X Y Z. ** ** appears in the grammar, then ID becomes a fallback token for X, Y, @@ -1626,12 +1849,12 @@ static const YYCODETYPE yyFallback[] = { 0, /* BWLIMIT => nothing */ 0, /* START => nothing */ 0, /* TIMESTAMP => nothing */ - 328, /* END => ABORT */ + 336, /* END => ABORT */ 0, /* TABLE => nothing */ 0, /* NK_LP => nothing */ 0, /* NK_RP => nothing */ 0, /* USING => nothing */ - 328, /* FILE => ABORT */ + 336, /* FILE => ABORT */ 0, /* STABLE => nothing */ 0, /* COLUMN => nothing */ 0, /* MODIFY => nothing */ @@ -1699,7 +1922,7 @@ static const YYCODETYPE yyFallback[] = { 0, /* VNODES => nothing */ 0, /* ALIVE => nothing */ 0, /* VIEWS => nothing */ - 328, /* VIEW => ABORT */ + 336, /* VIEW => ABORT */ 0, /* COMPACTS => nothing */ 0, /* NORMAL => nothing */ 0, /* CHILD => nothing */ @@ -1742,7 +1965,7 @@ static const YYCODETYPE yyFallback[] = { 0, /* PAUSE => nothing */ 0, /* RESUME => nothing */ 0, /* PRIMARY => nothing */ - 328, /* KEY => ABORT */ + 336, /* KEY => ABORT */ 0, /* TRIGGER => nothing */ 0, /* AT_ONCE => nothing */ 0, /* WINDOW_CLOSE => nothing */ @@ -1779,13 +2002,22 @@ static const YYCODETYPE yyFallback[] = { 0, /* IROWTS => nothing */ 0, /* ISFILLED => nothing */ 0, /* CAST => nothing */ + 0, /* POSITION => nothing */ + 0, /* IN => nothing */ + 336, /* FOR => ABORT */ 0, /* NOW => nothing */ 0, /* TODAY => nothing */ + 0, /* SUBSTR => nothing */ + 0, /* SUBSTRING => nothing */ + 0, /* BOTH => nothing */ + 0, /* TRAILING => nothing */ + 0, /* LEADING => nothing */ 0, /* TIMEZONE => nothing */ 0, /* CLIENT_VERSION => nothing */ 0, /* SERVER_VERSION => nothing */ 0, /* SERVER_STATUS => nothing */ 0, /* CURRENT_USER => nothing */ + 0, /* PI => nothing */ 0, /* CASE => nothing */ 0, /* WHEN => nothing */ 0, /* THEN => nothing */ @@ -1800,13 +2032,12 @@ static const YYCODETYPE yyFallback[] = { 0, /* MATCH => nothing */ 0, /* NMATCH => nothing */ 0, /* CONTAINS => nothing */ - 0, /* IN => nothing */ 0, /* JOIN => nothing */ 0, /* INNER => nothing */ 0, /* LEFT => nothing */ 0, /* RIGHT => nothing */ 0, /* OUTER => nothing */ - 328, /* SEMI => ABORT */ + 336, /* SEMI => ABORT */ 0, /* ANTI => nothing */ 0, /* ASOF => nothing */ 0, /* WINDOW => nothing */ @@ -1842,52 +2073,51 @@ static const YYCODETYPE yyFallback[] = { 0, /* ASC => nothing */ 0, /* NULLS => nothing */ 0, /* ABORT => nothing */ - 328, /* AFTER => ABORT */ - 328, /* ATTACH => ABORT */ - 328, /* BEFORE => ABORT */ - 328, /* BEGIN => ABORT */ - 328, /* BITAND => ABORT */ - 328, /* BITNOT => ABORT */ - 328, /* BITOR => ABORT */ - 328, /* BLOCKS => ABORT */ - 328, /* CHANGE => ABORT */ - 328, /* COMMA => ABORT */ - 328, /* CONCAT => ABORT */ - 328, /* CONFLICT => ABORT */ - 328, /* COPY => ABORT */ - 328, /* DEFERRED => ABORT */ - 328, /* DELIMITERS => ABORT */ - 328, /* DETACH => ABORT */ - 328, /* DIVIDE => ABORT */ - 328, /* DOT => ABORT */ - 328, /* EACH => ABORT */ - 328, /* FAIL => ABORT */ - 328, /* FOR => ABORT */ - 328, /* GLOB => ABORT */ - 328, /* ID => ABORT */ - 328, /* IMMEDIATE => ABORT */ - 328, /* IMPORT => ABORT */ - 328, /* INITIALLY => ABORT */ - 328, /* INSTEAD => ABORT */ - 328, /* ISNULL => ABORT */ - 328, /* MODULES => ABORT */ - 328, /* NK_BITNOT => ABORT */ - 328, /* NK_SEMI => ABORT */ - 328, /* NOTNULL => ABORT */ - 328, /* OF => ABORT */ - 328, /* PLUS => ABORT */ - 328, /* PRIVILEGE => ABORT */ - 328, /* RAISE => ABORT */ - 328, /* RESTRICT => ABORT */ - 328, /* ROW => ABORT */ - 328, /* STAR => ABORT */ - 328, /* STATEMENT => ABORT */ - 328, /* STRICT => ABORT */ - 328, /* STRING => ABORT */ - 328, /* TIMES => ABORT */ - 328, /* VALUES => ABORT */ - 328, /* VARIABLE => ABORT */ - 328, /* WAL => ABORT */ + 336, /* AFTER => ABORT */ + 336, /* ATTACH => ABORT */ + 336, /* BEFORE => ABORT */ + 336, /* BEGIN => ABORT */ + 336, /* BITAND => ABORT */ + 336, /* BITNOT => ABORT */ + 336, /* BITOR => ABORT */ + 336, /* BLOCKS => ABORT */ + 336, /* CHANGE => ABORT */ + 336, /* COMMA => ABORT */ + 336, /* CONCAT => ABORT */ + 336, /* CONFLICT => ABORT */ + 336, /* COPY => ABORT */ + 336, /* DEFERRED => ABORT */ + 336, /* DELIMITERS => ABORT */ + 336, /* DETACH => ABORT */ + 336, /* DIVIDE => ABORT */ + 336, /* DOT => ABORT */ + 336, /* EACH => ABORT */ + 336, /* FAIL => ABORT */ + 336, /* GLOB => ABORT */ + 336, /* ID => ABORT */ + 336, /* IMMEDIATE => ABORT */ + 336, /* IMPORT => ABORT */ + 336, /* INITIALLY => ABORT */ + 336, /* INSTEAD => ABORT */ + 336, /* ISNULL => ABORT */ + 336, /* MODULES => ABORT */ + 336, /* NK_BITNOT => ABORT */ + 336, /* NK_SEMI => ABORT */ + 336, /* NOTNULL => ABORT */ + 336, /* OF => ABORT */ + 336, /* PLUS => ABORT */ + 336, /* PRIVILEGE => ABORT */ + 336, /* RAISE => ABORT */ + 336, /* RESTRICT => ABORT */ + 336, /* ROW => ABORT */ + 336, /* STAR => ABORT */ + 336, /* STATEMENT => ABORT */ + 336, /* STRICT => ABORT */ + 336, /* STRING => ABORT */ + 336, /* TIMES => ABORT */ + 336, /* VALUES => ABORT */ + 336, /* VARIABLE => ABORT */ + 336, /* WAL => ABORT */ 0, /* ENCODE => nothing */ 0, /* COMPRESS => nothing */ 0, /* LEVEL => nothing */ @@ -1930,15 +2160,10 @@ struct yyParser { int yyerrcnt; /* Shifts left before out of the error */ #endif ParseARG_SDECL /* A place to hold %extra_argument */ - ParseCTX_SDECL /* A place to hold %extra_context */ -#if YYSTACKDEPTH<=0 - int yystksz; /* Current side of the stack */ - yyStackEntry *yystack; /* The parser's stack */ - yyStackEntry yystk0; /* First stack entry */ -#else - yyStackEntry yystack[YYSTACKDEPTH]; /* The parser's stack */ - yyStackEntry *yystackEnd; /* Last entry in the stack */ -#endif + ParseCTX_SDECL /* A place to hold %extra_context */ + yyStackEntry *yystackEnd; /* Last entry in the stack */ + yyStackEntry *yystack; /* The parser stack */ + yyStackEntry yystk0[YYSTACKDEPTH]; /* Initial stack space */ }; typedef struct yyParser yyParser; @@ -1950,10 +2175,10 @@ static char *yyTracePrompt = 0; #endif /* NDEBUG */ #ifndef NDEBUG -/* +/* ** Turn parser tracing on by giving a stream to which to write the trace ** and a prompt to preface each trace message. Tracing is turned off -** by making either argument NULL +** by making either argument NULL ** ** Inputs: **
    @@ -1978,1362 +2203,1394 @@ void ParseTrace(FILE *TraceFILE, char *zTracePrompt){ #if defined(YYCOVERAGE) || !defined(NDEBUG) /* For tracing shifts, the names of all terminals and nonterminals ** are required. The following table supplies these names */ -static const char *const yyTokenName[] = { - /* 0 */ "$", - /* 1 */ "OR", - /* 2 */ "AND", - /* 3 */ "UNION", - /* 4 */ "ALL", - /* 5 */ "MINUS", - /* 6 */ "EXCEPT", - /* 7 */ "INTERSECT", - /* 8 */ "NK_BITAND", - /* 9 */ "NK_BITOR", - /* 10 */ "NK_LSHIFT", - /* 11 */ "NK_RSHIFT", - /* 12 */ "NK_PLUS", - /* 13 */ "NK_MINUS", - /* 14 */ "NK_STAR", - /* 15 */ "NK_SLASH", - /* 16 */ "NK_REM", - /* 17 */ "NK_CONCAT", - /* 18 */ "CREATE", - /* 19 */ "ACCOUNT", - /* 20 */ "NK_ID", - /* 21 */ "PASS", - /* 22 */ "NK_STRING", - /* 23 */ "ALTER", - /* 24 */ "PPS", - /* 25 */ "TSERIES", - /* 26 */ "STORAGE", - /* 27 */ "STREAMS", - /* 28 */ "QTIME", - /* 29 */ "DBS", - /* 30 */ "USERS", - /* 31 */ "CONNS", - /* 32 */ "STATE", - /* 33 */ "NK_COMMA", - /* 34 */ "HOST", - /* 35 */ "IS_IMPORT", - /* 36 */ "NK_INTEGER", - /* 37 */ "CREATEDB", - /* 38 */ "USER", - /* 39 */ "ENABLE", - /* 40 */ "SYSINFO", - /* 41 */ "ADD", - /* 42 */ "DROP", - /* 43 */ "GRANT", - /* 44 */ "ON", - /* 45 */ "TO", - /* 46 */ "REVOKE", - /* 47 */ "FROM", - /* 48 */ "SUBSCRIBE", - /* 49 */ "READ", - /* 50 */ "WRITE", - /* 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 */ "NOW", - /* 267 */ "TODAY", - /* 268 */ "TIMEZONE", - /* 269 */ "CLIENT_VERSION", - /* 270 */ "SERVER_VERSION", - /* 271 */ "SERVER_STATUS", - /* 272 */ "CURRENT_USER", - /* 273 */ "CASE", - /* 274 */ "WHEN", - /* 275 */ "THEN", - /* 276 */ "ELSE", - /* 277 */ "BETWEEN", - /* 278 */ "IS", - /* 279 */ "NK_LT", - /* 280 */ "NK_GT", - /* 281 */ "NK_LE", - /* 282 */ "NK_GE", - /* 283 */ "NK_NE", - /* 284 */ "MATCH", - /* 285 */ "NMATCH", - /* 286 */ "CONTAINS", - /* 287 */ "IN", - /* 288 */ "JOIN", - /* 289 */ "INNER", - /* 290 */ "LEFT", - /* 291 */ "RIGHT", - /* 292 */ "OUTER", - /* 293 */ "SEMI", - /* 294 */ "ANTI", - /* 295 */ "ASOF", - /* 296 */ "WINDOW", - /* 297 */ "WINDOW_OFFSET", - /* 298 */ "JLIMIT", - /* 299 */ "SELECT", - /* 300 */ "NK_HINT", - /* 301 */ "DISTINCT", - /* 302 */ "WHERE", - /* 303 */ "PARTITION", - /* 304 */ "BY", - /* 305 */ "SESSION", - /* 306 */ "STATE_WINDOW", - /* 307 */ "EVENT_WINDOW", - /* 308 */ "COUNT_WINDOW", - /* 309 */ "SLIDING", - /* 310 */ "FILL", - /* 311 */ "VALUE", - /* 312 */ "VALUE_F", - /* 313 */ "NONE", - /* 314 */ "PREV", - /* 315 */ "NULL_F", - /* 316 */ "LINEAR", - /* 317 */ "NEXT", - /* 318 */ "HAVING", - /* 319 */ "RANGE", - /* 320 */ "EVERY", - /* 321 */ "ORDER", - /* 322 */ "SLIMIT", - /* 323 */ "SOFFSET", - /* 324 */ "LIMIT", - /* 325 */ "OFFSET", - /* 326 */ "ASC", - /* 327 */ "NULLS", - /* 328 */ "ABORT", - /* 329 */ "AFTER", - /* 330 */ "ATTACH", - /* 331 */ "BEFORE", - /* 332 */ "BEGIN", - /* 333 */ "BITAND", - /* 334 */ "BITNOT", - /* 335 */ "BITOR", - /* 336 */ "BLOCKS", - /* 337 */ "CHANGE", - /* 338 */ "COMMA", - /* 339 */ "CONCAT", - /* 340 */ "CONFLICT", - /* 341 */ "COPY", - /* 342 */ "DEFERRED", - /* 343 */ "DELIMITERS", - /* 344 */ "DETACH", - /* 345 */ "DIVIDE", - /* 346 */ "DOT", - /* 347 */ "EACH", - /* 348 */ "FAIL", - /* 349 */ "FOR", - /* 350 */ "GLOB", - /* 351 */ "ID", - /* 352 */ "IMMEDIATE", - /* 353 */ "IMPORT", - /* 354 */ "INITIALLY", - /* 355 */ "INSTEAD", - /* 356 */ "ISNULL", - /* 357 */ "MODULES", - /* 358 */ "NK_BITNOT", - /* 359 */ "NK_SEMI", - /* 360 */ "NOTNULL", - /* 361 */ "OF", - /* 362 */ "PLUS", - /* 363 */ "PRIVILEGE", - /* 364 */ "RAISE", - /* 365 */ "RESTRICT", - /* 366 */ "ROW", - /* 367 */ "STAR", - /* 368 */ "STATEMENT", - /* 369 */ "STRICT", - /* 370 */ "STRING", - /* 371 */ "TIMES", - /* 372 */ "VALUES", - /* 373 */ "VARIABLE", - /* 374 */ "WAL", - /* 375 */ "ENCODE", - /* 376 */ "COMPRESS", - /* 377 */ "LEVEL", - /* 378 */ "cmd", - /* 379 */ "account_options", - /* 380 */ "alter_account_options", - /* 381 */ "literal", - /* 382 */ "alter_account_option", - /* 383 */ "ip_range_list", - /* 384 */ "white_list", - /* 385 */ "white_list_opt", - /* 386 */ "is_import_opt", - /* 387 */ "is_createdb_opt", - /* 388 */ "user_name", - /* 389 */ "sysinfo_opt", - /* 390 */ "privileges", - /* 391 */ "priv_level", - /* 392 */ "with_opt", - /* 393 */ "priv_type_list", - /* 394 */ "priv_type", - /* 395 */ "db_name", - /* 396 */ "table_name", - /* 397 */ "topic_name", - /* 398 */ "search_condition", - /* 399 */ "dnode_endpoint", - /* 400 */ "force_opt", - /* 401 */ "unsafe_opt", - /* 402 */ "not_exists_opt", - /* 403 */ "db_options", - /* 404 */ "exists_opt", - /* 405 */ "alter_db_options", - /* 406 */ "speed_opt", - /* 407 */ "start_opt", - /* 408 */ "end_opt", - /* 409 */ "integer_list", - /* 410 */ "variable_list", - /* 411 */ "retention_list", - /* 412 */ "signed", - /* 413 */ "alter_db_option", - /* 414 */ "retention", - /* 415 */ "full_table_name", - /* 416 */ "column_def_list", - /* 417 */ "tags_def_opt", - /* 418 */ "table_options", - /* 419 */ "multi_create_clause", - /* 420 */ "tag_list_opt", - /* 421 */ "tags_def", - /* 422 */ "multi_drop_clause", - /* 423 */ "alter_table_clause", - /* 424 */ "alter_table_options", - /* 425 */ "column_name", - /* 426 */ "type_name", - /* 427 */ "column_options", - /* 428 */ "tags_literal", - /* 429 */ "create_subtable_clause", - /* 430 */ "specific_cols_opt", - /* 431 */ "tags_literal_list", - /* 432 */ "drop_table_clause", - /* 433 */ "col_name_list", - /* 434 */ "tag_def_list", - /* 435 */ "tag_def", - /* 436 */ "column_def", - /* 437 */ "type_name_default_len", - /* 438 */ "duration_list", - /* 439 */ "rollup_func_list", - /* 440 */ "alter_table_option", - /* 441 */ "duration_literal", - /* 442 */ "rollup_func_name", - /* 443 */ "function_name", - /* 444 */ "col_name", - /* 445 */ "db_kind_opt", - /* 446 */ "table_kind_db_name_cond_opt", - /* 447 */ "like_pattern_opt", - /* 448 */ "db_name_cond_opt", - /* 449 */ "table_name_cond", - /* 450 */ "from_db_opt", - /* 451 */ "table_kind", - /* 452 */ "tag_item", - /* 453 */ "column_alias", - /* 454 */ "tsma_name", - /* 455 */ "tsma_func_list", - /* 456 */ "full_tsma_name", - /* 457 */ "func_list", - /* 458 */ "index_options", - /* 459 */ "full_index_name", - /* 460 */ "index_name", - /* 461 */ "sliding_opt", - /* 462 */ "sma_stream_opt", - /* 463 */ "func", - /* 464 */ "sma_func_name", - /* 465 */ "expression_list", - /* 466 */ "with_meta", - /* 467 */ "query_or_subquery", - /* 468 */ "where_clause_opt", - /* 469 */ "cgroup_name", - /* 470 */ "analyze_opt", - /* 471 */ "explain_options", - /* 472 */ "insert_query", - /* 473 */ "or_replace_opt", - /* 474 */ "agg_func_opt", - /* 475 */ "bufsize_opt", - /* 476 */ "language_opt", - /* 477 */ "full_view_name", - /* 478 */ "view_name", - /* 479 */ "stream_name", - /* 480 */ "stream_options", - /* 481 */ "col_list_opt", - /* 482 */ "tag_def_or_ref_opt", - /* 483 */ "subtable_opt", - /* 484 */ "ignore_opt", - /* 485 */ "column_stream_def_list", - /* 486 */ "column_stream_def", - /* 487 */ "stream_col_options", - /* 488 */ "expression", - /* 489 */ "on_vgroup_id", - /* 490 */ "dnode_list", - /* 491 */ "literal_func", - /* 492 */ "signed_literal", - /* 493 */ "literal_list", - /* 494 */ "table_alias", - /* 495 */ "expr_or_subquery", - /* 496 */ "pseudo_column", - /* 497 */ "column_reference", - /* 498 */ "function_expression", - /* 499 */ "case_when_expression", - /* 500 */ "star_func", - /* 501 */ "star_func_para_list", - /* 502 */ "noarg_func", - /* 503 */ "other_para_list", - /* 504 */ "star_func_para", - /* 505 */ "when_then_list", - /* 506 */ "case_when_else_opt", - /* 507 */ "common_expression", - /* 508 */ "when_then_expr", - /* 509 */ "predicate", - /* 510 */ "compare_op", - /* 511 */ "in_op", - /* 512 */ "in_predicate_value", - /* 513 */ "boolean_value_expression", - /* 514 */ "boolean_primary", - /* 515 */ "from_clause_opt", - /* 516 */ "table_reference_list", - /* 517 */ "table_reference", - /* 518 */ "table_primary", - /* 519 */ "joined_table", - /* 520 */ "alias_opt", - /* 521 */ "subquery", - /* 522 */ "parenthesized_joined_table", - /* 523 */ "join_type", - /* 524 */ "join_subtype", - /* 525 */ "join_on_clause_opt", - /* 526 */ "window_offset_clause_opt", - /* 527 */ "jlimit_clause_opt", - /* 528 */ "window_offset_literal", - /* 529 */ "query_specification", - /* 530 */ "hint_list", - /* 531 */ "set_quantifier_opt", - /* 532 */ "tag_mode_opt", - /* 533 */ "select_list", - /* 534 */ "partition_by_clause_opt", - /* 535 */ "range_opt", - /* 536 */ "every_opt", - /* 537 */ "fill_opt", - /* 538 */ "twindow_clause_opt", - /* 539 */ "group_by_clause_opt", - /* 540 */ "having_clause_opt", - /* 541 */ "select_item", - /* 542 */ "partition_list", - /* 543 */ "partition_item", - /* 544 */ "interval_sliding_duration_literal", - /* 545 */ "fill_mode", - /* 546 */ "group_by_list", - /* 547 */ "query_expression", - /* 548 */ "query_simple", - /* 549 */ "order_by_clause_opt", - /* 550 */ "slimit_clause_opt", - /* 551 */ "limit_clause_opt", - /* 552 */ "union_query_expression", - /* 553 */ "query_simple_or_subquery", - /* 554 */ "sort_specification_list", - /* 555 */ "sort_specification", - /* 556 */ "ordering_specification_opt", - /* 557 */ "null_ordering_opt", +static const char *const yyTokenName[] = { + /* 0 */ "$", + /* 1 */ "OR", + /* 2 */ "AND", + /* 3 */ "UNION", + /* 4 */ "ALL", + /* 5 */ "MINUS", + /* 6 */ "EXCEPT", + /* 7 */ "INTERSECT", + /* 8 */ "NK_BITAND", + /* 9 */ "NK_BITOR", + /* 10 */ "NK_LSHIFT", + /* 11 */ "NK_RSHIFT", + /* 12 */ "NK_PLUS", + /* 13 */ "NK_MINUS", + /* 14 */ "NK_STAR", + /* 15 */ "NK_SLASH", + /* 16 */ "NK_REM", + /* 17 */ "NK_CONCAT", + /* 18 */ "CREATE", + /* 19 */ "ACCOUNT", + /* 20 */ "NK_ID", + /* 21 */ "PASS", + /* 22 */ "NK_STRING", + /* 23 */ "ALTER", + /* 24 */ "PPS", + /* 25 */ "TSERIES", + /* 26 */ "STORAGE", + /* 27 */ "STREAMS", + /* 28 */ "QTIME", + /* 29 */ "DBS", + /* 30 */ "USERS", + /* 31 */ "CONNS", + /* 32 */ "STATE", + /* 33 */ "NK_COMMA", + /* 34 */ "HOST", + /* 35 */ "IS_IMPORT", + /* 36 */ "NK_INTEGER", + /* 37 */ "CREATEDB", + /* 38 */ "USER", + /* 39 */ "ENABLE", + /* 40 */ "SYSINFO", + /* 41 */ "ADD", + /* 42 */ "DROP", + /* 43 */ "GRANT", + /* 44 */ "ON", + /* 45 */ "TO", + /* 46 */ "REVOKE", + /* 47 */ "FROM", + /* 48 */ "SUBSCRIBE", + /* 49 */ "READ", + /* 50 */ "WRITE", + /* 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 */ "SUBSTR", + /* 272 */ "SUBSTRING", + /* 273 */ "BOTH", + /* 274 */ "TRAILING", + /* 275 */ "LEADING", + /* 276 */ "TIMEZONE", + /* 277 */ "CLIENT_VERSION", + /* 278 */ "SERVER_VERSION", + /* 279 */ "SERVER_STATUS", + /* 280 */ "CURRENT_USER", + /* 281 */ "PI", + /* 282 */ "CASE", + /* 283 */ "WHEN", + /* 284 */ "THEN", + /* 285 */ "ELSE", + /* 286 */ "BETWEEN", + /* 287 */ "IS", + /* 288 */ "NK_LT", + /* 289 */ "NK_GT", + /* 290 */ "NK_LE", + /* 291 */ "NK_GE", + /* 292 */ "NK_NE", + /* 293 */ "MATCH", + /* 294 */ "NMATCH", + /* 295 */ "CONTAINS", + /* 296 */ "JOIN", + /* 297 */ "INNER", + /* 298 */ "LEFT", + /* 299 */ "RIGHT", + /* 300 */ "OUTER", + /* 301 */ "SEMI", + /* 302 */ "ANTI", + /* 303 */ "ASOF", + /* 304 */ "WINDOW", + /* 305 */ "WINDOW_OFFSET", + /* 306 */ "JLIMIT", + /* 307 */ "SELECT", + /* 308 */ "NK_HINT", + /* 309 */ "DISTINCT", + /* 310 */ "WHERE", + /* 311 */ "PARTITION", + /* 312 */ "BY", + /* 313 */ "SESSION", + /* 314 */ "STATE_WINDOW", + /* 315 */ "EVENT_WINDOW", + /* 316 */ "COUNT_WINDOW", + /* 317 */ "SLIDING", + /* 318 */ "FILL", + /* 319 */ "VALUE", + /* 320 */ "VALUE_F", + /* 321 */ "NONE", + /* 322 */ "PREV", + /* 323 */ "NULL_F", + /* 324 */ "LINEAR", + /* 325 */ "NEXT", + /* 326 */ "HAVING", + /* 327 */ "RANGE", + /* 328 */ "EVERY", + /* 329 */ "ORDER", + /* 330 */ "SLIMIT", + /* 331 */ "SOFFSET", + /* 332 */ "LIMIT", + /* 333 */ "OFFSET", + /* 334 */ "ASC", + /* 335 */ "NULLS", + /* 336 */ "ABORT", + /* 337 */ "AFTER", + /* 338 */ "ATTACH", + /* 339 */ "BEFORE", + /* 340 */ "BEGIN", + /* 341 */ "BITAND", + /* 342 */ "BITNOT", + /* 343 */ "BITOR", + /* 344 */ "BLOCKS", + /* 345 */ "CHANGE", + /* 346 */ "COMMA", + /* 347 */ "CONCAT", + /* 348 */ "CONFLICT", + /* 349 */ "COPY", + /* 350 */ "DEFERRED", + /* 351 */ "DELIMITERS", + /* 352 */ "DETACH", + /* 353 */ "DIVIDE", + /* 354 */ "DOT", + /* 355 */ "EACH", + /* 356 */ "FAIL", + /* 357 */ "GLOB", + /* 358 */ "ID", + /* 359 */ "IMMEDIATE", + /* 360 */ "IMPORT", + /* 361 */ "INITIALLY", + /* 362 */ "INSTEAD", + /* 363 */ "ISNULL", + /* 364 */ "MODULES", + /* 365 */ "NK_BITNOT", + /* 366 */ "NK_SEMI", + /* 367 */ "NOTNULL", + /* 368 */ "OF", + /* 369 */ "PLUS", + /* 370 */ "PRIVILEGE", + /* 371 */ "RAISE", + /* 372 */ "RESTRICT", + /* 373 */ "ROW", + /* 374 */ "STAR", + /* 375 */ "STATEMENT", + /* 376 */ "STRICT", + /* 377 */ "STRING", + /* 378 */ "TIMES", + /* 379 */ "VALUES", + /* 380 */ "VARIABLE", + /* 381 */ "WAL", + /* 382 */ "ENCODE", + /* 383 */ "COMPRESS", + /* 384 */ "LEVEL", + /* 385 */ "cmd", + /* 386 */ "account_options", + /* 387 */ "alter_account_options", + /* 388 */ "literal", + /* 389 */ "alter_account_option", + /* 390 */ "ip_range_list", + /* 391 */ "white_list", + /* 392 */ "white_list_opt", + /* 393 */ "is_import_opt", + /* 394 */ "is_createdb_opt", + /* 395 */ "user_name", + /* 396 */ "sysinfo_opt", + /* 397 */ "privileges", + /* 398 */ "priv_level", + /* 399 */ "with_opt", + /* 400 */ "priv_type_list", + /* 401 */ "priv_type", + /* 402 */ "db_name", + /* 403 */ "table_name", + /* 404 */ "topic_name", + /* 405 */ "search_condition", + /* 406 */ "dnode_endpoint", + /* 407 */ "force_opt", + /* 408 */ "unsafe_opt", + /* 409 */ "not_exists_opt", + /* 410 */ "db_options", + /* 411 */ "exists_opt", + /* 412 */ "alter_db_options", + /* 413 */ "speed_opt", + /* 414 */ "start_opt", + /* 415 */ "end_opt", + /* 416 */ "integer_list", + /* 417 */ "variable_list", + /* 418 */ "retention_list", + /* 419 */ "signed", + /* 420 */ "alter_db_option", + /* 421 */ "retention", + /* 422 */ "full_table_name", + /* 423 */ "column_def_list", + /* 424 */ "tags_def_opt", + /* 425 */ "table_options", + /* 426 */ "multi_create_clause", + /* 427 */ "tag_list_opt", + /* 428 */ "tags_def", + /* 429 */ "multi_drop_clause", + /* 430 */ "alter_table_clause", + /* 431 */ "alter_table_options", + /* 432 */ "column_name", + /* 433 */ "type_name", + /* 434 */ "column_options", + /* 435 */ "tags_literal", + /* 436 */ "create_subtable_clause", + /* 437 */ "specific_cols_opt", + /* 438 */ "tags_literal_list", + /* 439 */ "drop_table_clause", + /* 440 */ "col_name_list", + /* 441 */ "tag_def_list", + /* 442 */ "tag_def", + /* 443 */ "column_def", + /* 444 */ "type_name_default_len", + /* 445 */ "duration_list", + /* 446 */ "rollup_func_list", + /* 447 */ "alter_table_option", + /* 448 */ "duration_literal", + /* 449 */ "rollup_func_name", + /* 450 */ "function_name", + /* 451 */ "col_name", + /* 452 */ "db_kind_opt", + /* 453 */ "table_kind_db_name_cond_opt", + /* 454 */ "like_pattern_opt", + /* 455 */ "db_name_cond_opt", + /* 456 */ "table_name_cond", + /* 457 */ "from_db_opt", + /* 458 */ "table_kind", + /* 459 */ "tag_item", + /* 460 */ "column_alias", + /* 461 */ "tsma_name", + /* 462 */ "tsma_func_list", + /* 463 */ "full_tsma_name", + /* 464 */ "func_list", + /* 465 */ "index_options", + /* 466 */ "full_index_name", + /* 467 */ "index_name", + /* 468 */ "sliding_opt", + /* 469 */ "sma_stream_opt", + /* 470 */ "func", + /* 471 */ "sma_func_name", + /* 472 */ "expression_list", + /* 473 */ "with_meta", + /* 474 */ "query_or_subquery", + /* 475 */ "where_clause_opt", + /* 476 */ "cgroup_name", + /* 477 */ "analyze_opt", + /* 478 */ "explain_options", + /* 479 */ "insert_query", + /* 480 */ "or_replace_opt", + /* 481 */ "agg_func_opt", + /* 482 */ "bufsize_opt", + /* 483 */ "language_opt", + /* 484 */ "full_view_name", + /* 485 */ "view_name", + /* 486 */ "stream_name", + /* 487 */ "stream_options", + /* 488 */ "col_list_opt", + /* 489 */ "tag_def_or_ref_opt", + /* 490 */ "subtable_opt", + /* 491 */ "ignore_opt", + /* 492 */ "column_stream_def_list", + /* 493 */ "column_stream_def", + /* 494 */ "stream_col_options", + /* 495 */ "expression", + /* 496 */ "on_vgroup_id", + /* 497 */ "dnode_list", + /* 498 */ "literal_func", + /* 499 */ "signed_literal", + /* 500 */ "literal_list", + /* 501 */ "table_alias", + /* 502 */ "expr_or_subquery", + /* 503 */ "pseudo_column", + /* 504 */ "column_reference", + /* 505 */ "function_expression", + /* 506 */ "case_when_expression", + /* 507 */ "star_func", + /* 508 */ "star_func_para_list", + /* 509 */ "trim_specification_type", + /* 510 */ "substr_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", }; #endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */ #ifndef NDEBUG /* For tracing reduce actions, the names of all rules are required. -*/ + */ static const char *const yyRuleName[] = { - /* 0 */ "cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options", - /* 1 */ "cmd ::= ALTER ACCOUNT NK_ID alter_account_options", - /* 2 */ "account_options ::=", - /* 3 */ "account_options ::= account_options PPS literal", - /* 4 */ "account_options ::= account_options TSERIES literal", - /* 5 */ "account_options ::= account_options STORAGE literal", - /* 6 */ "account_options ::= account_options STREAMS literal", - /* 7 */ "account_options ::= account_options QTIME literal", - /* 8 */ "account_options ::= account_options DBS literal", - /* 9 */ "account_options ::= account_options USERS literal", - /* 10 */ "account_options ::= account_options CONNS literal", - /* 11 */ "account_options ::= account_options STATE literal", - /* 12 */ "alter_account_options ::= alter_account_option", - /* 13 */ "alter_account_options ::= alter_account_options alter_account_option", - /* 14 */ "alter_account_option ::= PASS literal", - /* 15 */ "alter_account_option ::= PPS literal", - /* 16 */ "alter_account_option ::= TSERIES literal", - /* 17 */ "alter_account_option ::= STORAGE literal", - /* 18 */ "alter_account_option ::= STREAMS literal", - /* 19 */ "alter_account_option ::= QTIME literal", - /* 20 */ "alter_account_option ::= DBS literal", - /* 21 */ "alter_account_option ::= USERS literal", - /* 22 */ "alter_account_option ::= CONNS literal", - /* 23 */ "alter_account_option ::= STATE literal", - /* 24 */ "ip_range_list ::= NK_STRING", - /* 25 */ "ip_range_list ::= ip_range_list NK_COMMA NK_STRING", - /* 26 */ "white_list ::= HOST ip_range_list", - /* 27 */ "white_list_opt ::=", - /* 28 */ "white_list_opt ::= white_list", - /* 29 */ "is_import_opt ::=", - /* 30 */ "is_import_opt ::= IS_IMPORT NK_INTEGER", - /* 31 */ "is_createdb_opt ::=", - /* 32 */ "is_createdb_opt ::= CREATEDB NK_INTEGER", - /* 33 */ "cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt is_createdb_opt is_import_opt white_list_opt", - /* 34 */ "cmd ::= ALTER USER user_name PASS NK_STRING", - /* 35 */ "cmd ::= ALTER USER user_name ENABLE NK_INTEGER", - /* 36 */ "cmd ::= ALTER USER user_name SYSINFO NK_INTEGER", - /* 37 */ "cmd ::= ALTER USER user_name CREATEDB NK_INTEGER", - /* 38 */ "cmd ::= ALTER USER user_name ADD white_list", - /* 39 */ "cmd ::= ALTER USER user_name DROP white_list", - /* 40 */ "cmd ::= DROP USER user_name", - /* 41 */ "sysinfo_opt ::=", - /* 42 */ "sysinfo_opt ::= SYSINFO NK_INTEGER", - /* 43 */ "cmd ::= GRANT privileges ON priv_level with_opt TO user_name", - /* 44 */ "cmd ::= REVOKE privileges ON priv_level with_opt FROM user_name", - /* 45 */ "privileges ::= ALL", - /* 46 */ "privileges ::= priv_type_list", - /* 47 */ "privileges ::= SUBSCRIBE", - /* 48 */ "priv_type_list ::= priv_type", - /* 49 */ "priv_type_list ::= priv_type_list NK_COMMA priv_type", - /* 50 */ "priv_type ::= READ", - /* 51 */ "priv_type ::= WRITE", - /* 52 */ "priv_type ::= ALTER", - /* 53 */ "priv_level ::= NK_STAR NK_DOT NK_STAR", - /* 54 */ "priv_level ::= db_name NK_DOT NK_STAR", - /* 55 */ "priv_level ::= db_name NK_DOT table_name", - /* 56 */ "priv_level ::= topic_name", - /* 57 */ "with_opt ::=", - /* 58 */ "with_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 multi_drop_clause", - /* 186 */ "cmd ::= DROP STABLE 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 */ "specific_cols_opt ::=", - /* 207 */ "specific_cols_opt ::= NK_LP col_name_list NK_RP", - /* 208 */ "full_table_name ::= table_name", - /* 209 */ "full_table_name ::= db_name NK_DOT table_name", - /* 210 */ "tag_def_list ::= tag_def", - /* 211 */ "tag_def_list ::= tag_def_list NK_COMMA tag_def", - /* 212 */ "tag_def ::= column_name type_name", - /* 213 */ "column_def_list ::= column_def", - /* 214 */ "column_def_list ::= column_def_list NK_COMMA column_def", - /* 215 */ "column_def ::= column_name type_name column_options", - /* 216 */ "type_name ::= BOOL", - /* 217 */ "type_name ::= TINYINT", - /* 218 */ "type_name ::= SMALLINT", - /* 219 */ "type_name ::= INT", - /* 220 */ "type_name ::= INTEGER", - /* 221 */ "type_name ::= BIGINT", - /* 222 */ "type_name ::= FLOAT", - /* 223 */ "type_name ::= DOUBLE", - /* 224 */ "type_name ::= BINARY NK_LP NK_INTEGER NK_RP", - /* 225 */ "type_name ::= TIMESTAMP", - /* 226 */ "type_name ::= NCHAR NK_LP NK_INTEGER NK_RP", - /* 227 */ "type_name ::= TINYINT UNSIGNED", - /* 228 */ "type_name ::= SMALLINT UNSIGNED", - /* 229 */ "type_name ::= INT UNSIGNED", - /* 230 */ "type_name ::= BIGINT UNSIGNED", - /* 231 */ "type_name ::= JSON", - /* 232 */ "type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP", - /* 233 */ "type_name ::= MEDIUMBLOB", - /* 234 */ "type_name ::= BLOB", - /* 235 */ "type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP", - /* 236 */ "type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP", - /* 237 */ "type_name ::= DECIMAL", - /* 238 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP", - /* 239 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP", - /* 240 */ "type_name_default_len ::= BINARY", - /* 241 */ "type_name_default_len ::= NCHAR", - /* 242 */ "type_name_default_len ::= VARCHAR", - /* 243 */ "type_name_default_len ::= VARBINARY", - /* 244 */ "tags_def_opt ::=", - /* 245 */ "tags_def_opt ::= tags_def", - /* 246 */ "tags_def ::= TAGS NK_LP tag_def_list NK_RP", - /* 247 */ "table_options ::=", - /* 248 */ "table_options ::= table_options COMMENT NK_STRING", - /* 249 */ "table_options ::= table_options MAX_DELAY duration_list", - /* 250 */ "table_options ::= table_options WATERMARK duration_list", - /* 251 */ "table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP", - /* 252 */ "table_options ::= table_options TTL NK_INTEGER", - /* 253 */ "table_options ::= table_options SMA NK_LP col_name_list NK_RP", - /* 254 */ "table_options ::= table_options DELETE_MARK duration_list", - /* 255 */ "alter_table_options ::= alter_table_option", - /* 256 */ "alter_table_options ::= alter_table_options alter_table_option", - /* 257 */ "alter_table_option ::= COMMENT NK_STRING", - /* 258 */ "alter_table_option ::= TTL NK_INTEGER", - /* 259 */ "duration_list ::= duration_literal", - /* 260 */ "duration_list ::= duration_list NK_COMMA duration_literal", - /* 261 */ "rollup_func_list ::= rollup_func_name", - /* 262 */ "rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name", - /* 263 */ "rollup_func_name ::= function_name", - /* 264 */ "rollup_func_name ::= FIRST", - /* 265 */ "rollup_func_name ::= LAST", - /* 266 */ "col_name_list ::= col_name", - /* 267 */ "col_name_list ::= col_name_list NK_COMMA col_name", - /* 268 */ "col_name ::= column_name", - /* 269 */ "cmd ::= SHOW DNODES", - /* 270 */ "cmd ::= SHOW USERS", - /* 271 */ "cmd ::= SHOW USERS FULL", - /* 272 */ "cmd ::= SHOW USER PRIVILEGES", - /* 273 */ "cmd ::= SHOW db_kind_opt DATABASES", - /* 274 */ "cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt", - /* 275 */ "cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt", - /* 276 */ "cmd ::= SHOW db_name_cond_opt VGROUPS", - /* 277 */ "cmd ::= SHOW MNODES", - /* 278 */ "cmd ::= SHOW QNODES", - /* 279 */ "cmd ::= SHOW ARBGROUPS", - /* 280 */ "cmd ::= SHOW FUNCTIONS", - /* 281 */ "cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt", - /* 282 */ "cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name", - /* 283 */ "cmd ::= SHOW STREAMS", - /* 284 */ "cmd ::= SHOW ACCOUNTS", - /* 285 */ "cmd ::= SHOW APPS", - /* 286 */ "cmd ::= SHOW CONNECTIONS", - /* 287 */ "cmd ::= SHOW LICENCES", - /* 288 */ "cmd ::= SHOW GRANTS", - /* 289 */ "cmd ::= SHOW GRANTS FULL", - /* 290 */ "cmd ::= SHOW GRANTS LOGS", - /* 291 */ "cmd ::= SHOW CLUSTER MACHINES", - /* 292 */ "cmd ::= SHOW CREATE DATABASE db_name", - /* 293 */ "cmd ::= SHOW CREATE TABLE full_table_name", - /* 294 */ "cmd ::= SHOW CREATE STABLE full_table_name", - /* 295 */ "cmd ::= SHOW ENCRYPTIONS", - /* 296 */ "cmd ::= SHOW QUERIES", - /* 297 */ "cmd ::= SHOW SCORES", - /* 298 */ "cmd ::= SHOW TOPICS", - /* 299 */ "cmd ::= SHOW VARIABLES", - /* 300 */ "cmd ::= SHOW CLUSTER VARIABLES", - /* 301 */ "cmd ::= SHOW LOCAL VARIABLES", - /* 302 */ "cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt", - /* 303 */ "cmd ::= SHOW BNODES", - /* 304 */ "cmd ::= SHOW SNODES", - /* 305 */ "cmd ::= SHOW CLUSTER", - /* 306 */ "cmd ::= SHOW TRANSACTIONS", - /* 307 */ "cmd ::= SHOW TABLE DISTRIBUTED full_table_name", - /* 308 */ "cmd ::= SHOW CONSUMERS", - /* 309 */ "cmd ::= SHOW SUBSCRIPTIONS", - /* 310 */ "cmd ::= SHOW TAGS FROM table_name_cond from_db_opt", - /* 311 */ "cmd ::= SHOW TAGS FROM db_name NK_DOT table_name", - /* 312 */ "cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt", - /* 313 */ "cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name", - /* 314 */ "cmd ::= SHOW VNODES ON DNODE NK_INTEGER", - /* 315 */ "cmd ::= SHOW VNODES", - /* 316 */ "cmd ::= SHOW db_name_cond_opt ALIVE", - /* 317 */ "cmd ::= SHOW CLUSTER ALIVE", - /* 318 */ "cmd ::= SHOW db_name_cond_opt VIEWS like_pattern_opt", - /* 319 */ "cmd ::= SHOW CREATE VIEW full_table_name", - /* 320 */ "cmd ::= SHOW COMPACTS", - /* 321 */ "cmd ::= SHOW COMPACT NK_INTEGER", - /* 322 */ "table_kind_db_name_cond_opt ::=", - /* 323 */ "table_kind_db_name_cond_opt ::= table_kind", - /* 324 */ "table_kind_db_name_cond_opt ::= db_name NK_DOT", - /* 325 */ "table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT", - /* 326 */ "table_kind ::= NORMAL", - /* 327 */ "table_kind ::= CHILD", - /* 328 */ "db_name_cond_opt ::=", - /* 329 */ "db_name_cond_opt ::= db_name NK_DOT", - /* 330 */ "like_pattern_opt ::=", - /* 331 */ "like_pattern_opt ::= LIKE NK_STRING", - /* 332 */ "table_name_cond ::= table_name", - /* 333 */ "from_db_opt ::=", - /* 334 */ "from_db_opt ::= FROM db_name", - /* 335 */ "tag_list_opt ::=", - /* 336 */ "tag_list_opt ::= tag_item", - /* 337 */ "tag_list_opt ::= tag_list_opt NK_COMMA tag_item", - /* 338 */ "tag_item ::= TBNAME", - /* 339 */ "tag_item ::= QTAGS", - /* 340 */ "tag_item ::= column_name", - /* 341 */ "tag_item ::= column_name column_alias", - /* 342 */ "tag_item ::= column_name AS column_alias", - /* 343 */ "db_kind_opt ::=", - /* 344 */ "db_kind_opt ::= USER", - /* 345 */ "db_kind_opt ::= SYSTEM", - /* 346 */ "cmd ::= CREATE TSMA not_exists_opt tsma_name ON full_table_name tsma_func_list INTERVAL NK_LP duration_literal NK_RP", - /* 347 */ "cmd ::= CREATE RECURSIVE TSMA not_exists_opt tsma_name ON full_table_name INTERVAL NK_LP duration_literal NK_RP", - /* 348 */ "cmd ::= DROP TSMA exists_opt full_tsma_name", - /* 349 */ "cmd ::= SHOW db_name_cond_opt TSMAS", - /* 350 */ "full_tsma_name ::= tsma_name", - /* 351 */ "full_tsma_name ::= db_name NK_DOT tsma_name", - /* 352 */ "tsma_func_list ::= FUNCTION NK_LP func_list NK_RP", - /* 353 */ "cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options", - /* 354 */ "cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP", - /* 355 */ "cmd ::= DROP INDEX exists_opt full_index_name", - /* 356 */ "full_index_name ::= index_name", - /* 357 */ "full_index_name ::= db_name NK_DOT index_name", - /* 358 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt", - /* 359 */ "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", - /* 360 */ "func_list ::= func", - /* 361 */ "func_list ::= func_list NK_COMMA func", - /* 362 */ "func ::= sma_func_name NK_LP expression_list NK_RP", - /* 363 */ "sma_func_name ::= function_name", - /* 364 */ "sma_func_name ::= COUNT", - /* 365 */ "sma_func_name ::= FIRST", - /* 366 */ "sma_func_name ::= LAST", - /* 367 */ "sma_func_name ::= LAST_ROW", - /* 368 */ "sma_stream_opt ::=", - /* 369 */ "sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal", - /* 370 */ "sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal", - /* 371 */ "sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal", - /* 372 */ "with_meta ::= AS", - /* 373 */ "with_meta ::= WITH META AS", - /* 374 */ "with_meta ::= ONLY META AS", - /* 375 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery", - /* 376 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name", - /* 377 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt", - /* 378 */ "cmd ::= DROP TOPIC exists_opt topic_name", - /* 379 */ "cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name", - /* 380 */ "cmd ::= DESC full_table_name", - /* 381 */ "cmd ::= DESCRIBE full_table_name", - /* 382 */ "cmd ::= RESET QUERY CACHE", - /* 383 */ "cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery", - /* 384 */ "cmd ::= EXPLAIN analyze_opt explain_options insert_query", - /* 385 */ "analyze_opt ::=", - /* 386 */ "analyze_opt ::= ANALYZE", - /* 387 */ "explain_options ::=", - /* 388 */ "explain_options ::= explain_options VERBOSE NK_BOOL", - /* 389 */ "explain_options ::= explain_options RATIO NK_FLOAT", - /* 390 */ "cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt", - /* 391 */ "cmd ::= DROP FUNCTION exists_opt function_name", - /* 392 */ "agg_func_opt ::=", - /* 393 */ "agg_func_opt ::= AGGREGATE", - /* 394 */ "bufsize_opt ::=", - /* 395 */ "bufsize_opt ::= BUFSIZE NK_INTEGER", - /* 396 */ "language_opt ::=", - /* 397 */ "language_opt ::= LANGUAGE NK_STRING", - /* 398 */ "or_replace_opt ::=", - /* 399 */ "or_replace_opt ::= OR REPLACE", - /* 400 */ "cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery", - /* 401 */ "cmd ::= DROP VIEW exists_opt full_view_name", - /* 402 */ "full_view_name ::= view_name", - /* 403 */ "full_view_name ::= db_name NK_DOT view_name", - /* 404 */ "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", - /* 405 */ "cmd ::= DROP STREAM exists_opt stream_name", - /* 406 */ "cmd ::= PAUSE STREAM exists_opt stream_name", - /* 407 */ "cmd ::= RESUME STREAM exists_opt ignore_opt stream_name", - /* 408 */ "col_list_opt ::=", - /* 409 */ "col_list_opt ::= NK_LP column_stream_def_list NK_RP", - /* 410 */ "column_stream_def_list ::= column_stream_def", - /* 411 */ "column_stream_def_list ::= column_stream_def_list NK_COMMA column_stream_def", - /* 412 */ "column_stream_def ::= column_name stream_col_options", - /* 413 */ "stream_col_options ::=", - /* 414 */ "stream_col_options ::= stream_col_options PRIMARY KEY", - /* 415 */ "tag_def_or_ref_opt ::=", - /* 416 */ "tag_def_or_ref_opt ::= tags_def", - /* 417 */ "tag_def_or_ref_opt ::= TAGS NK_LP column_stream_def_list NK_RP", - /* 418 */ "stream_options ::=", - /* 419 */ "stream_options ::= stream_options TRIGGER AT_ONCE", - /* 420 */ "stream_options ::= stream_options TRIGGER WINDOW_CLOSE", - /* 421 */ "stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal", - /* 422 */ "stream_options ::= stream_options WATERMARK duration_literal", - /* 423 */ "stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER", - /* 424 */ "stream_options ::= stream_options FILL_HISTORY NK_INTEGER", - /* 425 */ "stream_options ::= stream_options DELETE_MARK duration_literal", - /* 426 */ "stream_options ::= stream_options IGNORE UPDATE NK_INTEGER", - /* 427 */ "subtable_opt ::=", - /* 428 */ "subtable_opt ::= SUBTABLE NK_LP expression NK_RP", - /* 429 */ "ignore_opt ::=", - /* 430 */ "ignore_opt ::= IGNORE UNTREATED", - /* 431 */ "cmd ::= KILL CONNECTION NK_INTEGER", - /* 432 */ "cmd ::= KILL QUERY NK_STRING", - /* 433 */ "cmd ::= KILL TRANSACTION NK_INTEGER", - /* 434 */ "cmd ::= KILL COMPACT NK_INTEGER", - /* 435 */ "cmd ::= BALANCE VGROUP", - /* 436 */ "cmd ::= BALANCE VGROUP LEADER on_vgroup_id", - /* 437 */ "cmd ::= BALANCE VGROUP LEADER DATABASE db_name", - /* 438 */ "cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER", - /* 439 */ "cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list", - /* 440 */ "cmd ::= SPLIT VGROUP NK_INTEGER", - /* 441 */ "on_vgroup_id ::=", - /* 442 */ "on_vgroup_id ::= ON NK_INTEGER", - /* 443 */ "dnode_list ::= DNODE NK_INTEGER", - /* 444 */ "dnode_list ::= dnode_list DNODE NK_INTEGER", - /* 445 */ "cmd ::= DELETE FROM full_table_name where_clause_opt", - /* 446 */ "cmd ::= query_or_subquery", - /* 447 */ "cmd ::= insert_query", - /* 448 */ "insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery", - /* 449 */ "insert_query ::= INSERT INTO full_table_name query_or_subquery", - /* 450 */ "tags_literal ::= NK_INTEGER", - /* 451 */ "tags_literal ::= NK_INTEGER NK_PLUS duration_literal", - /* 452 */ "tags_literal ::= NK_INTEGER NK_MINUS duration_literal", - /* 453 */ "tags_literal ::= NK_PLUS NK_INTEGER", - /* 454 */ "tags_literal ::= NK_PLUS NK_INTEGER NK_PLUS duration_literal", - /* 455 */ "tags_literal ::= NK_PLUS NK_INTEGER NK_MINUS duration_literal", - /* 456 */ "tags_literal ::= NK_MINUS NK_INTEGER", - /* 457 */ "tags_literal ::= NK_MINUS NK_INTEGER NK_PLUS duration_literal", - /* 458 */ "tags_literal ::= NK_MINUS NK_INTEGER NK_MINUS duration_literal", - /* 459 */ "tags_literal ::= NK_FLOAT", - /* 460 */ "tags_literal ::= NK_PLUS NK_FLOAT", - /* 461 */ "tags_literal ::= NK_MINUS NK_FLOAT", - /* 462 */ "tags_literal ::= NK_BIN", - /* 463 */ "tags_literal ::= NK_BIN NK_PLUS duration_literal", - /* 464 */ "tags_literal ::= NK_BIN NK_MINUS duration_literal", - /* 465 */ "tags_literal ::= NK_PLUS NK_BIN", - /* 466 */ "tags_literal ::= NK_PLUS NK_BIN NK_PLUS duration_literal", - /* 467 */ "tags_literal ::= NK_PLUS NK_BIN NK_MINUS duration_literal", - /* 468 */ "tags_literal ::= NK_MINUS NK_BIN", - /* 469 */ "tags_literal ::= NK_MINUS NK_BIN NK_PLUS duration_literal", - /* 470 */ "tags_literal ::= NK_MINUS NK_BIN NK_MINUS duration_literal", - /* 471 */ "tags_literal ::= NK_HEX", - /* 472 */ "tags_literal ::= NK_HEX NK_PLUS duration_literal", - /* 473 */ "tags_literal ::= NK_HEX NK_MINUS duration_literal", - /* 474 */ "tags_literal ::= NK_PLUS NK_HEX", - /* 475 */ "tags_literal ::= NK_PLUS NK_HEX NK_PLUS duration_literal", - /* 476 */ "tags_literal ::= NK_PLUS NK_HEX NK_MINUS duration_literal", - /* 477 */ "tags_literal ::= NK_MINUS NK_HEX", - /* 478 */ "tags_literal ::= NK_MINUS NK_HEX NK_PLUS duration_literal", - /* 479 */ "tags_literal ::= NK_MINUS NK_HEX NK_MINUS duration_literal", - /* 480 */ "tags_literal ::= NK_STRING", - /* 481 */ "tags_literal ::= NK_STRING NK_PLUS duration_literal", - /* 482 */ "tags_literal ::= NK_STRING NK_MINUS duration_literal", - /* 483 */ "tags_literal ::= NK_BOOL", - /* 484 */ "tags_literal ::= NULL", - /* 485 */ "tags_literal ::= literal_func", - /* 486 */ "tags_literal ::= literal_func NK_PLUS duration_literal", - /* 487 */ "tags_literal ::= literal_func NK_MINUS duration_literal", - /* 488 */ "tags_literal_list ::= tags_literal", - /* 489 */ "tags_literal_list ::= tags_literal_list NK_COMMA tags_literal", - /* 490 */ "literal ::= NK_INTEGER", - /* 491 */ "literal ::= NK_FLOAT", - /* 492 */ "literal ::= NK_STRING", - /* 493 */ "literal ::= NK_BOOL", - /* 494 */ "literal ::= TIMESTAMP NK_STRING", - /* 495 */ "literal ::= duration_literal", - /* 496 */ "literal ::= NULL", - /* 497 */ "literal ::= NK_QUESTION", - /* 498 */ "duration_literal ::= NK_VARIABLE", - /* 499 */ "signed ::= NK_INTEGER", - /* 500 */ "signed ::= NK_PLUS NK_INTEGER", - /* 501 */ "signed ::= NK_MINUS NK_INTEGER", - /* 502 */ "signed ::= NK_FLOAT", - /* 503 */ "signed ::= NK_PLUS NK_FLOAT", - /* 504 */ "signed ::= NK_MINUS NK_FLOAT", - /* 505 */ "signed_literal ::= signed", - /* 506 */ "signed_literal ::= NK_STRING", - /* 507 */ "signed_literal ::= NK_BOOL", - /* 508 */ "signed_literal ::= TIMESTAMP NK_STRING", - /* 509 */ "signed_literal ::= duration_literal", - /* 510 */ "signed_literal ::= NULL", - /* 511 */ "signed_literal ::= literal_func", - /* 512 */ "signed_literal ::= NK_QUESTION", - /* 513 */ "literal_list ::= signed_literal", - /* 514 */ "literal_list ::= literal_list NK_COMMA signed_literal", - /* 515 */ "db_name ::= NK_ID", - /* 516 */ "table_name ::= NK_ID", - /* 517 */ "column_name ::= NK_ID", - /* 518 */ "function_name ::= NK_ID", - /* 519 */ "view_name ::= NK_ID", - /* 520 */ "table_alias ::= NK_ID", - /* 521 */ "column_alias ::= NK_ID", - /* 522 */ "column_alias ::= NK_ALIAS", - /* 523 */ "user_name ::= NK_ID", - /* 524 */ "topic_name ::= NK_ID", - /* 525 */ "stream_name ::= NK_ID", - /* 526 */ "cgroup_name ::= NK_ID", - /* 527 */ "index_name ::= NK_ID", - /* 528 */ "tsma_name ::= NK_ID", - /* 529 */ "expr_or_subquery ::= expression", - /* 530 */ "expression ::= literal", - /* 531 */ "expression ::= pseudo_column", - /* 532 */ "expression ::= column_reference", - /* 533 */ "expression ::= function_expression", - /* 534 */ "expression ::= case_when_expression", - /* 535 */ "expression ::= NK_LP expression NK_RP", - /* 536 */ "expression ::= NK_PLUS expr_or_subquery", - /* 537 */ "expression ::= NK_MINUS expr_or_subquery", - /* 538 */ "expression ::= expr_or_subquery NK_PLUS expr_or_subquery", - /* 539 */ "expression ::= expr_or_subquery NK_MINUS expr_or_subquery", - /* 540 */ "expression ::= expr_or_subquery NK_STAR expr_or_subquery", - /* 541 */ "expression ::= expr_or_subquery NK_SLASH expr_or_subquery", - /* 542 */ "expression ::= expr_or_subquery NK_REM expr_or_subquery", - /* 543 */ "expression ::= column_reference NK_ARROW NK_STRING", - /* 544 */ "expression ::= expr_or_subquery NK_BITAND expr_or_subquery", - /* 545 */ "expression ::= expr_or_subquery NK_BITOR expr_or_subquery", - /* 546 */ "expression_list ::= expr_or_subquery", - /* 547 */ "expression_list ::= expression_list NK_COMMA expr_or_subquery", - /* 548 */ "column_reference ::= column_name", - /* 549 */ "column_reference ::= table_name NK_DOT column_name", - /* 550 */ "column_reference ::= NK_ALIAS", - /* 551 */ "column_reference ::= table_name NK_DOT NK_ALIAS", - /* 552 */ "pseudo_column ::= ROWTS", - /* 553 */ "pseudo_column ::= TBNAME", - /* 554 */ "pseudo_column ::= table_name NK_DOT TBNAME", - /* 555 */ "pseudo_column ::= QSTART", - /* 556 */ "pseudo_column ::= QEND", - /* 557 */ "pseudo_column ::= QDURATION", - /* 558 */ "pseudo_column ::= WSTART", - /* 559 */ "pseudo_column ::= WEND", - /* 560 */ "pseudo_column ::= WDURATION", - /* 561 */ "pseudo_column ::= IROWTS", - /* 562 */ "pseudo_column ::= ISFILLED", - /* 563 */ "pseudo_column ::= QTAGS", - /* 564 */ "function_expression ::= function_name NK_LP expression_list NK_RP", - /* 565 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP", - /* 566 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP", - /* 567 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name_default_len NK_RP", - /* 568 */ "function_expression ::= literal_func", - /* 569 */ "literal_func ::= noarg_func NK_LP NK_RP", - /* 570 */ "literal_func ::= NOW", - /* 571 */ "literal_func ::= TODAY", - /* 572 */ "noarg_func ::= NOW", - /* 573 */ "noarg_func ::= TODAY", - /* 574 */ "noarg_func ::= TIMEZONE", - /* 575 */ "noarg_func ::= DATABASE", - /* 576 */ "noarg_func ::= CLIENT_VERSION", - /* 577 */ "noarg_func ::= SERVER_VERSION", - /* 578 */ "noarg_func ::= SERVER_STATUS", - /* 579 */ "noarg_func ::= CURRENT_USER", - /* 580 */ "noarg_func ::= USER", - /* 581 */ "star_func ::= COUNT", - /* 582 */ "star_func ::= FIRST", - /* 583 */ "star_func ::= LAST", - /* 584 */ "star_func ::= LAST_ROW", - /* 585 */ "star_func_para_list ::= NK_STAR", - /* 586 */ "star_func_para_list ::= other_para_list", - /* 587 */ "other_para_list ::= star_func_para", - /* 588 */ "other_para_list ::= other_para_list NK_COMMA star_func_para", - /* 589 */ "star_func_para ::= expr_or_subquery", - /* 590 */ "star_func_para ::= table_name NK_DOT NK_STAR", - /* 591 */ "case_when_expression ::= CASE when_then_list case_when_else_opt END", - /* 592 */ "case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END", - /* 593 */ "when_then_list ::= when_then_expr", - /* 594 */ "when_then_list ::= when_then_list when_then_expr", - /* 595 */ "when_then_expr ::= WHEN common_expression THEN common_expression", - /* 596 */ "case_when_else_opt ::=", - /* 597 */ "case_when_else_opt ::= ELSE common_expression", - /* 598 */ "predicate ::= expr_or_subquery compare_op expr_or_subquery", - /* 599 */ "predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery", - /* 600 */ "predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery", - /* 601 */ "predicate ::= expr_or_subquery IS NULL", - /* 602 */ "predicate ::= expr_or_subquery IS NOT NULL", - /* 603 */ "predicate ::= expr_or_subquery in_op in_predicate_value", - /* 604 */ "compare_op ::= NK_LT", - /* 605 */ "compare_op ::= NK_GT", - /* 606 */ "compare_op ::= NK_LE", - /* 607 */ "compare_op ::= NK_GE", - /* 608 */ "compare_op ::= NK_NE", - /* 609 */ "compare_op ::= NK_EQ", - /* 610 */ "compare_op ::= LIKE", - /* 611 */ "compare_op ::= NOT LIKE", - /* 612 */ "compare_op ::= MATCH", - /* 613 */ "compare_op ::= NMATCH", - /* 614 */ "compare_op ::= CONTAINS", - /* 615 */ "in_op ::= IN", - /* 616 */ "in_op ::= NOT IN", - /* 617 */ "in_predicate_value ::= NK_LP literal_list NK_RP", - /* 618 */ "boolean_value_expression ::= boolean_primary", - /* 619 */ "boolean_value_expression ::= NOT boolean_primary", - /* 620 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression", - /* 621 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression", - /* 622 */ "boolean_primary ::= predicate", - /* 623 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP", - /* 624 */ "common_expression ::= expr_or_subquery", - /* 625 */ "common_expression ::= boolean_value_expression", - /* 626 */ "from_clause_opt ::=", - /* 627 */ "from_clause_opt ::= FROM table_reference_list", - /* 628 */ "table_reference_list ::= table_reference", - /* 629 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference", - /* 630 */ "table_reference ::= table_primary", - /* 631 */ "table_reference ::= joined_table", - /* 632 */ "table_primary ::= table_name alias_opt", - /* 633 */ "table_primary ::= db_name NK_DOT table_name alias_opt", - /* 634 */ "table_primary ::= subquery alias_opt", - /* 635 */ "table_primary ::= parenthesized_joined_table", - /* 636 */ "alias_opt ::=", - /* 637 */ "alias_opt ::= table_alias", - /* 638 */ "alias_opt ::= AS table_alias", - /* 639 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP", - /* 640 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP", - /* 641 */ "joined_table ::= table_reference join_type join_subtype JOIN table_reference join_on_clause_opt window_offset_clause_opt jlimit_clause_opt", - /* 642 */ "join_type ::=", - /* 643 */ "join_type ::= INNER", - /* 644 */ "join_type ::= LEFT", - /* 645 */ "join_type ::= RIGHT", - /* 646 */ "join_type ::= FULL", - /* 647 */ "join_subtype ::=", - /* 648 */ "join_subtype ::= OUTER", - /* 649 */ "join_subtype ::= SEMI", - /* 650 */ "join_subtype ::= ANTI", - /* 651 */ "join_subtype ::= ASOF", - /* 652 */ "join_subtype ::= WINDOW", - /* 653 */ "join_on_clause_opt ::=", - /* 654 */ "join_on_clause_opt ::= ON search_condition", - /* 655 */ "window_offset_clause_opt ::=", - /* 656 */ "window_offset_clause_opt ::= WINDOW_OFFSET NK_LP window_offset_literal NK_COMMA window_offset_literal NK_RP", - /* 657 */ "window_offset_literal ::= NK_VARIABLE", - /* 658 */ "window_offset_literal ::= NK_MINUS NK_VARIABLE", - /* 659 */ "jlimit_clause_opt ::=", - /* 660 */ "jlimit_clause_opt ::= JLIMIT NK_INTEGER", - /* 661 */ "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", - /* 662 */ "hint_list ::=", - /* 663 */ "hint_list ::= NK_HINT", - /* 664 */ "tag_mode_opt ::=", - /* 665 */ "tag_mode_opt ::= TAGS", - /* 666 */ "set_quantifier_opt ::=", - /* 667 */ "set_quantifier_opt ::= DISTINCT", - /* 668 */ "set_quantifier_opt ::= ALL", - /* 669 */ "select_list ::= select_item", - /* 670 */ "select_list ::= select_list NK_COMMA select_item", - /* 671 */ "select_item ::= NK_STAR", - /* 672 */ "select_item ::= common_expression", - /* 673 */ "select_item ::= common_expression column_alias", - /* 674 */ "select_item ::= common_expression AS column_alias", - /* 675 */ "select_item ::= table_name NK_DOT NK_STAR", - /* 676 */ "where_clause_opt ::=", - /* 677 */ "where_clause_opt ::= WHERE search_condition", - /* 678 */ "partition_by_clause_opt ::=", - /* 679 */ "partition_by_clause_opt ::= PARTITION BY partition_list", - /* 680 */ "partition_list ::= partition_item", - /* 681 */ "partition_list ::= partition_list NK_COMMA partition_item", - /* 682 */ "partition_item ::= expr_or_subquery", - /* 683 */ "partition_item ::= expr_or_subquery column_alias", - /* 684 */ "partition_item ::= expr_or_subquery AS column_alias", - /* 685 */ "twindow_clause_opt ::=", - /* 686 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP", - /* 687 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP", - /* 688 */ "twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt", - /* 689 */ "twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt", - /* 690 */ "twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition", - /* 691 */ "twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP", - /* 692 */ "twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP", - /* 693 */ "sliding_opt ::=", - /* 694 */ "sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP", - /* 695 */ "interval_sliding_duration_literal ::= NK_VARIABLE", - /* 696 */ "interval_sliding_duration_literal ::= NK_STRING", - /* 697 */ "interval_sliding_duration_literal ::= NK_INTEGER", - /* 698 */ "fill_opt ::=", - /* 699 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", - /* 700 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP", - /* 701 */ "fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP", - /* 702 */ "fill_mode ::= NONE", - /* 703 */ "fill_mode ::= PREV", - /* 704 */ "fill_mode ::= NULL", - /* 705 */ "fill_mode ::= NULL_F", - /* 706 */ "fill_mode ::= LINEAR", - /* 707 */ "fill_mode ::= NEXT", - /* 708 */ "group_by_clause_opt ::=", - /* 709 */ "group_by_clause_opt ::= GROUP BY group_by_list", - /* 710 */ "group_by_list ::= expr_or_subquery", - /* 711 */ "group_by_list ::= group_by_list NK_COMMA expr_or_subquery", - /* 712 */ "having_clause_opt ::=", - /* 713 */ "having_clause_opt ::= HAVING search_condition", - /* 714 */ "range_opt ::=", - /* 715 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP", - /* 716 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_RP", - /* 717 */ "every_opt ::=", - /* 718 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP", - /* 719 */ "query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt", - /* 720 */ "query_simple ::= query_specification", - /* 721 */ "query_simple ::= union_query_expression", - /* 722 */ "union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery", - /* 723 */ "union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery", - /* 724 */ "query_simple_or_subquery ::= query_simple", - /* 725 */ "query_simple_or_subquery ::= subquery", - /* 726 */ "query_or_subquery ::= query_expression", - /* 727 */ "query_or_subquery ::= subquery", - /* 728 */ "order_by_clause_opt ::=", - /* 729 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", - /* 730 */ "slimit_clause_opt ::=", - /* 731 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", - /* 732 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", - /* 733 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 734 */ "limit_clause_opt ::=", - /* 735 */ "limit_clause_opt ::= LIMIT NK_INTEGER", - /* 736 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", - /* 737 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 738 */ "subquery ::= NK_LP query_expression NK_RP", - /* 739 */ "subquery ::= NK_LP subquery NK_RP", - /* 740 */ "search_condition ::= common_expression", - /* 741 */ "sort_specification_list ::= sort_specification", - /* 742 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", - /* 743 */ "sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt", - /* 744 */ "ordering_specification_opt ::=", - /* 745 */ "ordering_specification_opt ::= ASC", - /* 746 */ "ordering_specification_opt ::= DESC", - /* 747 */ "null_ordering_opt ::=", - /* 748 */ "null_ordering_opt ::= NULLS FIRST", - /* 749 */ "null_ordering_opt ::= NULLS LAST", - /* 750 */ "column_options ::=", - /* 751 */ "column_options ::= column_options PRIMARY KEY", - /* 752 */ "column_options ::= column_options ENCODE NK_STRING", - /* 753 */ "column_options ::= column_options COMPRESS NK_STRING", - /* 754 */ "column_options ::= column_options LEVEL NK_STRING", + /* 0 */ "cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options", + /* 1 */ "cmd ::= ALTER ACCOUNT NK_ID alter_account_options", + /* 2 */ "account_options ::=", + /* 3 */ "account_options ::= account_options PPS literal", + /* 4 */ "account_options ::= account_options TSERIES literal", + /* 5 */ "account_options ::= account_options STORAGE literal", + /* 6 */ "account_options ::= account_options STREAMS literal", + /* 7 */ "account_options ::= account_options QTIME literal", + /* 8 */ "account_options ::= account_options DBS literal", + /* 9 */ "account_options ::= account_options USERS literal", + /* 10 */ "account_options ::= account_options CONNS literal", + /* 11 */ "account_options ::= account_options STATE literal", + /* 12 */ "alter_account_options ::= alter_account_option", + /* 13 */ "alter_account_options ::= alter_account_options alter_account_option", + /* 14 */ "alter_account_option ::= PASS literal", + /* 15 */ "alter_account_option ::= PPS literal", + /* 16 */ "alter_account_option ::= TSERIES literal", + /* 17 */ "alter_account_option ::= STORAGE literal", + /* 18 */ "alter_account_option ::= STREAMS literal", + /* 19 */ "alter_account_option ::= QTIME literal", + /* 20 */ "alter_account_option ::= DBS literal", + /* 21 */ "alter_account_option ::= USERS literal", + /* 22 */ "alter_account_option ::= CONNS literal", + /* 23 */ "alter_account_option ::= STATE literal", + /* 24 */ "ip_range_list ::= NK_STRING", + /* 25 */ "ip_range_list ::= ip_range_list NK_COMMA NK_STRING", + /* 26 */ "white_list ::= HOST ip_range_list", + /* 27 */ "white_list_opt ::=", + /* 28 */ "white_list_opt ::= white_list", + /* 29 */ "is_import_opt ::=", + /* 30 */ "is_import_opt ::= IS_IMPORT NK_INTEGER", + /* 31 */ "is_createdb_opt ::=", + /* 32 */ "is_createdb_opt ::= CREATEDB NK_INTEGER", + /* 33 */ "cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt is_createdb_opt is_import_opt white_list_opt", + /* 34 */ "cmd ::= ALTER USER user_name PASS NK_STRING", + /* 35 */ "cmd ::= ALTER USER user_name ENABLE NK_INTEGER", + /* 36 */ "cmd ::= ALTER USER user_name SYSINFO NK_INTEGER", + /* 37 */ "cmd ::= ALTER USER user_name CREATEDB NK_INTEGER", + /* 38 */ "cmd ::= ALTER USER user_name ADD white_list", + /* 39 */ "cmd ::= ALTER USER user_name DROP white_list", + /* 40 */ "cmd ::= DROP USER user_name", + /* 41 */ "sysinfo_opt ::=", + /* 42 */ "sysinfo_opt ::= SYSINFO NK_INTEGER", + /* 43 */ "cmd ::= GRANT privileges ON priv_level with_opt TO user_name", + /* 44 */ "cmd ::= REVOKE privileges ON priv_level with_opt FROM user_name", + /* 45 */ "privileges ::= ALL", + /* 46 */ "privileges ::= priv_type_list", + /* 47 */ "privileges ::= SUBSCRIBE", + /* 48 */ "priv_type_list ::= priv_type", + /* 49 */ "priv_type_list ::= priv_type_list NK_COMMA priv_type", + /* 50 */ "priv_type ::= READ", + /* 51 */ "priv_type ::= WRITE", + /* 52 */ "priv_type ::= ALTER", + /* 53 */ "priv_level ::= NK_STAR NK_DOT NK_STAR", + /* 54 */ "priv_level ::= db_name NK_DOT NK_STAR", + /* 55 */ "priv_level ::= db_name NK_DOT table_name", + /* 56 */ "priv_level ::= topic_name", + /* 57 */ "with_opt ::=", + /* 58 */ "with_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 multi_drop_clause", + /* 186 */ "cmd ::= DROP STABLE 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 */ "specific_cols_opt ::=", + /* 207 */ "specific_cols_opt ::= NK_LP col_name_list NK_RP", + /* 208 */ "full_table_name ::= table_name", + /* 209 */ "full_table_name ::= db_name NK_DOT table_name", + /* 210 */ "tag_def_list ::= tag_def", + /* 211 */ "tag_def_list ::= tag_def_list NK_COMMA tag_def", + /* 212 */ "tag_def ::= column_name type_name", + /* 213 */ "column_def_list ::= column_def", + /* 214 */ "column_def_list ::= column_def_list NK_COMMA column_def", + /* 215 */ "column_def ::= column_name type_name column_options", + /* 216 */ "type_name ::= BOOL", + /* 217 */ "type_name ::= TINYINT", + /* 218 */ "type_name ::= SMALLINT", + /* 219 */ "type_name ::= INT", + /* 220 */ "type_name ::= INTEGER", + /* 221 */ "type_name ::= BIGINT", + /* 222 */ "type_name ::= FLOAT", + /* 223 */ "type_name ::= DOUBLE", + /* 224 */ "type_name ::= BINARY NK_LP NK_INTEGER NK_RP", + /* 225 */ "type_name ::= TIMESTAMP", + /* 226 */ "type_name ::= NCHAR NK_LP NK_INTEGER NK_RP", + /* 227 */ "type_name ::= TINYINT UNSIGNED", + /* 228 */ "type_name ::= SMALLINT UNSIGNED", + /* 229 */ "type_name ::= INT UNSIGNED", + /* 230 */ "type_name ::= BIGINT UNSIGNED", + /* 231 */ "type_name ::= JSON", + /* 232 */ "type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP", + /* 233 */ "type_name ::= MEDIUMBLOB", + /* 234 */ "type_name ::= BLOB", + /* 235 */ "type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP", + /* 236 */ "type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP", + /* 237 */ "type_name ::= DECIMAL", + /* 238 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP", + /* 239 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP", + /* 240 */ "type_name_default_len ::= BINARY", + /* 241 */ "type_name_default_len ::= NCHAR", + /* 242 */ "type_name_default_len ::= VARCHAR", + /* 243 */ "type_name_default_len ::= VARBINARY", + /* 244 */ "tags_def_opt ::=", + /* 245 */ "tags_def_opt ::= tags_def", + /* 246 */ "tags_def ::= TAGS NK_LP tag_def_list NK_RP", + /* 247 */ "table_options ::=", + /* 248 */ "table_options ::= table_options COMMENT NK_STRING", + /* 249 */ "table_options ::= table_options MAX_DELAY duration_list", + /* 250 */ "table_options ::= table_options WATERMARK duration_list", + /* 251 */ "table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP", + /* 252 */ "table_options ::= table_options TTL NK_INTEGER", + /* 253 */ "table_options ::= table_options SMA NK_LP col_name_list NK_RP", + /* 254 */ "table_options ::= table_options DELETE_MARK duration_list", + /* 255 */ "alter_table_options ::= alter_table_option", + /* 256 */ "alter_table_options ::= alter_table_options alter_table_option", + /* 257 */ "alter_table_option ::= COMMENT NK_STRING", + /* 258 */ "alter_table_option ::= TTL NK_INTEGER", + /* 259 */ "duration_list ::= duration_literal", + /* 260 */ "duration_list ::= duration_list NK_COMMA duration_literal", + /* 261 */ "rollup_func_list ::= rollup_func_name", + /* 262 */ "rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name", + /* 263 */ "rollup_func_name ::= function_name", + /* 264 */ "rollup_func_name ::= FIRST", + /* 265 */ "rollup_func_name ::= LAST", + /* 266 */ "col_name_list ::= col_name", + /* 267 */ "col_name_list ::= col_name_list NK_COMMA col_name", + /* 268 */ "col_name ::= column_name", + /* 269 */ "cmd ::= SHOW DNODES", + /* 270 */ "cmd ::= SHOW USERS", + /* 271 */ "cmd ::= SHOW USERS FULL", + /* 272 */ "cmd ::= SHOW USER PRIVILEGES", + /* 273 */ "cmd ::= SHOW db_kind_opt DATABASES", + /* 274 */ "cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt", + /* 275 */ "cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt", + /* 276 */ "cmd ::= SHOW db_name_cond_opt VGROUPS", + /* 277 */ "cmd ::= SHOW MNODES", + /* 278 */ "cmd ::= SHOW QNODES", + /* 279 */ "cmd ::= SHOW ARBGROUPS", + /* 280 */ "cmd ::= SHOW FUNCTIONS", + /* 281 */ "cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt", + /* 282 */ "cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name", + /* 283 */ "cmd ::= SHOW STREAMS", + /* 284 */ "cmd ::= SHOW ACCOUNTS", + /* 285 */ "cmd ::= SHOW APPS", + /* 286 */ "cmd ::= SHOW CONNECTIONS", + /* 287 */ "cmd ::= SHOW LICENCES", + /* 288 */ "cmd ::= SHOW GRANTS", + /* 289 */ "cmd ::= SHOW GRANTS FULL", + /* 290 */ "cmd ::= SHOW GRANTS LOGS", + /* 291 */ "cmd ::= SHOW CLUSTER MACHINES", + /* 292 */ "cmd ::= SHOW CREATE DATABASE db_name", + /* 293 */ "cmd ::= SHOW CREATE TABLE full_table_name", + /* 294 */ "cmd ::= SHOW CREATE STABLE full_table_name", + /* 295 */ "cmd ::= SHOW ENCRYPTIONS", + /* 296 */ "cmd ::= SHOW QUERIES", + /* 297 */ "cmd ::= SHOW SCORES", + /* 298 */ "cmd ::= SHOW TOPICS", + /* 299 */ "cmd ::= SHOW VARIABLES", + /* 300 */ "cmd ::= SHOW CLUSTER VARIABLES", + /* 301 */ "cmd ::= SHOW LOCAL VARIABLES", + /* 302 */ "cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt", + /* 303 */ "cmd ::= SHOW BNODES", + /* 304 */ "cmd ::= SHOW SNODES", + /* 305 */ "cmd ::= SHOW CLUSTER", + /* 306 */ "cmd ::= SHOW TRANSACTIONS", + /* 307 */ "cmd ::= SHOW TABLE DISTRIBUTED full_table_name", + /* 308 */ "cmd ::= SHOW CONSUMERS", + /* 309 */ "cmd ::= SHOW SUBSCRIPTIONS", + /* 310 */ "cmd ::= SHOW TAGS FROM table_name_cond from_db_opt", + /* 311 */ "cmd ::= SHOW TAGS FROM db_name NK_DOT table_name", + /* 312 */ "cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt", + /* 313 */ "cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name", + /* 314 */ "cmd ::= SHOW VNODES ON DNODE NK_INTEGER", + /* 315 */ "cmd ::= SHOW VNODES", + /* 316 */ "cmd ::= SHOW db_name_cond_opt ALIVE", + /* 317 */ "cmd ::= SHOW CLUSTER ALIVE", + /* 318 */ "cmd ::= SHOW db_name_cond_opt VIEWS like_pattern_opt", + /* 319 */ "cmd ::= SHOW CREATE VIEW full_table_name", + /* 320 */ "cmd ::= SHOW COMPACTS", + /* 321 */ "cmd ::= SHOW COMPACT NK_INTEGER", + /* 322 */ "table_kind_db_name_cond_opt ::=", + /* 323 */ "table_kind_db_name_cond_opt ::= table_kind", + /* 324 */ "table_kind_db_name_cond_opt ::= db_name NK_DOT", + /* 325 */ "table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT", + /* 326 */ "table_kind ::= NORMAL", + /* 327 */ "table_kind ::= CHILD", + /* 328 */ "db_name_cond_opt ::=", + /* 329 */ "db_name_cond_opt ::= db_name NK_DOT", + /* 330 */ "like_pattern_opt ::=", + /* 331 */ "like_pattern_opt ::= LIKE NK_STRING", + /* 332 */ "table_name_cond ::= table_name", + /* 333 */ "from_db_opt ::=", + /* 334 */ "from_db_opt ::= FROM db_name", + /* 335 */ "tag_list_opt ::=", + /* 336 */ "tag_list_opt ::= tag_item", + /* 337 */ "tag_list_opt ::= tag_list_opt NK_COMMA tag_item", + /* 338 */ "tag_item ::= TBNAME", + /* 339 */ "tag_item ::= QTAGS", + /* 340 */ "tag_item ::= column_name", + /* 341 */ "tag_item ::= column_name column_alias", + /* 342 */ "tag_item ::= column_name AS column_alias", + /* 343 */ "db_kind_opt ::=", + /* 344 */ "db_kind_opt ::= USER", + /* 345 */ "db_kind_opt ::= SYSTEM", + /* 346 */ "cmd ::= CREATE TSMA not_exists_opt tsma_name ON full_table_name tsma_func_list INTERVAL NK_LP duration_literal NK_RP", + /* 347 */ "cmd ::= CREATE RECURSIVE TSMA not_exists_opt tsma_name ON full_table_name INTERVAL NK_LP duration_literal NK_RP", + /* 348 */ "cmd ::= DROP TSMA exists_opt full_tsma_name", + /* 349 */ "cmd ::= SHOW db_name_cond_opt TSMAS", + /* 350 */ "full_tsma_name ::= tsma_name", + /* 351 */ "full_tsma_name ::= db_name NK_DOT tsma_name", + /* 352 */ "tsma_func_list ::= FUNCTION NK_LP func_list NK_RP", + /* 353 */ "cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options", + /* 354 */ "cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP", + /* 355 */ "cmd ::= DROP INDEX exists_opt full_index_name", + /* 356 */ "full_index_name ::= index_name", + /* 357 */ "full_index_name ::= db_name NK_DOT index_name", + /* 358 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt", + /* 359 */ "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", + /* 360 */ "func_list ::= func", + /* 361 */ "func_list ::= func_list NK_COMMA func", + /* 362 */ "func ::= sma_func_name NK_LP expression_list NK_RP", + /* 363 */ "sma_func_name ::= function_name", + /* 364 */ "sma_func_name ::= COUNT", + /* 365 */ "sma_func_name ::= FIRST", + /* 366 */ "sma_func_name ::= LAST", + /* 367 */ "sma_func_name ::= LAST_ROW", + /* 368 */ "sma_stream_opt ::=", + /* 369 */ "sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal", + /* 370 */ "sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal", + /* 371 */ "sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal", + /* 372 */ "with_meta ::= AS", + /* 373 */ "with_meta ::= WITH META AS", + /* 374 */ "with_meta ::= ONLY META AS", + /* 375 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery", + /* 376 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name", + /* 377 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt", + /* 378 */ "cmd ::= DROP TOPIC exists_opt topic_name", + /* 379 */ "cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name", + /* 380 */ "cmd ::= DESC full_table_name", + /* 381 */ "cmd ::= DESCRIBE full_table_name", + /* 382 */ "cmd ::= RESET QUERY CACHE", + /* 383 */ "cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery", + /* 384 */ "cmd ::= EXPLAIN analyze_opt explain_options insert_query", + /* 385 */ "analyze_opt ::=", + /* 386 */ "analyze_opt ::= ANALYZE", + /* 387 */ "explain_options ::=", + /* 388 */ "explain_options ::= explain_options VERBOSE NK_BOOL", + /* 389 */ "explain_options ::= explain_options RATIO NK_FLOAT", + /* 390 */ "cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt", + /* 391 */ "cmd ::= DROP FUNCTION exists_opt function_name", + /* 392 */ "agg_func_opt ::=", + /* 393 */ "agg_func_opt ::= AGGREGATE", + /* 394 */ "bufsize_opt ::=", + /* 395 */ "bufsize_opt ::= BUFSIZE NK_INTEGER", + /* 396 */ "language_opt ::=", + /* 397 */ "language_opt ::= LANGUAGE NK_STRING", + /* 398 */ "or_replace_opt ::=", + /* 399 */ "or_replace_opt ::= OR REPLACE", + /* 400 */ "cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery", + /* 401 */ "cmd ::= DROP VIEW exists_opt full_view_name", + /* 402 */ "full_view_name ::= view_name", + /* 403 */ "full_view_name ::= db_name NK_DOT view_name", + /* 404 */ "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", + /* 405 */ "cmd ::= DROP STREAM exists_opt stream_name", + /* 406 */ "cmd ::= PAUSE STREAM exists_opt stream_name", + /* 407 */ "cmd ::= RESUME STREAM exists_opt ignore_opt stream_name", + /* 408 */ "col_list_opt ::=", + /* 409 */ "col_list_opt ::= NK_LP column_stream_def_list NK_RP", + /* 410 */ "column_stream_def_list ::= column_stream_def", + /* 411 */ "column_stream_def_list ::= column_stream_def_list NK_COMMA column_stream_def", + /* 412 */ "column_stream_def ::= column_name stream_col_options", + /* 413 */ "stream_col_options ::=", + /* 414 */ "stream_col_options ::= stream_col_options PRIMARY KEY", + /* 415 */ "tag_def_or_ref_opt ::=", + /* 416 */ "tag_def_or_ref_opt ::= tags_def", + /* 417 */ "tag_def_or_ref_opt ::= TAGS NK_LP column_stream_def_list NK_RP", + /* 418 */ "stream_options ::=", + /* 419 */ "stream_options ::= stream_options TRIGGER AT_ONCE", + /* 420 */ "stream_options ::= stream_options TRIGGER WINDOW_CLOSE", + /* 421 */ "stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal", + /* 422 */ "stream_options ::= stream_options WATERMARK duration_literal", + /* 423 */ "stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER", + /* 424 */ "stream_options ::= stream_options FILL_HISTORY NK_INTEGER", + /* 425 */ "stream_options ::= stream_options DELETE_MARK duration_literal", + /* 426 */ "stream_options ::= stream_options IGNORE UPDATE NK_INTEGER", + /* 427 */ "subtable_opt ::=", + /* 428 */ "subtable_opt ::= SUBTABLE NK_LP expression NK_RP", + /* 429 */ "ignore_opt ::=", + /* 430 */ "ignore_opt ::= IGNORE UNTREATED", + /* 431 */ "cmd ::= KILL CONNECTION NK_INTEGER", + /* 432 */ "cmd ::= KILL QUERY NK_STRING", + /* 433 */ "cmd ::= KILL TRANSACTION NK_INTEGER", + /* 434 */ "cmd ::= KILL COMPACT NK_INTEGER", + /* 435 */ "cmd ::= BALANCE VGROUP", + /* 436 */ "cmd ::= BALANCE VGROUP LEADER on_vgroup_id", + /* 437 */ "cmd ::= BALANCE VGROUP LEADER DATABASE db_name", + /* 438 */ "cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER", + /* 439 */ "cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list", + /* 440 */ "cmd ::= SPLIT VGROUP NK_INTEGER", + /* 441 */ "on_vgroup_id ::=", + /* 442 */ "on_vgroup_id ::= ON NK_INTEGER", + /* 443 */ "dnode_list ::= DNODE NK_INTEGER", + /* 444 */ "dnode_list ::= dnode_list DNODE NK_INTEGER", + /* 445 */ "cmd ::= DELETE FROM full_table_name where_clause_opt", + /* 446 */ "cmd ::= query_or_subquery", + /* 447 */ "cmd ::= insert_query", + /* 448 */ "insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery", + /* 449 */ "insert_query ::= INSERT INTO full_table_name query_or_subquery", + /* 450 */ "tags_literal ::= NK_INTEGER", + /* 451 */ "tags_literal ::= NK_INTEGER NK_PLUS duration_literal", + /* 452 */ "tags_literal ::= NK_INTEGER NK_MINUS duration_literal", + /* 453 */ "tags_literal ::= NK_PLUS NK_INTEGER", + /* 454 */ "tags_literal ::= NK_PLUS NK_INTEGER NK_PLUS duration_literal", + /* 455 */ "tags_literal ::= NK_PLUS NK_INTEGER NK_MINUS duration_literal", + /* 456 */ "tags_literal ::= NK_MINUS NK_INTEGER", + /* 457 */ "tags_literal ::= NK_MINUS NK_INTEGER NK_PLUS duration_literal", + /* 458 */ "tags_literal ::= NK_MINUS NK_INTEGER NK_MINUS duration_literal", + /* 459 */ "tags_literal ::= NK_FLOAT", + /* 460 */ "tags_literal ::= NK_PLUS NK_FLOAT", + /* 461 */ "tags_literal ::= NK_MINUS NK_FLOAT", + /* 462 */ "tags_literal ::= NK_BIN", + /* 463 */ "tags_literal ::= NK_BIN NK_PLUS duration_literal", + /* 464 */ "tags_literal ::= NK_BIN NK_MINUS duration_literal", + /* 465 */ "tags_literal ::= NK_PLUS NK_BIN", + /* 466 */ "tags_literal ::= NK_PLUS NK_BIN NK_PLUS duration_literal", + /* 467 */ "tags_literal ::= NK_PLUS NK_BIN NK_MINUS duration_literal", + /* 468 */ "tags_literal ::= NK_MINUS NK_BIN", + /* 469 */ "tags_literal ::= NK_MINUS NK_BIN NK_PLUS duration_literal", + /* 470 */ "tags_literal ::= NK_MINUS NK_BIN NK_MINUS duration_literal", + /* 471 */ "tags_literal ::= NK_HEX", + /* 472 */ "tags_literal ::= NK_HEX NK_PLUS duration_literal", + /* 473 */ "tags_literal ::= NK_HEX NK_MINUS duration_literal", + /* 474 */ "tags_literal ::= NK_PLUS NK_HEX", + /* 475 */ "tags_literal ::= NK_PLUS NK_HEX NK_PLUS duration_literal", + /* 476 */ "tags_literal ::= NK_PLUS NK_HEX NK_MINUS duration_literal", + /* 477 */ "tags_literal ::= NK_MINUS NK_HEX", + /* 478 */ "tags_literal ::= NK_MINUS NK_HEX NK_PLUS duration_literal", + /* 479 */ "tags_literal ::= NK_MINUS NK_HEX NK_MINUS duration_literal", + /* 480 */ "tags_literal ::= NK_STRING", + /* 481 */ "tags_literal ::= NK_STRING NK_PLUS duration_literal", + /* 482 */ "tags_literal ::= NK_STRING NK_MINUS duration_literal", + /* 483 */ "tags_literal ::= NK_BOOL", + /* 484 */ "tags_literal ::= NULL", + /* 485 */ "tags_literal ::= literal_func", + /* 486 */ "tags_literal ::= literal_func NK_PLUS duration_literal", + /* 487 */ "tags_literal ::= literal_func NK_MINUS duration_literal", + /* 488 */ "tags_literal_list ::= tags_literal", + /* 489 */ "tags_literal_list ::= tags_literal_list NK_COMMA tags_literal", + /* 490 */ "literal ::= NK_INTEGER", + /* 491 */ "literal ::= NK_FLOAT", + /* 492 */ "literal ::= NK_STRING", + /* 493 */ "literal ::= NK_BOOL", + /* 494 */ "literal ::= TIMESTAMP NK_STRING", + /* 495 */ "literal ::= duration_literal", + /* 496 */ "literal ::= NULL", + /* 497 */ "literal ::= NK_QUESTION", + /* 498 */ "duration_literal ::= NK_VARIABLE", + /* 499 */ "signed ::= NK_INTEGER", + /* 500 */ "signed ::= NK_PLUS NK_INTEGER", + /* 501 */ "signed ::= NK_MINUS NK_INTEGER", + /* 502 */ "signed ::= NK_FLOAT", + /* 503 */ "signed ::= NK_PLUS NK_FLOAT", + /* 504 */ "signed ::= NK_MINUS NK_FLOAT", + /* 505 */ "signed_literal ::= signed", + /* 506 */ "signed_literal ::= NK_STRING", + /* 507 */ "signed_literal ::= NK_BOOL", + /* 508 */ "signed_literal ::= TIMESTAMP NK_STRING", + /* 509 */ "signed_literal ::= duration_literal", + /* 510 */ "signed_literal ::= NULL", + /* 511 */ "signed_literal ::= literal_func", + /* 512 */ "signed_literal ::= NK_QUESTION", + /* 513 */ "literal_list ::= signed_literal", + /* 514 */ "literal_list ::= literal_list NK_COMMA signed_literal", + /* 515 */ "db_name ::= NK_ID", + /* 516 */ "table_name ::= NK_ID", + /* 517 */ "column_name ::= NK_ID", + /* 518 */ "function_name ::= NK_ID", + /* 519 */ "view_name ::= NK_ID", + /* 520 */ "table_alias ::= NK_ID", + /* 521 */ "column_alias ::= NK_ID", + /* 522 */ "column_alias ::= NK_ALIAS", + /* 523 */ "user_name ::= NK_ID", + /* 524 */ "topic_name ::= NK_ID", + /* 525 */ "stream_name ::= NK_ID", + /* 526 */ "cgroup_name ::= NK_ID", + /* 527 */ "index_name ::= NK_ID", + /* 528 */ "tsma_name ::= NK_ID", + /* 529 */ "expr_or_subquery ::= expression", + /* 530 */ "expression ::= literal", + /* 531 */ "expression ::= pseudo_column", + /* 532 */ "expression ::= column_reference", + /* 533 */ "expression ::= function_expression", + /* 534 */ "expression ::= case_when_expression", + /* 535 */ "expression ::= NK_LP expression NK_RP", + /* 536 */ "expression ::= NK_PLUS expr_or_subquery", + /* 537 */ "expression ::= NK_MINUS expr_or_subquery", + /* 538 */ "expression ::= expr_or_subquery NK_PLUS expr_or_subquery", + /* 539 */ "expression ::= expr_or_subquery NK_MINUS expr_or_subquery", + /* 540 */ "expression ::= expr_or_subquery NK_STAR expr_or_subquery", + /* 541 */ "expression ::= expr_or_subquery NK_SLASH expr_or_subquery", + /* 542 */ "expression ::= expr_or_subquery NK_REM expr_or_subquery", + /* 543 */ "expression ::= column_reference NK_ARROW NK_STRING", + /* 544 */ "expression ::= expr_or_subquery NK_BITAND expr_or_subquery", + /* 545 */ "expression ::= expr_or_subquery NK_BITOR expr_or_subquery", + /* 546 */ "expression_list ::= expr_or_subquery", + /* 547 */ "expression_list ::= expression_list NK_COMMA expr_or_subquery", + /* 548 */ "column_reference ::= column_name", + /* 549 */ "column_reference ::= table_name NK_DOT column_name", + /* 550 */ "column_reference ::= NK_ALIAS", + /* 551 */ "column_reference ::= table_name NK_DOT NK_ALIAS", + /* 552 */ "pseudo_column ::= ROWTS", + /* 553 */ "pseudo_column ::= TBNAME", + /* 554 */ "pseudo_column ::= table_name NK_DOT TBNAME", + /* 555 */ "pseudo_column ::= QSTART", + /* 556 */ "pseudo_column ::= QEND", + /* 557 */ "pseudo_column ::= QDURATION", + /* 558 */ "pseudo_column ::= WSTART", + /* 559 */ "pseudo_column ::= WEND", + /* 560 */ "pseudo_column ::= WDURATION", + /* 561 */ "pseudo_column ::= IROWTS", + /* 562 */ "pseudo_column ::= ISFILLED", + /* 563 */ "pseudo_column ::= QTAGS", + /* 564 */ "function_expression ::= function_name NK_LP expression_list NK_RP", + /* 565 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP", + /* 566 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP", + /* 567 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name_default_len NK_RP", + /* 568 */ "function_expression ::= POSITION NK_LP expr_or_subquery IN expr_or_subquery NK_RP", + /* 569 */ "function_expression ::= TRIM NK_LP expr_or_subquery NK_RP", + /* 570 */ "function_expression ::= TRIM NK_LP trim_specification_type FROM expr_or_subquery NK_RP", + /* 571 */ "function_expression ::= TRIM NK_LP trim_specification_type expr_or_subquery FROM expr_or_subquery NK_RP", + /* 572 */ "function_expression ::= substr_func NK_LP expression_list NK_RP", + /* 573 */ "function_expression ::= substr_func NK_LP expr_or_subquery FROM expr_or_subquery NK_RP", + /* 574 */ "function_expression ::= substr_func NK_LP expr_or_subquery FROM expr_or_subquery FOR expr_or_subquery NK_RP", + /* 575 */ "function_expression ::= REPLACE NK_LP expression_list NK_RP", + /* 576 */ "function_expression ::= literal_func", + /* 577 */ "literal_func ::= noarg_func NK_LP NK_RP", + /* 578 */ "literal_func ::= NOW", + /* 579 */ "literal_func ::= TODAY", + /* 580 */ "substr_func ::= SUBSTR", + /* 581 */ "substr_func ::= SUBSTRING", + /* 582 */ "trim_specification_type ::=", + /* 583 */ "trim_specification_type ::= BOTH", + /* 584 */ "trim_specification_type ::= TRAILING", + /* 585 */ "trim_specification_type ::= LEADING", + /* 586 */ "noarg_func ::= NOW", + /* 587 */ "noarg_func ::= TODAY", + /* 588 */ "noarg_func ::= TIMEZONE", + /* 589 */ "noarg_func ::= DATABASE", + /* 590 */ "noarg_func ::= CLIENT_VERSION", + /* 591 */ "noarg_func ::= SERVER_VERSION", + /* 592 */ "noarg_func ::= SERVER_STATUS", + /* 593 */ "noarg_func ::= CURRENT_USER", + /* 594 */ "noarg_func ::= USER", + /* 595 */ "noarg_func ::= PI", + /* 596 */ "star_func ::= COUNT", + /* 597 */ "star_func ::= FIRST", + /* 598 */ "star_func ::= LAST", + /* 599 */ "star_func ::= LAST_ROW", + /* 600 */ "star_func_para_list ::= NK_STAR", + /* 601 */ "star_func_para_list ::= other_para_list", + /* 602 */ "other_para_list ::= star_func_para", + /* 603 */ "other_para_list ::= other_para_list NK_COMMA star_func_para", + /* 604 */ "star_func_para ::= expr_or_subquery", + /* 605 */ "star_func_para ::= table_name NK_DOT NK_STAR", + /* 606 */ "case_when_expression ::= CASE when_then_list case_when_else_opt END", + /* 607 */ "case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END", + /* 608 */ "when_then_list ::= when_then_expr", + /* 609 */ "when_then_list ::= when_then_list when_then_expr", + /* 610 */ "when_then_expr ::= WHEN common_expression THEN common_expression", + /* 611 */ "case_when_else_opt ::=", + /* 612 */ "case_when_else_opt ::= ELSE common_expression", + /* 613 */ "predicate ::= expr_or_subquery compare_op expr_or_subquery", + /* 614 */ "predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery", + /* 615 */ "predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery", + /* 616 */ "predicate ::= expr_or_subquery IS NULL", + /* 617 */ "predicate ::= expr_or_subquery IS NOT NULL", + /* 618 */ "predicate ::= expr_or_subquery in_op in_predicate_value", + /* 619 */ "compare_op ::= NK_LT", + /* 620 */ "compare_op ::= NK_GT", + /* 621 */ "compare_op ::= NK_LE", + /* 622 */ "compare_op ::= NK_GE", + /* 623 */ "compare_op ::= NK_NE", + /* 624 */ "compare_op ::= NK_EQ", + /* 625 */ "compare_op ::= LIKE", + /* 626 */ "compare_op ::= NOT LIKE", + /* 627 */ "compare_op ::= MATCH", + /* 628 */ "compare_op ::= NMATCH", + /* 629 */ "compare_op ::= CONTAINS", + /* 630 */ "in_op ::= IN", + /* 631 */ "in_op ::= NOT IN", + /* 632 */ "in_predicate_value ::= NK_LP literal_list NK_RP", + /* 633 */ "boolean_value_expression ::= boolean_primary", + /* 634 */ "boolean_value_expression ::= NOT boolean_primary", + /* 635 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression", + /* 636 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression", + /* 637 */ "boolean_primary ::= predicate", + /* 638 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP", + /* 639 */ "common_expression ::= expr_or_subquery", + /* 640 */ "common_expression ::= boolean_value_expression", + /* 641 */ "from_clause_opt ::=", + /* 642 */ "from_clause_opt ::= FROM table_reference_list", + /* 643 */ "table_reference_list ::= table_reference", + /* 644 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference", + /* 645 */ "table_reference ::= table_primary", + /* 646 */ "table_reference ::= joined_table", + /* 647 */ "table_primary ::= table_name alias_opt", + /* 648 */ "table_primary ::= db_name NK_DOT table_name alias_opt", + /* 649 */ "table_primary ::= subquery alias_opt", + /* 650 */ "table_primary ::= parenthesized_joined_table", + /* 651 */ "alias_opt ::=", + /* 652 */ "alias_opt ::= table_alias", + /* 653 */ "alias_opt ::= AS table_alias", + /* 654 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP", + /* 655 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP", + /* 656 */ "joined_table ::= table_reference join_type join_subtype JOIN table_reference join_on_clause_opt window_offset_clause_opt jlimit_clause_opt", + /* 657 */ "join_type ::=", + /* 658 */ "join_type ::= INNER", + /* 659 */ "join_type ::= LEFT", + /* 660 */ "join_type ::= RIGHT", + /* 661 */ "join_type ::= FULL", + /* 662 */ "join_subtype ::=", + /* 663 */ "join_subtype ::= OUTER", + /* 664 */ "join_subtype ::= SEMI", + /* 665 */ "join_subtype ::= ANTI", + /* 666 */ "join_subtype ::= ASOF", + /* 667 */ "join_subtype ::= WINDOW", + /* 668 */ "join_on_clause_opt ::=", + /* 669 */ "join_on_clause_opt ::= ON search_condition", + /* 670 */ "window_offset_clause_opt ::=", + /* 671 */ "window_offset_clause_opt ::= WINDOW_OFFSET NK_LP window_offset_literal NK_COMMA window_offset_literal NK_RP", + /* 672 */ "window_offset_literal ::= NK_VARIABLE", + /* 673 */ "window_offset_literal ::= NK_MINUS NK_VARIABLE", + /* 674 */ "jlimit_clause_opt ::=", + /* 675 */ "jlimit_clause_opt ::= JLIMIT NK_INTEGER", + /* 676 */ "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", + /* 677 */ "hint_list ::=", + /* 678 */ "hint_list ::= NK_HINT", + /* 679 */ "tag_mode_opt ::=", + /* 680 */ "tag_mode_opt ::= TAGS", + /* 681 */ "set_quantifier_opt ::=", + /* 682 */ "set_quantifier_opt ::= DISTINCT", + /* 683 */ "set_quantifier_opt ::= ALL", + /* 684 */ "select_list ::= select_item", + /* 685 */ "select_list ::= select_list NK_COMMA select_item", + /* 686 */ "select_item ::= NK_STAR", + /* 687 */ "select_item ::= common_expression", + /* 688 */ "select_item ::= common_expression column_alias", + /* 689 */ "select_item ::= common_expression AS column_alias", + /* 690 */ "select_item ::= table_name NK_DOT NK_STAR", + /* 691 */ "where_clause_opt ::=", + /* 692 */ "where_clause_opt ::= WHERE search_condition", + /* 693 */ "partition_by_clause_opt ::=", + /* 694 */ "partition_by_clause_opt ::= PARTITION BY partition_list", + /* 695 */ "partition_list ::= partition_item", + /* 696 */ "partition_list ::= partition_list NK_COMMA partition_item", + /* 697 */ "partition_item ::= expr_or_subquery", + /* 698 */ "partition_item ::= expr_or_subquery column_alias", + /* 699 */ "partition_item ::= expr_or_subquery AS column_alias", + /* 700 */ "twindow_clause_opt ::=", + /* 701 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP", + /* 702 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP", + /* 703 */ "twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt", + /* 704 */ "twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt", + /* 705 */ "twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition", + /* 706 */ "twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP", + /* 707 */ "twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP", + /* 708 */ "sliding_opt ::=", + /* 709 */ "sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP", + /* 710 */ "interval_sliding_duration_literal ::= NK_VARIABLE", + /* 711 */ "interval_sliding_duration_literal ::= NK_STRING", + /* 712 */ "interval_sliding_duration_literal ::= NK_INTEGER", + /* 713 */ "fill_opt ::=", + /* 714 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", + /* 715 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP", + /* 716 */ "fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP", + /* 717 */ "fill_mode ::= NONE", + /* 718 */ "fill_mode ::= PREV", + /* 719 */ "fill_mode ::= NULL", + /* 720 */ "fill_mode ::= NULL_F", + /* 721 */ "fill_mode ::= LINEAR", + /* 722 */ "fill_mode ::= NEXT", + /* 723 */ "group_by_clause_opt ::=", + /* 724 */ "group_by_clause_opt ::= GROUP BY group_by_list", + /* 725 */ "group_by_list ::= expr_or_subquery", + /* 726 */ "group_by_list ::= group_by_list NK_COMMA expr_or_subquery", + /* 727 */ "having_clause_opt ::=", + /* 728 */ "having_clause_opt ::= HAVING search_condition", + /* 729 */ "range_opt ::=", + /* 730 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP", + /* 731 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_RP", + /* 732 */ "every_opt ::=", + /* 733 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP", + /* 734 */ "query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt", + /* 735 */ "query_simple ::= query_specification", + /* 736 */ "query_simple ::= union_query_expression", + /* 737 */ "union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery", + /* 738 */ "union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery", + /* 739 */ "query_simple_or_subquery ::= query_simple", + /* 740 */ "query_simple_or_subquery ::= subquery", + /* 741 */ "query_or_subquery ::= query_expression", + /* 742 */ "query_or_subquery ::= subquery", + /* 743 */ "order_by_clause_opt ::=", + /* 744 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", + /* 745 */ "slimit_clause_opt ::=", + /* 746 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", + /* 747 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", + /* 748 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 749 */ "limit_clause_opt ::=", + /* 750 */ "limit_clause_opt ::= LIMIT NK_INTEGER", + /* 751 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", + /* 752 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 753 */ "subquery ::= NK_LP query_expression NK_RP", + /* 754 */ "subquery ::= NK_LP subquery NK_RP", + /* 755 */ "search_condition ::= common_expression", + /* 756 */ "sort_specification_list ::= sort_specification", + /* 757 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", + /* 758 */ "sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt", + /* 759 */ "ordering_specification_opt ::=", + /* 760 */ "ordering_specification_opt ::= ASC", + /* 761 */ "ordering_specification_opt ::= DESC", + /* 762 */ "null_ordering_opt ::=", + /* 763 */ "null_ordering_opt ::= NULLS FIRST", + /* 764 */ "null_ordering_opt ::= NULLS LAST", + /* 765 */ "column_options ::=", + /* 766 */ "column_options ::= column_options PRIMARY KEY", + /* 767 */ "column_options ::= column_options ENCODE NK_STRING", + /* 768 */ "column_options ::= column_options COMPRESS NK_STRING", + /* 769 */ "column_options ::= column_options LEVEL NK_STRING", }; #endif /* NDEBUG */ -#if YYSTACKDEPTH<=0 +#if YYGROWABLESTACK /* ** Try to increase the size of the parser stack. Return the number ** of errors. Return 0 on success. */ static int yyGrowStack(yyParser *p){ + int oldSize = 1 + (int)(p->yystackEnd - p->yystack); int newSize; int idx; yyStackEntry *pNew; - newSize = p->yystksz*2 + 100; - idx = p->yytos ? (int)(p->yytos - p->yystack) : 0; - if( p->yystack==&p->yystk0 ){ - pNew = malloc(newSize*sizeof(pNew[0])); - if( pNew ) pNew[0] = p->yystk0; + newSize = oldSize*2 + 100; + idx = (int)(p->yytos - p->yystack); + if( p->yystack==p->yystk0 ){ + pNew = YYREALLOC(0, newSize*sizeof(pNew[0])); + if( pNew==0 ) return 1; + memcpy(pNew, p->yystack, oldSize*sizeof(pNew[0])); }else{ - pNew = realloc(p->yystack, newSize*sizeof(pNew[0])); + pNew = YYREALLOC(p->yystack, newSize*sizeof(pNew[0])); + if( pNew==0 ) return 1; } - if( pNew ){ - p->yystack = pNew; - p->yytos = &p->yystack[idx]; + p->yystack = pNew; + p->yytos = &p->yystack[idx]; #ifndef NDEBUG - if( yyTraceFILE ){ - fprintf(yyTraceFILE,"%sStack grows from %d to %d entries.\n", - yyTracePrompt, p->yystksz, newSize); - } -#endif - p->yystksz = newSize; + if( yyTraceFILE ){ + fprintf(yyTraceFILE,"%sStack grows from %d to %d entries.\n", + yyTracePrompt, oldSize, newSize); } - return pNew==0; +#endif + p->yystackEnd = &p->yystack[newSize-1]; + return 0; } +#endif /* YYGROWABLESTACK */ + +#if !YYGROWABLESTACK +/* For builds that do no have a growable stack, yyGrowStack always +** returns an error. +*/ +# define yyGrowStack(X) 1 #endif /* Datatype of the argument to the memory allocated passed as the @@ -3346,35 +3603,25 @@ static int yyGrowStack(yyParser *p){ #endif /* Initialize a new parser that has already been allocated. -*/ + */ void ParseInit(void *yypRawParser ParseCTX_PDECL){ yyParser *yypParser = (yyParser*)yypRawParser; ParseCTX_STORE #ifdef YYTRACKMAXSTACKDEPTH - yypParser->yyhwm = 0; -#endif -#if YYSTACKDEPTH<=0 - yypParser->yytos = NULL; - yypParser->yystack = NULL; - yypParser->yystksz = 0; - if( yyGrowStack(yypParser) ){ - yypParser->yystack = &yypParser->yystk0; - yypParser->yystksz = 1; - } + yypParser->yyhwm = 0; #endif + yypParser->yystack = yypParser->yystk0; + yypParser->yystackEnd = &yypParser->yystack[YYSTACKDEPTH-1]; #ifndef YYNOERRORRECOVERY yypParser->yyerrcnt = -1; #endif yypParser->yytos = yypParser->yystack; yypParser->yystack[0].stateno = 0; yypParser->yystack[0].major = 0; -#if YYSTACKDEPTH>0 - yypParser->yystackEnd = &yypParser->yystack[YYSTACKDEPTH-1]; -#endif } #ifndef Parse_ENGINEALWAYSONSTACK -/* +/* ** This function allocates a new parser. ** The only argument is a pointer to a function which works like ** malloc. @@ -3401,325 +3648,293 @@ void *ParseAlloc(void *(*mallocProc)(YYMALLOCARGTYPE) ParseCTX_PDECL){ /* The following function deletes the "minor type" or semantic value ** associated with a symbol. The symbol can be either a terminal ** or nonterminal. "yymajor" is the symbol code, and "yypminor" is -** a pointer to the value to be deleted. The code used to do the +** a pointer to the value to be deleted. The code used to do the ** deletions is derived from the %destructor and/or %token_destructor ** directives of the input grammar. */ static void yy_destructor( - yyParser *yypParser, /* The parser */ - YYCODETYPE yymajor, /* Type code for object to destroy */ - YYMINORTYPE *yypminor /* The object to be destroyed */ + yyParser *yypParser, /* The parser */ + YYCODETYPE yymajor, /* Type code for object to destroy */ + YYMINORTYPE *yypminor /* The object to be destroyed */ ){ ParseARG_FETCH - ParseCTX_FETCH - switch( yymajor ){ - /* Here is inserted the actions which take place when a + ParseCTX_FETCH + switch( yymajor ){ + /* Here is inserted the actions which take place when a ** terminal or non-terminal is destroyed. This can happen ** when the symbol is popped from the stack during a - ** reduce or during error processing or when a parser is + ** reduce or during error processing or when a parser is ** being destroyed before it is finished parsing. ** ** Note: during a reduce, the only symbols destroyed are those ** which appear on the RHS of the rule, but which are *not* used ** inside the C code. - */ -/********* Begin destructor definitions ***************************************/ + */ + /********* Begin destructor definitions ***************************************/ /* Default NON-TERMINAL Destructor */ - case 378: /* cmd */ - case 381: /* literal */ - case 392: /* with_opt */ - case 398: /* search_condition */ - case 403: /* db_options */ - case 405: /* alter_db_options */ - case 407: /* start_opt */ - case 408: /* end_opt */ - case 412: /* signed */ - case 414: /* retention */ - case 415: /* full_table_name */ - case 418: /* table_options */ - case 423: /* alter_table_clause */ - case 424: /* alter_table_options */ - case 427: /* column_options */ - case 428: /* tags_literal */ - case 429: /* create_subtable_clause */ - case 432: /* drop_table_clause */ - case 435: /* tag_def */ - case 436: /* column_def */ - case 441: /* duration_literal */ - case 442: /* rollup_func_name */ - case 444: /* col_name */ - case 447: /* like_pattern_opt */ - case 448: /* db_name_cond_opt */ - case 449: /* table_name_cond */ - case 450: /* from_db_opt */ - case 452: /* tag_item */ - case 456: /* full_tsma_name */ - case 458: /* index_options */ - case 459: /* full_index_name */ - case 461: /* sliding_opt */ - case 462: /* sma_stream_opt */ - case 463: /* func */ - case 467: /* query_or_subquery */ - case 468: /* where_clause_opt */ - case 471: /* explain_options */ - case 472: /* insert_query */ - case 477: /* full_view_name */ - case 480: /* stream_options */ - case 483: /* subtable_opt */ - case 486: /* column_stream_def */ - case 487: /* stream_col_options */ - case 488: /* expression */ - case 491: /* literal_func */ - case 492: /* signed_literal */ - case 495: /* expr_or_subquery */ - case 496: /* pseudo_column */ - case 497: /* column_reference */ - case 498: /* function_expression */ - case 499: /* case_when_expression */ - case 504: /* star_func_para */ - case 506: /* case_when_else_opt */ - case 507: /* common_expression */ - case 508: /* when_then_expr */ - case 509: /* predicate */ - case 512: /* in_predicate_value */ - case 513: /* boolean_value_expression */ - case 514: /* boolean_primary */ - case 515: /* from_clause_opt */ - case 516: /* table_reference_list */ - case 517: /* table_reference */ - case 518: /* table_primary */ - case 519: /* joined_table */ - case 521: /* subquery */ - case 522: /* parenthesized_joined_table */ - case 525: /* join_on_clause_opt */ - case 526: /* window_offset_clause_opt */ - case 527: /* jlimit_clause_opt */ - case 528: /* window_offset_literal */ - case 529: /* query_specification */ - case 535: /* range_opt */ - case 536: /* every_opt */ - case 537: /* fill_opt */ - case 538: /* twindow_clause_opt */ - case 540: /* having_clause_opt */ - case 541: /* select_item */ - case 543: /* partition_item */ - case 544: /* interval_sliding_duration_literal */ - case 547: /* query_expression */ - case 548: /* query_simple */ - case 550: /* slimit_clause_opt */ - case 551: /* limit_clause_opt */ - case 552: /* union_query_expression */ - case 553: /* query_simple_or_subquery */ - case 555: /* sort_specification */ -{ -#line 7 "sql.y" - nodesDestroyNode((yypminor->yy416)); -#line 3517 "sql.c" -} - break; - case 379: /* account_options */ - case 380: /* alter_account_options */ - case 382: /* alter_account_option */ - case 406: /* speed_opt */ - case 466: /* with_meta */ - case 475: /* bufsize_opt */ -{ -#line 54 "sql.y" - -#line 3529 "sql.c" -} - break; - case 383: /* ip_range_list */ - case 384: /* white_list */ - case 385: /* white_list_opt */ - case 409: /* integer_list */ - case 410: /* variable_list */ - case 411: /* retention_list */ - case 416: /* column_def_list */ - case 417: /* tags_def_opt */ - case 419: /* multi_create_clause */ - case 420: /* tag_list_opt */ - case 421: /* tags_def */ - case 422: /* multi_drop_clause */ - case 430: /* specific_cols_opt */ - case 431: /* tags_literal_list */ - case 433: /* col_name_list */ - case 434: /* tag_def_list */ - case 438: /* duration_list */ - case 439: /* rollup_func_list */ - case 457: /* func_list */ - case 465: /* expression_list */ - case 481: /* col_list_opt */ - case 482: /* tag_def_or_ref_opt */ - case 485: /* column_stream_def_list */ - case 490: /* dnode_list */ - case 493: /* literal_list */ - case 501: /* star_func_para_list */ - case 503: /* other_para_list */ - case 505: /* when_then_list */ - case 530: /* hint_list */ - case 533: /* select_list */ - case 534: /* partition_by_clause_opt */ - case 539: /* group_by_clause_opt */ - case 542: /* partition_list */ - case 546: /* group_by_list */ - case 549: /* order_by_clause_opt */ - case 554: /* sort_specification_list */ -{ -#line 85 "sql.y" - nodesDestroyList((yypminor->yy316)); -#line 3571 "sql.c" -} - break; - case 386: /* is_import_opt */ - case 387: /* is_createdb_opt */ - case 389: /* sysinfo_opt */ -{ -#line 99 "sql.y" - -#line 3580 "sql.c" -} - break; - case 388: /* user_name */ - case 395: /* db_name */ - case 396: /* table_name */ - case 397: /* topic_name */ - case 399: /* dnode_endpoint */ - case 425: /* column_name */ - case 443: /* function_name */ - case 453: /* column_alias */ - case 454: /* tsma_name */ - case 460: /* index_name */ - case 464: /* sma_func_name */ - case 469: /* cgroup_name */ - case 476: /* language_opt */ - case 478: /* view_name */ - case 479: /* stream_name */ - case 489: /* on_vgroup_id */ - case 494: /* table_alias */ - case 500: /* star_func */ - case 502: /* noarg_func */ - case 520: /* alias_opt */ -{ -#line 1082 "sql.y" - -#line 3606 "sql.c" -} - break; - case 390: /* privileges */ - case 393: /* priv_type_list */ - case 394: /* priv_type */ -{ -#line 131 "sql.y" - -#line 3615 "sql.c" -} - break; - case 391: /* priv_level */ -{ -#line 148 "sql.y" - -#line 3622 "sql.c" -} - break; - case 400: /* force_opt */ - case 401: /* unsafe_opt */ - case 402: /* not_exists_opt */ - case 404: /* exists_opt */ - case 470: /* analyze_opt */ - case 473: /* or_replace_opt */ - case 474: /* agg_func_opt */ - case 484: /* ignore_opt */ - case 531: /* set_quantifier_opt */ - case 532: /* tag_mode_opt */ -{ -#line 180 "sql.y" - -#line 3638 "sql.c" -} - break; - case 413: /* alter_db_option */ - case 440: /* alter_table_option */ -{ -#line 288 "sql.y" - -#line 3646 "sql.c" -} - break; - case 426: /* type_name */ - case 437: /* type_name_default_len */ -{ -#line 425 "sql.y" - -#line 3654 "sql.c" -} - break; - case 445: /* db_kind_opt */ - case 451: /* table_kind */ -{ -#line 604 "sql.y" - -#line 3662 "sql.c" -} - break; - case 446: /* table_kind_db_name_cond_opt */ -{ -#line 569 "sql.y" - -#line 3669 "sql.c" -} - break; - case 455: /* tsma_func_list */ -{ -#line 623 "sql.y" - nodesDestroyNode((yypminor->yy416)); -#line 3676 "sql.c" -} - break; - case 510: /* compare_op */ - case 511: /* in_op */ -{ -#line 1280 "sql.y" - -#line 3684 "sql.c" -} - break; - case 523: /* join_type */ -{ -#line 1361 "sql.y" - -#line 3691 "sql.c" -} - break; - case 524: /* join_subtype */ -{ -#line 1369 "sql.y" - -#line 3698 "sql.c" -} - break; - case 545: /* fill_mode */ -{ -#line 1485 "sql.y" - -#line 3705 "sql.c" -} - break; - case 556: /* ordering_specification_opt */ -{ -#line 1570 "sql.y" - -#line 3712 "sql.c" -} - break; - case 557: /* null_ordering_opt */ -{ -#line 1576 "sql.y" - -#line 3719 "sql.c" -} - break; -/********* End destructor definitions *****************************************/ + case 385: /* cmd */ + case 388: /* literal */ + case 399: /* with_opt */ + case 405: /* search_condition */ + case 410: /* db_options */ + case 412: /* alter_db_options */ + case 414: /* start_opt */ + case 415: /* end_opt */ + case 419: /* signed */ + case 421: /* retention */ + case 422: /* full_table_name */ + case 425: /* table_options */ + case 430: /* alter_table_clause */ + case 431: /* alter_table_options */ + case 434: /* column_options */ + case 435: /* tags_literal */ + case 436: /* create_subtable_clause */ + case 439: /* drop_table_clause */ + case 442: /* tag_def */ + case 443: /* column_def */ + case 448: /* duration_literal */ + case 449: /* rollup_func_name */ + case 451: /* col_name */ + case 454: /* like_pattern_opt */ + case 455: /* db_name_cond_opt */ + case 456: /* table_name_cond */ + case 457: /* from_db_opt */ + case 459: /* tag_item */ + case 463: /* full_tsma_name */ + case 465: /* index_options */ + case 466: /* full_index_name */ + case 468: /* sliding_opt */ + case 469: /* sma_stream_opt */ + case 470: /* func */ + case 474: /* query_or_subquery */ + case 475: /* where_clause_opt */ + case 478: /* explain_options */ + case 479: /* insert_query */ + case 484: /* full_view_name */ + case 487: /* stream_options */ + case 490: /* subtable_opt */ + case 493: /* column_stream_def */ + case 494: /* stream_col_options */ + case 495: /* expression */ + case 498: /* literal_func */ + case 499: /* signed_literal */ + case 502: /* expr_or_subquery */ + case 503: /* pseudo_column */ + case 504: /* column_reference */ + case 505: /* function_expression */ + case 506: /* case_when_expression */ + 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 */ + { + nodesDestroyNode((yypminor->yy560)); + } + break; + case 386: /* account_options */ + case 387: /* alter_account_options */ + case 389: /* alter_account_option */ + case 413: /* speed_opt */ + case 473: /* with_meta */ + case 482: /* bufsize_opt */ + { + + } + break; + case 390: /* ip_range_list */ + case 391: /* white_list */ + case 392: /* white_list_opt */ + case 416: /* integer_list */ + case 417: /* variable_list */ + case 418: /* retention_list */ + case 423: /* column_def_list */ + case 424: /* tags_def_opt */ + case 426: /* multi_create_clause */ + case 427: /* tag_list_opt */ + case 428: /* tags_def */ + case 429: /* multi_drop_clause */ + case 437: /* specific_cols_opt */ + case 438: /* tags_literal_list */ + case 440: /* col_name_list */ + case 441: /* tag_def_list */ + case 445: /* duration_list */ + case 446: /* rollup_func_list */ + case 464: /* func_list */ + case 472: /* expression_list */ + case 488: /* col_list_opt */ + case 489: /* tag_def_or_ref_opt */ + case 492: /* column_stream_def_list */ + case 497: /* dnode_list */ + case 500: /* literal_list */ + case 508: /* 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 */ + { + nodesDestroyList((yypminor->yy334)); + } + break; + case 393: /* is_import_opt */ + case 394: /* is_createdb_opt */ + case 396: /* sysinfo_opt */ + { + + } + break; + case 395: /* user_name */ + case 402: /* db_name */ + case 403: /* table_name */ + case 404: /* topic_name */ + case 406: /* dnode_endpoint */ + case 432: /* column_name */ + case 450: /* function_name */ + case 460: /* column_alias */ + case 461: /* tsma_name */ + case 467: /* index_name */ + case 471: /* sma_func_name */ + case 476: /* cgroup_name */ + case 483: /* language_opt */ + case 485: /* view_name */ + case 486: /* stream_name */ + case 496: /* on_vgroup_id */ + case 501: /* table_alias */ + case 507: /* star_func */ + case 510: /* substr_func */ + case 511: /* noarg_func */ + case 529: /* alias_opt */ + { + + } + break; + case 397: /* privileges */ + case 400: /* priv_type_list */ + case 401: /* priv_type */ + { + + } + break; + case 398: /* priv_level */ + { + + } + break; + case 407: /* force_opt */ + case 408: /* unsafe_opt */ + case 409: /* not_exists_opt */ + case 411: /* exists_opt */ + case 477: /* analyze_opt */ + case 480: /* or_replace_opt */ + case 481: /* agg_func_opt */ + case 491: /* ignore_opt */ + case 540: /* set_quantifier_opt */ + case 541: /* tag_mode_opt */ + { + + } + break; + case 420: /* alter_db_option */ + case 447: /* alter_table_option */ + { + + } + break; + case 433: /* type_name */ + case 444: /* type_name_default_len */ + { + + } + break; + case 452: /* db_kind_opt */ + case 458: /* table_kind */ + { + + } + break; + case 453: /* table_kind_db_name_cond_opt */ + { + + } + break; + case 462: /* tsma_func_list */ + { + nodesDestroyNode((yypminor->yy560)); + } + break; + case 509: /* trim_specification_type */ + { + + } + break; + case 519: /* compare_op */ + case 520: /* in_op */ + { + + } + break; + case 532: /* join_type */ + { + + } + break; + case 533: /* join_subtype */ + { + + } + break; + case 554: /* fill_mode */ + { + + } + break; + case 565: /* ordering_specification_opt */ + { + + } + break; + case 566: /* null_ordering_opt */ + { + + } + break; + /********* End destructor definitions *****************************************/ default: break; /* If no destructor action specified: do nothing */ } } @@ -3738,8 +3953,8 @@ static void yy_pop_parser_stack(yyParser *pParser){ #ifndef NDEBUG if( yyTraceFILE ){ fprintf(yyTraceFILE,"%sPopping %s\n", - yyTracePrompt, - yyTokenName[yytos->major]); + yyTracePrompt, + yyTokenName[yytos->major]); } #endif yy_destructor(pParser, yytos->major, &yytos->minor); @@ -3750,14 +3965,31 @@ static void yy_pop_parser_stack(yyParser *pParser){ */ void ParseFinalize(void *p){ yyParser *pParser = (yyParser*)p; - while( pParser->yytos>pParser->yystack ) yy_pop_parser_stack(pParser); -#if YYSTACKDEPTH<=0 - if( pParser->yystack!=&pParser->yystk0 ) free(pParser->yystack); + + /* In-lined version of calling yy_pop_parser_stack() for each + ** element left in the stack */ + yyStackEntry *yytos = pParser->yytos; + while( yytos>pParser->yystack ){ +#ifndef NDEBUG + if( yyTraceFILE ){ + fprintf(yyTraceFILE,"%sPopping %s\n", + yyTracePrompt, + yyTokenName[yytos->major]); + } +#endif + if( yytos->major>=YY_MIN_DSTRCTR ){ + yy_destructor(pParser, yytos->major, &yytos->minor); + } + yytos--; + } + +#if YYGROWABLESTACK + if( pParser->yystack!=pParser->yystk0 ) YYFREE(pParser->yystack); #endif } #ifndef Parse_ENGINEALWAYSONSTACK -/* +/* ** Deallocate and destroy a parser. Destructors are called for ** all stack elements before shutting the parser down. ** @@ -3766,8 +3998,8 @@ void ParseFinalize(void *p){ ** assumed that the input pointer is never NULL. */ void ParseFree( - void *p, /* The parser to be deleted */ - void (*freeProc)(void*) /* Function used to reclaim memory */ + void *p, /* The parser to be deleted */ + void (*freeProc)(void*) /* Function used to reclaim memory */ ){ #ifndef YYPARSEFREENEVERNULL if( p==0 ) return; @@ -3829,8 +4061,8 @@ int ParseCoverage(FILE *out){ ** look-ahead token iLookAhead. */ static YYACTIONTYPE yy_find_shift_action( - YYCODETYPE iLookAhead, /* The look-ahead token */ - YYACTIONTYPE stateno /* Current state number */ + YYCODETYPE iLookAhead, /* The look-ahead token */ + YYACTIONTYPE stateno /* Current state number */ ){ int i; @@ -3857,7 +4089,7 @@ static YYACTIONTYPE yy_find_shift_action( #ifndef NDEBUG if( yyTraceFILE ){ fprintf(yyTraceFILE, "%sFALLBACK %s => %s\n", - yyTracePrompt, yyTokenName[iLookAhead], yyTokenName[iFallback]); + yyTracePrompt, yyTokenName[iLookAhead], yyTokenName[iFallback]); } #endif assert( yyFallback[iFallback]==0 ); /* Fallback loop must terminate */ @@ -3873,8 +4105,8 @@ static YYACTIONTYPE yy_find_shift_action( #ifndef NDEBUG if( yyTraceFILE ){ fprintf(yyTraceFILE, "%sWILDCARD %s => %s\n", - yyTracePrompt, yyTokenName[iLookAhead], - yyTokenName[YYWILDCARD]); + yyTracePrompt, yyTokenName[iLookAhead], + yyTokenName[YYWILDCARD]); } #endif /* NDEBUG */ return yy_action[j]; @@ -3894,8 +4126,8 @@ static YYACTIONTYPE yy_find_shift_action( ** look-ahead token iLookAhead. */ static YYACTIONTYPE yy_find_reduce_action( - YYACTIONTYPE stateno, /* Current state number */ - YYCODETYPE iLookAhead /* The look-ahead token */ + YYACTIONTYPE stateno, /* Current state number */ + YYCODETYPE iLookAhead /* The look-ahead token */ ){ int i; #ifdef YYERRORSYMBOL @@ -3923,20 +4155,20 @@ static YYACTIONTYPE yy_find_reduce_action( ** The following routine is called if the stack overflows. */ static void yyStackOverflow(yyParser *yypParser){ - ParseARG_FETCH - ParseCTX_FETCH + ParseARG_FETCH + ParseCTX_FETCH #ifndef NDEBUG - if( yyTraceFILE ){ - fprintf(yyTraceFILE,"%sStack Overflow!\n",yyTracePrompt); - } + if( yyTraceFILE ){ + fprintf(yyTraceFILE,"%sStack Overflow!\n",yyTracePrompt); + } #endif - while( yypParser->yytos>yypParser->yystack ) yy_pop_parser_stack(yypParser); - /* Here code is inserted which will execute if the parser + while( yypParser->yytos>yypParser->yystack ) yy_pop_parser_stack(yypParser); + /* Here code is inserted which will execute if the parser ** stack every overflows */ -/******** Begin %stack_overflow code ******************************************/ -/******** End %stack_overflow code ********************************************/ - ParseARG_STORE /* Suppress warning about unused %extra_argument var */ - ParseCTX_STORE + /******** Begin %stack_overflow code ******************************************/ + /******** End %stack_overflow code ********************************************/ + ParseARG_STORE /* Suppress warning about unused %extra_argument var */ + ParseCTX_STORE } /* @@ -3947,12 +4179,12 @@ static void yyTraceShift(yyParser *yypParser, int yyNewState, const char *zTag){ if( yyTraceFILE ){ if( yyNewStateyytos->major], - yyNewState); + yyTracePrompt, zTag, yyTokenName[yypParser->yytos->major], + yyNewState); }else{ fprintf(yyTraceFILE,"%s%s '%s', pending reduce %d\n", - yyTracePrompt, zTag, yyTokenName[yypParser->yytos->major], - yyNewState - YY_MIN_REDUCE); + yyTracePrompt, zTag, yyTokenName[yypParser->yytos->major], + yyNewState - YY_MIN_REDUCE); } } } @@ -3964,10 +4196,10 @@ static void yyTraceShift(yyParser *yypParser, int yyNewState, const char *zTag){ ** Perform a shift action. */ static void yy_shift( - yyParser *yypParser, /* The parser to be shifted */ - YYACTIONTYPE yyNewState, /* The new state to shift in */ - YYCODETYPE yyMajor, /* The major token to shift in */ - ParseTOKENTYPE yyMinor /* The minor token to shift in */ + yyParser *yypParser, /* The parser to be shifted */ + YYACTIONTYPE yyNewState, /* The new state to shift in */ + YYCODETYPE yyMajor, /* The major token to shift in */ + ParseTOKENTYPE yyMinor /* The minor token to shift in */ ){ yyStackEntry *yytos; yypParser->yytos++; @@ -3977,25 +4209,19 @@ static void yy_shift( assert( yypParser->yyhwm == (int)(yypParser->yytos - yypParser->yystack) ); } #endif -#if YYSTACKDEPTH>0 - if( yypParser->yytos>yypParser->yystackEnd ){ - yypParser->yytos--; - yyStackOverflow(yypParser); - return; - } -#else - if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz] ){ + yytos = yypParser->yytos; + if( yytos>yypParser->yystackEnd ){ if( yyGrowStack(yypParser) ){ yypParser->yytos--; yyStackOverflow(yypParser); return; } + yytos = yypParser->yytos; + assert( yytos <= yypParser->yystackEnd ); } -#endif if( yyNewState > YY_MAX_SHIFT ){ yyNewState += YY_MIN_REDUCE - YY_MIN_SHIFTREDUCE; } - yytos = yypParser->yytos; yytos->stateno = yyNewState; yytos->major = yyMajor; yytos->minor.yy0 = yyMinor; @@ -4005,1521 +4231,1551 @@ static void yy_shift( /* For rule J, yyRuleInfoLhs[J] contains the symbol on the left-hand side ** of that rule */ static const YYCODETYPE yyRuleInfoLhs[] = { - 378, /* (0) cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ - 378, /* (1) cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ - 379, /* (2) account_options ::= */ - 379, /* (3) account_options ::= account_options PPS literal */ - 379, /* (4) account_options ::= account_options TSERIES literal */ - 379, /* (5) account_options ::= account_options STORAGE literal */ - 379, /* (6) account_options ::= account_options STREAMS literal */ - 379, /* (7) account_options ::= account_options QTIME literal */ - 379, /* (8) account_options ::= account_options DBS literal */ - 379, /* (9) account_options ::= account_options USERS literal */ - 379, /* (10) account_options ::= account_options CONNS literal */ - 379, /* (11) account_options ::= account_options STATE literal */ - 380, /* (12) alter_account_options ::= alter_account_option */ - 380, /* (13) alter_account_options ::= alter_account_options alter_account_option */ - 382, /* (14) alter_account_option ::= PASS literal */ - 382, /* (15) alter_account_option ::= PPS literal */ - 382, /* (16) alter_account_option ::= TSERIES literal */ - 382, /* (17) alter_account_option ::= STORAGE literal */ - 382, /* (18) alter_account_option ::= STREAMS literal */ - 382, /* (19) alter_account_option ::= QTIME literal */ - 382, /* (20) alter_account_option ::= DBS literal */ - 382, /* (21) alter_account_option ::= USERS literal */ - 382, /* (22) alter_account_option ::= CONNS literal */ - 382, /* (23) alter_account_option ::= STATE literal */ - 383, /* (24) ip_range_list ::= NK_STRING */ - 383, /* (25) ip_range_list ::= ip_range_list NK_COMMA NK_STRING */ - 384, /* (26) white_list ::= HOST ip_range_list */ - 385, /* (27) white_list_opt ::= */ - 385, /* (28) white_list_opt ::= white_list */ - 386, /* (29) is_import_opt ::= */ - 386, /* (30) is_import_opt ::= IS_IMPORT NK_INTEGER */ - 387, /* (31) is_createdb_opt ::= */ - 387, /* (32) is_createdb_opt ::= CREATEDB NK_INTEGER */ - 378, /* (33) cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt is_createdb_opt is_import_opt white_list_opt */ - 378, /* (34) cmd ::= ALTER USER user_name PASS NK_STRING */ - 378, /* (35) cmd ::= ALTER USER user_name ENABLE NK_INTEGER */ - 378, /* (36) cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */ - 378, /* (37) cmd ::= ALTER USER user_name CREATEDB NK_INTEGER */ - 378, /* (38) cmd ::= ALTER USER user_name ADD white_list */ - 378, /* (39) cmd ::= ALTER USER user_name DROP white_list */ - 378, /* (40) cmd ::= DROP USER user_name */ - 389, /* (41) sysinfo_opt ::= */ - 389, /* (42) sysinfo_opt ::= SYSINFO NK_INTEGER */ - 378, /* (43) cmd ::= GRANT privileges ON priv_level with_opt TO user_name */ - 378, /* (44) cmd ::= REVOKE privileges ON priv_level with_opt FROM user_name */ - 390, /* (45) privileges ::= ALL */ - 390, /* (46) privileges ::= priv_type_list */ - 390, /* (47) privileges ::= SUBSCRIBE */ - 393, /* (48) priv_type_list ::= priv_type */ - 393, /* (49) priv_type_list ::= priv_type_list NK_COMMA priv_type */ - 394, /* (50) priv_type ::= READ */ - 394, /* (51) priv_type ::= WRITE */ - 394, /* (52) priv_type ::= ALTER */ - 391, /* (53) priv_level ::= NK_STAR NK_DOT NK_STAR */ - 391, /* (54) priv_level ::= db_name NK_DOT NK_STAR */ - 391, /* (55) priv_level ::= db_name NK_DOT table_name */ - 391, /* (56) priv_level ::= topic_name */ - 392, /* (57) with_opt ::= */ - 392, /* (58) with_opt ::= WITH search_condition */ - 378, /* (59) cmd ::= CREATE ENCRYPT_KEY NK_STRING */ - 378, /* (60) cmd ::= CREATE DNODE dnode_endpoint */ - 378, /* (61) cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */ - 378, /* (62) cmd ::= DROP DNODE NK_INTEGER force_opt */ - 378, /* (63) cmd ::= DROP DNODE dnode_endpoint force_opt */ - 378, /* (64) cmd ::= DROP DNODE NK_INTEGER unsafe_opt */ - 378, /* (65) cmd ::= DROP DNODE dnode_endpoint unsafe_opt */ - 378, /* (66) cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ - 378, /* (67) cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ - 378, /* (68) cmd ::= ALTER ALL DNODES NK_STRING */ - 378, /* (69) cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ - 378, /* (70) cmd ::= RESTORE DNODE NK_INTEGER */ - 399, /* (71) dnode_endpoint ::= NK_STRING */ - 399, /* (72) dnode_endpoint ::= NK_ID */ - 399, /* (73) dnode_endpoint ::= NK_IPTOKEN */ - 400, /* (74) force_opt ::= */ - 400, /* (75) force_opt ::= FORCE */ - 401, /* (76) unsafe_opt ::= UNSAFE */ - 378, /* (77) cmd ::= ALTER CLUSTER NK_STRING */ - 378, /* (78) cmd ::= ALTER CLUSTER NK_STRING NK_STRING */ - 378, /* (79) cmd ::= ALTER LOCAL NK_STRING */ - 378, /* (80) cmd ::= ALTER LOCAL NK_STRING NK_STRING */ - 378, /* (81) cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ - 378, /* (82) cmd ::= DROP QNODE ON DNODE NK_INTEGER */ - 378, /* (83) cmd ::= RESTORE QNODE ON DNODE NK_INTEGER */ - 378, /* (84) cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ - 378, /* (85) cmd ::= DROP BNODE ON DNODE NK_INTEGER */ - 378, /* (86) cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ - 378, /* (87) cmd ::= DROP SNODE ON DNODE NK_INTEGER */ - 378, /* (88) cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ - 378, /* (89) cmd ::= DROP MNODE ON DNODE NK_INTEGER */ - 378, /* (90) cmd ::= RESTORE MNODE ON DNODE NK_INTEGER */ - 378, /* (91) cmd ::= RESTORE VNODE ON DNODE NK_INTEGER */ - 378, /* (92) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ - 378, /* (93) cmd ::= DROP DATABASE exists_opt db_name */ - 378, /* (94) cmd ::= USE db_name */ - 378, /* (95) cmd ::= ALTER DATABASE db_name alter_db_options */ - 378, /* (96) cmd ::= FLUSH DATABASE db_name */ - 378, /* (97) cmd ::= TRIM DATABASE db_name speed_opt */ - 378, /* (98) cmd ::= S3MIGRATE DATABASE db_name */ - 378, /* (99) cmd ::= COMPACT DATABASE db_name start_opt end_opt */ - 402, /* (100) not_exists_opt ::= IF NOT EXISTS */ - 402, /* (101) not_exists_opt ::= */ - 404, /* (102) exists_opt ::= IF EXISTS */ - 404, /* (103) exists_opt ::= */ - 403, /* (104) db_options ::= */ - 403, /* (105) db_options ::= db_options BUFFER NK_INTEGER */ - 403, /* (106) db_options ::= db_options CACHEMODEL NK_STRING */ - 403, /* (107) db_options ::= db_options CACHESIZE NK_INTEGER */ - 403, /* (108) db_options ::= db_options COMP NK_INTEGER */ - 403, /* (109) db_options ::= db_options DURATION NK_INTEGER */ - 403, /* (110) db_options ::= db_options DURATION NK_VARIABLE */ - 403, /* (111) db_options ::= db_options MAXROWS NK_INTEGER */ - 403, /* (112) db_options ::= db_options MINROWS NK_INTEGER */ - 403, /* (113) db_options ::= db_options KEEP integer_list */ - 403, /* (114) db_options ::= db_options KEEP variable_list */ - 403, /* (115) db_options ::= db_options PAGES NK_INTEGER */ - 403, /* (116) db_options ::= db_options PAGESIZE NK_INTEGER */ - 403, /* (117) db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ - 403, /* (118) db_options ::= db_options PRECISION NK_STRING */ - 403, /* (119) db_options ::= db_options REPLICA NK_INTEGER */ - 403, /* (120) db_options ::= db_options VGROUPS NK_INTEGER */ - 403, /* (121) db_options ::= db_options SINGLE_STABLE NK_INTEGER */ - 403, /* (122) db_options ::= db_options RETENTIONS retention_list */ - 403, /* (123) db_options ::= db_options SCHEMALESS NK_INTEGER */ - 403, /* (124) db_options ::= db_options WAL_LEVEL NK_INTEGER */ - 403, /* (125) db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ - 403, /* (126) db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ - 403, /* (127) db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ - 403, /* (128) db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ - 403, /* (129) db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ - 403, /* (130) db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ - 403, /* (131) db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ - 403, /* (132) db_options ::= db_options STT_TRIGGER NK_INTEGER */ - 403, /* (133) db_options ::= db_options TABLE_PREFIX signed */ - 403, /* (134) db_options ::= db_options TABLE_SUFFIX signed */ - 403, /* (135) db_options ::= db_options S3_CHUNKSIZE NK_INTEGER */ - 403, /* (136) db_options ::= db_options S3_KEEPLOCAL NK_INTEGER */ - 403, /* (137) db_options ::= db_options S3_KEEPLOCAL NK_VARIABLE */ - 403, /* (138) db_options ::= db_options S3_COMPACT NK_INTEGER */ - 403, /* (139) db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER */ - 403, /* (140) db_options ::= db_options ENCRYPT_ALGORITHM NK_STRING */ - 405, /* (141) alter_db_options ::= alter_db_option */ - 405, /* (142) alter_db_options ::= alter_db_options alter_db_option */ - 413, /* (143) alter_db_option ::= BUFFER NK_INTEGER */ - 413, /* (144) alter_db_option ::= CACHEMODEL NK_STRING */ - 413, /* (145) alter_db_option ::= CACHESIZE NK_INTEGER */ - 413, /* (146) alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ - 413, /* (147) alter_db_option ::= KEEP integer_list */ - 413, /* (148) alter_db_option ::= KEEP variable_list */ - 413, /* (149) alter_db_option ::= PAGES NK_INTEGER */ - 413, /* (150) alter_db_option ::= REPLICA NK_INTEGER */ - 413, /* (151) alter_db_option ::= WAL_LEVEL NK_INTEGER */ - 413, /* (152) alter_db_option ::= STT_TRIGGER NK_INTEGER */ - 413, /* (153) alter_db_option ::= MINROWS NK_INTEGER */ - 413, /* (154) alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER */ - 413, /* (155) alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ - 413, /* (156) alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER */ - 413, /* (157) alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ - 413, /* (158) alter_db_option ::= S3_KEEPLOCAL NK_INTEGER */ - 413, /* (159) alter_db_option ::= S3_KEEPLOCAL NK_VARIABLE */ - 413, /* (160) alter_db_option ::= S3_COMPACT NK_INTEGER */ - 413, /* (161) alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER */ - 413, /* (162) alter_db_option ::= ENCRYPT_ALGORITHM NK_STRING */ - 409, /* (163) integer_list ::= NK_INTEGER */ - 409, /* (164) integer_list ::= integer_list NK_COMMA NK_INTEGER */ - 410, /* (165) variable_list ::= NK_VARIABLE */ - 410, /* (166) variable_list ::= variable_list NK_COMMA NK_VARIABLE */ - 411, /* (167) retention_list ::= retention */ - 411, /* (168) retention_list ::= retention_list NK_COMMA retention */ - 414, /* (169) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ - 414, /* (170) retention ::= NK_MINUS NK_COLON NK_VARIABLE */ - 406, /* (171) speed_opt ::= */ - 406, /* (172) speed_opt ::= BWLIMIT NK_INTEGER */ - 407, /* (173) start_opt ::= */ - 407, /* (174) start_opt ::= START WITH NK_INTEGER */ - 407, /* (175) start_opt ::= START WITH NK_STRING */ - 407, /* (176) start_opt ::= START WITH TIMESTAMP NK_STRING */ - 408, /* (177) end_opt ::= */ - 408, /* (178) end_opt ::= END WITH NK_INTEGER */ - 408, /* (179) end_opt ::= END WITH NK_STRING */ - 408, /* (180) end_opt ::= END WITH TIMESTAMP NK_STRING */ - 378, /* (181) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ - 378, /* (182) cmd ::= CREATE TABLE multi_create_clause */ - 378, /* (183) cmd ::= CREATE TABLE not_exists_opt USING full_table_name NK_LP tag_list_opt NK_RP FILE NK_STRING */ - 378, /* (184) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ - 378, /* (185) cmd ::= DROP TABLE multi_drop_clause */ - 378, /* (186) cmd ::= DROP STABLE exists_opt full_table_name */ - 378, /* (187) cmd ::= ALTER TABLE alter_table_clause */ - 378, /* (188) cmd ::= ALTER STABLE alter_table_clause */ - 423, /* (189) alter_table_clause ::= full_table_name alter_table_options */ - 423, /* (190) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name column_options */ - 423, /* (191) alter_table_clause ::= full_table_name DROP COLUMN column_name */ - 423, /* (192) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ - 423, /* (193) alter_table_clause ::= full_table_name MODIFY COLUMN column_name column_options */ - 423, /* (194) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ - 423, /* (195) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ - 423, /* (196) alter_table_clause ::= full_table_name DROP TAG column_name */ - 423, /* (197) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ - 423, /* (198) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ - 423, /* (199) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ tags_literal */ - 419, /* (200) multi_create_clause ::= create_subtable_clause */ - 419, /* (201) multi_create_clause ::= multi_create_clause create_subtable_clause */ - 429, /* (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 */ - 422, /* (203) multi_drop_clause ::= drop_table_clause */ - 422, /* (204) multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */ - 432, /* (205) drop_table_clause ::= exists_opt full_table_name */ - 430, /* (206) specific_cols_opt ::= */ - 430, /* (207) specific_cols_opt ::= NK_LP col_name_list NK_RP */ - 415, /* (208) full_table_name ::= table_name */ - 415, /* (209) full_table_name ::= db_name NK_DOT table_name */ - 434, /* (210) tag_def_list ::= tag_def */ - 434, /* (211) tag_def_list ::= tag_def_list NK_COMMA tag_def */ - 435, /* (212) tag_def ::= column_name type_name */ - 416, /* (213) column_def_list ::= column_def */ - 416, /* (214) column_def_list ::= column_def_list NK_COMMA column_def */ - 436, /* (215) column_def ::= column_name type_name column_options */ - 426, /* (216) type_name ::= BOOL */ - 426, /* (217) type_name ::= TINYINT */ - 426, /* (218) type_name ::= SMALLINT */ - 426, /* (219) type_name ::= INT */ - 426, /* (220) type_name ::= INTEGER */ - 426, /* (221) type_name ::= BIGINT */ - 426, /* (222) type_name ::= FLOAT */ - 426, /* (223) type_name ::= DOUBLE */ - 426, /* (224) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ - 426, /* (225) type_name ::= TIMESTAMP */ - 426, /* (226) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ - 426, /* (227) type_name ::= TINYINT UNSIGNED */ - 426, /* (228) type_name ::= SMALLINT UNSIGNED */ - 426, /* (229) type_name ::= INT UNSIGNED */ - 426, /* (230) type_name ::= BIGINT UNSIGNED */ - 426, /* (231) type_name ::= JSON */ - 426, /* (232) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ - 426, /* (233) type_name ::= MEDIUMBLOB */ - 426, /* (234) type_name ::= BLOB */ - 426, /* (235) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ - 426, /* (236) type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP */ - 426, /* (237) type_name ::= DECIMAL */ - 426, /* (238) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ - 426, /* (239) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ - 437, /* (240) type_name_default_len ::= BINARY */ - 437, /* (241) type_name_default_len ::= NCHAR */ - 437, /* (242) type_name_default_len ::= VARCHAR */ - 437, /* (243) type_name_default_len ::= VARBINARY */ - 417, /* (244) tags_def_opt ::= */ - 417, /* (245) tags_def_opt ::= tags_def */ - 421, /* (246) tags_def ::= TAGS NK_LP tag_def_list NK_RP */ - 418, /* (247) table_options ::= */ - 418, /* (248) table_options ::= table_options COMMENT NK_STRING */ - 418, /* (249) table_options ::= table_options MAX_DELAY duration_list */ - 418, /* (250) table_options ::= table_options WATERMARK duration_list */ - 418, /* (251) table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ - 418, /* (252) table_options ::= table_options TTL NK_INTEGER */ - 418, /* (253) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ - 418, /* (254) table_options ::= table_options DELETE_MARK duration_list */ - 424, /* (255) alter_table_options ::= alter_table_option */ - 424, /* (256) alter_table_options ::= alter_table_options alter_table_option */ - 440, /* (257) alter_table_option ::= COMMENT NK_STRING */ - 440, /* (258) alter_table_option ::= TTL NK_INTEGER */ - 438, /* (259) duration_list ::= duration_literal */ - 438, /* (260) duration_list ::= duration_list NK_COMMA duration_literal */ - 439, /* (261) rollup_func_list ::= rollup_func_name */ - 439, /* (262) rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ - 442, /* (263) rollup_func_name ::= function_name */ - 442, /* (264) rollup_func_name ::= FIRST */ - 442, /* (265) rollup_func_name ::= LAST */ - 433, /* (266) col_name_list ::= col_name */ - 433, /* (267) col_name_list ::= col_name_list NK_COMMA col_name */ - 444, /* (268) col_name ::= column_name */ - 378, /* (269) cmd ::= SHOW DNODES */ - 378, /* (270) cmd ::= SHOW USERS */ - 378, /* (271) cmd ::= SHOW USERS FULL */ - 378, /* (272) cmd ::= SHOW USER PRIVILEGES */ - 378, /* (273) cmd ::= SHOW db_kind_opt DATABASES */ - 378, /* (274) cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt */ - 378, /* (275) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ - 378, /* (276) cmd ::= SHOW db_name_cond_opt VGROUPS */ - 378, /* (277) cmd ::= SHOW MNODES */ - 378, /* (278) cmd ::= SHOW QNODES */ - 378, /* (279) cmd ::= SHOW ARBGROUPS */ - 378, /* (280) cmd ::= SHOW FUNCTIONS */ - 378, /* (281) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ - 378, /* (282) cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name */ - 378, /* (283) cmd ::= SHOW STREAMS */ - 378, /* (284) cmd ::= SHOW ACCOUNTS */ - 378, /* (285) cmd ::= SHOW APPS */ - 378, /* (286) cmd ::= SHOW CONNECTIONS */ - 378, /* (287) cmd ::= SHOW LICENCES */ - 378, /* (288) cmd ::= SHOW GRANTS */ - 378, /* (289) cmd ::= SHOW GRANTS FULL */ - 378, /* (290) cmd ::= SHOW GRANTS LOGS */ - 378, /* (291) cmd ::= SHOW CLUSTER MACHINES */ - 378, /* (292) cmd ::= SHOW CREATE DATABASE db_name */ - 378, /* (293) cmd ::= SHOW CREATE TABLE full_table_name */ - 378, /* (294) cmd ::= SHOW CREATE STABLE full_table_name */ - 378, /* (295) cmd ::= SHOW ENCRYPTIONS */ - 378, /* (296) cmd ::= SHOW QUERIES */ - 378, /* (297) cmd ::= SHOW SCORES */ - 378, /* (298) cmd ::= SHOW TOPICS */ - 378, /* (299) cmd ::= SHOW VARIABLES */ - 378, /* (300) cmd ::= SHOW CLUSTER VARIABLES */ - 378, /* (301) cmd ::= SHOW LOCAL VARIABLES */ - 378, /* (302) cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ - 378, /* (303) cmd ::= SHOW BNODES */ - 378, /* (304) cmd ::= SHOW SNODES */ - 378, /* (305) cmd ::= SHOW CLUSTER */ - 378, /* (306) cmd ::= SHOW TRANSACTIONS */ - 378, /* (307) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ - 378, /* (308) cmd ::= SHOW CONSUMERS */ - 378, /* (309) cmd ::= SHOW SUBSCRIPTIONS */ - 378, /* (310) cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ - 378, /* (311) cmd ::= SHOW TAGS FROM db_name NK_DOT table_name */ - 378, /* (312) cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ - 378, /* (313) cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name */ - 378, /* (314) cmd ::= SHOW VNODES ON DNODE NK_INTEGER */ - 378, /* (315) cmd ::= SHOW VNODES */ - 378, /* (316) cmd ::= SHOW db_name_cond_opt ALIVE */ - 378, /* (317) cmd ::= SHOW CLUSTER ALIVE */ - 378, /* (318) cmd ::= SHOW db_name_cond_opt VIEWS like_pattern_opt */ - 378, /* (319) cmd ::= SHOW CREATE VIEW full_table_name */ - 378, /* (320) cmd ::= SHOW COMPACTS */ - 378, /* (321) cmd ::= SHOW COMPACT NK_INTEGER */ - 446, /* (322) table_kind_db_name_cond_opt ::= */ - 446, /* (323) table_kind_db_name_cond_opt ::= table_kind */ - 446, /* (324) table_kind_db_name_cond_opt ::= db_name NK_DOT */ - 446, /* (325) table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT */ - 451, /* (326) table_kind ::= NORMAL */ - 451, /* (327) table_kind ::= CHILD */ - 448, /* (328) db_name_cond_opt ::= */ - 448, /* (329) db_name_cond_opt ::= db_name NK_DOT */ - 447, /* (330) like_pattern_opt ::= */ - 447, /* (331) like_pattern_opt ::= LIKE NK_STRING */ - 449, /* (332) table_name_cond ::= table_name */ - 450, /* (333) from_db_opt ::= */ - 450, /* (334) from_db_opt ::= FROM db_name */ - 420, /* (335) tag_list_opt ::= */ - 420, /* (336) tag_list_opt ::= tag_item */ - 420, /* (337) tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ - 452, /* (338) tag_item ::= TBNAME */ - 452, /* (339) tag_item ::= QTAGS */ - 452, /* (340) tag_item ::= column_name */ - 452, /* (341) tag_item ::= column_name column_alias */ - 452, /* (342) tag_item ::= column_name AS column_alias */ - 445, /* (343) db_kind_opt ::= */ - 445, /* (344) db_kind_opt ::= USER */ - 445, /* (345) db_kind_opt ::= SYSTEM */ - 378, /* (346) cmd ::= CREATE TSMA not_exists_opt tsma_name ON full_table_name tsma_func_list INTERVAL NK_LP duration_literal NK_RP */ - 378, /* (347) cmd ::= CREATE RECURSIVE TSMA not_exists_opt tsma_name ON full_table_name INTERVAL NK_LP duration_literal NK_RP */ - 378, /* (348) cmd ::= DROP TSMA exists_opt full_tsma_name */ - 378, /* (349) cmd ::= SHOW db_name_cond_opt TSMAS */ - 456, /* (350) full_tsma_name ::= tsma_name */ - 456, /* (351) full_tsma_name ::= db_name NK_DOT tsma_name */ - 455, /* (352) tsma_func_list ::= FUNCTION NK_LP func_list NK_RP */ - 378, /* (353) cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options */ - 378, /* (354) cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP */ - 378, /* (355) cmd ::= DROP INDEX exists_opt full_index_name */ - 459, /* (356) full_index_name ::= index_name */ - 459, /* (357) full_index_name ::= db_name NK_DOT index_name */ - 458, /* (358) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ - 458, /* (359) 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 */ - 457, /* (360) func_list ::= func */ - 457, /* (361) func_list ::= func_list NK_COMMA func */ - 463, /* (362) func ::= sma_func_name NK_LP expression_list NK_RP */ - 464, /* (363) sma_func_name ::= function_name */ - 464, /* (364) sma_func_name ::= COUNT */ - 464, /* (365) sma_func_name ::= FIRST */ - 464, /* (366) sma_func_name ::= LAST */ - 464, /* (367) sma_func_name ::= LAST_ROW */ - 462, /* (368) sma_stream_opt ::= */ - 462, /* (369) sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ - 462, /* (370) sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ - 462, /* (371) sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ - 466, /* (372) with_meta ::= AS */ - 466, /* (373) with_meta ::= WITH META AS */ - 466, /* (374) with_meta ::= ONLY META AS */ - 378, /* (375) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ - 378, /* (376) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */ - 378, /* (377) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */ - 378, /* (378) cmd ::= DROP TOPIC exists_opt topic_name */ - 378, /* (379) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ - 378, /* (380) cmd ::= DESC full_table_name */ - 378, /* (381) cmd ::= DESCRIBE full_table_name */ - 378, /* (382) cmd ::= RESET QUERY CACHE */ - 378, /* (383) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ - 378, /* (384) cmd ::= EXPLAIN analyze_opt explain_options insert_query */ - 470, /* (385) analyze_opt ::= */ - 470, /* (386) analyze_opt ::= ANALYZE */ - 471, /* (387) explain_options ::= */ - 471, /* (388) explain_options ::= explain_options VERBOSE NK_BOOL */ - 471, /* (389) explain_options ::= explain_options RATIO NK_FLOAT */ - 378, /* (390) cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt */ - 378, /* (391) cmd ::= DROP FUNCTION exists_opt function_name */ - 474, /* (392) agg_func_opt ::= */ - 474, /* (393) agg_func_opt ::= AGGREGATE */ - 475, /* (394) bufsize_opt ::= */ - 475, /* (395) bufsize_opt ::= BUFSIZE NK_INTEGER */ - 476, /* (396) language_opt ::= */ - 476, /* (397) language_opt ::= LANGUAGE NK_STRING */ - 473, /* (398) or_replace_opt ::= */ - 473, /* (399) or_replace_opt ::= OR REPLACE */ - 378, /* (400) cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery */ - 378, /* (401) cmd ::= DROP VIEW exists_opt full_view_name */ - 477, /* (402) full_view_name ::= view_name */ - 477, /* (403) full_view_name ::= db_name NK_DOT view_name */ - 378, /* (404) 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 */ - 378, /* (405) cmd ::= DROP STREAM exists_opt stream_name */ - 378, /* (406) cmd ::= PAUSE STREAM exists_opt stream_name */ - 378, /* (407) cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */ - 481, /* (408) col_list_opt ::= */ - 481, /* (409) col_list_opt ::= NK_LP column_stream_def_list NK_RP */ - 485, /* (410) column_stream_def_list ::= column_stream_def */ - 485, /* (411) column_stream_def_list ::= column_stream_def_list NK_COMMA column_stream_def */ - 486, /* (412) column_stream_def ::= column_name stream_col_options */ - 487, /* (413) stream_col_options ::= */ - 487, /* (414) stream_col_options ::= stream_col_options PRIMARY KEY */ - 482, /* (415) tag_def_or_ref_opt ::= */ - 482, /* (416) tag_def_or_ref_opt ::= tags_def */ - 482, /* (417) tag_def_or_ref_opt ::= TAGS NK_LP column_stream_def_list NK_RP */ - 480, /* (418) stream_options ::= */ - 480, /* (419) stream_options ::= stream_options TRIGGER AT_ONCE */ - 480, /* (420) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ - 480, /* (421) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ - 480, /* (422) stream_options ::= stream_options WATERMARK duration_literal */ - 480, /* (423) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ - 480, /* (424) stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ - 480, /* (425) stream_options ::= stream_options DELETE_MARK duration_literal */ - 480, /* (426) stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ - 483, /* (427) subtable_opt ::= */ - 483, /* (428) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ - 484, /* (429) ignore_opt ::= */ - 484, /* (430) ignore_opt ::= IGNORE UNTREATED */ - 378, /* (431) cmd ::= KILL CONNECTION NK_INTEGER */ - 378, /* (432) cmd ::= KILL QUERY NK_STRING */ - 378, /* (433) cmd ::= KILL TRANSACTION NK_INTEGER */ - 378, /* (434) cmd ::= KILL COMPACT NK_INTEGER */ - 378, /* (435) cmd ::= BALANCE VGROUP */ - 378, /* (436) cmd ::= BALANCE VGROUP LEADER on_vgroup_id */ - 378, /* (437) cmd ::= BALANCE VGROUP LEADER DATABASE db_name */ - 378, /* (438) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ - 378, /* (439) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ - 378, /* (440) cmd ::= SPLIT VGROUP NK_INTEGER */ - 489, /* (441) on_vgroup_id ::= */ - 489, /* (442) on_vgroup_id ::= ON NK_INTEGER */ - 490, /* (443) dnode_list ::= DNODE NK_INTEGER */ - 490, /* (444) dnode_list ::= dnode_list DNODE NK_INTEGER */ - 378, /* (445) cmd ::= DELETE FROM full_table_name where_clause_opt */ - 378, /* (446) cmd ::= query_or_subquery */ - 378, /* (447) cmd ::= insert_query */ - 472, /* (448) insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ - 472, /* (449) insert_query ::= INSERT INTO full_table_name query_or_subquery */ - 428, /* (450) tags_literal ::= NK_INTEGER */ - 428, /* (451) tags_literal ::= NK_INTEGER NK_PLUS duration_literal */ - 428, /* (452) tags_literal ::= NK_INTEGER NK_MINUS duration_literal */ - 428, /* (453) tags_literal ::= NK_PLUS NK_INTEGER */ - 428, /* (454) tags_literal ::= NK_PLUS NK_INTEGER NK_PLUS duration_literal */ - 428, /* (455) tags_literal ::= NK_PLUS NK_INTEGER NK_MINUS duration_literal */ - 428, /* (456) tags_literal ::= NK_MINUS NK_INTEGER */ - 428, /* (457) tags_literal ::= NK_MINUS NK_INTEGER NK_PLUS duration_literal */ - 428, /* (458) tags_literal ::= NK_MINUS NK_INTEGER NK_MINUS duration_literal */ - 428, /* (459) tags_literal ::= NK_FLOAT */ - 428, /* (460) tags_literal ::= NK_PLUS NK_FLOAT */ - 428, /* (461) tags_literal ::= NK_MINUS NK_FLOAT */ - 428, /* (462) tags_literal ::= NK_BIN */ - 428, /* (463) tags_literal ::= NK_BIN NK_PLUS duration_literal */ - 428, /* (464) tags_literal ::= NK_BIN NK_MINUS duration_literal */ - 428, /* (465) tags_literal ::= NK_PLUS NK_BIN */ - 428, /* (466) tags_literal ::= NK_PLUS NK_BIN NK_PLUS duration_literal */ - 428, /* (467) tags_literal ::= NK_PLUS NK_BIN NK_MINUS duration_literal */ - 428, /* (468) tags_literal ::= NK_MINUS NK_BIN */ - 428, /* (469) tags_literal ::= NK_MINUS NK_BIN NK_PLUS duration_literal */ - 428, /* (470) tags_literal ::= NK_MINUS NK_BIN NK_MINUS duration_literal */ - 428, /* (471) tags_literal ::= NK_HEX */ - 428, /* (472) tags_literal ::= NK_HEX NK_PLUS duration_literal */ - 428, /* (473) tags_literal ::= NK_HEX NK_MINUS duration_literal */ - 428, /* (474) tags_literal ::= NK_PLUS NK_HEX */ - 428, /* (475) tags_literal ::= NK_PLUS NK_HEX NK_PLUS duration_literal */ - 428, /* (476) tags_literal ::= NK_PLUS NK_HEX NK_MINUS duration_literal */ - 428, /* (477) tags_literal ::= NK_MINUS NK_HEX */ - 428, /* (478) tags_literal ::= NK_MINUS NK_HEX NK_PLUS duration_literal */ - 428, /* (479) tags_literal ::= NK_MINUS NK_HEX NK_MINUS duration_literal */ - 428, /* (480) tags_literal ::= NK_STRING */ - 428, /* (481) tags_literal ::= NK_STRING NK_PLUS duration_literal */ - 428, /* (482) tags_literal ::= NK_STRING NK_MINUS duration_literal */ - 428, /* (483) tags_literal ::= NK_BOOL */ - 428, /* (484) tags_literal ::= NULL */ - 428, /* (485) tags_literal ::= literal_func */ - 428, /* (486) tags_literal ::= literal_func NK_PLUS duration_literal */ - 428, /* (487) tags_literal ::= literal_func NK_MINUS duration_literal */ - 431, /* (488) tags_literal_list ::= tags_literal */ - 431, /* (489) tags_literal_list ::= tags_literal_list NK_COMMA tags_literal */ - 381, /* (490) literal ::= NK_INTEGER */ - 381, /* (491) literal ::= NK_FLOAT */ - 381, /* (492) literal ::= NK_STRING */ - 381, /* (493) literal ::= NK_BOOL */ - 381, /* (494) literal ::= TIMESTAMP NK_STRING */ - 381, /* (495) literal ::= duration_literal */ - 381, /* (496) literal ::= NULL */ - 381, /* (497) literal ::= NK_QUESTION */ - 441, /* (498) duration_literal ::= NK_VARIABLE */ - 412, /* (499) signed ::= NK_INTEGER */ - 412, /* (500) signed ::= NK_PLUS NK_INTEGER */ - 412, /* (501) signed ::= NK_MINUS NK_INTEGER */ - 412, /* (502) signed ::= NK_FLOAT */ - 412, /* (503) signed ::= NK_PLUS NK_FLOAT */ - 412, /* (504) signed ::= NK_MINUS NK_FLOAT */ - 492, /* (505) signed_literal ::= signed */ - 492, /* (506) signed_literal ::= NK_STRING */ - 492, /* (507) signed_literal ::= NK_BOOL */ - 492, /* (508) signed_literal ::= TIMESTAMP NK_STRING */ - 492, /* (509) signed_literal ::= duration_literal */ - 492, /* (510) signed_literal ::= NULL */ - 492, /* (511) signed_literal ::= literal_func */ - 492, /* (512) signed_literal ::= NK_QUESTION */ - 493, /* (513) literal_list ::= signed_literal */ - 493, /* (514) literal_list ::= literal_list NK_COMMA signed_literal */ - 395, /* (515) db_name ::= NK_ID */ - 396, /* (516) table_name ::= NK_ID */ - 425, /* (517) column_name ::= NK_ID */ - 443, /* (518) function_name ::= NK_ID */ - 478, /* (519) view_name ::= NK_ID */ - 494, /* (520) table_alias ::= NK_ID */ - 453, /* (521) column_alias ::= NK_ID */ - 453, /* (522) column_alias ::= NK_ALIAS */ - 388, /* (523) user_name ::= NK_ID */ - 397, /* (524) topic_name ::= NK_ID */ - 479, /* (525) stream_name ::= NK_ID */ - 469, /* (526) cgroup_name ::= NK_ID */ - 460, /* (527) index_name ::= NK_ID */ - 454, /* (528) tsma_name ::= NK_ID */ - 495, /* (529) expr_or_subquery ::= expression */ - 488, /* (530) expression ::= literal */ - 488, /* (531) expression ::= pseudo_column */ - 488, /* (532) expression ::= column_reference */ - 488, /* (533) expression ::= function_expression */ - 488, /* (534) expression ::= case_when_expression */ - 488, /* (535) expression ::= NK_LP expression NK_RP */ - 488, /* (536) expression ::= NK_PLUS expr_or_subquery */ - 488, /* (537) expression ::= NK_MINUS expr_or_subquery */ - 488, /* (538) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ - 488, /* (539) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ - 488, /* (540) expression ::= expr_or_subquery NK_STAR expr_or_subquery */ - 488, /* (541) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ - 488, /* (542) expression ::= expr_or_subquery NK_REM expr_or_subquery */ - 488, /* (543) expression ::= column_reference NK_ARROW NK_STRING */ - 488, /* (544) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ - 488, /* (545) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ - 465, /* (546) expression_list ::= expr_or_subquery */ - 465, /* (547) expression_list ::= expression_list NK_COMMA expr_or_subquery */ - 497, /* (548) column_reference ::= column_name */ - 497, /* (549) column_reference ::= table_name NK_DOT column_name */ - 497, /* (550) column_reference ::= NK_ALIAS */ - 497, /* (551) column_reference ::= table_name NK_DOT NK_ALIAS */ - 496, /* (552) pseudo_column ::= ROWTS */ - 496, /* (553) pseudo_column ::= TBNAME */ - 496, /* (554) pseudo_column ::= table_name NK_DOT TBNAME */ - 496, /* (555) pseudo_column ::= QSTART */ - 496, /* (556) pseudo_column ::= QEND */ - 496, /* (557) pseudo_column ::= QDURATION */ - 496, /* (558) pseudo_column ::= WSTART */ - 496, /* (559) pseudo_column ::= WEND */ - 496, /* (560) pseudo_column ::= WDURATION */ - 496, /* (561) pseudo_column ::= IROWTS */ - 496, /* (562) pseudo_column ::= ISFILLED */ - 496, /* (563) pseudo_column ::= QTAGS */ - 498, /* (564) function_expression ::= function_name NK_LP expression_list NK_RP */ - 498, /* (565) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ - 498, /* (566) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ - 498, /* (567) function_expression ::= CAST NK_LP expr_or_subquery AS type_name_default_len NK_RP */ - 498, /* (568) function_expression ::= literal_func */ - 491, /* (569) literal_func ::= noarg_func NK_LP NK_RP */ - 491, /* (570) literal_func ::= NOW */ - 491, /* (571) literal_func ::= TODAY */ - 502, /* (572) noarg_func ::= NOW */ - 502, /* (573) noarg_func ::= TODAY */ - 502, /* (574) noarg_func ::= TIMEZONE */ - 502, /* (575) noarg_func ::= DATABASE */ - 502, /* (576) noarg_func ::= CLIENT_VERSION */ - 502, /* (577) noarg_func ::= SERVER_VERSION */ - 502, /* (578) noarg_func ::= SERVER_STATUS */ - 502, /* (579) noarg_func ::= CURRENT_USER */ - 502, /* (580) noarg_func ::= USER */ - 500, /* (581) star_func ::= COUNT */ - 500, /* (582) star_func ::= FIRST */ - 500, /* (583) star_func ::= LAST */ - 500, /* (584) star_func ::= LAST_ROW */ - 501, /* (585) star_func_para_list ::= NK_STAR */ - 501, /* (586) star_func_para_list ::= other_para_list */ - 503, /* (587) other_para_list ::= star_func_para */ - 503, /* (588) other_para_list ::= other_para_list NK_COMMA star_func_para */ - 504, /* (589) star_func_para ::= expr_or_subquery */ - 504, /* (590) star_func_para ::= table_name NK_DOT NK_STAR */ - 499, /* (591) case_when_expression ::= CASE when_then_list case_when_else_opt END */ - 499, /* (592) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ - 505, /* (593) when_then_list ::= when_then_expr */ - 505, /* (594) when_then_list ::= when_then_list when_then_expr */ - 508, /* (595) when_then_expr ::= WHEN common_expression THEN common_expression */ - 506, /* (596) case_when_else_opt ::= */ - 506, /* (597) case_when_else_opt ::= ELSE common_expression */ - 509, /* (598) predicate ::= expr_or_subquery compare_op expr_or_subquery */ - 509, /* (599) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ - 509, /* (600) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ - 509, /* (601) predicate ::= expr_or_subquery IS NULL */ - 509, /* (602) predicate ::= expr_or_subquery IS NOT NULL */ - 509, /* (603) predicate ::= expr_or_subquery in_op in_predicate_value */ - 510, /* (604) compare_op ::= NK_LT */ - 510, /* (605) compare_op ::= NK_GT */ - 510, /* (606) compare_op ::= NK_LE */ - 510, /* (607) compare_op ::= NK_GE */ - 510, /* (608) compare_op ::= NK_NE */ - 510, /* (609) compare_op ::= NK_EQ */ - 510, /* (610) compare_op ::= LIKE */ - 510, /* (611) compare_op ::= NOT LIKE */ - 510, /* (612) compare_op ::= MATCH */ - 510, /* (613) compare_op ::= NMATCH */ - 510, /* (614) compare_op ::= CONTAINS */ - 511, /* (615) in_op ::= IN */ - 511, /* (616) in_op ::= NOT IN */ - 512, /* (617) in_predicate_value ::= NK_LP literal_list NK_RP */ - 513, /* (618) boolean_value_expression ::= boolean_primary */ - 513, /* (619) boolean_value_expression ::= NOT boolean_primary */ - 513, /* (620) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ - 513, /* (621) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ - 514, /* (622) boolean_primary ::= predicate */ - 514, /* (623) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ - 507, /* (624) common_expression ::= expr_or_subquery */ - 507, /* (625) common_expression ::= boolean_value_expression */ - 515, /* (626) from_clause_opt ::= */ - 515, /* (627) from_clause_opt ::= FROM table_reference_list */ - 516, /* (628) table_reference_list ::= table_reference */ - 516, /* (629) table_reference_list ::= table_reference_list NK_COMMA table_reference */ - 517, /* (630) table_reference ::= table_primary */ - 517, /* (631) table_reference ::= joined_table */ - 518, /* (632) table_primary ::= table_name alias_opt */ - 518, /* (633) table_primary ::= db_name NK_DOT table_name alias_opt */ - 518, /* (634) table_primary ::= subquery alias_opt */ - 518, /* (635) table_primary ::= parenthesized_joined_table */ - 520, /* (636) alias_opt ::= */ - 520, /* (637) alias_opt ::= table_alias */ - 520, /* (638) alias_opt ::= AS table_alias */ - 522, /* (639) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - 522, /* (640) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ - 519, /* (641) joined_table ::= table_reference join_type join_subtype JOIN table_reference join_on_clause_opt window_offset_clause_opt jlimit_clause_opt */ - 523, /* (642) join_type ::= */ - 523, /* (643) join_type ::= INNER */ - 523, /* (644) join_type ::= LEFT */ - 523, /* (645) join_type ::= RIGHT */ - 523, /* (646) join_type ::= FULL */ - 524, /* (647) join_subtype ::= */ - 524, /* (648) join_subtype ::= OUTER */ - 524, /* (649) join_subtype ::= SEMI */ - 524, /* (650) join_subtype ::= ANTI */ - 524, /* (651) join_subtype ::= ASOF */ - 524, /* (652) join_subtype ::= WINDOW */ - 525, /* (653) join_on_clause_opt ::= */ - 525, /* (654) join_on_clause_opt ::= ON search_condition */ - 526, /* (655) window_offset_clause_opt ::= */ - 526, /* (656) window_offset_clause_opt ::= WINDOW_OFFSET NK_LP window_offset_literal NK_COMMA window_offset_literal NK_RP */ - 528, /* (657) window_offset_literal ::= NK_VARIABLE */ - 528, /* (658) window_offset_literal ::= NK_MINUS NK_VARIABLE */ - 527, /* (659) jlimit_clause_opt ::= */ - 527, /* (660) jlimit_clause_opt ::= JLIMIT NK_INTEGER */ - 529, /* (661) 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 */ - 530, /* (662) hint_list ::= */ - 530, /* (663) hint_list ::= NK_HINT */ - 532, /* (664) tag_mode_opt ::= */ - 532, /* (665) tag_mode_opt ::= TAGS */ - 531, /* (666) set_quantifier_opt ::= */ - 531, /* (667) set_quantifier_opt ::= DISTINCT */ - 531, /* (668) set_quantifier_opt ::= ALL */ - 533, /* (669) select_list ::= select_item */ - 533, /* (670) select_list ::= select_list NK_COMMA select_item */ - 541, /* (671) select_item ::= NK_STAR */ - 541, /* (672) select_item ::= common_expression */ - 541, /* (673) select_item ::= common_expression column_alias */ - 541, /* (674) select_item ::= common_expression AS column_alias */ - 541, /* (675) select_item ::= table_name NK_DOT NK_STAR */ - 468, /* (676) where_clause_opt ::= */ - 468, /* (677) where_clause_opt ::= WHERE search_condition */ - 534, /* (678) partition_by_clause_opt ::= */ - 534, /* (679) partition_by_clause_opt ::= PARTITION BY partition_list */ - 542, /* (680) partition_list ::= partition_item */ - 542, /* (681) partition_list ::= partition_list NK_COMMA partition_item */ - 543, /* (682) partition_item ::= expr_or_subquery */ - 543, /* (683) partition_item ::= expr_or_subquery column_alias */ - 543, /* (684) partition_item ::= expr_or_subquery AS column_alias */ - 538, /* (685) twindow_clause_opt ::= */ - 538, /* (686) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP */ - 538, /* (687) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ - 538, /* (688) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ - 538, /* (689) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ - 538, /* (690) twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ - 538, /* (691) twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP */ - 538, /* (692) twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ - 461, /* (693) sliding_opt ::= */ - 461, /* (694) sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ - 544, /* (695) interval_sliding_duration_literal ::= NK_VARIABLE */ - 544, /* (696) interval_sliding_duration_literal ::= NK_STRING */ - 544, /* (697) interval_sliding_duration_literal ::= NK_INTEGER */ - 537, /* (698) fill_opt ::= */ - 537, /* (699) fill_opt ::= FILL NK_LP fill_mode NK_RP */ - 537, /* (700) fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ - 537, /* (701) fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ - 545, /* (702) fill_mode ::= NONE */ - 545, /* (703) fill_mode ::= PREV */ - 545, /* (704) fill_mode ::= NULL */ - 545, /* (705) fill_mode ::= NULL_F */ - 545, /* (706) fill_mode ::= LINEAR */ - 545, /* (707) fill_mode ::= NEXT */ - 539, /* (708) group_by_clause_opt ::= */ - 539, /* (709) group_by_clause_opt ::= GROUP BY group_by_list */ - 546, /* (710) group_by_list ::= expr_or_subquery */ - 546, /* (711) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ - 540, /* (712) having_clause_opt ::= */ - 540, /* (713) having_clause_opt ::= HAVING search_condition */ - 535, /* (714) range_opt ::= */ - 535, /* (715) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ - 535, /* (716) range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ - 536, /* (717) every_opt ::= */ - 536, /* (718) every_opt ::= EVERY NK_LP duration_literal NK_RP */ - 547, /* (719) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ - 548, /* (720) query_simple ::= query_specification */ - 548, /* (721) query_simple ::= union_query_expression */ - 552, /* (722) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ - 552, /* (723) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ - 553, /* (724) query_simple_or_subquery ::= query_simple */ - 553, /* (725) query_simple_or_subquery ::= subquery */ - 467, /* (726) query_or_subquery ::= query_expression */ - 467, /* (727) query_or_subquery ::= subquery */ - 549, /* (728) order_by_clause_opt ::= */ - 549, /* (729) order_by_clause_opt ::= ORDER BY sort_specification_list */ - 550, /* (730) slimit_clause_opt ::= */ - 550, /* (731) slimit_clause_opt ::= SLIMIT NK_INTEGER */ - 550, /* (732) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - 550, /* (733) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - 551, /* (734) limit_clause_opt ::= */ - 551, /* (735) limit_clause_opt ::= LIMIT NK_INTEGER */ - 551, /* (736) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ - 551, /* (737) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - 521, /* (738) subquery ::= NK_LP query_expression NK_RP */ - 521, /* (739) subquery ::= NK_LP subquery NK_RP */ - 398, /* (740) search_condition ::= common_expression */ - 554, /* (741) sort_specification_list ::= sort_specification */ - 554, /* (742) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ - 555, /* (743) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ - 556, /* (744) ordering_specification_opt ::= */ - 556, /* (745) ordering_specification_opt ::= ASC */ - 556, /* (746) ordering_specification_opt ::= DESC */ - 557, /* (747) null_ordering_opt ::= */ - 557, /* (748) null_ordering_opt ::= NULLS FIRST */ - 557, /* (749) null_ordering_opt ::= NULLS LAST */ - 427, /* (750) column_options ::= */ - 427, /* (751) column_options ::= column_options PRIMARY KEY */ - 427, /* (752) column_options ::= column_options ENCODE NK_STRING */ - 427, /* (753) column_options ::= column_options COMPRESS NK_STRING */ - 427, /* (754) column_options ::= column_options LEVEL NK_STRING */ + 385, /* (0) cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ + 385, /* (1) cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ + 386, /* (2) account_options ::= */ + 386, /* (3) account_options ::= account_options PPS literal */ + 386, /* (4) account_options ::= account_options TSERIES literal */ + 386, /* (5) account_options ::= account_options STORAGE literal */ + 386, /* (6) account_options ::= account_options STREAMS literal */ + 386, /* (7) account_options ::= account_options QTIME literal */ + 386, /* (8) account_options ::= account_options DBS literal */ + 386, /* (9) account_options ::= account_options USERS literal */ + 386, /* (10) account_options ::= account_options CONNS literal */ + 386, /* (11) account_options ::= account_options STATE literal */ + 387, /* (12) alter_account_options ::= alter_account_option */ + 387, /* (13) alter_account_options ::= alter_account_options alter_account_option */ + 389, /* (14) alter_account_option ::= PASS literal */ + 389, /* (15) alter_account_option ::= PPS literal */ + 389, /* (16) alter_account_option ::= TSERIES literal */ + 389, /* (17) alter_account_option ::= STORAGE literal */ + 389, /* (18) alter_account_option ::= STREAMS literal */ + 389, /* (19) alter_account_option ::= QTIME literal */ + 389, /* (20) alter_account_option ::= DBS literal */ + 389, /* (21) alter_account_option ::= USERS literal */ + 389, /* (22) alter_account_option ::= CONNS literal */ + 389, /* (23) alter_account_option ::= STATE literal */ + 390, /* (24) ip_range_list ::= NK_STRING */ + 390, /* (25) ip_range_list ::= ip_range_list NK_COMMA NK_STRING */ + 391, /* (26) white_list ::= HOST ip_range_list */ + 392, /* (27) white_list_opt ::= */ + 392, /* (28) white_list_opt ::= white_list */ + 393, /* (29) is_import_opt ::= */ + 393, /* (30) is_import_opt ::= IS_IMPORT NK_INTEGER */ + 394, /* (31) is_createdb_opt ::= */ + 394, /* (32) is_createdb_opt ::= CREATEDB NK_INTEGER */ + 385, /* (33) cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt is_createdb_opt is_import_opt white_list_opt */ + 385, /* (34) cmd ::= ALTER USER user_name PASS NK_STRING */ + 385, /* (35) cmd ::= ALTER USER user_name ENABLE NK_INTEGER */ + 385, /* (36) cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */ + 385, /* (37) cmd ::= ALTER USER user_name CREATEDB NK_INTEGER */ + 385, /* (38) cmd ::= ALTER USER user_name ADD white_list */ + 385, /* (39) cmd ::= ALTER USER user_name DROP white_list */ + 385, /* (40) cmd ::= DROP USER user_name */ + 396, /* (41) sysinfo_opt ::= */ + 396, /* (42) sysinfo_opt ::= SYSINFO NK_INTEGER */ + 385, /* (43) cmd ::= GRANT privileges ON priv_level with_opt TO user_name */ + 385, /* (44) cmd ::= REVOKE privileges ON priv_level with_opt FROM user_name */ + 397, /* (45) privileges ::= ALL */ + 397, /* (46) privileges ::= priv_type_list */ + 397, /* (47) privileges ::= SUBSCRIBE */ + 400, /* (48) priv_type_list ::= priv_type */ + 400, /* (49) priv_type_list ::= priv_type_list NK_COMMA priv_type */ + 401, /* (50) priv_type ::= READ */ + 401, /* (51) priv_type ::= WRITE */ + 401, /* (52) priv_type ::= ALTER */ + 398, /* (53) priv_level ::= NK_STAR NK_DOT NK_STAR */ + 398, /* (54) priv_level ::= db_name NK_DOT NK_STAR */ + 398, /* (55) priv_level ::= db_name NK_DOT table_name */ + 398, /* (56) priv_level ::= topic_name */ + 399, /* (57) with_opt ::= */ + 399, /* (58) with_opt ::= WITH search_condition */ + 385, /* (59) cmd ::= CREATE ENCRYPT_KEY NK_STRING */ + 385, /* (60) cmd ::= CREATE DNODE dnode_endpoint */ + 385, /* (61) cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */ + 385, /* (62) cmd ::= DROP DNODE NK_INTEGER force_opt */ + 385, /* (63) cmd ::= DROP DNODE dnode_endpoint force_opt */ + 385, /* (64) cmd ::= DROP DNODE NK_INTEGER unsafe_opt */ + 385, /* (65) cmd ::= DROP DNODE dnode_endpoint unsafe_opt */ + 385, /* (66) cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ + 385, /* (67) cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ + 385, /* (68) cmd ::= ALTER ALL DNODES NK_STRING */ + 385, /* (69) cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ + 385, /* (70) cmd ::= RESTORE DNODE NK_INTEGER */ + 406, /* (71) dnode_endpoint ::= NK_STRING */ + 406, /* (72) dnode_endpoint ::= NK_ID */ + 406, /* (73) dnode_endpoint ::= NK_IPTOKEN */ + 407, /* (74) force_opt ::= */ + 407, /* (75) force_opt ::= FORCE */ + 408, /* (76) unsafe_opt ::= UNSAFE */ + 385, /* (77) cmd ::= ALTER CLUSTER NK_STRING */ + 385, /* (78) cmd ::= ALTER CLUSTER NK_STRING NK_STRING */ + 385, /* (79) cmd ::= ALTER LOCAL NK_STRING */ + 385, /* (80) cmd ::= ALTER LOCAL NK_STRING NK_STRING */ + 385, /* (81) cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ + 385, /* (82) cmd ::= DROP QNODE ON DNODE NK_INTEGER */ + 385, /* (83) cmd ::= RESTORE QNODE ON DNODE NK_INTEGER */ + 385, /* (84) cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ + 385, /* (85) cmd ::= DROP BNODE ON DNODE NK_INTEGER */ + 385, /* (86) cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ + 385, /* (87) cmd ::= DROP SNODE ON DNODE NK_INTEGER */ + 385, /* (88) cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ + 385, /* (89) cmd ::= DROP MNODE ON DNODE NK_INTEGER */ + 385, /* (90) cmd ::= RESTORE MNODE ON DNODE NK_INTEGER */ + 385, /* (91) cmd ::= RESTORE VNODE ON DNODE NK_INTEGER */ + 385, /* (92) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ + 385, /* (93) cmd ::= DROP DATABASE exists_opt db_name */ + 385, /* (94) cmd ::= USE db_name */ + 385, /* (95) cmd ::= ALTER DATABASE db_name alter_db_options */ + 385, /* (96) cmd ::= FLUSH DATABASE db_name */ + 385, /* (97) cmd ::= TRIM DATABASE db_name speed_opt */ + 385, /* (98) cmd ::= S3MIGRATE DATABASE db_name */ + 385, /* (99) cmd ::= COMPACT DATABASE db_name start_opt end_opt */ + 409, /* (100) not_exists_opt ::= IF NOT EXISTS */ + 409, /* (101) not_exists_opt ::= */ + 411, /* (102) exists_opt ::= IF EXISTS */ + 411, /* (103) exists_opt ::= */ + 410, /* (104) db_options ::= */ + 410, /* (105) db_options ::= db_options BUFFER NK_INTEGER */ + 410, /* (106) db_options ::= db_options CACHEMODEL NK_STRING */ + 410, /* (107) db_options ::= db_options CACHESIZE NK_INTEGER */ + 410, /* (108) db_options ::= db_options COMP NK_INTEGER */ + 410, /* (109) db_options ::= db_options DURATION NK_INTEGER */ + 410, /* (110) db_options ::= db_options DURATION NK_VARIABLE */ + 410, /* (111) db_options ::= db_options MAXROWS NK_INTEGER */ + 410, /* (112) db_options ::= db_options MINROWS NK_INTEGER */ + 410, /* (113) db_options ::= db_options KEEP integer_list */ + 410, /* (114) db_options ::= db_options KEEP variable_list */ + 410, /* (115) db_options ::= db_options PAGES NK_INTEGER */ + 410, /* (116) db_options ::= db_options PAGESIZE NK_INTEGER */ + 410, /* (117) db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ + 410, /* (118) db_options ::= db_options PRECISION NK_STRING */ + 410, /* (119) db_options ::= db_options REPLICA NK_INTEGER */ + 410, /* (120) db_options ::= db_options VGROUPS NK_INTEGER */ + 410, /* (121) db_options ::= db_options SINGLE_STABLE NK_INTEGER */ + 410, /* (122) db_options ::= db_options RETENTIONS retention_list */ + 410, /* (123) db_options ::= db_options SCHEMALESS NK_INTEGER */ + 410, /* (124) db_options ::= db_options WAL_LEVEL NK_INTEGER */ + 410, /* (125) db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ + 410, /* (126) db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ + 410, /* (127) db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ + 410, /* (128) db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ + 410, /* (129) db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ + 410, /* (130) db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ + 410, /* (131) db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ + 410, /* (132) db_options ::= db_options STT_TRIGGER NK_INTEGER */ + 410, /* (133) db_options ::= db_options TABLE_PREFIX signed */ + 410, /* (134) db_options ::= db_options TABLE_SUFFIX signed */ + 410, /* (135) db_options ::= db_options S3_CHUNKSIZE NK_INTEGER */ + 410, /* (136) db_options ::= db_options S3_KEEPLOCAL NK_INTEGER */ + 410, /* (137) db_options ::= db_options S3_KEEPLOCAL NK_VARIABLE */ + 410, /* (138) db_options ::= db_options S3_COMPACT NK_INTEGER */ + 410, /* (139) db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER */ + 410, /* (140) db_options ::= db_options ENCRYPT_ALGORITHM NK_STRING */ + 412, /* (141) alter_db_options ::= alter_db_option */ + 412, /* (142) alter_db_options ::= alter_db_options alter_db_option */ + 420, /* (143) alter_db_option ::= BUFFER NK_INTEGER */ + 420, /* (144) alter_db_option ::= CACHEMODEL NK_STRING */ + 420, /* (145) alter_db_option ::= CACHESIZE NK_INTEGER */ + 420, /* (146) alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ + 420, /* (147) alter_db_option ::= KEEP integer_list */ + 420, /* (148) alter_db_option ::= KEEP variable_list */ + 420, /* (149) alter_db_option ::= PAGES NK_INTEGER */ + 420, /* (150) alter_db_option ::= REPLICA NK_INTEGER */ + 420, /* (151) alter_db_option ::= WAL_LEVEL NK_INTEGER */ + 420, /* (152) alter_db_option ::= STT_TRIGGER NK_INTEGER */ + 420, /* (153) alter_db_option ::= MINROWS NK_INTEGER */ + 420, /* (154) alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER */ + 420, /* (155) alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ + 420, /* (156) alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER */ + 420, /* (157) alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ + 420, /* (158) alter_db_option ::= S3_KEEPLOCAL NK_INTEGER */ + 420, /* (159) alter_db_option ::= S3_KEEPLOCAL NK_VARIABLE */ + 420, /* (160) alter_db_option ::= S3_COMPACT NK_INTEGER */ + 420, /* (161) alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER */ + 420, /* (162) alter_db_option ::= ENCRYPT_ALGORITHM NK_STRING */ + 416, /* (163) integer_list ::= NK_INTEGER */ + 416, /* (164) integer_list ::= integer_list NK_COMMA NK_INTEGER */ + 417, /* (165) variable_list ::= NK_VARIABLE */ + 417, /* (166) variable_list ::= variable_list NK_COMMA NK_VARIABLE */ + 418, /* (167) retention_list ::= retention */ + 418, /* (168) retention_list ::= retention_list NK_COMMA retention */ + 421, /* (169) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ + 421, /* (170) retention ::= NK_MINUS NK_COLON NK_VARIABLE */ + 413, /* (171) speed_opt ::= */ + 413, /* (172) speed_opt ::= BWLIMIT NK_INTEGER */ + 414, /* (173) start_opt ::= */ + 414, /* (174) start_opt ::= START WITH NK_INTEGER */ + 414, /* (175) start_opt ::= START WITH NK_STRING */ + 414, /* (176) start_opt ::= START WITH TIMESTAMP NK_STRING */ + 415, /* (177) end_opt ::= */ + 415, /* (178) end_opt ::= END WITH NK_INTEGER */ + 415, /* (179) end_opt ::= END WITH NK_STRING */ + 415, /* (180) end_opt ::= END WITH TIMESTAMP NK_STRING */ + 385, /* (181) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ + 385, /* (182) cmd ::= CREATE TABLE multi_create_clause */ + 385, /* (183) cmd ::= CREATE TABLE not_exists_opt USING full_table_name NK_LP tag_list_opt NK_RP FILE NK_STRING */ + 385, /* (184) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ + 385, /* (185) cmd ::= DROP TABLE multi_drop_clause */ + 385, /* (186) cmd ::= DROP STABLE exists_opt full_table_name */ + 385, /* (187) cmd ::= ALTER TABLE alter_table_clause */ + 385, /* (188) cmd ::= ALTER STABLE alter_table_clause */ + 430, /* (189) alter_table_clause ::= full_table_name alter_table_options */ + 430, /* (190) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name column_options */ + 430, /* (191) alter_table_clause ::= full_table_name DROP COLUMN column_name */ + 430, /* (192) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ + 430, /* (193) alter_table_clause ::= full_table_name MODIFY COLUMN column_name column_options */ + 430, /* (194) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ + 430, /* (195) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ + 430, /* (196) alter_table_clause ::= full_table_name DROP TAG column_name */ + 430, /* (197) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ + 430, /* (198) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ + 430, /* (199) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ tags_literal */ + 426, /* (200) multi_create_clause ::= create_subtable_clause */ + 426, /* (201) multi_create_clause ::= multi_create_clause create_subtable_clause */ + 436, /* (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 */ + 429, /* (203) multi_drop_clause ::= drop_table_clause */ + 429, /* (204) multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */ + 439, /* (205) drop_table_clause ::= exists_opt full_table_name */ + 437, /* (206) specific_cols_opt ::= */ + 437, /* (207) specific_cols_opt ::= NK_LP col_name_list NK_RP */ + 422, /* (208) full_table_name ::= table_name */ + 422, /* (209) full_table_name ::= db_name NK_DOT table_name */ + 441, /* (210) tag_def_list ::= tag_def */ + 441, /* (211) tag_def_list ::= tag_def_list NK_COMMA tag_def */ + 442, /* (212) tag_def ::= column_name type_name */ + 423, /* (213) column_def_list ::= column_def */ + 423, /* (214) column_def_list ::= column_def_list NK_COMMA column_def */ + 443, /* (215) column_def ::= column_name type_name column_options */ + 433, /* (216) type_name ::= BOOL */ + 433, /* (217) type_name ::= TINYINT */ + 433, /* (218) type_name ::= SMALLINT */ + 433, /* (219) type_name ::= INT */ + 433, /* (220) type_name ::= INTEGER */ + 433, /* (221) type_name ::= BIGINT */ + 433, /* (222) type_name ::= FLOAT */ + 433, /* (223) type_name ::= DOUBLE */ + 433, /* (224) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ + 433, /* (225) type_name ::= TIMESTAMP */ + 433, /* (226) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ + 433, /* (227) type_name ::= TINYINT UNSIGNED */ + 433, /* (228) type_name ::= SMALLINT UNSIGNED */ + 433, /* (229) type_name ::= INT UNSIGNED */ + 433, /* (230) type_name ::= BIGINT UNSIGNED */ + 433, /* (231) type_name ::= JSON */ + 433, /* (232) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ + 433, /* (233) type_name ::= MEDIUMBLOB */ + 433, /* (234) type_name ::= BLOB */ + 433, /* (235) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ + 433, /* (236) type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP */ + 433, /* (237) type_name ::= DECIMAL */ + 433, /* (238) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ + 433, /* (239) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ + 444, /* (240) type_name_default_len ::= BINARY */ + 444, /* (241) type_name_default_len ::= NCHAR */ + 444, /* (242) type_name_default_len ::= VARCHAR */ + 444, /* (243) type_name_default_len ::= VARBINARY */ + 424, /* (244) tags_def_opt ::= */ + 424, /* (245) tags_def_opt ::= tags_def */ + 428, /* (246) tags_def ::= TAGS NK_LP tag_def_list NK_RP */ + 425, /* (247) table_options ::= */ + 425, /* (248) table_options ::= table_options COMMENT NK_STRING */ + 425, /* (249) table_options ::= table_options MAX_DELAY duration_list */ + 425, /* (250) table_options ::= table_options WATERMARK duration_list */ + 425, /* (251) table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ + 425, /* (252) table_options ::= table_options TTL NK_INTEGER */ + 425, /* (253) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ + 425, /* (254) table_options ::= table_options DELETE_MARK duration_list */ + 431, /* (255) alter_table_options ::= alter_table_option */ + 431, /* (256) alter_table_options ::= alter_table_options alter_table_option */ + 447, /* (257) alter_table_option ::= COMMENT NK_STRING */ + 447, /* (258) alter_table_option ::= TTL NK_INTEGER */ + 445, /* (259) duration_list ::= duration_literal */ + 445, /* (260) duration_list ::= duration_list NK_COMMA duration_literal */ + 446, /* (261) rollup_func_list ::= rollup_func_name */ + 446, /* (262) rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ + 449, /* (263) rollup_func_name ::= function_name */ + 449, /* (264) rollup_func_name ::= FIRST */ + 449, /* (265) rollup_func_name ::= LAST */ + 440, /* (266) col_name_list ::= col_name */ + 440, /* (267) col_name_list ::= col_name_list NK_COMMA col_name */ + 451, /* (268) col_name ::= column_name */ + 385, /* (269) cmd ::= SHOW DNODES */ + 385, /* (270) cmd ::= SHOW USERS */ + 385, /* (271) cmd ::= SHOW USERS FULL */ + 385, /* (272) cmd ::= SHOW USER PRIVILEGES */ + 385, /* (273) cmd ::= SHOW db_kind_opt DATABASES */ + 385, /* (274) cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt */ + 385, /* (275) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ + 385, /* (276) cmd ::= SHOW db_name_cond_opt VGROUPS */ + 385, /* (277) cmd ::= SHOW MNODES */ + 385, /* (278) cmd ::= SHOW QNODES */ + 385, /* (279) cmd ::= SHOW ARBGROUPS */ + 385, /* (280) cmd ::= SHOW FUNCTIONS */ + 385, /* (281) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ + 385, /* (282) cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name */ + 385, /* (283) cmd ::= SHOW STREAMS */ + 385, /* (284) cmd ::= SHOW ACCOUNTS */ + 385, /* (285) cmd ::= SHOW APPS */ + 385, /* (286) cmd ::= SHOW CONNECTIONS */ + 385, /* (287) cmd ::= SHOW LICENCES */ + 385, /* (288) cmd ::= SHOW GRANTS */ + 385, /* (289) cmd ::= SHOW GRANTS FULL */ + 385, /* (290) cmd ::= SHOW GRANTS LOGS */ + 385, /* (291) cmd ::= SHOW CLUSTER MACHINES */ + 385, /* (292) cmd ::= SHOW CREATE DATABASE db_name */ + 385, /* (293) cmd ::= SHOW CREATE TABLE full_table_name */ + 385, /* (294) cmd ::= SHOW CREATE STABLE full_table_name */ + 385, /* (295) cmd ::= SHOW ENCRYPTIONS */ + 385, /* (296) cmd ::= SHOW QUERIES */ + 385, /* (297) cmd ::= SHOW SCORES */ + 385, /* (298) cmd ::= SHOW TOPICS */ + 385, /* (299) cmd ::= SHOW VARIABLES */ + 385, /* (300) cmd ::= SHOW CLUSTER VARIABLES */ + 385, /* (301) cmd ::= SHOW LOCAL VARIABLES */ + 385, /* (302) cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ + 385, /* (303) cmd ::= SHOW BNODES */ + 385, /* (304) cmd ::= SHOW SNODES */ + 385, /* (305) cmd ::= SHOW CLUSTER */ + 385, /* (306) cmd ::= SHOW TRANSACTIONS */ + 385, /* (307) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ + 385, /* (308) cmd ::= SHOW CONSUMERS */ + 385, /* (309) cmd ::= SHOW SUBSCRIPTIONS */ + 385, /* (310) cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ + 385, /* (311) cmd ::= SHOW TAGS FROM db_name NK_DOT table_name */ + 385, /* (312) cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ + 385, /* (313) cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name */ + 385, /* (314) cmd ::= SHOW VNODES ON DNODE NK_INTEGER */ + 385, /* (315) cmd ::= SHOW VNODES */ + 385, /* (316) cmd ::= SHOW db_name_cond_opt ALIVE */ + 385, /* (317) cmd ::= SHOW CLUSTER ALIVE */ + 385, /* (318) cmd ::= SHOW db_name_cond_opt VIEWS like_pattern_opt */ + 385, /* (319) cmd ::= SHOW CREATE VIEW full_table_name */ + 385, /* (320) cmd ::= SHOW COMPACTS */ + 385, /* (321) cmd ::= SHOW COMPACT NK_INTEGER */ + 453, /* (322) table_kind_db_name_cond_opt ::= */ + 453, /* (323) table_kind_db_name_cond_opt ::= table_kind */ + 453, /* (324) table_kind_db_name_cond_opt ::= db_name NK_DOT */ + 453, /* (325) table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT */ + 458, /* (326) table_kind ::= NORMAL */ + 458, /* (327) table_kind ::= CHILD */ + 455, /* (328) db_name_cond_opt ::= */ + 455, /* (329) db_name_cond_opt ::= db_name NK_DOT */ + 454, /* (330) like_pattern_opt ::= */ + 454, /* (331) like_pattern_opt ::= LIKE NK_STRING */ + 456, /* (332) table_name_cond ::= table_name */ + 457, /* (333) from_db_opt ::= */ + 457, /* (334) from_db_opt ::= FROM db_name */ + 427, /* (335) tag_list_opt ::= */ + 427, /* (336) tag_list_opt ::= tag_item */ + 427, /* (337) tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ + 459, /* (338) tag_item ::= TBNAME */ + 459, /* (339) tag_item ::= QTAGS */ + 459, /* (340) tag_item ::= column_name */ + 459, /* (341) tag_item ::= column_name column_alias */ + 459, /* (342) tag_item ::= column_name AS column_alias */ + 452, /* (343) db_kind_opt ::= */ + 452, /* (344) db_kind_opt ::= USER */ + 452, /* (345) db_kind_opt ::= SYSTEM */ + 385, /* (346) cmd ::= CREATE TSMA not_exists_opt tsma_name ON full_table_name tsma_func_list INTERVAL NK_LP duration_literal NK_RP */ + 385, /* (347) cmd ::= CREATE RECURSIVE TSMA not_exists_opt tsma_name ON full_table_name INTERVAL NK_LP duration_literal NK_RP */ + 385, /* (348) cmd ::= DROP TSMA exists_opt full_tsma_name */ + 385, /* (349) cmd ::= SHOW db_name_cond_opt TSMAS */ + 463, /* (350) full_tsma_name ::= tsma_name */ + 463, /* (351) full_tsma_name ::= db_name NK_DOT tsma_name */ + 462, /* (352) tsma_func_list ::= FUNCTION NK_LP func_list NK_RP */ + 385, /* (353) cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options */ + 385, /* (354) cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP */ + 385, /* (355) cmd ::= DROP INDEX exists_opt full_index_name */ + 466, /* (356) full_index_name ::= index_name */ + 466, /* (357) full_index_name ::= db_name NK_DOT index_name */ + 465, /* (358) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ + 465, /* (359) 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 */ + 464, /* (360) func_list ::= func */ + 464, /* (361) func_list ::= func_list NK_COMMA func */ + 470, /* (362) func ::= sma_func_name NK_LP expression_list NK_RP */ + 471, /* (363) sma_func_name ::= function_name */ + 471, /* (364) sma_func_name ::= COUNT */ + 471, /* (365) sma_func_name ::= FIRST */ + 471, /* (366) sma_func_name ::= LAST */ + 471, /* (367) sma_func_name ::= LAST_ROW */ + 469, /* (368) sma_stream_opt ::= */ + 469, /* (369) sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ + 469, /* (370) sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ + 469, /* (371) sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ + 473, /* (372) with_meta ::= AS */ + 473, /* (373) with_meta ::= WITH META AS */ + 473, /* (374) with_meta ::= ONLY META AS */ + 385, /* (375) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ + 385, /* (376) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */ + 385, /* (377) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */ + 385, /* (378) cmd ::= DROP TOPIC exists_opt topic_name */ + 385, /* (379) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ + 385, /* (380) cmd ::= DESC full_table_name */ + 385, /* (381) cmd ::= DESCRIBE full_table_name */ + 385, /* (382) cmd ::= RESET QUERY CACHE */ + 385, /* (383) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ + 385, /* (384) cmd ::= EXPLAIN analyze_opt explain_options insert_query */ + 477, /* (385) analyze_opt ::= */ + 477, /* (386) analyze_opt ::= ANALYZE */ + 478, /* (387) explain_options ::= */ + 478, /* (388) explain_options ::= explain_options VERBOSE NK_BOOL */ + 478, /* (389) explain_options ::= explain_options RATIO NK_FLOAT */ + 385, /* (390) cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt */ + 385, /* (391) cmd ::= DROP FUNCTION exists_opt function_name */ + 481, /* (392) agg_func_opt ::= */ + 481, /* (393) agg_func_opt ::= AGGREGATE */ + 482, /* (394) bufsize_opt ::= */ + 482, /* (395) bufsize_opt ::= BUFSIZE NK_INTEGER */ + 483, /* (396) language_opt ::= */ + 483, /* (397) language_opt ::= LANGUAGE NK_STRING */ + 480, /* (398) or_replace_opt ::= */ + 480, /* (399) or_replace_opt ::= OR REPLACE */ + 385, /* (400) cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery */ + 385, /* (401) cmd ::= DROP VIEW exists_opt full_view_name */ + 484, /* (402) full_view_name ::= view_name */ + 484, /* (403) full_view_name ::= db_name NK_DOT view_name */ + 385, /* (404) 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 */ + 385, /* (405) cmd ::= DROP STREAM exists_opt stream_name */ + 385, /* (406) cmd ::= PAUSE STREAM exists_opt stream_name */ + 385, /* (407) cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */ + 488, /* (408) col_list_opt ::= */ + 488, /* (409) col_list_opt ::= NK_LP column_stream_def_list NK_RP */ + 492, /* (410) column_stream_def_list ::= column_stream_def */ + 492, /* (411) column_stream_def_list ::= column_stream_def_list NK_COMMA column_stream_def */ + 493, /* (412) column_stream_def ::= column_name stream_col_options */ + 494, /* (413) stream_col_options ::= */ + 494, /* (414) stream_col_options ::= stream_col_options PRIMARY KEY */ + 489, /* (415) tag_def_or_ref_opt ::= */ + 489, /* (416) tag_def_or_ref_opt ::= tags_def */ + 489, /* (417) tag_def_or_ref_opt ::= TAGS NK_LP column_stream_def_list NK_RP */ + 487, /* (418) stream_options ::= */ + 487, /* (419) stream_options ::= stream_options TRIGGER AT_ONCE */ + 487, /* (420) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ + 487, /* (421) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ + 487, /* (422) stream_options ::= stream_options WATERMARK duration_literal */ + 487, /* (423) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ + 487, /* (424) stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ + 487, /* (425) stream_options ::= stream_options DELETE_MARK duration_literal */ + 487, /* (426) stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ + 490, /* (427) subtable_opt ::= */ + 490, /* (428) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ + 491, /* (429) ignore_opt ::= */ + 491, /* (430) ignore_opt ::= IGNORE UNTREATED */ + 385, /* (431) cmd ::= KILL CONNECTION NK_INTEGER */ + 385, /* (432) cmd ::= KILL QUERY NK_STRING */ + 385, /* (433) cmd ::= KILL TRANSACTION NK_INTEGER */ + 385, /* (434) cmd ::= KILL COMPACT NK_INTEGER */ + 385, /* (435) cmd ::= BALANCE VGROUP */ + 385, /* (436) cmd ::= BALANCE VGROUP LEADER on_vgroup_id */ + 385, /* (437) cmd ::= BALANCE VGROUP LEADER DATABASE db_name */ + 385, /* (438) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ + 385, /* (439) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ + 385, /* (440) cmd ::= SPLIT VGROUP NK_INTEGER */ + 496, /* (441) on_vgroup_id ::= */ + 496, /* (442) on_vgroup_id ::= ON NK_INTEGER */ + 497, /* (443) dnode_list ::= DNODE NK_INTEGER */ + 497, /* (444) dnode_list ::= dnode_list DNODE NK_INTEGER */ + 385, /* (445) cmd ::= DELETE FROM full_table_name where_clause_opt */ + 385, /* (446) cmd ::= query_or_subquery */ + 385, /* (447) cmd ::= insert_query */ + 479, /* (448) insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ + 479, /* (449) insert_query ::= INSERT INTO full_table_name query_or_subquery */ + 435, /* (450) tags_literal ::= NK_INTEGER */ + 435, /* (451) tags_literal ::= NK_INTEGER NK_PLUS duration_literal */ + 435, /* (452) tags_literal ::= NK_INTEGER NK_MINUS duration_literal */ + 435, /* (453) tags_literal ::= NK_PLUS NK_INTEGER */ + 435, /* (454) tags_literal ::= NK_PLUS NK_INTEGER NK_PLUS duration_literal */ + 435, /* (455) tags_literal ::= NK_PLUS NK_INTEGER NK_MINUS duration_literal */ + 435, /* (456) tags_literal ::= NK_MINUS NK_INTEGER */ + 435, /* (457) tags_literal ::= NK_MINUS NK_INTEGER NK_PLUS duration_literal */ + 435, /* (458) tags_literal ::= NK_MINUS NK_INTEGER NK_MINUS duration_literal */ + 435, /* (459) tags_literal ::= NK_FLOAT */ + 435, /* (460) tags_literal ::= NK_PLUS NK_FLOAT */ + 435, /* (461) tags_literal ::= NK_MINUS NK_FLOAT */ + 435, /* (462) tags_literal ::= NK_BIN */ + 435, /* (463) tags_literal ::= NK_BIN NK_PLUS duration_literal */ + 435, /* (464) tags_literal ::= NK_BIN NK_MINUS duration_literal */ + 435, /* (465) tags_literal ::= NK_PLUS NK_BIN */ + 435, /* (466) tags_literal ::= NK_PLUS NK_BIN NK_PLUS duration_literal */ + 435, /* (467) tags_literal ::= NK_PLUS NK_BIN NK_MINUS duration_literal */ + 435, /* (468) tags_literal ::= NK_MINUS NK_BIN */ + 435, /* (469) tags_literal ::= NK_MINUS NK_BIN NK_PLUS duration_literal */ + 435, /* (470) tags_literal ::= NK_MINUS NK_BIN NK_MINUS duration_literal */ + 435, /* (471) tags_literal ::= NK_HEX */ + 435, /* (472) tags_literal ::= NK_HEX NK_PLUS duration_literal */ + 435, /* (473) tags_literal ::= NK_HEX NK_MINUS duration_literal */ + 435, /* (474) tags_literal ::= NK_PLUS NK_HEX */ + 435, /* (475) tags_literal ::= NK_PLUS NK_HEX NK_PLUS duration_literal */ + 435, /* (476) tags_literal ::= NK_PLUS NK_HEX NK_MINUS duration_literal */ + 435, /* (477) tags_literal ::= NK_MINUS NK_HEX */ + 435, /* (478) tags_literal ::= NK_MINUS NK_HEX NK_PLUS duration_literal */ + 435, /* (479) tags_literal ::= NK_MINUS NK_HEX NK_MINUS duration_literal */ + 435, /* (480) tags_literal ::= NK_STRING */ + 435, /* (481) tags_literal ::= NK_STRING NK_PLUS duration_literal */ + 435, /* (482) tags_literal ::= NK_STRING NK_MINUS duration_literal */ + 435, /* (483) tags_literal ::= NK_BOOL */ + 435, /* (484) tags_literal ::= NULL */ + 435, /* (485) tags_literal ::= literal_func */ + 435, /* (486) tags_literal ::= literal_func NK_PLUS duration_literal */ + 435, /* (487) tags_literal ::= literal_func NK_MINUS duration_literal */ + 438, /* (488) tags_literal_list ::= tags_literal */ + 438, /* (489) tags_literal_list ::= tags_literal_list NK_COMMA tags_literal */ + 388, /* (490) literal ::= NK_INTEGER */ + 388, /* (491) literal ::= NK_FLOAT */ + 388, /* (492) literal ::= NK_STRING */ + 388, /* (493) literal ::= NK_BOOL */ + 388, /* (494) literal ::= TIMESTAMP NK_STRING */ + 388, /* (495) literal ::= duration_literal */ + 388, /* (496) literal ::= NULL */ + 388, /* (497) literal ::= NK_QUESTION */ + 448, /* (498) duration_literal ::= NK_VARIABLE */ + 419, /* (499) signed ::= NK_INTEGER */ + 419, /* (500) signed ::= NK_PLUS NK_INTEGER */ + 419, /* (501) signed ::= NK_MINUS NK_INTEGER */ + 419, /* (502) signed ::= NK_FLOAT */ + 419, /* (503) signed ::= NK_PLUS NK_FLOAT */ + 419, /* (504) signed ::= NK_MINUS NK_FLOAT */ + 499, /* (505) signed_literal ::= signed */ + 499, /* (506) signed_literal ::= NK_STRING */ + 499, /* (507) signed_literal ::= NK_BOOL */ + 499, /* (508) signed_literal ::= TIMESTAMP NK_STRING */ + 499, /* (509) signed_literal ::= duration_literal */ + 499, /* (510) signed_literal ::= NULL */ + 499, /* (511) signed_literal ::= literal_func */ + 499, /* (512) signed_literal ::= NK_QUESTION */ + 500, /* (513) literal_list ::= signed_literal */ + 500, /* (514) literal_list ::= literal_list NK_COMMA signed_literal */ + 402, /* (515) db_name ::= NK_ID */ + 403, /* (516) table_name ::= NK_ID */ + 432, /* (517) column_name ::= NK_ID */ + 450, /* (518) function_name ::= NK_ID */ + 485, /* (519) view_name ::= NK_ID */ + 501, /* (520) table_alias ::= NK_ID */ + 460, /* (521) column_alias ::= NK_ID */ + 460, /* (522) column_alias ::= NK_ALIAS */ + 395, /* (523) user_name ::= NK_ID */ + 404, /* (524) topic_name ::= NK_ID */ + 486, /* (525) stream_name ::= NK_ID */ + 476, /* (526) cgroup_name ::= NK_ID */ + 467, /* (527) index_name ::= NK_ID */ + 461, /* (528) tsma_name ::= NK_ID */ + 502, /* (529) expr_or_subquery ::= expression */ + 495, /* (530) expression ::= literal */ + 495, /* (531) expression ::= pseudo_column */ + 495, /* (532) expression ::= column_reference */ + 495, /* (533) expression ::= function_expression */ + 495, /* (534) expression ::= case_when_expression */ + 495, /* (535) expression ::= NK_LP expression NK_RP */ + 495, /* (536) expression ::= NK_PLUS expr_or_subquery */ + 495, /* (537) expression ::= NK_MINUS expr_or_subquery */ + 495, /* (538) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ + 495, /* (539) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ + 495, /* (540) expression ::= expr_or_subquery NK_STAR expr_or_subquery */ + 495, /* (541) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ + 495, /* (542) expression ::= expr_or_subquery NK_REM expr_or_subquery */ + 495, /* (543) expression ::= column_reference NK_ARROW NK_STRING */ + 495, /* (544) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ + 495, /* (545) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ + 472, /* (546) expression_list ::= expr_or_subquery */ + 472, /* (547) expression_list ::= expression_list NK_COMMA expr_or_subquery */ + 504, /* (548) column_reference ::= column_name */ + 504, /* (549) column_reference ::= table_name NK_DOT column_name */ + 504, /* (550) column_reference ::= NK_ALIAS */ + 504, /* (551) column_reference ::= table_name NK_DOT NK_ALIAS */ + 503, /* (552) pseudo_column ::= ROWTS */ + 503, /* (553) pseudo_column ::= TBNAME */ + 503, /* (554) pseudo_column ::= table_name NK_DOT TBNAME */ + 503, /* (555) pseudo_column ::= QSTART */ + 503, /* (556) pseudo_column ::= QEND */ + 503, /* (557) pseudo_column ::= QDURATION */ + 503, /* (558) pseudo_column ::= WSTART */ + 503, /* (559) pseudo_column ::= WEND */ + 503, /* (560) pseudo_column ::= WDURATION */ + 503, /* (561) pseudo_column ::= IROWTS */ + 503, /* (562) pseudo_column ::= ISFILLED */ + 503, /* (563) pseudo_column ::= QTAGS */ + 505, /* (564) function_expression ::= function_name NK_LP expression_list NK_RP */ + 505, /* (565) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ + 505, /* (566) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ + 505, /* (567) function_expression ::= CAST NK_LP expr_or_subquery AS type_name_default_len NK_RP */ + 505, /* (568) function_expression ::= POSITION NK_LP expr_or_subquery IN expr_or_subquery NK_RP */ + 505, /* (569) function_expression ::= TRIM NK_LP expr_or_subquery NK_RP */ + 505, /* (570) function_expression ::= TRIM NK_LP trim_specification_type FROM expr_or_subquery NK_RP */ + 505, /* (571) function_expression ::= TRIM NK_LP trim_specification_type expr_or_subquery FROM expr_or_subquery NK_RP */ + 505, /* (572) function_expression ::= substr_func NK_LP expression_list NK_RP */ + 505, /* (573) function_expression ::= substr_func NK_LP expr_or_subquery FROM expr_or_subquery NK_RP */ + 505, /* (574) function_expression ::= substr_func NK_LP expr_or_subquery FROM expr_or_subquery FOR expr_or_subquery NK_RP */ + 505, /* (575) function_expression ::= REPLACE NK_LP expression_list NK_RP */ + 505, /* (576) function_expression ::= literal_func */ + 498, /* (577) literal_func ::= noarg_func NK_LP NK_RP */ + 498, /* (578) literal_func ::= NOW */ + 498, /* (579) literal_func ::= TODAY */ + 510, /* (580) substr_func ::= SUBSTR */ + 510, /* (581) substr_func ::= SUBSTRING */ + 509, /* (582) trim_specification_type ::= */ + 509, /* (583) trim_specification_type ::= BOTH */ + 509, /* (584) trim_specification_type ::= TRAILING */ + 509, /* (585) trim_specification_type ::= LEADING */ + 511, /* (586) noarg_func ::= NOW */ + 511, /* (587) noarg_func ::= TODAY */ + 511, /* (588) noarg_func ::= TIMEZONE */ + 511, /* (589) noarg_func ::= DATABASE */ + 511, /* (590) noarg_func ::= CLIENT_VERSION */ + 511, /* (591) noarg_func ::= SERVER_VERSION */ + 511, /* (592) noarg_func ::= SERVER_STATUS */ + 511, /* (593) noarg_func ::= CURRENT_USER */ + 511, /* (594) noarg_func ::= USER */ + 511, /* (595) noarg_func ::= PI */ + 507, /* (596) star_func ::= COUNT */ + 507, /* (597) star_func ::= FIRST */ + 507, /* (598) star_func ::= LAST */ + 507, /* (599) star_func ::= LAST_ROW */ + 508, /* (600) star_func_para_list ::= NK_STAR */ + 508, /* (601) star_func_para_list ::= other_para_list */ + 512, /* (602) other_para_list ::= star_func_para */ + 512, /* (603) other_para_list ::= other_para_list NK_COMMA star_func_para */ + 513, /* (604) star_func_para ::= expr_or_subquery */ + 513, /* (605) star_func_para ::= table_name NK_DOT NK_STAR */ + 506, /* (606) case_when_expression ::= CASE when_then_list case_when_else_opt END */ + 506, /* (607) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ + 514, /* (608) when_then_list ::= when_then_expr */ + 514, /* (609) when_then_list ::= when_then_list when_then_expr */ + 517, /* (610) when_then_expr ::= WHEN common_expression THEN common_expression */ + 515, /* (611) case_when_else_opt ::= */ + 515, /* (612) case_when_else_opt ::= ELSE common_expression */ + 518, /* (613) predicate ::= expr_or_subquery compare_op expr_or_subquery */ + 518, /* (614) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ + 518, /* (615) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ + 518, /* (616) predicate ::= expr_or_subquery IS NULL */ + 518, /* (617) predicate ::= expr_or_subquery IS NOT NULL */ + 518, /* (618) predicate ::= expr_or_subquery in_op in_predicate_value */ + 519, /* (619) compare_op ::= NK_LT */ + 519, /* (620) compare_op ::= NK_GT */ + 519, /* (621) compare_op ::= NK_LE */ + 519, /* (622) compare_op ::= NK_GE */ + 519, /* (623) compare_op ::= NK_NE */ + 519, /* (624) compare_op ::= NK_EQ */ + 519, /* (625) compare_op ::= LIKE */ + 519, /* (626) compare_op ::= NOT LIKE */ + 519, /* (627) compare_op ::= MATCH */ + 519, /* (628) compare_op ::= NMATCH */ + 519, /* (629) compare_op ::= CONTAINS */ + 520, /* (630) in_op ::= IN */ + 520, /* (631) in_op ::= NOT IN */ + 521, /* (632) in_predicate_value ::= NK_LP literal_list NK_RP */ + 522, /* (633) boolean_value_expression ::= boolean_primary */ + 522, /* (634) boolean_value_expression ::= NOT boolean_primary */ + 522, /* (635) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + 522, /* (636) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + 523, /* (637) boolean_primary ::= predicate */ + 523, /* (638) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ + 516, /* (639) common_expression ::= expr_or_subquery */ + 516, /* (640) common_expression ::= boolean_value_expression */ + 524, /* (641) from_clause_opt ::= */ + 524, /* (642) from_clause_opt ::= FROM table_reference_list */ + 525, /* (643) table_reference_list ::= table_reference */ + 525, /* (644) table_reference_list ::= table_reference_list NK_COMMA table_reference */ + 526, /* (645) table_reference ::= table_primary */ + 526, /* (646) table_reference ::= joined_table */ + 527, /* (647) table_primary ::= table_name alias_opt */ + 527, /* (648) table_primary ::= db_name NK_DOT table_name alias_opt */ + 527, /* (649) table_primary ::= subquery alias_opt */ + 527, /* (650) table_primary ::= parenthesized_joined_table */ + 529, /* (651) alias_opt ::= */ + 529, /* (652) alias_opt ::= table_alias */ + 529, /* (653) alias_opt ::= AS table_alias */ + 531, /* (654) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + 531, /* (655) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ + 528, /* (656) joined_table ::= table_reference join_type join_subtype JOIN table_reference join_on_clause_opt window_offset_clause_opt jlimit_clause_opt */ + 532, /* (657) join_type ::= */ + 532, /* (658) join_type ::= INNER */ + 532, /* (659) join_type ::= LEFT */ + 532, /* (660) join_type ::= RIGHT */ + 532, /* (661) join_type ::= FULL */ + 533, /* (662) join_subtype ::= */ + 533, /* (663) join_subtype ::= OUTER */ + 533, /* (664) join_subtype ::= SEMI */ + 533, /* (665) join_subtype ::= ANTI */ + 533, /* (666) join_subtype ::= ASOF */ + 533, /* (667) join_subtype ::= WINDOW */ + 534, /* (668) join_on_clause_opt ::= */ + 534, /* (669) join_on_clause_opt ::= ON search_condition */ + 535, /* (670) window_offset_clause_opt ::= */ + 535, /* (671) window_offset_clause_opt ::= WINDOW_OFFSET NK_LP window_offset_literal NK_COMMA window_offset_literal NK_RP */ + 537, /* (672) window_offset_literal ::= NK_VARIABLE */ + 537, /* (673) window_offset_literal ::= NK_MINUS NK_VARIABLE */ + 536, /* (674) jlimit_clause_opt ::= */ + 536, /* (675) jlimit_clause_opt ::= JLIMIT NK_INTEGER */ + 538, /* (676) 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, /* (677) hint_list ::= */ + 539, /* (678) hint_list ::= NK_HINT */ + 541, /* (679) tag_mode_opt ::= */ + 541, /* (680) tag_mode_opt ::= TAGS */ + 540, /* (681) set_quantifier_opt ::= */ + 540, /* (682) set_quantifier_opt ::= DISTINCT */ + 540, /* (683) set_quantifier_opt ::= ALL */ + 542, /* (684) select_list ::= select_item */ + 542, /* (685) select_list ::= select_list NK_COMMA select_item */ + 550, /* (686) select_item ::= NK_STAR */ + 550, /* (687) select_item ::= common_expression */ + 550, /* (688) select_item ::= common_expression column_alias */ + 550, /* (689) select_item ::= common_expression AS column_alias */ + 550, /* (690) select_item ::= table_name NK_DOT NK_STAR */ + 475, /* (691) where_clause_opt ::= */ + 475, /* (692) where_clause_opt ::= WHERE search_condition */ + 543, /* (693) partition_by_clause_opt ::= */ + 543, /* (694) partition_by_clause_opt ::= PARTITION BY partition_list */ + 551, /* (695) partition_list ::= partition_item */ + 551, /* (696) partition_list ::= partition_list NK_COMMA partition_item */ + 552, /* (697) partition_item ::= expr_or_subquery */ + 552, /* (698) partition_item ::= expr_or_subquery column_alias */ + 552, /* (699) partition_item ::= expr_or_subquery AS column_alias */ + 547, /* (700) twindow_clause_opt ::= */ + 547, /* (701) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP */ + 547, /* (702) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ + 547, /* (703) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ + 547, /* (704) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ + 547, /* (705) twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ + 547, /* (706) twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP */ + 547, /* (707) twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ + 468, /* (708) sliding_opt ::= */ + 468, /* (709) sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ + 553, /* (710) interval_sliding_duration_literal ::= NK_VARIABLE */ + 553, /* (711) interval_sliding_duration_literal ::= NK_STRING */ + 553, /* (712) interval_sliding_duration_literal ::= NK_INTEGER */ + 546, /* (713) fill_opt ::= */ + 546, /* (714) fill_opt ::= FILL NK_LP fill_mode NK_RP */ + 546, /* (715) fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ + 546, /* (716) fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ + 554, /* (717) fill_mode ::= NONE */ + 554, /* (718) fill_mode ::= PREV */ + 554, /* (719) fill_mode ::= NULL */ + 554, /* (720) fill_mode ::= NULL_F */ + 554, /* (721) fill_mode ::= LINEAR */ + 554, /* (722) fill_mode ::= NEXT */ + 548, /* (723) group_by_clause_opt ::= */ + 548, /* (724) group_by_clause_opt ::= GROUP BY group_by_list */ + 555, /* (725) group_by_list ::= expr_or_subquery */ + 555, /* (726) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ + 549, /* (727) having_clause_opt ::= */ + 549, /* (728) having_clause_opt ::= HAVING search_condition */ + 544, /* (729) range_opt ::= */ + 544, /* (730) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ + 544, /* (731) range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ + 545, /* (732) every_opt ::= */ + 545, /* (733) every_opt ::= EVERY NK_LP duration_literal NK_RP */ + 556, /* (734) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ + 557, /* (735) query_simple ::= query_specification */ + 557, /* (736) query_simple ::= union_query_expression */ + 561, /* (737) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ + 561, /* (738) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ + 562, /* (739) query_simple_or_subquery ::= query_simple */ + 562, /* (740) query_simple_or_subquery ::= subquery */ + 474, /* (741) query_or_subquery ::= query_expression */ + 474, /* (742) query_or_subquery ::= subquery */ + 558, /* (743) order_by_clause_opt ::= */ + 558, /* (744) order_by_clause_opt ::= ORDER BY sort_specification_list */ + 559, /* (745) slimit_clause_opt ::= */ + 559, /* (746) slimit_clause_opt ::= SLIMIT NK_INTEGER */ + 559, /* (747) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + 559, /* (748) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + 560, /* (749) limit_clause_opt ::= */ + 560, /* (750) limit_clause_opt ::= LIMIT NK_INTEGER */ + 560, /* (751) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ + 560, /* (752) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + 530, /* (753) subquery ::= NK_LP query_expression NK_RP */ + 530, /* (754) subquery ::= NK_LP subquery NK_RP */ + 405, /* (755) search_condition ::= common_expression */ + 563, /* (756) sort_specification_list ::= sort_specification */ + 563, /* (757) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ + 564, /* (758) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ + 565, /* (759) ordering_specification_opt ::= */ + 565, /* (760) ordering_specification_opt ::= ASC */ + 565, /* (761) ordering_specification_opt ::= DESC */ + 566, /* (762) null_ordering_opt ::= */ + 566, /* (763) null_ordering_opt ::= NULLS FIRST */ + 566, /* (764) null_ordering_opt ::= NULLS LAST */ + 434, /* (765) column_options ::= */ + 434, /* (766) column_options ::= column_options PRIMARY KEY */ + 434, /* (767) column_options ::= column_options ENCODE NK_STRING */ + 434, /* (768) column_options ::= column_options COMPRESS NK_STRING */ + 434, /* (769) column_options ::= column_options LEVEL NK_STRING */ }; /* For rule J, yyRuleInfoNRhs[J] contains the negative of the number ** of symbols on the right-hand side of that rule. */ static const signed char yyRuleInfoNRhs[] = { - -6, /* (0) cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ - -4, /* (1) cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ + -6, /* (0) cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ + -4, /* (1) cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ 0, /* (2) account_options ::= */ - -3, /* (3) account_options ::= account_options PPS literal */ - -3, /* (4) account_options ::= account_options TSERIES literal */ - -3, /* (5) account_options ::= account_options STORAGE literal */ - -3, /* (6) account_options ::= account_options STREAMS literal */ - -3, /* (7) account_options ::= account_options QTIME literal */ - -3, /* (8) account_options ::= account_options DBS literal */ - -3, /* (9) account_options ::= account_options USERS literal */ - -3, /* (10) account_options ::= account_options CONNS literal */ - -3, /* (11) account_options ::= account_options STATE literal */ - -1, /* (12) alter_account_options ::= alter_account_option */ - -2, /* (13) alter_account_options ::= alter_account_options alter_account_option */ - -2, /* (14) alter_account_option ::= PASS literal */ - -2, /* (15) alter_account_option ::= PPS literal */ - -2, /* (16) alter_account_option ::= TSERIES literal */ - -2, /* (17) alter_account_option ::= STORAGE literal */ - -2, /* (18) alter_account_option ::= STREAMS literal */ - -2, /* (19) alter_account_option ::= QTIME literal */ - -2, /* (20) alter_account_option ::= DBS literal */ - -2, /* (21) alter_account_option ::= USERS literal */ - -2, /* (22) alter_account_option ::= CONNS literal */ - -2, /* (23) alter_account_option ::= STATE literal */ - -1, /* (24) ip_range_list ::= NK_STRING */ - -3, /* (25) ip_range_list ::= ip_range_list NK_COMMA NK_STRING */ - -2, /* (26) white_list ::= HOST ip_range_list */ + -3, /* (3) account_options ::= account_options PPS literal */ + -3, /* (4) account_options ::= account_options TSERIES literal */ + -3, /* (5) account_options ::= account_options STORAGE literal */ + -3, /* (6) account_options ::= account_options STREAMS literal */ + -3, /* (7) account_options ::= account_options QTIME literal */ + -3, /* (8) account_options ::= account_options DBS literal */ + -3, /* (9) account_options ::= account_options USERS literal */ + -3, /* (10) account_options ::= account_options CONNS literal */ + -3, /* (11) account_options ::= account_options STATE literal */ + -1, /* (12) alter_account_options ::= alter_account_option */ + -2, /* (13) alter_account_options ::= alter_account_options alter_account_option */ + -2, /* (14) alter_account_option ::= PASS literal */ + -2, /* (15) alter_account_option ::= PPS literal */ + -2, /* (16) alter_account_option ::= TSERIES literal */ + -2, /* (17) alter_account_option ::= STORAGE literal */ + -2, /* (18) alter_account_option ::= STREAMS literal */ + -2, /* (19) alter_account_option ::= QTIME literal */ + -2, /* (20) alter_account_option ::= DBS literal */ + -2, /* (21) alter_account_option ::= USERS literal */ + -2, /* (22) alter_account_option ::= CONNS literal */ + -2, /* (23) alter_account_option ::= STATE literal */ + -1, /* (24) ip_range_list ::= NK_STRING */ + -3, /* (25) ip_range_list ::= ip_range_list NK_COMMA NK_STRING */ + -2, /* (26) white_list ::= HOST ip_range_list */ 0, /* (27) white_list_opt ::= */ - -1, /* (28) white_list_opt ::= white_list */ + -1, /* (28) white_list_opt ::= white_list */ 0, /* (29) is_import_opt ::= */ - -2, /* (30) is_import_opt ::= IS_IMPORT NK_INTEGER */ + -2, /* (30) is_import_opt ::= IS_IMPORT NK_INTEGER */ 0, /* (31) is_createdb_opt ::= */ - -2, /* (32) is_createdb_opt ::= CREATEDB NK_INTEGER */ - -9, /* (33) cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt is_createdb_opt is_import_opt white_list_opt */ - -5, /* (34) cmd ::= ALTER USER user_name PASS NK_STRING */ - -5, /* (35) cmd ::= ALTER USER user_name ENABLE NK_INTEGER */ - -5, /* (36) cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */ - -5, /* (37) cmd ::= ALTER USER user_name CREATEDB NK_INTEGER */ - -5, /* (38) cmd ::= ALTER USER user_name ADD white_list */ - -5, /* (39) cmd ::= ALTER USER user_name DROP white_list */ - -3, /* (40) cmd ::= DROP USER user_name */ + -2, /* (32) is_createdb_opt ::= CREATEDB NK_INTEGER */ + -9, /* (33) cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt is_createdb_opt is_import_opt white_list_opt */ + -5, /* (34) cmd ::= ALTER USER user_name PASS NK_STRING */ + -5, /* (35) cmd ::= ALTER USER user_name ENABLE NK_INTEGER */ + -5, /* (36) cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */ + -5, /* (37) cmd ::= ALTER USER user_name CREATEDB NK_INTEGER */ + -5, /* (38) cmd ::= ALTER USER user_name ADD white_list */ + -5, /* (39) cmd ::= ALTER USER user_name DROP white_list */ + -3, /* (40) cmd ::= DROP USER user_name */ 0, /* (41) sysinfo_opt ::= */ - -2, /* (42) sysinfo_opt ::= SYSINFO NK_INTEGER */ - -7, /* (43) cmd ::= GRANT privileges ON priv_level with_opt TO user_name */ - -7, /* (44) cmd ::= REVOKE privileges ON priv_level with_opt FROM user_name */ - -1, /* (45) privileges ::= ALL */ - -1, /* (46) privileges ::= priv_type_list */ - -1, /* (47) privileges ::= SUBSCRIBE */ - -1, /* (48) priv_type_list ::= priv_type */ - -3, /* (49) priv_type_list ::= priv_type_list NK_COMMA priv_type */ - -1, /* (50) priv_type ::= READ */ - -1, /* (51) priv_type ::= WRITE */ - -1, /* (52) priv_type ::= ALTER */ - -3, /* (53) priv_level ::= NK_STAR NK_DOT NK_STAR */ - -3, /* (54) priv_level ::= db_name NK_DOT NK_STAR */ - -3, /* (55) priv_level ::= db_name NK_DOT table_name */ - -1, /* (56) priv_level ::= topic_name */ + -2, /* (42) sysinfo_opt ::= SYSINFO NK_INTEGER */ + -7, /* (43) cmd ::= GRANT privileges ON priv_level with_opt TO user_name */ + -7, /* (44) cmd ::= REVOKE privileges ON priv_level with_opt FROM user_name */ + -1, /* (45) privileges ::= ALL */ + -1, /* (46) privileges ::= priv_type_list */ + -1, /* (47) privileges ::= SUBSCRIBE */ + -1, /* (48) priv_type_list ::= priv_type */ + -3, /* (49) priv_type_list ::= priv_type_list NK_COMMA priv_type */ + -1, /* (50) priv_type ::= READ */ + -1, /* (51) priv_type ::= WRITE */ + -1, /* (52) priv_type ::= ALTER */ + -3, /* (53) priv_level ::= NK_STAR NK_DOT NK_STAR */ + -3, /* (54) priv_level ::= db_name NK_DOT NK_STAR */ + -3, /* (55) priv_level ::= db_name NK_DOT table_name */ + -1, /* (56) priv_level ::= topic_name */ 0, /* (57) with_opt ::= */ - -2, /* (58) with_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 */ + -2, /* (58) with_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 */ + -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 */ + -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 */ + -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 */ + -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 */ + -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 */ - -3, /* (185) cmd ::= DROP TABLE multi_drop_clause */ - -4, /* (186) cmd ::= DROP STABLE 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 */ + -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 */ + -3, /* (185) cmd ::= DROP TABLE multi_drop_clause */ + -4, /* (186) cmd ::= DROP STABLE 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) specific_cols_opt ::= */ - -3, /* (207) specific_cols_opt ::= NK_LP col_name_list NK_RP */ - -1, /* (208) full_table_name ::= table_name */ - -3, /* (209) full_table_name ::= db_name NK_DOT table_name */ - -1, /* (210) tag_def_list ::= tag_def */ - -3, /* (211) tag_def_list ::= tag_def_list NK_COMMA tag_def */ - -2, /* (212) tag_def ::= column_name type_name */ - -1, /* (213) column_def_list ::= column_def */ - -3, /* (214) column_def_list ::= column_def_list NK_COMMA column_def */ - -3, /* (215) column_def ::= column_name type_name column_options */ - -1, /* (216) type_name ::= BOOL */ - -1, /* (217) type_name ::= TINYINT */ - -1, /* (218) type_name ::= SMALLINT */ - -1, /* (219) type_name ::= INT */ - -1, /* (220) type_name ::= INTEGER */ - -1, /* (221) type_name ::= BIGINT */ - -1, /* (222) type_name ::= FLOAT */ - -1, /* (223) type_name ::= DOUBLE */ - -4, /* (224) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ - -1, /* (225) type_name ::= TIMESTAMP */ - -4, /* (226) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ - -2, /* (227) type_name ::= TINYINT UNSIGNED */ - -2, /* (228) type_name ::= SMALLINT UNSIGNED */ - -2, /* (229) type_name ::= INT UNSIGNED */ - -2, /* (230) type_name ::= BIGINT UNSIGNED */ - -1, /* (231) type_name ::= JSON */ - -4, /* (232) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ - -1, /* (233) type_name ::= MEDIUMBLOB */ - -1, /* (234) type_name ::= BLOB */ - -4, /* (235) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ - -4, /* (236) type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP */ - -1, /* (237) type_name ::= DECIMAL */ - -4, /* (238) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ - -6, /* (239) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ - -1, /* (240) type_name_default_len ::= BINARY */ - -1, /* (241) type_name_default_len ::= NCHAR */ - -1, /* (242) type_name_default_len ::= VARCHAR */ - -1, /* (243) type_name_default_len ::= VARBINARY */ + -3, /* (207) specific_cols_opt ::= NK_LP col_name_list NK_RP */ + -1, /* (208) full_table_name ::= table_name */ + -3, /* (209) full_table_name ::= db_name NK_DOT table_name */ + -1, /* (210) tag_def_list ::= tag_def */ + -3, /* (211) tag_def_list ::= tag_def_list NK_COMMA tag_def */ + -2, /* (212) tag_def ::= column_name type_name */ + -1, /* (213) column_def_list ::= column_def */ + -3, /* (214) column_def_list ::= column_def_list NK_COMMA column_def */ + -3, /* (215) column_def ::= column_name type_name column_options */ + -1, /* (216) type_name ::= BOOL */ + -1, /* (217) type_name ::= TINYINT */ + -1, /* (218) type_name ::= SMALLINT */ + -1, /* (219) type_name ::= INT */ + -1, /* (220) type_name ::= INTEGER */ + -1, /* (221) type_name ::= BIGINT */ + -1, /* (222) type_name ::= FLOAT */ + -1, /* (223) type_name ::= DOUBLE */ + -4, /* (224) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ + -1, /* (225) type_name ::= TIMESTAMP */ + -4, /* (226) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ + -2, /* (227) type_name ::= TINYINT UNSIGNED */ + -2, /* (228) type_name ::= SMALLINT UNSIGNED */ + -2, /* (229) type_name ::= INT UNSIGNED */ + -2, /* (230) type_name ::= BIGINT UNSIGNED */ + -1, /* (231) type_name ::= JSON */ + -4, /* (232) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ + -1, /* (233) type_name ::= MEDIUMBLOB */ + -1, /* (234) type_name ::= BLOB */ + -4, /* (235) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ + -4, /* (236) type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP */ + -1, /* (237) type_name ::= DECIMAL */ + -4, /* (238) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ + -6, /* (239) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ + -1, /* (240) type_name_default_len ::= BINARY */ + -1, /* (241) type_name_default_len ::= NCHAR */ + -1, /* (242) type_name_default_len ::= VARCHAR */ + -1, /* (243) type_name_default_len ::= VARBINARY */ 0, /* (244) tags_def_opt ::= */ - -1, /* (245) tags_def_opt ::= tags_def */ - -4, /* (246) tags_def ::= TAGS NK_LP tag_def_list NK_RP */ + -1, /* (245) tags_def_opt ::= tags_def */ + -4, /* (246) tags_def ::= TAGS NK_LP tag_def_list NK_RP */ 0, /* (247) table_options ::= */ - -3, /* (248) table_options ::= table_options COMMENT NK_STRING */ - -3, /* (249) table_options ::= table_options MAX_DELAY duration_list */ - -3, /* (250) table_options ::= table_options WATERMARK duration_list */ - -5, /* (251) table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ - -3, /* (252) table_options ::= table_options TTL NK_INTEGER */ - -5, /* (253) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ - -3, /* (254) table_options ::= table_options DELETE_MARK duration_list */ - -1, /* (255) alter_table_options ::= alter_table_option */ - -2, /* (256) alter_table_options ::= alter_table_options alter_table_option */ - -2, /* (257) alter_table_option ::= COMMENT NK_STRING */ - -2, /* (258) alter_table_option ::= TTL NK_INTEGER */ - -1, /* (259) duration_list ::= duration_literal */ - -3, /* (260) duration_list ::= duration_list NK_COMMA duration_literal */ - -1, /* (261) rollup_func_list ::= rollup_func_name */ - -3, /* (262) rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ - -1, /* (263) rollup_func_name ::= function_name */ - -1, /* (264) rollup_func_name ::= FIRST */ - -1, /* (265) rollup_func_name ::= LAST */ - -1, /* (266) col_name_list ::= col_name */ - -3, /* (267) col_name_list ::= col_name_list NK_COMMA col_name */ - -1, /* (268) col_name ::= column_name */ - -2, /* (269) cmd ::= SHOW DNODES */ - -2, /* (270) cmd ::= SHOW USERS */ - -3, /* (271) cmd ::= SHOW USERS FULL */ - -3, /* (272) cmd ::= SHOW USER PRIVILEGES */ - -3, /* (273) cmd ::= SHOW db_kind_opt DATABASES */ - -4, /* (274) cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt */ - -4, /* (275) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ - -3, /* (276) cmd ::= SHOW db_name_cond_opt VGROUPS */ - -2, /* (277) cmd ::= SHOW MNODES */ - -2, /* (278) cmd ::= SHOW QNODES */ - -2, /* (279) cmd ::= SHOW ARBGROUPS */ - -2, /* (280) cmd ::= SHOW FUNCTIONS */ - -5, /* (281) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ - -6, /* (282) cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name */ - -2, /* (283) cmd ::= SHOW STREAMS */ - -2, /* (284) cmd ::= SHOW ACCOUNTS */ - -2, /* (285) cmd ::= SHOW APPS */ - -2, /* (286) cmd ::= SHOW CONNECTIONS */ - -2, /* (287) cmd ::= SHOW LICENCES */ - -2, /* (288) cmd ::= SHOW GRANTS */ - -3, /* (289) cmd ::= SHOW GRANTS FULL */ - -3, /* (290) cmd ::= SHOW GRANTS LOGS */ - -3, /* (291) cmd ::= SHOW CLUSTER MACHINES */ - -4, /* (292) cmd ::= SHOW CREATE DATABASE db_name */ - -4, /* (293) cmd ::= SHOW CREATE TABLE full_table_name */ - -4, /* (294) cmd ::= SHOW CREATE STABLE full_table_name */ - -2, /* (295) cmd ::= SHOW ENCRYPTIONS */ - -2, /* (296) cmd ::= SHOW QUERIES */ - -2, /* (297) cmd ::= SHOW SCORES */ - -2, /* (298) cmd ::= SHOW TOPICS */ - -2, /* (299) cmd ::= SHOW VARIABLES */ - -3, /* (300) cmd ::= SHOW CLUSTER VARIABLES */ - -3, /* (301) cmd ::= SHOW LOCAL VARIABLES */ - -5, /* (302) cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ - -2, /* (303) cmd ::= SHOW BNODES */ - -2, /* (304) cmd ::= SHOW SNODES */ - -2, /* (305) cmd ::= SHOW CLUSTER */ - -2, /* (306) cmd ::= SHOW TRANSACTIONS */ - -4, /* (307) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ - -2, /* (308) cmd ::= SHOW CONSUMERS */ - -2, /* (309) cmd ::= SHOW SUBSCRIPTIONS */ - -5, /* (310) cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ - -6, /* (311) cmd ::= SHOW TAGS FROM db_name NK_DOT table_name */ - -7, /* (312) cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ - -8, /* (313) cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name */ - -5, /* (314) cmd ::= SHOW VNODES ON DNODE NK_INTEGER */ - -2, /* (315) cmd ::= SHOW VNODES */ - -3, /* (316) cmd ::= SHOW db_name_cond_opt ALIVE */ - -3, /* (317) cmd ::= SHOW CLUSTER ALIVE */ - -4, /* (318) cmd ::= SHOW db_name_cond_opt VIEWS like_pattern_opt */ - -4, /* (319) cmd ::= SHOW CREATE VIEW full_table_name */ - -2, /* (320) cmd ::= SHOW COMPACTS */ - -3, /* (321) cmd ::= SHOW COMPACT NK_INTEGER */ + -3, /* (248) table_options ::= table_options COMMENT NK_STRING */ + -3, /* (249) table_options ::= table_options MAX_DELAY duration_list */ + -3, /* (250) table_options ::= table_options WATERMARK duration_list */ + -5, /* (251) table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ + -3, /* (252) table_options ::= table_options TTL NK_INTEGER */ + -5, /* (253) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ + -3, /* (254) table_options ::= table_options DELETE_MARK duration_list */ + -1, /* (255) alter_table_options ::= alter_table_option */ + -2, /* (256) alter_table_options ::= alter_table_options alter_table_option */ + -2, /* (257) alter_table_option ::= COMMENT NK_STRING */ + -2, /* (258) alter_table_option ::= TTL NK_INTEGER */ + -1, /* (259) duration_list ::= duration_literal */ + -3, /* (260) duration_list ::= duration_list NK_COMMA duration_literal */ + -1, /* (261) rollup_func_list ::= rollup_func_name */ + -3, /* (262) rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ + -1, /* (263) rollup_func_name ::= function_name */ + -1, /* (264) rollup_func_name ::= FIRST */ + -1, /* (265) rollup_func_name ::= LAST */ + -1, /* (266) col_name_list ::= col_name */ + -3, /* (267) col_name_list ::= col_name_list NK_COMMA col_name */ + -1, /* (268) col_name ::= column_name */ + -2, /* (269) cmd ::= SHOW DNODES */ + -2, /* (270) cmd ::= SHOW USERS */ + -3, /* (271) cmd ::= SHOW USERS FULL */ + -3, /* (272) cmd ::= SHOW USER PRIVILEGES */ + -3, /* (273) cmd ::= SHOW db_kind_opt DATABASES */ + -4, /* (274) cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt */ + -4, /* (275) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ + -3, /* (276) cmd ::= SHOW db_name_cond_opt VGROUPS */ + -2, /* (277) cmd ::= SHOW MNODES */ + -2, /* (278) cmd ::= SHOW QNODES */ + -2, /* (279) cmd ::= SHOW ARBGROUPS */ + -2, /* (280) cmd ::= SHOW FUNCTIONS */ + -5, /* (281) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ + -6, /* (282) cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name */ + -2, /* (283) cmd ::= SHOW STREAMS */ + -2, /* (284) cmd ::= SHOW ACCOUNTS */ + -2, /* (285) cmd ::= SHOW APPS */ + -2, /* (286) cmd ::= SHOW CONNECTIONS */ + -2, /* (287) cmd ::= SHOW LICENCES */ + -2, /* (288) cmd ::= SHOW GRANTS */ + -3, /* (289) cmd ::= SHOW GRANTS FULL */ + -3, /* (290) cmd ::= SHOW GRANTS LOGS */ + -3, /* (291) cmd ::= SHOW CLUSTER MACHINES */ + -4, /* (292) cmd ::= SHOW CREATE DATABASE db_name */ + -4, /* (293) cmd ::= SHOW CREATE TABLE full_table_name */ + -4, /* (294) cmd ::= SHOW CREATE STABLE full_table_name */ + -2, /* (295) cmd ::= SHOW ENCRYPTIONS */ + -2, /* (296) cmd ::= SHOW QUERIES */ + -2, /* (297) cmd ::= SHOW SCORES */ + -2, /* (298) cmd ::= SHOW TOPICS */ + -2, /* (299) cmd ::= SHOW VARIABLES */ + -3, /* (300) cmd ::= SHOW CLUSTER VARIABLES */ + -3, /* (301) cmd ::= SHOW LOCAL VARIABLES */ + -5, /* (302) cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ + -2, /* (303) cmd ::= SHOW BNODES */ + -2, /* (304) cmd ::= SHOW SNODES */ + -2, /* (305) cmd ::= SHOW CLUSTER */ + -2, /* (306) cmd ::= SHOW TRANSACTIONS */ + -4, /* (307) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ + -2, /* (308) cmd ::= SHOW CONSUMERS */ + -2, /* (309) cmd ::= SHOW SUBSCRIPTIONS */ + -5, /* (310) cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ + -6, /* (311) cmd ::= SHOW TAGS FROM db_name NK_DOT table_name */ + -7, /* (312) cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ + -8, /* (313) cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name */ + -5, /* (314) cmd ::= SHOW VNODES ON DNODE NK_INTEGER */ + -2, /* (315) cmd ::= SHOW VNODES */ + -3, /* (316) cmd ::= SHOW db_name_cond_opt ALIVE */ + -3, /* (317) cmd ::= SHOW CLUSTER ALIVE */ + -4, /* (318) cmd ::= SHOW db_name_cond_opt VIEWS like_pattern_opt */ + -4, /* (319) cmd ::= SHOW CREATE VIEW full_table_name */ + -2, /* (320) cmd ::= SHOW COMPACTS */ + -3, /* (321) cmd ::= SHOW COMPACT NK_INTEGER */ 0, /* (322) table_kind_db_name_cond_opt ::= */ - -1, /* (323) table_kind_db_name_cond_opt ::= table_kind */ - -2, /* (324) table_kind_db_name_cond_opt ::= db_name NK_DOT */ - -3, /* (325) table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT */ - -1, /* (326) table_kind ::= NORMAL */ - -1, /* (327) table_kind ::= CHILD */ + -1, /* (323) table_kind_db_name_cond_opt ::= table_kind */ + -2, /* (324) table_kind_db_name_cond_opt ::= db_name NK_DOT */ + -3, /* (325) table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT */ + -1, /* (326) table_kind ::= NORMAL */ + -1, /* (327) table_kind ::= CHILD */ 0, /* (328) db_name_cond_opt ::= */ - -2, /* (329) db_name_cond_opt ::= db_name NK_DOT */ + -2, /* (329) db_name_cond_opt ::= db_name NK_DOT */ 0, /* (330) like_pattern_opt ::= */ - -2, /* (331) like_pattern_opt ::= LIKE NK_STRING */ - -1, /* (332) table_name_cond ::= table_name */ + -2, /* (331) like_pattern_opt ::= LIKE NK_STRING */ + -1, /* (332) table_name_cond ::= table_name */ 0, /* (333) from_db_opt ::= */ - -2, /* (334) from_db_opt ::= FROM db_name */ + -2, /* (334) from_db_opt ::= FROM db_name */ 0, /* (335) tag_list_opt ::= */ - -1, /* (336) tag_list_opt ::= tag_item */ - -3, /* (337) tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ - -1, /* (338) tag_item ::= TBNAME */ - -1, /* (339) tag_item ::= QTAGS */ - -1, /* (340) tag_item ::= column_name */ - -2, /* (341) tag_item ::= column_name column_alias */ - -3, /* (342) tag_item ::= column_name AS column_alias */ + -1, /* (336) tag_list_opt ::= tag_item */ + -3, /* (337) tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ + -1, /* (338) tag_item ::= TBNAME */ + -1, /* (339) tag_item ::= QTAGS */ + -1, /* (340) tag_item ::= column_name */ + -2, /* (341) tag_item ::= column_name column_alias */ + -3, /* (342) tag_item ::= column_name AS column_alias */ 0, /* (343) db_kind_opt ::= */ - -1, /* (344) db_kind_opt ::= USER */ - -1, /* (345) db_kind_opt ::= SYSTEM */ - -11, /* (346) cmd ::= CREATE TSMA not_exists_opt tsma_name ON full_table_name tsma_func_list INTERVAL NK_LP duration_literal NK_RP */ - -11, /* (347) cmd ::= CREATE RECURSIVE TSMA not_exists_opt tsma_name ON full_table_name INTERVAL NK_LP duration_literal NK_RP */ - -4, /* (348) cmd ::= DROP TSMA exists_opt full_tsma_name */ - -3, /* (349) cmd ::= SHOW db_name_cond_opt TSMAS */ - -1, /* (350) full_tsma_name ::= tsma_name */ - -3, /* (351) full_tsma_name ::= db_name NK_DOT tsma_name */ - -4, /* (352) tsma_func_list ::= FUNCTION NK_LP func_list NK_RP */ - -8, /* (353) cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options */ - -9, /* (354) cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP */ - -4, /* (355) cmd ::= DROP INDEX exists_opt full_index_name */ - -1, /* (356) full_index_name ::= index_name */ - -3, /* (357) full_index_name ::= db_name NK_DOT index_name */ - -10, /* (358) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ - -12, /* (359) 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, /* (360) func_list ::= func */ - -3, /* (361) func_list ::= func_list NK_COMMA func */ - -4, /* (362) func ::= sma_func_name NK_LP expression_list NK_RP */ - -1, /* (363) sma_func_name ::= function_name */ - -1, /* (364) sma_func_name ::= COUNT */ - -1, /* (365) sma_func_name ::= FIRST */ - -1, /* (366) sma_func_name ::= LAST */ - -1, /* (367) sma_func_name ::= LAST_ROW */ + -1, /* (344) db_kind_opt ::= USER */ + -1, /* (345) db_kind_opt ::= SYSTEM */ + -11, /* (346) cmd ::= CREATE TSMA not_exists_opt tsma_name ON full_table_name tsma_func_list INTERVAL NK_LP duration_literal NK_RP */ + -11, /* (347) cmd ::= CREATE RECURSIVE TSMA not_exists_opt tsma_name ON full_table_name INTERVAL NK_LP duration_literal NK_RP */ + -4, /* (348) cmd ::= DROP TSMA exists_opt full_tsma_name */ + -3, /* (349) cmd ::= SHOW db_name_cond_opt TSMAS */ + -1, /* (350) full_tsma_name ::= tsma_name */ + -3, /* (351) full_tsma_name ::= db_name NK_DOT tsma_name */ + -4, /* (352) tsma_func_list ::= FUNCTION NK_LP func_list NK_RP */ + -8, /* (353) cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options */ + -9, /* (354) cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP */ + -4, /* (355) cmd ::= DROP INDEX exists_opt full_index_name */ + -1, /* (356) full_index_name ::= index_name */ + -3, /* (357) full_index_name ::= db_name NK_DOT index_name */ + -10, /* (358) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ + -12, /* (359) 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, /* (360) func_list ::= func */ + -3, /* (361) func_list ::= func_list NK_COMMA func */ + -4, /* (362) func ::= sma_func_name NK_LP expression_list NK_RP */ + -1, /* (363) sma_func_name ::= function_name */ + -1, /* (364) sma_func_name ::= COUNT */ + -1, /* (365) sma_func_name ::= FIRST */ + -1, /* (366) sma_func_name ::= LAST */ + -1, /* (367) sma_func_name ::= LAST_ROW */ 0, /* (368) sma_stream_opt ::= */ - -3, /* (369) sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ - -3, /* (370) sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ - -3, /* (371) sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ - -1, /* (372) with_meta ::= AS */ - -3, /* (373) with_meta ::= WITH META AS */ - -3, /* (374) with_meta ::= ONLY META AS */ - -6, /* (375) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ - -7, /* (376) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */ - -8, /* (377) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */ - -4, /* (378) cmd ::= DROP TOPIC exists_opt topic_name */ - -7, /* (379) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ - -2, /* (380) cmd ::= DESC full_table_name */ - -2, /* (381) cmd ::= DESCRIBE full_table_name */ - -3, /* (382) cmd ::= RESET QUERY CACHE */ - -4, /* (383) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ - -4, /* (384) cmd ::= EXPLAIN analyze_opt explain_options insert_query */ + -3, /* (369) sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ + -3, /* (370) sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ + -3, /* (371) sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ + -1, /* (372) with_meta ::= AS */ + -3, /* (373) with_meta ::= WITH META AS */ + -3, /* (374) with_meta ::= ONLY META AS */ + -6, /* (375) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ + -7, /* (376) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */ + -8, /* (377) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */ + -4, /* (378) cmd ::= DROP TOPIC exists_opt topic_name */ + -7, /* (379) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ + -2, /* (380) cmd ::= DESC full_table_name */ + -2, /* (381) cmd ::= DESCRIBE full_table_name */ + -3, /* (382) cmd ::= RESET QUERY CACHE */ + -4, /* (383) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ + -4, /* (384) cmd ::= EXPLAIN analyze_opt explain_options insert_query */ 0, /* (385) analyze_opt ::= */ - -1, /* (386) analyze_opt ::= ANALYZE */ + -1, /* (386) analyze_opt ::= ANALYZE */ 0, /* (387) explain_options ::= */ - -3, /* (388) explain_options ::= explain_options VERBOSE NK_BOOL */ - -3, /* (389) explain_options ::= explain_options RATIO NK_FLOAT */ - -12, /* (390) 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, /* (391) cmd ::= DROP FUNCTION exists_opt function_name */ + -3, /* (388) explain_options ::= explain_options VERBOSE NK_BOOL */ + -3, /* (389) explain_options ::= explain_options RATIO NK_FLOAT */ + -12, /* (390) 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, /* (391) cmd ::= DROP FUNCTION exists_opt function_name */ 0, /* (392) agg_func_opt ::= */ - -1, /* (393) agg_func_opt ::= AGGREGATE */ + -1, /* (393) agg_func_opt ::= AGGREGATE */ 0, /* (394) bufsize_opt ::= */ - -2, /* (395) bufsize_opt ::= BUFSIZE NK_INTEGER */ + -2, /* (395) bufsize_opt ::= BUFSIZE NK_INTEGER */ 0, /* (396) language_opt ::= */ - -2, /* (397) language_opt ::= LANGUAGE NK_STRING */ + -2, /* (397) language_opt ::= LANGUAGE NK_STRING */ 0, /* (398) or_replace_opt ::= */ - -2, /* (399) or_replace_opt ::= OR REPLACE */ - -6, /* (400) cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery */ - -4, /* (401) cmd ::= DROP VIEW exists_opt full_view_name */ - -1, /* (402) full_view_name ::= view_name */ - -3, /* (403) full_view_name ::= db_name NK_DOT view_name */ - -12, /* (404) 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, /* (405) cmd ::= DROP STREAM exists_opt stream_name */ - -4, /* (406) cmd ::= PAUSE STREAM exists_opt stream_name */ - -5, /* (407) cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */ + -2, /* (399) or_replace_opt ::= OR REPLACE */ + -6, /* (400) cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery */ + -4, /* (401) cmd ::= DROP VIEW exists_opt full_view_name */ + -1, /* (402) full_view_name ::= view_name */ + -3, /* (403) full_view_name ::= db_name NK_DOT view_name */ + -12, /* (404) 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, /* (405) cmd ::= DROP STREAM exists_opt stream_name */ + -4, /* (406) cmd ::= PAUSE STREAM exists_opt stream_name */ + -5, /* (407) cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */ 0, /* (408) col_list_opt ::= */ - -3, /* (409) col_list_opt ::= NK_LP column_stream_def_list NK_RP */ - -1, /* (410) column_stream_def_list ::= column_stream_def */ - -3, /* (411) column_stream_def_list ::= column_stream_def_list NK_COMMA column_stream_def */ - -2, /* (412) column_stream_def ::= column_name stream_col_options */ + -3, /* (409) col_list_opt ::= NK_LP column_stream_def_list NK_RP */ + -1, /* (410) column_stream_def_list ::= column_stream_def */ + -3, /* (411) column_stream_def_list ::= column_stream_def_list NK_COMMA column_stream_def */ + -2, /* (412) column_stream_def ::= column_name stream_col_options */ 0, /* (413) stream_col_options ::= */ - -3, /* (414) stream_col_options ::= stream_col_options PRIMARY KEY */ + -3, /* (414) stream_col_options ::= stream_col_options PRIMARY KEY */ 0, /* (415) tag_def_or_ref_opt ::= */ - -1, /* (416) tag_def_or_ref_opt ::= tags_def */ - -4, /* (417) tag_def_or_ref_opt ::= TAGS NK_LP column_stream_def_list NK_RP */ + -1, /* (416) tag_def_or_ref_opt ::= tags_def */ + -4, /* (417) tag_def_or_ref_opt ::= TAGS NK_LP column_stream_def_list NK_RP */ 0, /* (418) stream_options ::= */ - -3, /* (419) stream_options ::= stream_options TRIGGER AT_ONCE */ - -3, /* (420) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ - -4, /* (421) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ - -3, /* (422) stream_options ::= stream_options WATERMARK duration_literal */ - -4, /* (423) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ - -3, /* (424) stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ - -3, /* (425) stream_options ::= stream_options DELETE_MARK duration_literal */ - -4, /* (426) stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ + -3, /* (419) stream_options ::= stream_options TRIGGER AT_ONCE */ + -3, /* (420) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ + -4, /* (421) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ + -3, /* (422) stream_options ::= stream_options WATERMARK duration_literal */ + -4, /* (423) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ + -3, /* (424) stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ + -3, /* (425) stream_options ::= stream_options DELETE_MARK duration_literal */ + -4, /* (426) stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ 0, /* (427) subtable_opt ::= */ - -4, /* (428) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ + -4, /* (428) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ 0, /* (429) ignore_opt ::= */ - -2, /* (430) ignore_opt ::= IGNORE UNTREATED */ - -3, /* (431) cmd ::= KILL CONNECTION NK_INTEGER */ - -3, /* (432) cmd ::= KILL QUERY NK_STRING */ - -3, /* (433) cmd ::= KILL TRANSACTION NK_INTEGER */ - -3, /* (434) cmd ::= KILL COMPACT NK_INTEGER */ - -2, /* (435) cmd ::= BALANCE VGROUP */ - -4, /* (436) cmd ::= BALANCE VGROUP LEADER on_vgroup_id */ - -5, /* (437) cmd ::= BALANCE VGROUP LEADER DATABASE db_name */ - -4, /* (438) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ - -4, /* (439) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ - -3, /* (440) cmd ::= SPLIT VGROUP NK_INTEGER */ + -2, /* (430) ignore_opt ::= IGNORE UNTREATED */ + -3, /* (431) cmd ::= KILL CONNECTION NK_INTEGER */ + -3, /* (432) cmd ::= KILL QUERY NK_STRING */ + -3, /* (433) cmd ::= KILL TRANSACTION NK_INTEGER */ + -3, /* (434) cmd ::= KILL COMPACT NK_INTEGER */ + -2, /* (435) cmd ::= BALANCE VGROUP */ + -4, /* (436) cmd ::= BALANCE VGROUP LEADER on_vgroup_id */ + -5, /* (437) cmd ::= BALANCE VGROUP LEADER DATABASE db_name */ + -4, /* (438) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ + -4, /* (439) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ + -3, /* (440) cmd ::= SPLIT VGROUP NK_INTEGER */ 0, /* (441) on_vgroup_id ::= */ - -2, /* (442) on_vgroup_id ::= ON NK_INTEGER */ - -2, /* (443) dnode_list ::= DNODE NK_INTEGER */ - -3, /* (444) dnode_list ::= dnode_list DNODE NK_INTEGER */ - -4, /* (445) cmd ::= DELETE FROM full_table_name where_clause_opt */ - -1, /* (446) cmd ::= query_or_subquery */ - -1, /* (447) cmd ::= insert_query */ - -7, /* (448) insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ - -4, /* (449) insert_query ::= INSERT INTO full_table_name query_or_subquery */ - -1, /* (450) tags_literal ::= NK_INTEGER */ - -3, /* (451) tags_literal ::= NK_INTEGER NK_PLUS duration_literal */ - -3, /* (452) tags_literal ::= NK_INTEGER NK_MINUS duration_literal */ - -2, /* (453) tags_literal ::= NK_PLUS NK_INTEGER */ - -4, /* (454) tags_literal ::= NK_PLUS NK_INTEGER NK_PLUS duration_literal */ - -4, /* (455) tags_literal ::= NK_PLUS NK_INTEGER NK_MINUS duration_literal */ - -2, /* (456) tags_literal ::= NK_MINUS NK_INTEGER */ - -4, /* (457) tags_literal ::= NK_MINUS NK_INTEGER NK_PLUS duration_literal */ - -4, /* (458) tags_literal ::= NK_MINUS NK_INTEGER NK_MINUS duration_literal */ - -1, /* (459) tags_literal ::= NK_FLOAT */ - -2, /* (460) tags_literal ::= NK_PLUS NK_FLOAT */ - -2, /* (461) tags_literal ::= NK_MINUS NK_FLOAT */ - -1, /* (462) tags_literal ::= NK_BIN */ - -3, /* (463) tags_literal ::= NK_BIN NK_PLUS duration_literal */ - -3, /* (464) tags_literal ::= NK_BIN NK_MINUS duration_literal */ - -2, /* (465) tags_literal ::= NK_PLUS NK_BIN */ - -4, /* (466) tags_literal ::= NK_PLUS NK_BIN NK_PLUS duration_literal */ - -4, /* (467) tags_literal ::= NK_PLUS NK_BIN NK_MINUS duration_literal */ - -2, /* (468) tags_literal ::= NK_MINUS NK_BIN */ - -4, /* (469) tags_literal ::= NK_MINUS NK_BIN NK_PLUS duration_literal */ - -4, /* (470) tags_literal ::= NK_MINUS NK_BIN NK_MINUS duration_literal */ - -1, /* (471) tags_literal ::= NK_HEX */ - -3, /* (472) tags_literal ::= NK_HEX NK_PLUS duration_literal */ - -3, /* (473) tags_literal ::= NK_HEX NK_MINUS duration_literal */ - -2, /* (474) tags_literal ::= NK_PLUS NK_HEX */ - -4, /* (475) tags_literal ::= NK_PLUS NK_HEX NK_PLUS duration_literal */ - -4, /* (476) tags_literal ::= NK_PLUS NK_HEX NK_MINUS duration_literal */ - -2, /* (477) tags_literal ::= NK_MINUS NK_HEX */ - -4, /* (478) tags_literal ::= NK_MINUS NK_HEX NK_PLUS duration_literal */ - -4, /* (479) tags_literal ::= NK_MINUS NK_HEX NK_MINUS duration_literal */ - -1, /* (480) tags_literal ::= NK_STRING */ - -3, /* (481) tags_literal ::= NK_STRING NK_PLUS duration_literal */ - -3, /* (482) tags_literal ::= NK_STRING NK_MINUS duration_literal */ - -1, /* (483) tags_literal ::= NK_BOOL */ - -1, /* (484) tags_literal ::= NULL */ - -1, /* (485) tags_literal ::= literal_func */ - -3, /* (486) tags_literal ::= literal_func NK_PLUS duration_literal */ - -3, /* (487) tags_literal ::= literal_func NK_MINUS duration_literal */ - -1, /* (488) tags_literal_list ::= tags_literal */ - -3, /* (489) tags_literal_list ::= tags_literal_list NK_COMMA tags_literal */ - -1, /* (490) literal ::= NK_INTEGER */ - -1, /* (491) literal ::= NK_FLOAT */ - -1, /* (492) literal ::= NK_STRING */ - -1, /* (493) literal ::= NK_BOOL */ - -2, /* (494) literal ::= TIMESTAMP NK_STRING */ - -1, /* (495) literal ::= duration_literal */ - -1, /* (496) literal ::= NULL */ - -1, /* (497) literal ::= NK_QUESTION */ - -1, /* (498) duration_literal ::= NK_VARIABLE */ - -1, /* (499) signed ::= NK_INTEGER */ - -2, /* (500) signed ::= NK_PLUS NK_INTEGER */ - -2, /* (501) signed ::= NK_MINUS NK_INTEGER */ - -1, /* (502) signed ::= NK_FLOAT */ - -2, /* (503) signed ::= NK_PLUS NK_FLOAT */ - -2, /* (504) signed ::= NK_MINUS NK_FLOAT */ - -1, /* (505) signed_literal ::= signed */ - -1, /* (506) signed_literal ::= NK_STRING */ - -1, /* (507) signed_literal ::= NK_BOOL */ - -2, /* (508) signed_literal ::= TIMESTAMP NK_STRING */ - -1, /* (509) signed_literal ::= duration_literal */ - -1, /* (510) signed_literal ::= NULL */ - -1, /* (511) signed_literal ::= literal_func */ - -1, /* (512) signed_literal ::= NK_QUESTION */ - -1, /* (513) literal_list ::= signed_literal */ - -3, /* (514) literal_list ::= literal_list NK_COMMA signed_literal */ - -1, /* (515) db_name ::= NK_ID */ - -1, /* (516) table_name ::= NK_ID */ - -1, /* (517) column_name ::= NK_ID */ - -1, /* (518) function_name ::= NK_ID */ - -1, /* (519) view_name ::= NK_ID */ - -1, /* (520) table_alias ::= NK_ID */ - -1, /* (521) column_alias ::= NK_ID */ - -1, /* (522) column_alias ::= NK_ALIAS */ - -1, /* (523) user_name ::= NK_ID */ - -1, /* (524) topic_name ::= NK_ID */ - -1, /* (525) stream_name ::= NK_ID */ - -1, /* (526) cgroup_name ::= NK_ID */ - -1, /* (527) index_name ::= NK_ID */ - -1, /* (528) tsma_name ::= NK_ID */ - -1, /* (529) expr_or_subquery ::= expression */ - -1, /* (530) expression ::= literal */ - -1, /* (531) expression ::= pseudo_column */ - -1, /* (532) expression ::= column_reference */ - -1, /* (533) expression ::= function_expression */ - -1, /* (534) expression ::= case_when_expression */ - -3, /* (535) expression ::= NK_LP expression NK_RP */ - -2, /* (536) expression ::= NK_PLUS expr_or_subquery */ - -2, /* (537) expression ::= NK_MINUS expr_or_subquery */ - -3, /* (538) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ - -3, /* (539) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ - -3, /* (540) expression ::= expr_or_subquery NK_STAR expr_or_subquery */ - -3, /* (541) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ - -3, /* (542) expression ::= expr_or_subquery NK_REM expr_or_subquery */ - -3, /* (543) expression ::= column_reference NK_ARROW NK_STRING */ - -3, /* (544) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ - -3, /* (545) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ - -1, /* (546) expression_list ::= expr_or_subquery */ - -3, /* (547) expression_list ::= expression_list NK_COMMA expr_or_subquery */ - -1, /* (548) column_reference ::= column_name */ - -3, /* (549) column_reference ::= table_name NK_DOT column_name */ - -1, /* (550) column_reference ::= NK_ALIAS */ - -3, /* (551) column_reference ::= table_name NK_DOT NK_ALIAS */ - -1, /* (552) pseudo_column ::= ROWTS */ - -1, /* (553) pseudo_column ::= TBNAME */ - -3, /* (554) pseudo_column ::= table_name NK_DOT TBNAME */ - -1, /* (555) pseudo_column ::= QSTART */ - -1, /* (556) pseudo_column ::= QEND */ - -1, /* (557) pseudo_column ::= QDURATION */ - -1, /* (558) pseudo_column ::= WSTART */ - -1, /* (559) pseudo_column ::= WEND */ - -1, /* (560) pseudo_column ::= WDURATION */ - -1, /* (561) pseudo_column ::= IROWTS */ - -1, /* (562) pseudo_column ::= ISFILLED */ - -1, /* (563) pseudo_column ::= QTAGS */ - -4, /* (564) function_expression ::= function_name NK_LP expression_list NK_RP */ - -4, /* (565) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ - -6, /* (566) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ - -6, /* (567) function_expression ::= CAST NK_LP expr_or_subquery AS type_name_default_len NK_RP */ - -1, /* (568) function_expression ::= literal_func */ - -3, /* (569) literal_func ::= noarg_func NK_LP NK_RP */ - -1, /* (570) literal_func ::= NOW */ - -1, /* (571) literal_func ::= TODAY */ - -1, /* (572) noarg_func ::= NOW */ - -1, /* (573) noarg_func ::= TODAY */ - -1, /* (574) noarg_func ::= TIMEZONE */ - -1, /* (575) noarg_func ::= DATABASE */ - -1, /* (576) noarg_func ::= CLIENT_VERSION */ - -1, /* (577) noarg_func ::= SERVER_VERSION */ - -1, /* (578) noarg_func ::= SERVER_STATUS */ - -1, /* (579) noarg_func ::= CURRENT_USER */ - -1, /* (580) noarg_func ::= USER */ - -1, /* (581) star_func ::= COUNT */ - -1, /* (582) star_func ::= FIRST */ - -1, /* (583) star_func ::= LAST */ - -1, /* (584) star_func ::= LAST_ROW */ - -1, /* (585) star_func_para_list ::= NK_STAR */ - -1, /* (586) star_func_para_list ::= other_para_list */ - -1, /* (587) other_para_list ::= star_func_para */ - -3, /* (588) other_para_list ::= other_para_list NK_COMMA star_func_para */ - -1, /* (589) star_func_para ::= expr_or_subquery */ - -3, /* (590) star_func_para ::= table_name NK_DOT NK_STAR */ - -4, /* (591) case_when_expression ::= CASE when_then_list case_when_else_opt END */ - -5, /* (592) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ - -1, /* (593) when_then_list ::= when_then_expr */ - -2, /* (594) when_then_list ::= when_then_list when_then_expr */ - -4, /* (595) when_then_expr ::= WHEN common_expression THEN common_expression */ - 0, /* (596) case_when_else_opt ::= */ - -2, /* (597) case_when_else_opt ::= ELSE common_expression */ - -3, /* (598) predicate ::= expr_or_subquery compare_op expr_or_subquery */ - -5, /* (599) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ - -6, /* (600) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ - -3, /* (601) predicate ::= expr_or_subquery IS NULL */ - -4, /* (602) predicate ::= expr_or_subquery IS NOT NULL */ - -3, /* (603) predicate ::= expr_or_subquery in_op in_predicate_value */ - -1, /* (604) compare_op ::= NK_LT */ - -1, /* (605) compare_op ::= NK_GT */ - -1, /* (606) compare_op ::= NK_LE */ - -1, /* (607) compare_op ::= NK_GE */ - -1, /* (608) compare_op ::= NK_NE */ - -1, /* (609) compare_op ::= NK_EQ */ - -1, /* (610) compare_op ::= LIKE */ - -2, /* (611) compare_op ::= NOT LIKE */ - -1, /* (612) compare_op ::= MATCH */ - -1, /* (613) compare_op ::= NMATCH */ - -1, /* (614) compare_op ::= CONTAINS */ - -1, /* (615) in_op ::= IN */ - -2, /* (616) in_op ::= NOT IN */ - -3, /* (617) in_predicate_value ::= NK_LP literal_list NK_RP */ - -1, /* (618) boolean_value_expression ::= boolean_primary */ - -2, /* (619) boolean_value_expression ::= NOT boolean_primary */ - -3, /* (620) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ - -3, /* (621) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ - -1, /* (622) boolean_primary ::= predicate */ - -3, /* (623) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ - -1, /* (624) common_expression ::= expr_or_subquery */ - -1, /* (625) common_expression ::= boolean_value_expression */ - 0, /* (626) from_clause_opt ::= */ - -2, /* (627) from_clause_opt ::= FROM table_reference_list */ - -1, /* (628) table_reference_list ::= table_reference */ - -3, /* (629) table_reference_list ::= table_reference_list NK_COMMA table_reference */ - -1, /* (630) table_reference ::= table_primary */ - -1, /* (631) table_reference ::= joined_table */ - -2, /* (632) table_primary ::= table_name alias_opt */ - -4, /* (633) table_primary ::= db_name NK_DOT table_name alias_opt */ - -2, /* (634) table_primary ::= subquery alias_opt */ - -1, /* (635) table_primary ::= parenthesized_joined_table */ - 0, /* (636) alias_opt ::= */ - -1, /* (637) alias_opt ::= table_alias */ - -2, /* (638) alias_opt ::= AS table_alias */ - -3, /* (639) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - -3, /* (640) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ - -8, /* (641) joined_table ::= table_reference join_type join_subtype JOIN table_reference join_on_clause_opt window_offset_clause_opt jlimit_clause_opt */ - 0, /* (642) join_type ::= */ - -1, /* (643) join_type ::= INNER */ - -1, /* (644) join_type ::= LEFT */ - -1, /* (645) join_type ::= RIGHT */ - -1, /* (646) join_type ::= FULL */ - 0, /* (647) join_subtype ::= */ - -1, /* (648) join_subtype ::= OUTER */ - -1, /* (649) join_subtype ::= SEMI */ - -1, /* (650) join_subtype ::= ANTI */ - -1, /* (651) join_subtype ::= ASOF */ - -1, /* (652) join_subtype ::= WINDOW */ - 0, /* (653) join_on_clause_opt ::= */ - -2, /* (654) join_on_clause_opt ::= ON search_condition */ - 0, /* (655) window_offset_clause_opt ::= */ - -6, /* (656) window_offset_clause_opt ::= WINDOW_OFFSET NK_LP window_offset_literal NK_COMMA window_offset_literal NK_RP */ - -1, /* (657) window_offset_literal ::= NK_VARIABLE */ - -2, /* (658) window_offset_literal ::= NK_MINUS NK_VARIABLE */ - 0, /* (659) jlimit_clause_opt ::= */ - -2, /* (660) jlimit_clause_opt ::= JLIMIT NK_INTEGER */ - -14, /* (661) 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, /* (662) hint_list ::= */ - -1, /* (663) hint_list ::= NK_HINT */ - 0, /* (664) tag_mode_opt ::= */ - -1, /* (665) tag_mode_opt ::= TAGS */ - 0, /* (666) set_quantifier_opt ::= */ - -1, /* (667) set_quantifier_opt ::= DISTINCT */ - -1, /* (668) set_quantifier_opt ::= ALL */ - -1, /* (669) select_list ::= select_item */ - -3, /* (670) select_list ::= select_list NK_COMMA select_item */ - -1, /* (671) select_item ::= NK_STAR */ - -1, /* (672) select_item ::= common_expression */ - -2, /* (673) select_item ::= common_expression column_alias */ - -3, /* (674) select_item ::= common_expression AS column_alias */ - -3, /* (675) select_item ::= table_name NK_DOT NK_STAR */ - 0, /* (676) where_clause_opt ::= */ - -2, /* (677) where_clause_opt ::= WHERE search_condition */ - 0, /* (678) partition_by_clause_opt ::= */ - -3, /* (679) partition_by_clause_opt ::= PARTITION BY partition_list */ - -1, /* (680) partition_list ::= partition_item */ - -3, /* (681) partition_list ::= partition_list NK_COMMA partition_item */ - -1, /* (682) partition_item ::= expr_or_subquery */ - -2, /* (683) partition_item ::= expr_or_subquery column_alias */ - -3, /* (684) partition_item ::= expr_or_subquery AS column_alias */ - 0, /* (685) twindow_clause_opt ::= */ - -6, /* (686) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP */ - -4, /* (687) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ - -6, /* (688) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ - -8, /* (689) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ - -7, /* (690) twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ - -4, /* (691) twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP */ - -6, /* (692) twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ - 0, /* (693) sliding_opt ::= */ - -4, /* (694) sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ - -1, /* (695) interval_sliding_duration_literal ::= NK_VARIABLE */ - -1, /* (696) interval_sliding_duration_literal ::= NK_STRING */ - -1, /* (697) interval_sliding_duration_literal ::= NK_INTEGER */ - 0, /* (698) fill_opt ::= */ - -4, /* (699) fill_opt ::= FILL NK_LP fill_mode NK_RP */ - -6, /* (700) fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ - -6, /* (701) fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ - -1, /* (702) fill_mode ::= NONE */ - -1, /* (703) fill_mode ::= PREV */ - -1, /* (704) fill_mode ::= NULL */ - -1, /* (705) fill_mode ::= NULL_F */ - -1, /* (706) fill_mode ::= LINEAR */ - -1, /* (707) fill_mode ::= NEXT */ - 0, /* (708) group_by_clause_opt ::= */ - -3, /* (709) group_by_clause_opt ::= GROUP BY group_by_list */ - -1, /* (710) group_by_list ::= expr_or_subquery */ - -3, /* (711) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ - 0, /* (712) having_clause_opt ::= */ - -2, /* (713) having_clause_opt ::= HAVING search_condition */ - 0, /* (714) range_opt ::= */ - -6, /* (715) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ - -4, /* (716) range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ - 0, /* (717) every_opt ::= */ - -4, /* (718) every_opt ::= EVERY NK_LP duration_literal NK_RP */ - -4, /* (719) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ - -1, /* (720) query_simple ::= query_specification */ - -1, /* (721) query_simple ::= union_query_expression */ - -4, /* (722) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ - -3, /* (723) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ - -1, /* (724) query_simple_or_subquery ::= query_simple */ - -1, /* (725) query_simple_or_subquery ::= subquery */ - -1, /* (726) query_or_subquery ::= query_expression */ - -1, /* (727) query_or_subquery ::= subquery */ - 0, /* (728) order_by_clause_opt ::= */ - -3, /* (729) order_by_clause_opt ::= ORDER BY sort_specification_list */ - 0, /* (730) slimit_clause_opt ::= */ - -2, /* (731) slimit_clause_opt ::= SLIMIT NK_INTEGER */ - -4, /* (732) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - -4, /* (733) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - 0, /* (734) limit_clause_opt ::= */ - -2, /* (735) limit_clause_opt ::= LIMIT NK_INTEGER */ - -4, /* (736) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ - -4, /* (737) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - -3, /* (738) subquery ::= NK_LP query_expression NK_RP */ - -3, /* (739) subquery ::= NK_LP subquery NK_RP */ - -1, /* (740) search_condition ::= common_expression */ - -1, /* (741) sort_specification_list ::= sort_specification */ - -3, /* (742) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ - -3, /* (743) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ - 0, /* (744) ordering_specification_opt ::= */ - -1, /* (745) ordering_specification_opt ::= ASC */ - -1, /* (746) ordering_specification_opt ::= DESC */ - 0, /* (747) null_ordering_opt ::= */ - -2, /* (748) null_ordering_opt ::= NULLS FIRST */ - -2, /* (749) null_ordering_opt ::= NULLS LAST */ - 0, /* (750) column_options ::= */ - -3, /* (751) column_options ::= column_options PRIMARY KEY */ - -3, /* (752) column_options ::= column_options ENCODE NK_STRING */ - -3, /* (753) column_options ::= column_options COMPRESS NK_STRING */ - -3, /* (754) column_options ::= column_options LEVEL NK_STRING */ + -2, /* (442) on_vgroup_id ::= ON NK_INTEGER */ + -2, /* (443) dnode_list ::= DNODE NK_INTEGER */ + -3, /* (444) dnode_list ::= dnode_list DNODE NK_INTEGER */ + -4, /* (445) cmd ::= DELETE FROM full_table_name where_clause_opt */ + -1, /* (446) cmd ::= query_or_subquery */ + -1, /* (447) cmd ::= insert_query */ + -7, /* (448) insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ + -4, /* (449) insert_query ::= INSERT INTO full_table_name query_or_subquery */ + -1, /* (450) tags_literal ::= NK_INTEGER */ + -3, /* (451) tags_literal ::= NK_INTEGER NK_PLUS duration_literal */ + -3, /* (452) tags_literal ::= NK_INTEGER NK_MINUS duration_literal */ + -2, /* (453) tags_literal ::= NK_PLUS NK_INTEGER */ + -4, /* (454) tags_literal ::= NK_PLUS NK_INTEGER NK_PLUS duration_literal */ + -4, /* (455) tags_literal ::= NK_PLUS NK_INTEGER NK_MINUS duration_literal */ + -2, /* (456) tags_literal ::= NK_MINUS NK_INTEGER */ + -4, /* (457) tags_literal ::= NK_MINUS NK_INTEGER NK_PLUS duration_literal */ + -4, /* (458) tags_literal ::= NK_MINUS NK_INTEGER NK_MINUS duration_literal */ + -1, /* (459) tags_literal ::= NK_FLOAT */ + -2, /* (460) tags_literal ::= NK_PLUS NK_FLOAT */ + -2, /* (461) tags_literal ::= NK_MINUS NK_FLOAT */ + -1, /* (462) tags_literal ::= NK_BIN */ + -3, /* (463) tags_literal ::= NK_BIN NK_PLUS duration_literal */ + -3, /* (464) tags_literal ::= NK_BIN NK_MINUS duration_literal */ + -2, /* (465) tags_literal ::= NK_PLUS NK_BIN */ + -4, /* (466) tags_literal ::= NK_PLUS NK_BIN NK_PLUS duration_literal */ + -4, /* (467) tags_literal ::= NK_PLUS NK_BIN NK_MINUS duration_literal */ + -2, /* (468) tags_literal ::= NK_MINUS NK_BIN */ + -4, /* (469) tags_literal ::= NK_MINUS NK_BIN NK_PLUS duration_literal */ + -4, /* (470) tags_literal ::= NK_MINUS NK_BIN NK_MINUS duration_literal */ + -1, /* (471) tags_literal ::= NK_HEX */ + -3, /* (472) tags_literal ::= NK_HEX NK_PLUS duration_literal */ + -3, /* (473) tags_literal ::= NK_HEX NK_MINUS duration_literal */ + -2, /* (474) tags_literal ::= NK_PLUS NK_HEX */ + -4, /* (475) tags_literal ::= NK_PLUS NK_HEX NK_PLUS duration_literal */ + -4, /* (476) tags_literal ::= NK_PLUS NK_HEX NK_MINUS duration_literal */ + -2, /* (477) tags_literal ::= NK_MINUS NK_HEX */ + -4, /* (478) tags_literal ::= NK_MINUS NK_HEX NK_PLUS duration_literal */ + -4, /* (479) tags_literal ::= NK_MINUS NK_HEX NK_MINUS duration_literal */ + -1, /* (480) tags_literal ::= NK_STRING */ + -3, /* (481) tags_literal ::= NK_STRING NK_PLUS duration_literal */ + -3, /* (482) tags_literal ::= NK_STRING NK_MINUS duration_literal */ + -1, /* (483) tags_literal ::= NK_BOOL */ + -1, /* (484) tags_literal ::= NULL */ + -1, /* (485) tags_literal ::= literal_func */ + -3, /* (486) tags_literal ::= literal_func NK_PLUS duration_literal */ + -3, /* (487) tags_literal ::= literal_func NK_MINUS duration_literal */ + -1, /* (488) tags_literal_list ::= tags_literal */ + -3, /* (489) tags_literal_list ::= tags_literal_list NK_COMMA tags_literal */ + -1, /* (490) literal ::= NK_INTEGER */ + -1, /* (491) literal ::= NK_FLOAT */ + -1, /* (492) literal ::= NK_STRING */ + -1, /* (493) literal ::= NK_BOOL */ + -2, /* (494) literal ::= TIMESTAMP NK_STRING */ + -1, /* (495) literal ::= duration_literal */ + -1, /* (496) literal ::= NULL */ + -1, /* (497) literal ::= NK_QUESTION */ + -1, /* (498) duration_literal ::= NK_VARIABLE */ + -1, /* (499) signed ::= NK_INTEGER */ + -2, /* (500) signed ::= NK_PLUS NK_INTEGER */ + -2, /* (501) signed ::= NK_MINUS NK_INTEGER */ + -1, /* (502) signed ::= NK_FLOAT */ + -2, /* (503) signed ::= NK_PLUS NK_FLOAT */ + -2, /* (504) signed ::= NK_MINUS NK_FLOAT */ + -1, /* (505) signed_literal ::= signed */ + -1, /* (506) signed_literal ::= NK_STRING */ + -1, /* (507) signed_literal ::= NK_BOOL */ + -2, /* (508) signed_literal ::= TIMESTAMP NK_STRING */ + -1, /* (509) signed_literal ::= duration_literal */ + -1, /* (510) signed_literal ::= NULL */ + -1, /* (511) signed_literal ::= literal_func */ + -1, /* (512) signed_literal ::= NK_QUESTION */ + -1, /* (513) literal_list ::= signed_literal */ + -3, /* (514) literal_list ::= literal_list NK_COMMA signed_literal */ + -1, /* (515) db_name ::= NK_ID */ + -1, /* (516) table_name ::= NK_ID */ + -1, /* (517) column_name ::= NK_ID */ + -1, /* (518) function_name ::= NK_ID */ + -1, /* (519) view_name ::= NK_ID */ + -1, /* (520) table_alias ::= NK_ID */ + -1, /* (521) column_alias ::= NK_ID */ + -1, /* (522) column_alias ::= NK_ALIAS */ + -1, /* (523) user_name ::= NK_ID */ + -1, /* (524) topic_name ::= NK_ID */ + -1, /* (525) stream_name ::= NK_ID */ + -1, /* (526) cgroup_name ::= NK_ID */ + -1, /* (527) index_name ::= NK_ID */ + -1, /* (528) tsma_name ::= NK_ID */ + -1, /* (529) expr_or_subquery ::= expression */ + -1, /* (530) expression ::= literal */ + -1, /* (531) expression ::= pseudo_column */ + -1, /* (532) expression ::= column_reference */ + -1, /* (533) expression ::= function_expression */ + -1, /* (534) expression ::= case_when_expression */ + -3, /* (535) expression ::= NK_LP expression NK_RP */ + -2, /* (536) expression ::= NK_PLUS expr_or_subquery */ + -2, /* (537) expression ::= NK_MINUS expr_or_subquery */ + -3, /* (538) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ + -3, /* (539) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ + -3, /* (540) expression ::= expr_or_subquery NK_STAR expr_or_subquery */ + -3, /* (541) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ + -3, /* (542) expression ::= expr_or_subquery NK_REM expr_or_subquery */ + -3, /* (543) expression ::= column_reference NK_ARROW NK_STRING */ + -3, /* (544) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ + -3, /* (545) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ + -1, /* (546) expression_list ::= expr_or_subquery */ + -3, /* (547) expression_list ::= expression_list NK_COMMA expr_or_subquery */ + -1, /* (548) column_reference ::= column_name */ + -3, /* (549) column_reference ::= table_name NK_DOT column_name */ + -1, /* (550) column_reference ::= NK_ALIAS */ + -3, /* (551) column_reference ::= table_name NK_DOT NK_ALIAS */ + -1, /* (552) pseudo_column ::= ROWTS */ + -1, /* (553) pseudo_column ::= TBNAME */ + -3, /* (554) pseudo_column ::= table_name NK_DOT TBNAME */ + -1, /* (555) pseudo_column ::= QSTART */ + -1, /* (556) pseudo_column ::= QEND */ + -1, /* (557) pseudo_column ::= QDURATION */ + -1, /* (558) pseudo_column ::= WSTART */ + -1, /* (559) pseudo_column ::= WEND */ + -1, /* (560) pseudo_column ::= WDURATION */ + -1, /* (561) pseudo_column ::= IROWTS */ + -1, /* (562) pseudo_column ::= ISFILLED */ + -1, /* (563) pseudo_column ::= QTAGS */ + -4, /* (564) function_expression ::= function_name NK_LP expression_list NK_RP */ + -4, /* (565) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ + -6, /* (566) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ + -6, /* (567) function_expression ::= CAST NK_LP expr_or_subquery AS type_name_default_len NK_RP */ + -6, /* (568) function_expression ::= POSITION NK_LP expr_or_subquery IN expr_or_subquery NK_RP */ + -4, /* (569) function_expression ::= TRIM NK_LP expr_or_subquery NK_RP */ + -6, /* (570) function_expression ::= TRIM NK_LP trim_specification_type FROM expr_or_subquery NK_RP */ + -7, /* (571) function_expression ::= TRIM NK_LP trim_specification_type expr_or_subquery FROM expr_or_subquery NK_RP */ + -4, /* (572) function_expression ::= substr_func NK_LP expression_list NK_RP */ + -6, /* (573) function_expression ::= substr_func NK_LP expr_or_subquery FROM expr_or_subquery NK_RP */ + -8, /* (574) function_expression ::= substr_func NK_LP expr_or_subquery FROM expr_or_subquery FOR expr_or_subquery NK_RP */ + -4, /* (575) function_expression ::= REPLACE NK_LP expression_list NK_RP */ + -1, /* (576) function_expression ::= literal_func */ + -3, /* (577) literal_func ::= noarg_func NK_LP NK_RP */ + -1, /* (578) literal_func ::= NOW */ + -1, /* (579) literal_func ::= TODAY */ + -1, /* (580) substr_func ::= SUBSTR */ + -1, /* (581) substr_func ::= SUBSTRING */ + 0, /* (582) trim_specification_type ::= */ + -1, /* (583) trim_specification_type ::= BOTH */ + -1, /* (584) trim_specification_type ::= TRAILING */ + -1, /* (585) trim_specification_type ::= LEADING */ + -1, /* (586) noarg_func ::= NOW */ + -1, /* (587) noarg_func ::= TODAY */ + -1, /* (588) noarg_func ::= TIMEZONE */ + -1, /* (589) noarg_func ::= DATABASE */ + -1, /* (590) noarg_func ::= CLIENT_VERSION */ + -1, /* (591) noarg_func ::= SERVER_VERSION */ + -1, /* (592) noarg_func ::= SERVER_STATUS */ + -1, /* (593) noarg_func ::= CURRENT_USER */ + -1, /* (594) noarg_func ::= USER */ + -1, /* (595) noarg_func ::= PI */ + -1, /* (596) star_func ::= COUNT */ + -1, /* (597) star_func ::= FIRST */ + -1, /* (598) star_func ::= LAST */ + -1, /* (599) star_func ::= LAST_ROW */ + -1, /* (600) star_func_para_list ::= NK_STAR */ + -1, /* (601) star_func_para_list ::= other_para_list */ + -1, /* (602) other_para_list ::= star_func_para */ + -3, /* (603) other_para_list ::= other_para_list NK_COMMA star_func_para */ + -1, /* (604) star_func_para ::= expr_or_subquery */ + -3, /* (605) star_func_para ::= table_name NK_DOT NK_STAR */ + -4, /* (606) case_when_expression ::= CASE when_then_list case_when_else_opt END */ + -5, /* (607) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ + -1, /* (608) when_then_list ::= when_then_expr */ + -2, /* (609) when_then_list ::= when_then_list when_then_expr */ + -4, /* (610) when_then_expr ::= WHEN common_expression THEN common_expression */ + 0, /* (611) case_when_else_opt ::= */ + -2, /* (612) case_when_else_opt ::= ELSE common_expression */ + -3, /* (613) predicate ::= expr_or_subquery compare_op expr_or_subquery */ + -5, /* (614) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ + -6, /* (615) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ + -3, /* (616) predicate ::= expr_or_subquery IS NULL */ + -4, /* (617) predicate ::= expr_or_subquery IS NOT NULL */ + -3, /* (618) predicate ::= expr_or_subquery in_op in_predicate_value */ + -1, /* (619) compare_op ::= NK_LT */ + -1, /* (620) compare_op ::= NK_GT */ + -1, /* (621) compare_op ::= NK_LE */ + -1, /* (622) compare_op ::= NK_GE */ + -1, /* (623) compare_op ::= NK_NE */ + -1, /* (624) compare_op ::= NK_EQ */ + -1, /* (625) compare_op ::= LIKE */ + -2, /* (626) compare_op ::= NOT LIKE */ + -1, /* (627) compare_op ::= MATCH */ + -1, /* (628) compare_op ::= NMATCH */ + -1, /* (629) compare_op ::= CONTAINS */ + -1, /* (630) in_op ::= IN */ + -2, /* (631) in_op ::= NOT IN */ + -3, /* (632) in_predicate_value ::= NK_LP literal_list NK_RP */ + -1, /* (633) boolean_value_expression ::= boolean_primary */ + -2, /* (634) boolean_value_expression ::= NOT boolean_primary */ + -3, /* (635) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + -3, /* (636) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + -1, /* (637) boolean_primary ::= predicate */ + -3, /* (638) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ + -1, /* (639) common_expression ::= expr_or_subquery */ + -1, /* (640) common_expression ::= boolean_value_expression */ + 0, /* (641) from_clause_opt ::= */ + -2, /* (642) from_clause_opt ::= FROM table_reference_list */ + -1, /* (643) table_reference_list ::= table_reference */ + -3, /* (644) table_reference_list ::= table_reference_list NK_COMMA table_reference */ + -1, /* (645) table_reference ::= table_primary */ + -1, /* (646) table_reference ::= joined_table */ + -2, /* (647) table_primary ::= table_name alias_opt */ + -4, /* (648) table_primary ::= db_name NK_DOT table_name alias_opt */ + -2, /* (649) table_primary ::= subquery alias_opt */ + -1, /* (650) table_primary ::= parenthesized_joined_table */ + 0, /* (651) alias_opt ::= */ + -1, /* (652) alias_opt ::= table_alias */ + -2, /* (653) alias_opt ::= AS table_alias */ + -3, /* (654) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + -3, /* (655) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ + -8, /* (656) joined_table ::= table_reference join_type join_subtype JOIN table_reference join_on_clause_opt window_offset_clause_opt jlimit_clause_opt */ + 0, /* (657) join_type ::= */ + -1, /* (658) join_type ::= INNER */ + -1, /* (659) join_type ::= LEFT */ + -1, /* (660) join_type ::= RIGHT */ + -1, /* (661) join_type ::= FULL */ + 0, /* (662) join_subtype ::= */ + -1, /* (663) join_subtype ::= OUTER */ + -1, /* (664) join_subtype ::= SEMI */ + -1, /* (665) join_subtype ::= ANTI */ + -1, /* (666) join_subtype ::= ASOF */ + -1, /* (667) join_subtype ::= WINDOW */ + 0, /* (668) join_on_clause_opt ::= */ + -2, /* (669) join_on_clause_opt ::= ON search_condition */ + 0, /* (670) window_offset_clause_opt ::= */ + -6, /* (671) window_offset_clause_opt ::= WINDOW_OFFSET NK_LP window_offset_literal NK_COMMA window_offset_literal NK_RP */ + -1, /* (672) window_offset_literal ::= NK_VARIABLE */ + -2, /* (673) window_offset_literal ::= NK_MINUS NK_VARIABLE */ + 0, /* (674) jlimit_clause_opt ::= */ + -2, /* (675) jlimit_clause_opt ::= JLIMIT NK_INTEGER */ + -14, /* (676) 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, /* (677) hint_list ::= */ + -1, /* (678) hint_list ::= NK_HINT */ + 0, /* (679) tag_mode_opt ::= */ + -1, /* (680) tag_mode_opt ::= TAGS */ + 0, /* (681) set_quantifier_opt ::= */ + -1, /* (682) set_quantifier_opt ::= DISTINCT */ + -1, /* (683) set_quantifier_opt ::= ALL */ + -1, /* (684) select_list ::= select_item */ + -3, /* (685) select_list ::= select_list NK_COMMA select_item */ + -1, /* (686) select_item ::= NK_STAR */ + -1, /* (687) select_item ::= common_expression */ + -2, /* (688) select_item ::= common_expression column_alias */ + -3, /* (689) select_item ::= common_expression AS column_alias */ + -3, /* (690) select_item ::= table_name NK_DOT NK_STAR */ + 0, /* (691) where_clause_opt ::= */ + -2, /* (692) where_clause_opt ::= WHERE search_condition */ + 0, /* (693) partition_by_clause_opt ::= */ + -3, /* (694) partition_by_clause_opt ::= PARTITION BY partition_list */ + -1, /* (695) partition_list ::= partition_item */ + -3, /* (696) partition_list ::= partition_list NK_COMMA partition_item */ + -1, /* (697) partition_item ::= expr_or_subquery */ + -2, /* (698) partition_item ::= expr_or_subquery column_alias */ + -3, /* (699) partition_item ::= expr_or_subquery AS column_alias */ + 0, /* (700) twindow_clause_opt ::= */ + -6, /* (701) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP */ + -4, /* (702) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ + -6, /* (703) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ + -8, /* (704) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ + -7, /* (705) twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ + -4, /* (706) twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP */ + -6, /* (707) twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ + 0, /* (708) sliding_opt ::= */ + -4, /* (709) sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ + -1, /* (710) interval_sliding_duration_literal ::= NK_VARIABLE */ + -1, /* (711) interval_sliding_duration_literal ::= NK_STRING */ + -1, /* (712) interval_sliding_duration_literal ::= NK_INTEGER */ + 0, /* (713) fill_opt ::= */ + -4, /* (714) fill_opt ::= FILL NK_LP fill_mode NK_RP */ + -6, /* (715) fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ + -6, /* (716) fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ + -1, /* (717) fill_mode ::= NONE */ + -1, /* (718) fill_mode ::= PREV */ + -1, /* (719) fill_mode ::= NULL */ + -1, /* (720) fill_mode ::= NULL_F */ + -1, /* (721) fill_mode ::= LINEAR */ + -1, /* (722) fill_mode ::= NEXT */ + 0, /* (723) group_by_clause_opt ::= */ + -3, /* (724) group_by_clause_opt ::= GROUP BY group_by_list */ + -1, /* (725) group_by_list ::= expr_or_subquery */ + -3, /* (726) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ + 0, /* (727) having_clause_opt ::= */ + -2, /* (728) having_clause_opt ::= HAVING search_condition */ + 0, /* (729) range_opt ::= */ + -6, /* (730) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ + -4, /* (731) range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ + 0, /* (732) every_opt ::= */ + -4, /* (733) every_opt ::= EVERY NK_LP duration_literal NK_RP */ + -4, /* (734) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ + -1, /* (735) query_simple ::= query_specification */ + -1, /* (736) query_simple ::= union_query_expression */ + -4, /* (737) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ + -3, /* (738) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ + -1, /* (739) query_simple_or_subquery ::= query_simple */ + -1, /* (740) query_simple_or_subquery ::= subquery */ + -1, /* (741) query_or_subquery ::= query_expression */ + -1, /* (742) query_or_subquery ::= subquery */ + 0, /* (743) order_by_clause_opt ::= */ + -3, /* (744) order_by_clause_opt ::= ORDER BY sort_specification_list */ + 0, /* (745) slimit_clause_opt ::= */ + -2, /* (746) slimit_clause_opt ::= SLIMIT NK_INTEGER */ + -4, /* (747) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + -4, /* (748) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + 0, /* (749) limit_clause_opt ::= */ + -2, /* (750) limit_clause_opt ::= LIMIT NK_INTEGER */ + -4, /* (751) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ + -4, /* (752) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + -3, /* (753) subquery ::= NK_LP query_expression NK_RP */ + -3, /* (754) subquery ::= NK_LP subquery NK_RP */ + -1, /* (755) search_condition ::= common_expression */ + -1, /* (756) sort_specification_list ::= sort_specification */ + -3, /* (757) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ + -3, /* (758) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ + 0, /* (759) ordering_specification_opt ::= */ + -1, /* (760) ordering_specification_opt ::= ASC */ + -1, /* (761) ordering_specification_opt ::= DESC */ + 0, /* (762) null_ordering_opt ::= */ + -2, /* (763) null_ordering_opt ::= NULLS FIRST */ + -2, /* (764) null_ordering_opt ::= NULLS LAST */ + 0, /* (765) column_options ::= */ + -3, /* (766) column_options ::= column_options PRIMARY KEY */ + -3, /* (767) column_options ::= column_options ENCODE NK_STRING */ + -3, /* (768) column_options ::= column_options COMPRESS NK_STRING */ + -3, /* (769) column_options ::= column_options LEVEL NK_STRING */ }; static void yy_accept(yyParser*); /* Forward Declaration */ @@ -5535,3142 +5791,2186 @@ static void yy_accept(yyParser*); /* Forward Declaration */ ** means that the extra parameters have no performance impact. */ static YYACTIONTYPE yy_reduce( - yyParser *yypParser, /* The parser */ - unsigned int yyruleno, /* Number of the rule by which to reduce */ - int yyLookahead, /* Lookahead token, or YYNOCODE if none */ - ParseTOKENTYPE yyLookaheadToken /* Value of the lookahead token */ - ParseCTX_PDECL /* %extra_context */ + yyParser *yypParser, /* The parser */ + unsigned int yyruleno, /* Number of the rule by which to reduce */ + int yyLookahead, /* Lookahead token, or YYNOCODE if none */ + ParseTOKENTYPE yyLookaheadToken /* Value of the lookahead token */ + ParseCTX_PDECL /* %extra_context */ ){ int yygoto; /* The next state */ YYACTIONTYPE yyact; /* The next action */ yyStackEntry *yymsp; /* The top of the parser's stack */ int yysize; /* Amount to pop the stack */ ParseARG_FETCH - (void)yyLookahead; + (void)yyLookahead; (void)yyLookaheadToken; yymsp = yypParser->yytos; switch( yyruleno ){ - /* Beginning here are the reduction cases. A typical example + /* Beginning here are the reduction cases. A typical example ** follows: ** case 0: ** #line ** { ... } // User supplied code ** #line ** break; - */ -/********** Begin reduce actions **********************************************/ - YYMINORTYPE yylhsminor; - case 0: /* cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ -#line 50 "sql.y" -{ pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } -#line 5567 "sql.c" - yy_destructor(yypParser,379,&yymsp[0].minor); - break; - case 1: /* cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ -#line 51 "sql.y" -{ pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } -#line 5573 "sql.c" - yy_destructor(yypParser,380,&yymsp[0].minor); - break; - case 2: /* account_options ::= */ -#line 55 "sql.y" -{ } -#line 5579 "sql.c" - break; - case 3: /* account_options ::= account_options PPS literal */ - case 4: /* account_options ::= account_options TSERIES literal */ yytestcase(yyruleno==4); - case 5: /* account_options ::= account_options STORAGE literal */ yytestcase(yyruleno==5); - case 6: /* account_options ::= account_options STREAMS literal */ yytestcase(yyruleno==6); - case 7: /* account_options ::= account_options QTIME literal */ yytestcase(yyruleno==7); - case 8: /* account_options ::= account_options DBS literal */ yytestcase(yyruleno==8); - 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,379,&yymsp[-2].minor); -#line 56 "sql.y" -{ } -#line 5593 "sql.c" - yy_destructor(yypParser,381,&yymsp[0].minor); -} - break; - case 12: /* alter_account_options ::= alter_account_option */ -{ yy_destructor(yypParser,382,&yymsp[0].minor); -#line 68 "sql.y" -{ } -#line 5601 "sql.c" -} - break; - case 13: /* alter_account_options ::= alter_account_options alter_account_option */ -{ yy_destructor(yypParser,380,&yymsp[-1].minor); -#line 69 "sql.y" -{ } -#line 5608 "sql.c" - yy_destructor(yypParser,382,&yymsp[0].minor); -} - break; - case 14: /* alter_account_option ::= PASS literal */ - case 15: /* alter_account_option ::= PPS literal */ yytestcase(yyruleno==15); - case 16: /* alter_account_option ::= TSERIES literal */ yytestcase(yyruleno==16); - case 17: /* alter_account_option ::= STORAGE literal */ yytestcase(yyruleno==17); - case 18: /* alter_account_option ::= STREAMS literal */ yytestcase(yyruleno==18); - case 19: /* alter_account_option ::= QTIME literal */ yytestcase(yyruleno==19); - case 20: /* alter_account_option ::= DBS literal */ yytestcase(yyruleno==20); - case 21: /* alter_account_option ::= USERS literal */ yytestcase(yyruleno==21); - case 22: /* alter_account_option ::= CONNS literal */ yytestcase(yyruleno==22); - case 23: /* alter_account_option ::= STATE literal */ yytestcase(yyruleno==23); -#line 73 "sql.y" -{ } -#line 5624 "sql.c" - yy_destructor(yypParser,381,&yymsp[0].minor); - break; - case 24: /* ip_range_list ::= NK_STRING */ -#line 86 "sql.y" -{ yylhsminor.yy316 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } -#line 5630 "sql.c" - yymsp[0].minor.yy316 = yylhsminor.yy316; - break; - case 25: /* ip_range_list ::= ip_range_list NK_COMMA NK_STRING */ -#line 87 "sql.y" -{ yylhsminor.yy316 = addNodeToList(pCxt, yymsp[-2].minor.yy316, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } -#line 5636 "sql.c" - yymsp[-2].minor.yy316 = yylhsminor.yy316; - break; - case 26: /* white_list ::= HOST ip_range_list */ -#line 91 "sql.y" -{ yymsp[-1].minor.yy316 = yymsp[0].minor.yy316; } -#line 5642 "sql.c" - break; - case 27: /* white_list_opt ::= */ - case 206: /* specific_cols_opt ::= */ yytestcase(yyruleno==206); - case 244: /* tags_def_opt ::= */ yytestcase(yyruleno==244); - case 335: /* tag_list_opt ::= */ yytestcase(yyruleno==335); - case 408: /* col_list_opt ::= */ yytestcase(yyruleno==408); - case 415: /* tag_def_or_ref_opt ::= */ yytestcase(yyruleno==415); - case 678: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==678); - case 708: /* group_by_clause_opt ::= */ yytestcase(yyruleno==708); - case 728: /* order_by_clause_opt ::= */ yytestcase(yyruleno==728); -#line 95 "sql.y" -{ yymsp[1].minor.yy316 = NULL; } -#line 5655 "sql.c" - break; - case 28: /* white_list_opt ::= white_list */ - case 245: /* tags_def_opt ::= tags_def */ yytestcase(yyruleno==245); - case 416: /* tag_def_or_ref_opt ::= tags_def */ yytestcase(yyruleno==416); - case 586: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==586); -#line 96 "sql.y" -{ yylhsminor.yy316 = yymsp[0].minor.yy316; } -#line 5663 "sql.c" - yymsp[0].minor.yy316 = yylhsminor.yy316; - break; - case 29: /* is_import_opt ::= */ - case 31: /* is_createdb_opt ::= */ yytestcase(yyruleno==31); -#line 100 "sql.y" -{ yymsp[1].minor.yy1043 = 0; } -#line 5670 "sql.c" - 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); -#line 101 "sql.y" -{ yymsp[-1].minor.yy1043 = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); } -#line 5677 "sql.c" - break; - case 33: /* cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt is_createdb_opt is_import_opt white_list_opt */ -#line 109 "sql.y" -{ - pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-6].minor.yy1109, &yymsp[-4].minor.yy0, yymsp[-3].minor.yy1043, yymsp[-1].minor.yy1043, yymsp[-2].minor.yy1043); - pCxt->pRootNode = addCreateUserStmtWhiteList(pCxt, pCxt->pRootNode, yymsp[0].minor.yy316); - } -#line 5685 "sql.c" - break; - case 34: /* cmd ::= ALTER USER user_name PASS NK_STRING */ -#line 113 "sql.y" -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy1109, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0); } -#line 5690 "sql.c" - break; - case 35: /* cmd ::= ALTER USER user_name ENABLE NK_INTEGER */ -#line 114 "sql.y" -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy1109, TSDB_ALTER_USER_ENABLE, &yymsp[0].minor.yy0); } -#line 5695 "sql.c" - break; - case 36: /* cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */ -#line 115 "sql.y" -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy1109, TSDB_ALTER_USER_SYSINFO, &yymsp[0].minor.yy0); } -#line 5700 "sql.c" - break; - case 37: /* cmd ::= ALTER USER user_name CREATEDB NK_INTEGER */ -#line 116 "sql.y" -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy1109, TSDB_ALTER_USER_CREATEDB, &yymsp[0].minor.yy0); } -#line 5705 "sql.c" - break; - case 38: /* cmd ::= ALTER USER user_name ADD white_list */ -#line 117 "sql.y" -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy1109, TSDB_ALTER_USER_ADD_WHITE_LIST, yymsp[0].minor.yy316); } -#line 5710 "sql.c" - break; - case 39: /* cmd ::= ALTER USER user_name DROP white_list */ -#line 118 "sql.y" -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy1109, TSDB_ALTER_USER_DROP_WHITE_LIST, yymsp[0].minor.yy316); } -#line 5715 "sql.c" - break; - case 40: /* cmd ::= DROP USER user_name */ -#line 119 "sql.y" -{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy1109); } -#line 5720 "sql.c" - break; - case 41: /* sysinfo_opt ::= */ -#line 123 "sql.y" -{ yymsp[1].minor.yy1043 = 1; } -#line 5725 "sql.c" - break; - case 43: /* cmd ::= GRANT privileges ON priv_level with_opt TO user_name */ -#line 127 "sql.y" -{ pCxt->pRootNode = createGrantStmt(pCxt, yymsp[-5].minor.yy1089, &yymsp[-3].minor.yy849, &yymsp[0].minor.yy1109, yymsp[-2].minor.yy416); } -#line 5730 "sql.c" - break; - case 44: /* cmd ::= REVOKE privileges ON priv_level with_opt FROM user_name */ -#line 128 "sql.y" -{ pCxt->pRootNode = createRevokeStmt(pCxt, yymsp[-5].minor.yy1089, &yymsp[-3].minor.yy849, &yymsp[0].minor.yy1109, yymsp[-2].minor.yy416); } -#line 5735 "sql.c" - break; - case 45: /* privileges ::= ALL */ -#line 132 "sql.y" -{ yymsp[0].minor.yy1089 = PRIVILEGE_TYPE_ALL; } -#line 5740 "sql.c" - break; - case 46: /* privileges ::= priv_type_list */ - case 48: /* priv_type_list ::= priv_type */ yytestcase(yyruleno==48); -#line 133 "sql.y" -{ yylhsminor.yy1089 = yymsp[0].minor.yy1089; } -#line 5746 "sql.c" - yymsp[0].minor.yy1089 = yylhsminor.yy1089; - break; - case 47: /* privileges ::= SUBSCRIBE */ -#line 134 "sql.y" -{ yymsp[0].minor.yy1089 = PRIVILEGE_TYPE_SUBSCRIBE; } -#line 5752 "sql.c" - break; - case 49: /* priv_type_list ::= priv_type_list NK_COMMA priv_type */ -#line 139 "sql.y" -{ yylhsminor.yy1089 = yymsp[-2].minor.yy1089 | yymsp[0].minor.yy1089; } -#line 5757 "sql.c" - yymsp[-2].minor.yy1089 = yylhsminor.yy1089; - break; - case 50: /* priv_type ::= READ */ -#line 143 "sql.y" -{ yymsp[0].minor.yy1089 = PRIVILEGE_TYPE_READ; } -#line 5763 "sql.c" - break; - case 51: /* priv_type ::= WRITE */ -#line 144 "sql.y" -{ yymsp[0].minor.yy1089 = PRIVILEGE_TYPE_WRITE; } -#line 5768 "sql.c" - break; - case 52: /* priv_type ::= ALTER */ -#line 145 "sql.y" -{ yymsp[0].minor.yy1089 = PRIVILEGE_TYPE_ALTER; } -#line 5773 "sql.c" - break; - case 53: /* priv_level ::= NK_STAR NK_DOT NK_STAR */ -#line 149 "sql.y" -{ yylhsminor.yy849.first = yymsp[-2].minor.yy0; yylhsminor.yy849.second = yymsp[0].minor.yy0; } -#line 5778 "sql.c" - yymsp[-2].minor.yy849 = yylhsminor.yy849; - break; - case 54: /* priv_level ::= db_name NK_DOT NK_STAR */ -#line 150 "sql.y" -{ yylhsminor.yy849.first = yymsp[-2].minor.yy1109; yylhsminor.yy849.second = yymsp[0].minor.yy0; } -#line 5784 "sql.c" - yymsp[-2].minor.yy849 = yylhsminor.yy849; - break; - case 55: /* priv_level ::= db_name NK_DOT table_name */ -#line 151 "sql.y" -{ yylhsminor.yy849.first = yymsp[-2].minor.yy1109; yylhsminor.yy849.second = yymsp[0].minor.yy1109; } -#line 5790 "sql.c" - yymsp[-2].minor.yy849 = yylhsminor.yy849; - break; - case 56: /* priv_level ::= topic_name */ -#line 152 "sql.y" -{ yylhsminor.yy849.first = yymsp[0].minor.yy1109; yylhsminor.yy849.second = nil_token; } -#line 5796 "sql.c" - yymsp[0].minor.yy849 = yylhsminor.yy849; - break; - case 57: /* with_opt ::= */ - case 173: /* start_opt ::= */ yytestcase(yyruleno==173); - case 177: /* end_opt ::= */ yytestcase(yyruleno==177); - case 330: /* like_pattern_opt ::= */ yytestcase(yyruleno==330); - case 427: /* subtable_opt ::= */ yytestcase(yyruleno==427); - case 596: /* case_when_else_opt ::= */ yytestcase(yyruleno==596); - case 626: /* from_clause_opt ::= */ yytestcase(yyruleno==626); - case 653: /* join_on_clause_opt ::= */ yytestcase(yyruleno==653); - case 655: /* window_offset_clause_opt ::= */ yytestcase(yyruleno==655); - case 659: /* jlimit_clause_opt ::= */ yytestcase(yyruleno==659); - case 676: /* where_clause_opt ::= */ yytestcase(yyruleno==676); - case 685: /* twindow_clause_opt ::= */ yytestcase(yyruleno==685); - case 693: /* sliding_opt ::= */ yytestcase(yyruleno==693); - case 698: /* fill_opt ::= */ yytestcase(yyruleno==698); - case 712: /* having_clause_opt ::= */ yytestcase(yyruleno==712); - case 714: /* range_opt ::= */ yytestcase(yyruleno==714); - case 717: /* every_opt ::= */ yytestcase(yyruleno==717); - case 730: /* slimit_clause_opt ::= */ yytestcase(yyruleno==730); - case 734: /* limit_clause_opt ::= */ yytestcase(yyruleno==734); -#line 154 "sql.y" -{ yymsp[1].minor.yy416 = NULL; } -#line 5820 "sql.c" - break; - case 58: /* with_opt ::= WITH search_condition */ - case 627: /* from_clause_opt ::= FROM table_reference_list */ yytestcase(yyruleno==627); - case 654: /* join_on_clause_opt ::= ON search_condition */ yytestcase(yyruleno==654); - case 677: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==677); - case 713: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==713); -#line 155 "sql.y" -{ yymsp[-1].minor.yy416 = yymsp[0].minor.yy416; } -#line 5829 "sql.c" - break; - case 59: /* cmd ::= CREATE ENCRYPT_KEY NK_STRING */ -#line 158 "sql.y" -{ pCxt->pRootNode = createEncryptKeyStmt(pCxt, &yymsp[0].minor.yy0); } -#line 5834 "sql.c" - break; - case 60: /* cmd ::= CREATE DNODE dnode_endpoint */ -#line 161 "sql.y" -{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy1109, NULL); } -#line 5839 "sql.c" - break; - case 61: /* cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */ -#line 162 "sql.y" -{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy1109, &yymsp[0].minor.yy0); } -#line 5844 "sql.c" - break; - case 62: /* cmd ::= DROP DNODE NK_INTEGER force_opt */ -#line 163 "sql.y" -{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy209, false); } -#line 5849 "sql.c" - break; - case 63: /* cmd ::= DROP DNODE dnode_endpoint force_opt */ -#line 164 "sql.y" -{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy1109, yymsp[0].minor.yy209, false); } -#line 5854 "sql.c" - break; - case 64: /* cmd ::= DROP DNODE NK_INTEGER unsafe_opt */ -#line 165 "sql.y" -{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, false, yymsp[0].minor.yy209); } -#line 5859 "sql.c" - break; - case 65: /* cmd ::= DROP DNODE dnode_endpoint unsafe_opt */ -#line 166 "sql.y" -{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy1109, false, yymsp[0].minor.yy209); } -#line 5864 "sql.c" - break; - case 66: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ -#line 167 "sql.y" -{ pCxt->pRootNode = createAlterDnodeStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, NULL); } -#line 5869 "sql.c" - break; - case 67: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ -#line 168 "sql.y" -{ pCxt->pRootNode = createAlterDnodeStmt(pCxt, &yymsp[-2].minor.yy0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } -#line 5874 "sql.c" - break; - case 68: /* cmd ::= ALTER ALL DNODES NK_STRING */ -#line 169 "sql.y" -{ pCxt->pRootNode = createAlterDnodeStmt(pCxt, NULL, &yymsp[0].minor.yy0, NULL); } -#line 5879 "sql.c" - break; - case 69: /* cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ -#line 170 "sql.y" -{ pCxt->pRootNode = createAlterDnodeStmt(pCxt, NULL, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } -#line 5884 "sql.c" - break; - case 70: /* cmd ::= RESTORE DNODE NK_INTEGER */ -#line 171 "sql.y" -{ pCxt->pRootNode = createRestoreComponentNodeStmt(pCxt, QUERY_NODE_RESTORE_DNODE_STMT, &yymsp[0].minor.yy0); } -#line 5889 "sql.c" - 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 364: /* sma_func_name ::= COUNT */ yytestcase(yyruleno==364); - case 365: /* sma_func_name ::= FIRST */ yytestcase(yyruleno==365); - case 366: /* sma_func_name ::= LAST */ yytestcase(yyruleno==366); - case 367: /* sma_func_name ::= LAST_ROW */ yytestcase(yyruleno==367); - case 515: /* db_name ::= NK_ID */ yytestcase(yyruleno==515); - case 516: /* table_name ::= NK_ID */ yytestcase(yyruleno==516); - case 517: /* column_name ::= NK_ID */ yytestcase(yyruleno==517); - case 518: /* function_name ::= NK_ID */ yytestcase(yyruleno==518); - case 519: /* view_name ::= NK_ID */ yytestcase(yyruleno==519); - case 520: /* table_alias ::= NK_ID */ yytestcase(yyruleno==520); - case 521: /* column_alias ::= NK_ID */ yytestcase(yyruleno==521); - case 522: /* column_alias ::= NK_ALIAS */ yytestcase(yyruleno==522); - case 523: /* user_name ::= NK_ID */ yytestcase(yyruleno==523); - case 524: /* topic_name ::= NK_ID */ yytestcase(yyruleno==524); - case 525: /* stream_name ::= NK_ID */ yytestcase(yyruleno==525); - case 526: /* cgroup_name ::= NK_ID */ yytestcase(yyruleno==526); - case 527: /* index_name ::= NK_ID */ yytestcase(yyruleno==527); - case 528: /* tsma_name ::= NK_ID */ yytestcase(yyruleno==528); - case 572: /* noarg_func ::= NOW */ yytestcase(yyruleno==572); - case 573: /* noarg_func ::= TODAY */ yytestcase(yyruleno==573); - case 574: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==574); - case 575: /* noarg_func ::= DATABASE */ yytestcase(yyruleno==575); - case 576: /* noarg_func ::= CLIENT_VERSION */ yytestcase(yyruleno==576); - case 577: /* noarg_func ::= SERVER_VERSION */ yytestcase(yyruleno==577); - case 578: /* noarg_func ::= SERVER_STATUS */ yytestcase(yyruleno==578); - case 579: /* noarg_func ::= CURRENT_USER */ yytestcase(yyruleno==579); - case 580: /* noarg_func ::= USER */ yytestcase(yyruleno==580); - case 581: /* star_func ::= COUNT */ yytestcase(yyruleno==581); - case 582: /* star_func ::= FIRST */ yytestcase(yyruleno==582); - case 583: /* star_func ::= LAST */ yytestcase(yyruleno==583); - case 584: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==584); -#line 175 "sql.y" -{ yylhsminor.yy1109 = yymsp[0].minor.yy0; } -#line 5927 "sql.c" - yymsp[0].minor.yy1109 = yylhsminor.yy1109; - break; - case 74: /* force_opt ::= */ - case 101: /* not_exists_opt ::= */ yytestcase(yyruleno==101); - case 103: /* exists_opt ::= */ yytestcase(yyruleno==103); - case 385: /* analyze_opt ::= */ yytestcase(yyruleno==385); - case 392: /* agg_func_opt ::= */ yytestcase(yyruleno==392); - case 398: /* or_replace_opt ::= */ yytestcase(yyruleno==398); - case 429: /* ignore_opt ::= */ yytestcase(yyruleno==429); - case 664: /* tag_mode_opt ::= */ yytestcase(yyruleno==664); - case 666: /* set_quantifier_opt ::= */ yytestcase(yyruleno==666); -#line 181 "sql.y" -{ yymsp[1].minor.yy209 = false; } -#line 5941 "sql.c" - break; - case 75: /* force_opt ::= FORCE */ - case 76: /* unsafe_opt ::= UNSAFE */ yytestcase(yyruleno==76); - case 386: /* analyze_opt ::= ANALYZE */ yytestcase(yyruleno==386); - case 393: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==393); - case 665: /* tag_mode_opt ::= TAGS */ yytestcase(yyruleno==665); - case 667: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==667); -#line 182 "sql.y" -{ yymsp[0].minor.yy209 = true; } -#line 5951 "sql.c" - break; - case 77: /* cmd ::= ALTER CLUSTER NK_STRING */ -#line 189 "sql.y" -{ pCxt->pRootNode = createAlterClusterStmt(pCxt, &yymsp[0].minor.yy0, NULL); } -#line 5956 "sql.c" - break; - case 78: /* cmd ::= ALTER CLUSTER NK_STRING NK_STRING */ -#line 190 "sql.y" -{ pCxt->pRootNode = createAlterClusterStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } -#line 5961 "sql.c" - break; - case 79: /* cmd ::= ALTER LOCAL NK_STRING */ -#line 193 "sql.y" -{ pCxt->pRootNode = createAlterLocalStmt(pCxt, &yymsp[0].minor.yy0, NULL); } -#line 5966 "sql.c" - break; - case 80: /* cmd ::= ALTER LOCAL NK_STRING NK_STRING */ -#line 194 "sql.y" -{ pCxt->pRootNode = createAlterLocalStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } -#line 5971 "sql.c" - break; - case 81: /* cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ -#line 197 "sql.y" -{ pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_QNODE_STMT, &yymsp[0].minor.yy0); } -#line 5976 "sql.c" - break; - case 82: /* cmd ::= DROP QNODE ON DNODE NK_INTEGER */ -#line 198 "sql.y" -{ pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_QNODE_STMT, &yymsp[0].minor.yy0); } -#line 5981 "sql.c" - break; - case 83: /* cmd ::= RESTORE QNODE ON DNODE NK_INTEGER */ -#line 199 "sql.y" -{ pCxt->pRootNode = createRestoreComponentNodeStmt(pCxt, QUERY_NODE_RESTORE_QNODE_STMT, &yymsp[0].minor.yy0); } -#line 5986 "sql.c" - break; - case 84: /* cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ -#line 202 "sql.y" -{ pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_BNODE_STMT, &yymsp[0].minor.yy0); } -#line 5991 "sql.c" - break; - case 85: /* cmd ::= DROP BNODE ON DNODE NK_INTEGER */ -#line 203 "sql.y" -{ pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_BNODE_STMT, &yymsp[0].minor.yy0); } -#line 5996 "sql.c" - break; - case 86: /* cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ -#line 206 "sql.y" -{ pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_SNODE_STMT, &yymsp[0].minor.yy0); } -#line 6001 "sql.c" - break; - case 87: /* cmd ::= DROP SNODE ON DNODE NK_INTEGER */ -#line 207 "sql.y" -{ pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_SNODE_STMT, &yymsp[0].minor.yy0); } -#line 6006 "sql.c" - break; - case 88: /* cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ -#line 210 "sql.y" -{ pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_MNODE_STMT, &yymsp[0].minor.yy0); } -#line 6011 "sql.c" - break; - case 89: /* cmd ::= DROP MNODE ON DNODE NK_INTEGER */ -#line 211 "sql.y" -{ pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_MNODE_STMT, &yymsp[0].minor.yy0); } -#line 6016 "sql.c" - break; - case 90: /* cmd ::= RESTORE MNODE ON DNODE NK_INTEGER */ -#line 212 "sql.y" -{ pCxt->pRootNode = createRestoreComponentNodeStmt(pCxt, QUERY_NODE_RESTORE_MNODE_STMT, &yymsp[0].minor.yy0); } -#line 6021 "sql.c" - break; - case 91: /* cmd ::= RESTORE VNODE ON DNODE NK_INTEGER */ -#line 215 "sql.y" -{ pCxt->pRootNode = createRestoreComponentNodeStmt(pCxt, QUERY_NODE_RESTORE_VNODE_STMT, &yymsp[0].minor.yy0); } -#line 6026 "sql.c" - break; - case 92: /* cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ -#line 218 "sql.y" -{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy209, &yymsp[-1].minor.yy1109, yymsp[0].minor.yy416); } -#line 6031 "sql.c" - break; - case 93: /* cmd ::= DROP DATABASE exists_opt db_name */ -#line 219 "sql.y" -{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy209, &yymsp[0].minor.yy1109); } -#line 6036 "sql.c" - break; - case 94: /* cmd ::= USE db_name */ -#line 220 "sql.y" -{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy1109); } -#line 6041 "sql.c" - break; - case 95: /* cmd ::= ALTER DATABASE db_name alter_db_options */ -#line 221 "sql.y" -{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy1109, yymsp[0].minor.yy416); } -#line 6046 "sql.c" - break; - case 96: /* cmd ::= FLUSH DATABASE db_name */ -#line 222 "sql.y" -{ pCxt->pRootNode = createFlushDatabaseStmt(pCxt, &yymsp[0].minor.yy1109); } -#line 6051 "sql.c" - break; - case 97: /* cmd ::= TRIM DATABASE db_name speed_opt */ -#line 223 "sql.y" -{ pCxt->pRootNode = createTrimDatabaseStmt(pCxt, &yymsp[-1].minor.yy1109, yymsp[0].minor.yy820); } -#line 6056 "sql.c" - break; - case 98: /* cmd ::= S3MIGRATE DATABASE db_name */ -#line 224 "sql.y" -{ pCxt->pRootNode = createS3MigrateDatabaseStmt(pCxt, &yymsp[0].minor.yy1109); } -#line 6061 "sql.c" - break; - case 99: /* cmd ::= COMPACT DATABASE db_name start_opt end_opt */ -#line 225 "sql.y" -{ pCxt->pRootNode = createCompactStmt(pCxt, &yymsp[-2].minor.yy1109, yymsp[-1].minor.yy416, yymsp[0].minor.yy416); } -#line 6066 "sql.c" - break; - case 100: /* not_exists_opt ::= IF NOT EXISTS */ -#line 229 "sql.y" -{ yymsp[-2].minor.yy209 = true; } -#line 6071 "sql.c" - break; - case 102: /* exists_opt ::= IF EXISTS */ - case 399: /* or_replace_opt ::= OR REPLACE */ yytestcase(yyruleno==399); - case 430: /* ignore_opt ::= IGNORE UNTREATED */ yytestcase(yyruleno==430); -#line 234 "sql.y" -{ yymsp[-1].minor.yy209 = true; } -#line 6078 "sql.c" - break; - case 104: /* db_options ::= */ -#line 237 "sql.y" -{ yymsp[1].minor.yy416 = createDefaultDatabaseOptions(pCxt); } -#line 6083 "sql.c" - break; - case 105: /* db_options ::= db_options BUFFER NK_INTEGER */ -#line 238 "sql.y" -{ yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-2].minor.yy416, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); } -#line 6088 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 106: /* db_options ::= db_options CACHEMODEL NK_STRING */ -#line 239 "sql.y" -{ yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-2].minor.yy416, DB_OPTION_CACHEMODEL, &yymsp[0].minor.yy0); } -#line 6094 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 107: /* db_options ::= db_options CACHESIZE NK_INTEGER */ -#line 240 "sql.y" -{ yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-2].minor.yy416, DB_OPTION_CACHESIZE, &yymsp[0].minor.yy0); } -#line 6100 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 108: /* db_options ::= db_options COMP NK_INTEGER */ -#line 241 "sql.y" -{ yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-2].minor.yy416, DB_OPTION_COMP, &yymsp[0].minor.yy0); } -#line 6106 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 109: /* db_options ::= db_options DURATION NK_INTEGER */ - case 110: /* db_options ::= db_options DURATION NK_VARIABLE */ yytestcase(yyruleno==110); -#line 242 "sql.y" -{ yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-2].minor.yy416, DB_OPTION_DAYS, &yymsp[0].minor.yy0); } -#line 6113 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 111: /* db_options ::= db_options MAXROWS NK_INTEGER */ -#line 244 "sql.y" -{ yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-2].minor.yy416, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); } -#line 6119 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 112: /* db_options ::= db_options MINROWS NK_INTEGER */ -#line 245 "sql.y" -{ yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-2].minor.yy416, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); } -#line 6125 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 113: /* db_options ::= db_options KEEP integer_list */ - case 114: /* db_options ::= db_options KEEP variable_list */ yytestcase(yyruleno==114); -#line 246 "sql.y" -{ yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-2].minor.yy416, DB_OPTION_KEEP, yymsp[0].minor.yy316); } -#line 6132 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 115: /* db_options ::= db_options PAGES NK_INTEGER */ -#line 248 "sql.y" -{ yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-2].minor.yy416, DB_OPTION_PAGES, &yymsp[0].minor.yy0); } -#line 6138 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 116: /* db_options ::= db_options PAGESIZE NK_INTEGER */ -#line 249 "sql.y" -{ yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-2].minor.yy416, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); } -#line 6144 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 117: /* db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ -#line 250 "sql.y" -{ yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-2].minor.yy416, DB_OPTION_TSDB_PAGESIZE, &yymsp[0].minor.yy0); } -#line 6150 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 118: /* db_options ::= db_options PRECISION NK_STRING */ -#line 251 "sql.y" -{ yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-2].minor.yy416, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); } -#line 6156 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 119: /* db_options ::= db_options REPLICA NK_INTEGER */ -#line 252 "sql.y" -{ yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-2].minor.yy416, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); } -#line 6162 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 120: /* db_options ::= db_options VGROUPS NK_INTEGER */ -#line 254 "sql.y" -{ yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-2].minor.yy416, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); } -#line 6168 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 121: /* db_options ::= db_options SINGLE_STABLE NK_INTEGER */ -#line 255 "sql.y" -{ yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-2].minor.yy416, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); } -#line 6174 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 122: /* db_options ::= db_options RETENTIONS retention_list */ -#line 256 "sql.y" -{ yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-2].minor.yy416, DB_OPTION_RETENTIONS, yymsp[0].minor.yy316); } -#line 6180 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 123: /* db_options ::= db_options SCHEMALESS NK_INTEGER */ -#line 257 "sql.y" -{ yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-2].minor.yy416, DB_OPTION_SCHEMALESS, &yymsp[0].minor.yy0); } -#line 6186 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 124: /* db_options ::= db_options WAL_LEVEL NK_INTEGER */ -#line 258 "sql.y" -{ yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-2].minor.yy416, DB_OPTION_WAL, &yymsp[0].minor.yy0); } -#line 6192 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 125: /* db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ -#line 259 "sql.y" -{ yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-2].minor.yy416, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); } -#line 6198 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 126: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ -#line 260 "sql.y" -{ yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-2].minor.yy416, DB_OPTION_WAL_RETENTION_PERIOD, &yymsp[0].minor.yy0); } -#line 6204 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 127: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ -#line 261 "sql.y" -{ - SToken t = yymsp[-1].minor.yy0; - t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-3].minor.yy416, DB_OPTION_WAL_RETENTION_PERIOD, &t); - } -#line 6214 "sql.c" - yymsp[-3].minor.yy416 = yylhsminor.yy416; - break; - case 128: /* db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ -#line 266 "sql.y" -{ yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-2].minor.yy416, DB_OPTION_WAL_RETENTION_SIZE, &yymsp[0].minor.yy0); } -#line 6220 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 129: /* db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ -#line 267 "sql.y" -{ - SToken t = yymsp[-1].minor.yy0; - t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-3].minor.yy416, DB_OPTION_WAL_RETENTION_SIZE, &t); - } -#line 6230 "sql.c" - yymsp[-3].minor.yy416 = yylhsminor.yy416; - break; - case 130: /* db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ -#line 272 "sql.y" -{ yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-2].minor.yy416, DB_OPTION_WAL_ROLL_PERIOD, &yymsp[0].minor.yy0); } -#line 6236 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 131: /* db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ -#line 273 "sql.y" -{ yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-2].minor.yy416, DB_OPTION_WAL_SEGMENT_SIZE, &yymsp[0].minor.yy0); } -#line 6242 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 132: /* db_options ::= db_options STT_TRIGGER NK_INTEGER */ -#line 274 "sql.y" -{ yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-2].minor.yy416, DB_OPTION_STT_TRIGGER, &yymsp[0].minor.yy0); } -#line 6248 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 133: /* db_options ::= db_options TABLE_PREFIX signed */ -#line 275 "sql.y" -{ yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-2].minor.yy416, DB_OPTION_TABLE_PREFIX, yymsp[0].minor.yy416); } -#line 6254 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 134: /* db_options ::= db_options TABLE_SUFFIX signed */ -#line 276 "sql.y" -{ yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-2].minor.yy416, DB_OPTION_TABLE_SUFFIX, yymsp[0].minor.yy416); } -#line 6260 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 135: /* db_options ::= db_options S3_CHUNKSIZE NK_INTEGER */ -#line 277 "sql.y" -{ yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-2].minor.yy416, DB_OPTION_S3_CHUNKSIZE, &yymsp[0].minor.yy0); } -#line 6266 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 136: /* db_options ::= db_options S3_KEEPLOCAL NK_INTEGER */ - case 137: /* db_options ::= db_options S3_KEEPLOCAL NK_VARIABLE */ yytestcase(yyruleno==137); -#line 278 "sql.y" -{ yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-2].minor.yy416, DB_OPTION_S3_KEEPLOCAL, &yymsp[0].minor.yy0); } -#line 6273 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 138: /* db_options ::= db_options S3_COMPACT NK_INTEGER */ -#line 280 "sql.y" -{ yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-2].minor.yy416, DB_OPTION_S3_COMPACT, &yymsp[0].minor.yy0); } -#line 6279 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 139: /* db_options ::= db_options KEEP_TIME_OFFSET NK_INTEGER */ -#line 281 "sql.y" -{ yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-2].minor.yy416, DB_OPTION_KEEP_TIME_OFFSET, &yymsp[0].minor.yy0); } -#line 6285 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 140: /* db_options ::= db_options ENCRYPT_ALGORITHM NK_STRING */ -#line 282 "sql.y" -{ yylhsminor.yy416 = setDatabaseOption(pCxt, yymsp[-2].minor.yy416, DB_OPTION_ENCRYPT_ALGORITHM, &yymsp[0].minor.yy0); } -#line 6291 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 141: /* alter_db_options ::= alter_db_option */ -#line 284 "sql.y" -{ yylhsminor.yy416 = createAlterDatabaseOptions(pCxt); yylhsminor.yy416 = setAlterDatabaseOption(pCxt, yylhsminor.yy416, &yymsp[0].minor.yy101); } -#line 6297 "sql.c" - yymsp[0].minor.yy416 = yylhsminor.yy416; - break; - case 142: /* alter_db_options ::= alter_db_options alter_db_option */ -#line 285 "sql.y" -{ yylhsminor.yy416 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy416, &yymsp[0].minor.yy101); } -#line 6303 "sql.c" - yymsp[-1].minor.yy416 = yylhsminor.yy416; - break; - case 143: /* alter_db_option ::= BUFFER NK_INTEGER */ -#line 289 "sql.y" -{ yymsp[-1].minor.yy101.type = DB_OPTION_BUFFER; yymsp[-1].minor.yy101.val = yymsp[0].minor.yy0; } -#line 6309 "sql.c" - break; - case 144: /* alter_db_option ::= CACHEMODEL NK_STRING */ -#line 290 "sql.y" -{ yymsp[-1].minor.yy101.type = DB_OPTION_CACHEMODEL; yymsp[-1].minor.yy101.val = yymsp[0].minor.yy0; } -#line 6314 "sql.c" - break; - case 145: /* alter_db_option ::= CACHESIZE NK_INTEGER */ -#line 291 "sql.y" -{ yymsp[-1].minor.yy101.type = DB_OPTION_CACHESIZE; yymsp[-1].minor.yy101.val = yymsp[0].minor.yy0; } -#line 6319 "sql.c" - break; - case 146: /* alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ -#line 292 "sql.y" -{ yymsp[-1].minor.yy101.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy101.val = yymsp[0].minor.yy0; } -#line 6324 "sql.c" - break; - case 147: /* alter_db_option ::= KEEP integer_list */ - case 148: /* alter_db_option ::= KEEP variable_list */ yytestcase(yyruleno==148); -#line 293 "sql.y" -{ yymsp[-1].minor.yy101.type = DB_OPTION_KEEP; yymsp[-1].minor.yy101.pList = yymsp[0].minor.yy316; } -#line 6330 "sql.c" - break; - case 149: /* alter_db_option ::= PAGES NK_INTEGER */ -#line 295 "sql.y" -{ yymsp[-1].minor.yy101.type = DB_OPTION_PAGES; yymsp[-1].minor.yy101.val = yymsp[0].minor.yy0; } -#line 6335 "sql.c" - break; - case 150: /* alter_db_option ::= REPLICA NK_INTEGER */ -#line 296 "sql.y" -{ yymsp[-1].minor.yy101.type = DB_OPTION_REPLICA; yymsp[-1].minor.yy101.val = yymsp[0].minor.yy0; } -#line 6340 "sql.c" - break; - case 151: /* alter_db_option ::= WAL_LEVEL NK_INTEGER */ -#line 298 "sql.y" -{ yymsp[-1].minor.yy101.type = DB_OPTION_WAL; yymsp[-1].minor.yy101.val = yymsp[0].minor.yy0; } -#line 6345 "sql.c" - break; - case 152: /* alter_db_option ::= STT_TRIGGER NK_INTEGER */ -#line 299 "sql.y" -{ yymsp[-1].minor.yy101.type = DB_OPTION_STT_TRIGGER; yymsp[-1].minor.yy101.val = yymsp[0].minor.yy0; } -#line 6350 "sql.c" - break; - case 153: /* alter_db_option ::= MINROWS NK_INTEGER */ -#line 300 "sql.y" -{ yymsp[-1].minor.yy101.type = DB_OPTION_MINROWS; yymsp[-1].minor.yy101.val = yymsp[0].minor.yy0; } -#line 6355 "sql.c" - break; - case 154: /* alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER */ -#line 301 "sql.y" -{ yymsp[-1].minor.yy101.type = DB_OPTION_WAL_RETENTION_PERIOD; yymsp[-1].minor.yy101.val = yymsp[0].minor.yy0; } -#line 6360 "sql.c" - break; - case 155: /* alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ -#line 302 "sql.y" -{ - SToken t = yymsp[-1].minor.yy0; - t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yymsp[-2].minor.yy101.type = DB_OPTION_WAL_RETENTION_PERIOD; yymsp[-2].minor.yy101.val = t; - } -#line 6369 "sql.c" - break; - case 156: /* alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER */ -#line 307 "sql.y" -{ yymsp[-1].minor.yy101.type = DB_OPTION_WAL_RETENTION_SIZE; yymsp[-1].minor.yy101.val = yymsp[0].minor.yy0; } -#line 6374 "sql.c" - break; - case 157: /* alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ -#line 308 "sql.y" -{ - SToken t = yymsp[-1].minor.yy0; - t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yymsp[-2].minor.yy101.type = DB_OPTION_WAL_RETENTION_SIZE; yymsp[-2].minor.yy101.val = t; - } -#line 6383 "sql.c" - break; - case 158: /* alter_db_option ::= S3_KEEPLOCAL NK_INTEGER */ - case 159: /* alter_db_option ::= S3_KEEPLOCAL NK_VARIABLE */ yytestcase(yyruleno==159); -#line 313 "sql.y" -{ yymsp[-1].minor.yy101.type = DB_OPTION_S3_KEEPLOCAL; yymsp[-1].minor.yy101.val = yymsp[0].minor.yy0; } -#line 6389 "sql.c" - break; - case 160: /* alter_db_option ::= S3_COMPACT NK_INTEGER */ -#line 315 "sql.y" -{ yymsp[-1].minor.yy101.type = DB_OPTION_S3_COMPACT, yymsp[-1].minor.yy101.val = yymsp[0].minor.yy0; } -#line 6394 "sql.c" - break; - case 161: /* alter_db_option ::= KEEP_TIME_OFFSET NK_INTEGER */ -#line 316 "sql.y" -{ yymsp[-1].minor.yy101.type = DB_OPTION_KEEP_TIME_OFFSET; yymsp[-1].minor.yy101.val = yymsp[0].minor.yy0; } -#line 6399 "sql.c" - break; - case 162: /* alter_db_option ::= ENCRYPT_ALGORITHM NK_STRING */ -#line 317 "sql.y" -{ yymsp[-1].minor.yy101.type = DB_OPTION_ENCRYPT_ALGORITHM; yymsp[-1].minor.yy101.val = yymsp[0].minor.yy0; } -#line 6404 "sql.c" - break; - case 163: /* integer_list ::= NK_INTEGER */ -#line 321 "sql.y" -{ yylhsminor.yy316 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } -#line 6409 "sql.c" - yymsp[0].minor.yy316 = yylhsminor.yy316; - break; - case 164: /* integer_list ::= integer_list NK_COMMA NK_INTEGER */ - case 444: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==444); -#line 322 "sql.y" -{ yylhsminor.yy316 = addNodeToList(pCxt, yymsp[-2].minor.yy316, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } -#line 6416 "sql.c" - yymsp[-2].minor.yy316 = yylhsminor.yy316; - break; - case 165: /* variable_list ::= NK_VARIABLE */ -#line 326 "sql.y" -{ yylhsminor.yy316 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } -#line 6422 "sql.c" - yymsp[0].minor.yy316 = yylhsminor.yy316; - break; - case 166: /* variable_list ::= variable_list NK_COMMA NK_VARIABLE */ -#line 327 "sql.y" -{ yylhsminor.yy316 = addNodeToList(pCxt, yymsp[-2].minor.yy316, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } -#line 6428 "sql.c" - yymsp[-2].minor.yy316 = yylhsminor.yy316; - 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 210: /* tag_def_list ::= tag_def */ yytestcase(yyruleno==210); - case 213: /* column_def_list ::= column_def */ yytestcase(yyruleno==213); - case 261: /* rollup_func_list ::= rollup_func_name */ yytestcase(yyruleno==261); - case 266: /* col_name_list ::= col_name */ yytestcase(yyruleno==266); - case 336: /* tag_list_opt ::= tag_item */ yytestcase(yyruleno==336); - case 360: /* func_list ::= func */ yytestcase(yyruleno==360); - case 410: /* column_stream_def_list ::= column_stream_def */ yytestcase(yyruleno==410); - case 488: /* tags_literal_list ::= tags_literal */ yytestcase(yyruleno==488); - case 513: /* literal_list ::= signed_literal */ yytestcase(yyruleno==513); - case 587: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==587); - case 593: /* when_then_list ::= when_then_expr */ yytestcase(yyruleno==593); - case 669: /* select_list ::= select_item */ yytestcase(yyruleno==669); - case 680: /* partition_list ::= partition_item */ yytestcase(yyruleno==680); - case 741: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==741); -#line 331 "sql.y" -{ yylhsminor.yy316 = createNodeList(pCxt, yymsp[0].minor.yy416); } -#line 6450 "sql.c" - yymsp[0].minor.yy316 = yylhsminor.yy316; - 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 211: /* tag_def_list ::= tag_def_list NK_COMMA tag_def */ yytestcase(yyruleno==211); - case 214: /* column_def_list ::= column_def_list NK_COMMA column_def */ yytestcase(yyruleno==214); - case 262: /* rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ yytestcase(yyruleno==262); - case 267: /* col_name_list ::= col_name_list NK_COMMA col_name */ yytestcase(yyruleno==267); - case 337: /* tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ yytestcase(yyruleno==337); - case 361: /* func_list ::= func_list NK_COMMA func */ yytestcase(yyruleno==361); - case 411: /* column_stream_def_list ::= column_stream_def_list NK_COMMA column_stream_def */ yytestcase(yyruleno==411); - case 489: /* tags_literal_list ::= tags_literal_list NK_COMMA tags_literal */ yytestcase(yyruleno==489); - case 514: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==514); - case 588: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==588); - case 670: /* select_list ::= select_list NK_COMMA select_item */ yytestcase(yyruleno==670); - case 681: /* partition_list ::= partition_list NK_COMMA partition_item */ yytestcase(yyruleno==681); - case 742: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==742); -#line 332 "sql.y" -{ yylhsminor.yy316 = addNodeToList(pCxt, yymsp[-2].minor.yy316, yymsp[0].minor.yy416); } -#line 6470 "sql.c" - yymsp[-2].minor.yy316 = yylhsminor.yy316; - break; - case 169: /* retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ - case 170: /* retention ::= NK_MINUS NK_COLON NK_VARIABLE */ yytestcase(yyruleno==170); -#line 334 "sql.y" -{ yylhsminor.yy416 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } -#line 6477 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 171: /* speed_opt ::= */ - case 394: /* bufsize_opt ::= */ yytestcase(yyruleno==394); -#line 339 "sql.y" -{ yymsp[1].minor.yy820 = 0; } -#line 6484 "sql.c" - break; - case 172: /* speed_opt ::= BWLIMIT NK_INTEGER */ - case 395: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ yytestcase(yyruleno==395); -#line 340 "sql.y" -{ yymsp[-1].minor.yy820 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); } -#line 6490 "sql.c" - break; - case 174: /* start_opt ::= START WITH NK_INTEGER */ - case 178: /* end_opt ::= END WITH NK_INTEGER */ yytestcase(yyruleno==178); -#line 343 "sql.y" -{ yymsp[-2].minor.yy416 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } -#line 6496 "sql.c" - break; - case 175: /* start_opt ::= START WITH NK_STRING */ - case 179: /* end_opt ::= END WITH NK_STRING */ yytestcase(yyruleno==179); -#line 344 "sql.y" -{ yymsp[-2].minor.yy416 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } -#line 6502 "sql.c" - break; - case 176: /* start_opt ::= START WITH TIMESTAMP NK_STRING */ - case 180: /* end_opt ::= END WITH TIMESTAMP NK_STRING */ yytestcase(yyruleno==180); -#line 345 "sql.y" -{ yymsp[-3].minor.yy416 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } -#line 6508 "sql.c" - 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); -#line 354 "sql.y" -{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy209, yymsp[-5].minor.yy416, yymsp[-3].minor.yy316, yymsp[-1].minor.yy316, yymsp[0].minor.yy416); } -#line 6514 "sql.c" - break; - case 182: /* cmd ::= CREATE TABLE multi_create_clause */ -#line 355 "sql.y" -{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy316); } -#line 6519 "sql.c" - break; - case 183: /* cmd ::= CREATE TABLE not_exists_opt USING full_table_name NK_LP tag_list_opt NK_RP FILE NK_STRING */ -#line 357 "sql.y" -{ pCxt->pRootNode = createCreateSubTableFromFileClause(pCxt, yymsp[-7].minor.yy209, yymsp[-5].minor.yy416, yymsp[-3].minor.yy316, &yymsp[0].minor.yy0); } -#line 6524 "sql.c" - break; - case 185: /* cmd ::= DROP TABLE multi_drop_clause */ -#line 360 "sql.y" -{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy316); } -#line 6529 "sql.c" - break; - case 186: /* cmd ::= DROP STABLE exists_opt full_table_name */ -#line 361 "sql.y" -{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy209, yymsp[0].minor.yy416); } -#line 6534 "sql.c" - break; - case 187: /* cmd ::= ALTER TABLE alter_table_clause */ - case 446: /* cmd ::= query_or_subquery */ yytestcase(yyruleno==446); - case 447: /* cmd ::= insert_query */ yytestcase(yyruleno==447); -#line 363 "sql.y" -{ pCxt->pRootNode = yymsp[0].minor.yy416; } -#line 6541 "sql.c" - break; - case 188: /* cmd ::= ALTER STABLE alter_table_clause */ -#line 364 "sql.y" -{ pCxt->pRootNode = setAlterSuperTableType(yymsp[0].minor.yy416); } -#line 6546 "sql.c" - break; - case 189: /* alter_table_clause ::= full_table_name alter_table_options */ -#line 366 "sql.y" -{ yylhsminor.yy416 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy416, yymsp[0].minor.yy416); } -#line 6551 "sql.c" - yymsp[-1].minor.yy416 = yylhsminor.yy416; - break; - case 190: /* alter_table_clause ::= full_table_name ADD COLUMN column_name type_name column_options */ -#line 368 "sql.y" -{ yylhsminor.yy416 = createAlterTableAddModifyColOptions2(pCxt, yymsp[-5].minor.yy416, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-2].minor.yy1109, yymsp[-1].minor.yy952, yymsp[0].minor.yy416); } -#line 6557 "sql.c" - yymsp[-5].minor.yy416 = yylhsminor.yy416; - break; - case 191: /* alter_table_clause ::= full_table_name DROP COLUMN column_name */ -#line 369 "sql.y" -{ yylhsminor.yy416 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy416, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy1109); } -#line 6563 "sql.c" - yymsp[-3].minor.yy416 = yylhsminor.yy416; - break; - case 192: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ -#line 371 "sql.y" -{ yylhsminor.yy416 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy416, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy1109, yymsp[0].minor.yy952); } -#line 6569 "sql.c" - yymsp[-4].minor.yy416 = yylhsminor.yy416; - break; - case 193: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name column_options */ -#line 373 "sql.y" -{ yylhsminor.yy416 = createAlterTableAddModifyColOptions(pCxt, yymsp[-4].minor.yy416, TSDB_ALTER_TABLE_UPDATE_COLUMN_COMPRESS, &yymsp[-1].minor.yy1109, yymsp[0].minor.yy416); } -#line 6575 "sql.c" - yymsp[-4].minor.yy416 = yylhsminor.yy416; - break; - case 194: /* alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ -#line 375 "sql.y" -{ yylhsminor.yy416 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy416, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy1109, &yymsp[0].minor.yy1109); } -#line 6581 "sql.c" - yymsp[-4].minor.yy416 = yylhsminor.yy416; - break; - case 195: /* alter_table_clause ::= full_table_name ADD TAG column_name type_name */ -#line 377 "sql.y" -{ yylhsminor.yy416 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy416, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy1109, yymsp[0].minor.yy952); } -#line 6587 "sql.c" - yymsp[-4].minor.yy416 = yylhsminor.yy416; - break; - case 196: /* alter_table_clause ::= full_table_name DROP TAG column_name */ -#line 378 "sql.y" -{ yylhsminor.yy416 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy416, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy1109); } -#line 6593 "sql.c" - yymsp[-3].minor.yy416 = yylhsminor.yy416; - break; - case 197: /* alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ -#line 380 "sql.y" -{ yylhsminor.yy416 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy416, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy1109, yymsp[0].minor.yy952); } -#line 6599 "sql.c" - yymsp[-4].minor.yy416 = yylhsminor.yy416; - break; - case 198: /* alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ -#line 382 "sql.y" -{ yylhsminor.yy416 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy416, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy1109, &yymsp[0].minor.yy1109); } -#line 6605 "sql.c" - yymsp[-4].minor.yy416 = yylhsminor.yy416; - break; - case 199: /* alter_table_clause ::= full_table_name SET TAG column_name NK_EQ tags_literal */ -#line 384 "sql.y" -{ yylhsminor.yy416 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy416, &yymsp[-2].minor.yy1109, yymsp[0].minor.yy416); } -#line 6611 "sql.c" - yymsp[-5].minor.yy416 = yylhsminor.yy416; - break; - case 201: /* multi_create_clause ::= multi_create_clause create_subtable_clause */ - case 594: /* when_then_list ::= when_then_list when_then_expr */ yytestcase(yyruleno==594); -#line 389 "sql.y" -{ yylhsminor.yy316 = addNodeToList(pCxt, yymsp[-1].minor.yy316, yymsp[0].minor.yy416); } -#line 6618 "sql.c" - yymsp[-1].minor.yy316 = yylhsminor.yy316; - 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 */ -#line 393 "sql.y" -{ yylhsminor.yy416 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy209, yymsp[-8].minor.yy416, yymsp[-6].minor.yy416, yymsp[-5].minor.yy316, yymsp[-2].minor.yy316, yymsp[0].minor.yy416); } -#line 6624 "sql.c" - yymsp[-9].minor.yy416 = yylhsminor.yy416; - break; - case 205: /* drop_table_clause ::= exists_opt full_table_name */ -#line 400 "sql.y" -{ yylhsminor.yy416 = createDropTableClause(pCxt, yymsp[-1].minor.yy209, yymsp[0].minor.yy416); } -#line 6630 "sql.c" - yymsp[-1].minor.yy416 = yylhsminor.yy416; - break; - case 207: /* specific_cols_opt ::= NK_LP col_name_list NK_RP */ - case 409: /* col_list_opt ::= NK_LP column_stream_def_list NK_RP */ yytestcase(yyruleno==409); -#line 405 "sql.y" -{ yymsp[-2].minor.yy316 = yymsp[-1].minor.yy316; } -#line 6637 "sql.c" - break; - case 208: /* full_table_name ::= table_name */ - case 350: /* full_tsma_name ::= tsma_name */ yytestcase(yyruleno==350); -#line 407 "sql.y" -{ yylhsminor.yy416 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy1109, NULL); } -#line 6643 "sql.c" - yymsp[0].minor.yy416 = yylhsminor.yy416; - break; - case 209: /* full_table_name ::= db_name NK_DOT table_name */ - case 351: /* full_tsma_name ::= db_name NK_DOT tsma_name */ yytestcase(yyruleno==351); -#line 408 "sql.y" -{ yylhsminor.yy416 = createRealTableNode(pCxt, &yymsp[-2].minor.yy1109, &yymsp[0].minor.yy1109, NULL); } -#line 6650 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 212: /* tag_def ::= column_name type_name */ -#line 414 "sql.y" -{ yylhsminor.yy416 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy1109, yymsp[0].minor.yy952, NULL); } -#line 6656 "sql.c" - yymsp[-1].minor.yy416 = yylhsminor.yy416; - break; - case 215: /* column_def ::= column_name type_name column_options */ -#line 422 "sql.y" -{ yylhsminor.yy416 = createColumnDefNode(pCxt, &yymsp[-2].minor.yy1109, yymsp[-1].minor.yy952, yymsp[0].minor.yy416); } -#line 6662 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 216: /* type_name ::= BOOL */ -#line 426 "sql.y" -{ yymsp[0].minor.yy952 = createDataType(TSDB_DATA_TYPE_BOOL); } -#line 6668 "sql.c" - break; - case 217: /* type_name ::= TINYINT */ -#line 427 "sql.y" -{ yymsp[0].minor.yy952 = createDataType(TSDB_DATA_TYPE_TINYINT); } -#line 6673 "sql.c" - break; - case 218: /* type_name ::= SMALLINT */ -#line 428 "sql.y" -{ yymsp[0].minor.yy952 = createDataType(TSDB_DATA_TYPE_SMALLINT); } -#line 6678 "sql.c" - break; - case 219: /* type_name ::= INT */ - case 220: /* type_name ::= INTEGER */ yytestcase(yyruleno==220); -#line 429 "sql.y" -{ yymsp[0].minor.yy952 = createDataType(TSDB_DATA_TYPE_INT); } -#line 6684 "sql.c" - break; - case 221: /* type_name ::= BIGINT */ -#line 431 "sql.y" -{ yymsp[0].minor.yy952 = createDataType(TSDB_DATA_TYPE_BIGINT); } -#line 6689 "sql.c" - break; - case 222: /* type_name ::= FLOAT */ -#line 432 "sql.y" -{ yymsp[0].minor.yy952 = createDataType(TSDB_DATA_TYPE_FLOAT); } -#line 6694 "sql.c" - break; - case 223: /* type_name ::= DOUBLE */ -#line 433 "sql.y" -{ yymsp[0].minor.yy952 = createDataType(TSDB_DATA_TYPE_DOUBLE); } -#line 6699 "sql.c" - break; - case 224: /* type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ -#line 434 "sql.y" -{ yymsp[-3].minor.yy952 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); } -#line 6704 "sql.c" - break; - case 225: /* type_name ::= TIMESTAMP */ -#line 435 "sql.y" -{ yymsp[0].minor.yy952 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); } -#line 6709 "sql.c" - break; - case 226: /* type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ -#line 436 "sql.y" -{ yymsp[-3].minor.yy952 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); } -#line 6714 "sql.c" - break; - case 227: /* type_name ::= TINYINT UNSIGNED */ -#line 437 "sql.y" -{ yymsp[-1].minor.yy952 = createDataType(TSDB_DATA_TYPE_UTINYINT); } -#line 6719 "sql.c" - break; - case 228: /* type_name ::= SMALLINT UNSIGNED */ -#line 438 "sql.y" -{ yymsp[-1].minor.yy952 = createDataType(TSDB_DATA_TYPE_USMALLINT); } -#line 6724 "sql.c" - break; - case 229: /* type_name ::= INT UNSIGNED */ -#line 439 "sql.y" -{ yymsp[-1].minor.yy952 = createDataType(TSDB_DATA_TYPE_UINT); } -#line 6729 "sql.c" - break; - case 230: /* type_name ::= BIGINT UNSIGNED */ -#line 440 "sql.y" -{ yymsp[-1].minor.yy952 = createDataType(TSDB_DATA_TYPE_UBIGINT); } -#line 6734 "sql.c" - break; - case 231: /* type_name ::= JSON */ -#line 441 "sql.y" -{ yymsp[0].minor.yy952 = createDataType(TSDB_DATA_TYPE_JSON); } -#line 6739 "sql.c" - break; - case 232: /* type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ -#line 442 "sql.y" -{ yymsp[-3].minor.yy952 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); } -#line 6744 "sql.c" - break; - case 233: /* type_name ::= MEDIUMBLOB */ -#line 443 "sql.y" -{ yymsp[0].minor.yy952 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); } -#line 6749 "sql.c" - break; - case 234: /* type_name ::= BLOB */ -#line 444 "sql.y" -{ yymsp[0].minor.yy952 = createDataType(TSDB_DATA_TYPE_BLOB); } -#line 6754 "sql.c" - break; - case 235: /* type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ -#line 445 "sql.y" -{ yymsp[-3].minor.yy952 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); } -#line 6759 "sql.c" - break; - case 236: /* type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP */ -#line 446 "sql.y" -{ yymsp[-3].minor.yy952 = createVarLenDataType(TSDB_DATA_TYPE_GEOMETRY, &yymsp[-1].minor.yy0); } -#line 6764 "sql.c" - break; - case 237: /* type_name ::= DECIMAL */ -#line 447 "sql.y" -{ yymsp[0].minor.yy952 = createDataType(TSDB_DATA_TYPE_DECIMAL); } -#line 6769 "sql.c" - break; - case 238: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ -#line 448 "sql.y" -{ yymsp[-3].minor.yy952 = createDataType(TSDB_DATA_TYPE_DECIMAL); } -#line 6774 "sql.c" - break; - case 239: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ -#line 449 "sql.y" -{ yymsp[-5].minor.yy952 = createDataType(TSDB_DATA_TYPE_DECIMAL); } -#line 6779 "sql.c" - break; - case 240: /* type_name_default_len ::= BINARY */ -#line 453 "sql.y" -{ yymsp[0].minor.yy952 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, NULL); } -#line 6784 "sql.c" - break; - case 241: /* type_name_default_len ::= NCHAR */ -#line 454 "sql.y" -{ yymsp[0].minor.yy952 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, NULL); } -#line 6789 "sql.c" - break; - case 242: /* type_name_default_len ::= VARCHAR */ -#line 455 "sql.y" -{ yymsp[0].minor.yy952 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, NULL); } -#line 6794 "sql.c" - break; - case 243: /* type_name_default_len ::= VARBINARY */ -#line 456 "sql.y" -{ yymsp[0].minor.yy952 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, NULL); } -#line 6799 "sql.c" - break; - case 246: /* tags_def ::= TAGS NK_LP tag_def_list NK_RP */ - case 417: /* tag_def_or_ref_opt ::= TAGS NK_LP column_stream_def_list NK_RP */ yytestcase(yyruleno==417); -#line 465 "sql.y" -{ yymsp[-3].minor.yy316 = yymsp[-1].minor.yy316; } -#line 6805 "sql.c" - break; - case 247: /* table_options ::= */ -#line 467 "sql.y" -{ yymsp[1].minor.yy416 = createDefaultTableOptions(pCxt); } -#line 6810 "sql.c" - break; - case 248: /* table_options ::= table_options COMMENT NK_STRING */ -#line 468 "sql.y" -{ yylhsminor.yy416 = setTableOption(pCxt, yymsp[-2].minor.yy416, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); } -#line 6815 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 249: /* table_options ::= table_options MAX_DELAY duration_list */ -#line 469 "sql.y" -{ yylhsminor.yy416 = setTableOption(pCxt, yymsp[-2].minor.yy416, TABLE_OPTION_MAXDELAY, yymsp[0].minor.yy316); } -#line 6821 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 250: /* table_options ::= table_options WATERMARK duration_list */ -#line 470 "sql.y" -{ yylhsminor.yy416 = setTableOption(pCxt, yymsp[-2].minor.yy416, TABLE_OPTION_WATERMARK, yymsp[0].minor.yy316); } -#line 6827 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 251: /* table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ -#line 471 "sql.y" -{ yylhsminor.yy416 = setTableOption(pCxt, yymsp[-4].minor.yy416, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy316); } -#line 6833 "sql.c" - yymsp[-4].minor.yy416 = yylhsminor.yy416; - break; - case 252: /* table_options ::= table_options TTL NK_INTEGER */ -#line 472 "sql.y" -{ yylhsminor.yy416 = setTableOption(pCxt, yymsp[-2].minor.yy416, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); } -#line 6839 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 253: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */ -#line 473 "sql.y" -{ yylhsminor.yy416 = setTableOption(pCxt, yymsp[-4].minor.yy416, TABLE_OPTION_SMA, yymsp[-1].minor.yy316); } -#line 6845 "sql.c" - yymsp[-4].minor.yy416 = yylhsminor.yy416; - break; - case 254: /* table_options ::= table_options DELETE_MARK duration_list */ -#line 474 "sql.y" -{ yylhsminor.yy416 = setTableOption(pCxt, yymsp[-2].minor.yy416, TABLE_OPTION_DELETE_MARK, yymsp[0].minor.yy316); } -#line 6851 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 255: /* alter_table_options ::= alter_table_option */ -#line 476 "sql.y" -{ yylhsminor.yy416 = createAlterTableOptions(pCxt); yylhsminor.yy416 = setTableOption(pCxt, yylhsminor.yy416, yymsp[0].minor.yy101.type, &yymsp[0].minor.yy101.val); } -#line 6857 "sql.c" - yymsp[0].minor.yy416 = yylhsminor.yy416; - break; - case 256: /* alter_table_options ::= alter_table_options alter_table_option */ -#line 477 "sql.y" -{ yylhsminor.yy416 = setTableOption(pCxt, yymsp[-1].minor.yy416, yymsp[0].minor.yy101.type, &yymsp[0].minor.yy101.val); } -#line 6863 "sql.c" - yymsp[-1].minor.yy416 = yylhsminor.yy416; - break; - case 257: /* alter_table_option ::= COMMENT NK_STRING */ -#line 481 "sql.y" -{ yymsp[-1].minor.yy101.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy101.val = yymsp[0].minor.yy0; } -#line 6869 "sql.c" - break; - case 258: /* alter_table_option ::= TTL NK_INTEGER */ -#line 482 "sql.y" -{ yymsp[-1].minor.yy101.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy101.val = yymsp[0].minor.yy0; } -#line 6874 "sql.c" - break; - case 259: /* duration_list ::= duration_literal */ - case 546: /* expression_list ::= expr_or_subquery */ yytestcase(yyruleno==546); -#line 486 "sql.y" -{ yylhsminor.yy316 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy416)); } -#line 6880 "sql.c" - yymsp[0].minor.yy316 = yylhsminor.yy316; - break; - case 260: /* duration_list ::= duration_list NK_COMMA duration_literal */ - case 547: /* expression_list ::= expression_list NK_COMMA expr_or_subquery */ yytestcase(yyruleno==547); -#line 487 "sql.y" -{ yylhsminor.yy316 = addNodeToList(pCxt, yymsp[-2].minor.yy316, releaseRawExprNode(pCxt, yymsp[0].minor.yy416)); } -#line 6887 "sql.c" - yymsp[-2].minor.yy316 = yylhsminor.yy316; - break; - case 263: /* rollup_func_name ::= function_name */ -#line 494 "sql.y" -{ yylhsminor.yy416 = createFunctionNode(pCxt, &yymsp[0].minor.yy1109, NULL); } -#line 6893 "sql.c" - yymsp[0].minor.yy416 = yylhsminor.yy416; - break; - case 264: /* rollup_func_name ::= FIRST */ - case 265: /* rollup_func_name ::= LAST */ yytestcase(yyruleno==265); - case 339: /* tag_item ::= QTAGS */ yytestcase(yyruleno==339); -#line 495 "sql.y" -{ yylhsminor.yy416 = createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL); } -#line 6901 "sql.c" - yymsp[0].minor.yy416 = yylhsminor.yy416; - break; - case 268: /* col_name ::= column_name */ - case 340: /* tag_item ::= column_name */ yytestcase(yyruleno==340); -#line 503 "sql.y" -{ yylhsminor.yy416 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy1109); } -#line 6908 "sql.c" - yymsp[0].minor.yy416 = yylhsminor.yy416; - break; - case 269: /* cmd ::= SHOW DNODES */ -#line 506 "sql.y" -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DNODES_STMT); } -#line 6914 "sql.c" - break; - case 270: /* cmd ::= SHOW USERS */ -#line 507 "sql.y" -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_USERS_STMT); } -#line 6919 "sql.c" - break; - case 271: /* cmd ::= SHOW USERS FULL */ -#line 508 "sql.y" -{ pCxt->pRootNode = createShowStmtWithFull(pCxt, QUERY_NODE_SHOW_USERS_FULL_STMT); } -#line 6924 "sql.c" - break; - case 272: /* cmd ::= SHOW USER PRIVILEGES */ -#line 509 "sql.y" -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_USER_PRIVILEGES_STMT); } -#line 6929 "sql.c" - break; - case 273: /* cmd ::= SHOW db_kind_opt DATABASES */ -#line 510 "sql.y" -{ - pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DATABASES_STMT); - setShowKind(pCxt, pCxt->pRootNode, yymsp[-1].minor.yy681); - } -#line 6937 "sql.c" - break; - case 274: /* cmd ::= SHOW table_kind_db_name_cond_opt TABLES like_pattern_opt */ -#line 514 "sql.y" -{ - pCxt->pRootNode = createShowTablesStmt(pCxt, yymsp[-2].minor.yy925, yymsp[0].minor.yy416, OP_TYPE_LIKE); - } -#line 6944 "sql.c" - break; - case 275: /* cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ -#line 517 "sql.y" -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy416, yymsp[0].minor.yy416, OP_TYPE_LIKE); } -#line 6949 "sql.c" - break; - case 276: /* cmd ::= SHOW db_name_cond_opt VGROUPS */ -#line 518 "sql.y" -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy416, NULL, OP_TYPE_LIKE); } -#line 6954 "sql.c" - break; - case 277: /* cmd ::= SHOW MNODES */ -#line 519 "sql.y" -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MNODES_STMT); } -#line 6959 "sql.c" - break; - case 278: /* cmd ::= SHOW QNODES */ -#line 521 "sql.y" -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QNODES_STMT); } -#line 6964 "sql.c" - break; - case 279: /* cmd ::= SHOW ARBGROUPS */ -#line 522 "sql.y" -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_ARBGROUPS_STMT); } -#line 6969 "sql.c" - break; - case 280: /* cmd ::= SHOW FUNCTIONS */ -#line 523 "sql.y" -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_FUNCTIONS_STMT); } -#line 6974 "sql.c" - break; - case 281: /* cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ -#line 524 "sql.y" -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[0].minor.yy416, yymsp[-1].minor.yy416, OP_TYPE_EQUAL); } -#line 6979 "sql.c" - break; - case 282: /* cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name */ -#line 525 "sql.y" -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy1109), createIdentifierValueNode(pCxt, &yymsp[0].minor.yy1109), OP_TYPE_EQUAL); } -#line 6984 "sql.c" - break; - case 283: /* cmd ::= SHOW STREAMS */ -#line 526 "sql.y" -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STREAMS_STMT); } -#line 6989 "sql.c" - break; - case 284: /* cmd ::= SHOW ACCOUNTS */ -#line 527 "sql.y" -{ pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } -#line 6994 "sql.c" - break; - case 285: /* cmd ::= SHOW APPS */ -#line 528 "sql.y" -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_APPS_STMT); } -#line 6999 "sql.c" - break; - case 286: /* cmd ::= SHOW CONNECTIONS */ -#line 529 "sql.y" -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONNECTIONS_STMT); } -#line 7004 "sql.c" - break; - case 287: /* cmd ::= SHOW LICENCES */ - case 288: /* cmd ::= SHOW GRANTS */ yytestcase(yyruleno==288); -#line 530 "sql.y" -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LICENCES_STMT); } -#line 7010 "sql.c" - break; - case 289: /* cmd ::= SHOW GRANTS FULL */ -#line 532 "sql.y" -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_GRANTS_FULL_STMT); } -#line 7015 "sql.c" - break; - case 290: /* cmd ::= SHOW GRANTS LOGS */ -#line 533 "sql.y" -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_GRANTS_LOGS_STMT); } -#line 7020 "sql.c" - break; - case 291: /* cmd ::= SHOW CLUSTER MACHINES */ -#line 534 "sql.y" -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CLUSTER_MACHINES_STMT); } -#line 7025 "sql.c" - break; - case 292: /* cmd ::= SHOW CREATE DATABASE db_name */ -#line 535 "sql.y" -{ pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy1109); } -#line 7030 "sql.c" - break; - case 293: /* cmd ::= SHOW CREATE TABLE full_table_name */ -#line 536 "sql.y" -{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy416); } -#line 7035 "sql.c" - break; - case 294: /* cmd ::= SHOW CREATE STABLE full_table_name */ -#line 537 "sql.y" -{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, -yymsp[0].minor.yy416); } -#line 7041 "sql.c" - break; - case 295: /* cmd ::= SHOW ENCRYPTIONS */ -#line 539 "sql.y" -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_ENCRYPTIONS_STMT); } -#line 7046 "sql.c" - break; - case 296: /* cmd ::= SHOW QUERIES */ -#line 540 "sql.y" -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QUERIES_STMT); } -#line 7051 "sql.c" - break; - case 297: /* cmd ::= SHOW SCORES */ -#line 541 "sql.y" -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SCORES_STMT); } -#line 7056 "sql.c" - break; - case 298: /* cmd ::= SHOW TOPICS */ -#line 542 "sql.y" -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TOPICS_STMT); } -#line 7061 "sql.c" - break; - case 299: /* cmd ::= SHOW VARIABLES */ - case 300: /* cmd ::= SHOW CLUSTER VARIABLES */ yytestcase(yyruleno==300); -#line 543 "sql.y" -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VARIABLES_STMT); } -#line 7067 "sql.c" - break; - case 301: /* cmd ::= SHOW LOCAL VARIABLES */ -#line 545 "sql.y" -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LOCAL_VARIABLES_STMT); } -#line 7072 "sql.c" - break; - case 302: /* cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ -#line 546 "sql.y" -{ pCxt->pRootNode = createShowDnodeVariablesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[-2].minor.yy0), yymsp[0].minor.yy416); } -#line 7077 "sql.c" - break; - case 303: /* cmd ::= SHOW BNODES */ -#line 547 "sql.y" -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_BNODES_STMT); } -#line 7082 "sql.c" - break; - case 304: /* cmd ::= SHOW SNODES */ -#line 548 "sql.y" -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SNODES_STMT); } -#line 7087 "sql.c" - break; - case 305: /* cmd ::= SHOW CLUSTER */ -#line 549 "sql.y" -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CLUSTER_STMT); } -#line 7092 "sql.c" - break; - case 306: /* cmd ::= SHOW TRANSACTIONS */ -#line 550 "sql.y" -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TRANSACTIONS_STMT); } -#line 7097 "sql.c" - break; - case 307: /* cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ -#line 551 "sql.y" -{ pCxt->pRootNode = createShowTableDistributedStmt(pCxt, yymsp[0].minor.yy416); } -#line 7102 "sql.c" - break; - case 308: /* cmd ::= SHOW CONSUMERS */ -#line 552 "sql.y" -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONSUMERS_STMT); } -#line 7107 "sql.c" - break; - case 309: /* cmd ::= SHOW SUBSCRIPTIONS */ -#line 553 "sql.y" -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SUBSCRIPTIONS_STMT); } -#line 7112 "sql.c" - break; - case 310: /* cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ -#line 554 "sql.y" -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, yymsp[0].minor.yy416, yymsp[-1].minor.yy416, OP_TYPE_EQUAL); } -#line 7117 "sql.c" - break; - case 311: /* cmd ::= SHOW TAGS FROM db_name NK_DOT table_name */ -#line 555 "sql.y" -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy1109), createIdentifierValueNode(pCxt, &yymsp[0].minor.yy1109), OP_TYPE_EQUAL); } -#line 7122 "sql.c" - break; - case 312: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ -#line 556 "sql.y" -{ pCxt->pRootNode = createShowTableTagsStmt(pCxt, yymsp[-1].minor.yy416, yymsp[0].minor.yy416, yymsp[-3].minor.yy316); } -#line 7127 "sql.c" - break; - case 313: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name */ -#line 557 "sql.y" -{ pCxt->pRootNode = createShowTableTagsStmt(pCxt, createIdentifierValueNode(pCxt, &yymsp[0].minor.yy1109), createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy1109), yymsp[-4].minor.yy316); } -#line 7132 "sql.c" - break; - case 314: /* cmd ::= SHOW VNODES ON DNODE NK_INTEGER */ -#line 558 "sql.y" -{ pCxt->pRootNode = createShowVnodesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0), NULL); } -#line 7137 "sql.c" - break; - case 315: /* cmd ::= SHOW VNODES */ -#line 559 "sql.y" -{ pCxt->pRootNode = createShowVnodesStmt(pCxt, NULL, NULL); } -#line 7142 "sql.c" - break; - case 316: /* cmd ::= SHOW db_name_cond_opt ALIVE */ -#line 561 "sql.y" -{ pCxt->pRootNode = createShowAliveStmt(pCxt, yymsp[-1].minor.yy416, QUERY_NODE_SHOW_DB_ALIVE_STMT); } -#line 7147 "sql.c" - break; - case 317: /* cmd ::= SHOW CLUSTER ALIVE */ -#line 562 "sql.y" -{ pCxt->pRootNode = createShowAliveStmt(pCxt, NULL, QUERY_NODE_SHOW_CLUSTER_ALIVE_STMT); } -#line 7152 "sql.c" - break; - case 318: /* cmd ::= SHOW db_name_cond_opt VIEWS like_pattern_opt */ -#line 563 "sql.y" -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VIEWS_STMT, yymsp[-2].minor.yy416, yymsp[0].minor.yy416, OP_TYPE_LIKE); } -#line 7157 "sql.c" - break; - case 319: /* cmd ::= SHOW CREATE VIEW full_table_name */ -#line 564 "sql.y" -{ pCxt->pRootNode = createShowCreateViewStmt(pCxt, QUERY_NODE_SHOW_CREATE_VIEW_STMT, yymsp[0].minor.yy416); } -#line 7162 "sql.c" - break; - case 320: /* cmd ::= SHOW COMPACTS */ -#line 565 "sql.y" -{ pCxt->pRootNode = createShowCompactsStmt(pCxt, QUERY_NODE_SHOW_COMPACTS_STMT); } -#line 7167 "sql.c" - break; - case 321: /* cmd ::= SHOW COMPACT NK_INTEGER */ -#line 566 "sql.y" -{ pCxt->pRootNode = createShowCompactDetailsStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } -#line 7172 "sql.c" - break; - case 322: /* table_kind_db_name_cond_opt ::= */ -#line 570 "sql.y" -{ yymsp[1].minor.yy925.kind = SHOW_KIND_ALL; yymsp[1].minor.yy925.dbName = nil_token; } -#line 7177 "sql.c" - break; - case 323: /* table_kind_db_name_cond_opt ::= table_kind */ -#line 571 "sql.y" -{ yylhsminor.yy925.kind = yymsp[0].minor.yy681; yylhsminor.yy925.dbName = nil_token; } -#line 7182 "sql.c" - yymsp[0].minor.yy925 = yylhsminor.yy925; - break; - case 324: /* table_kind_db_name_cond_opt ::= db_name NK_DOT */ -#line 572 "sql.y" -{ yylhsminor.yy925.kind = SHOW_KIND_ALL; yylhsminor.yy925.dbName = yymsp[-1].minor.yy1109; } -#line 7188 "sql.c" - yymsp[-1].minor.yy925 = yylhsminor.yy925; - break; - case 325: /* table_kind_db_name_cond_opt ::= table_kind db_name NK_DOT */ -#line 573 "sql.y" -{ yylhsminor.yy925.kind = yymsp[-2].minor.yy681; yylhsminor.yy925.dbName = yymsp[-1].minor.yy1109; } -#line 7194 "sql.c" - yymsp[-2].minor.yy925 = yylhsminor.yy925; - break; - case 326: /* table_kind ::= NORMAL */ -#line 577 "sql.y" -{ yymsp[0].minor.yy681 = SHOW_KIND_TABLES_NORMAL; } -#line 7200 "sql.c" - break; - case 327: /* table_kind ::= CHILD */ -#line 578 "sql.y" -{ yymsp[0].minor.yy681 = SHOW_KIND_TABLES_CHILD; } -#line 7205 "sql.c" - break; - case 328: /* db_name_cond_opt ::= */ - case 333: /* from_db_opt ::= */ yytestcase(yyruleno==333); -#line 580 "sql.y" -{ yymsp[1].minor.yy416 = createDefaultDatabaseCondValue(pCxt); } -#line 7211 "sql.c" - break; - case 329: /* db_name_cond_opt ::= db_name NK_DOT */ -#line 581 "sql.y" -{ yylhsminor.yy416 = createIdentifierValueNode(pCxt, &yymsp[-1].minor.yy1109); } -#line 7216 "sql.c" - yymsp[-1].minor.yy416 = yylhsminor.yy416; - break; - case 331: /* like_pattern_opt ::= LIKE NK_STRING */ -#line 584 "sql.y" -{ yymsp[-1].minor.yy416 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } -#line 7222 "sql.c" - break; - case 332: /* table_name_cond ::= table_name */ -#line 586 "sql.y" -{ yylhsminor.yy416 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy1109); } -#line 7227 "sql.c" - yymsp[0].minor.yy416 = yylhsminor.yy416; - break; - case 334: /* from_db_opt ::= FROM db_name */ -#line 589 "sql.y" -{ yymsp[-1].minor.yy416 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy1109); } -#line 7233 "sql.c" - break; - case 338: /* tag_item ::= TBNAME */ -#line 597 "sql.y" -{ yylhsminor.yy416 = setProjectionAlias(pCxt, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL), &yymsp[0].minor.yy0); } -#line 7238 "sql.c" - yymsp[0].minor.yy416 = yylhsminor.yy416; - break; - case 341: /* tag_item ::= column_name column_alias */ -#line 600 "sql.y" -{ yylhsminor.yy416 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-1].minor.yy1109), &yymsp[0].minor.yy1109); } -#line 7244 "sql.c" - yymsp[-1].minor.yy416 = yylhsminor.yy416; - break; - case 342: /* tag_item ::= column_name AS column_alias */ -#line 601 "sql.y" -{ yylhsminor.yy416 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-2].minor.yy1109), &yymsp[0].minor.yy1109); } -#line 7250 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 343: /* db_kind_opt ::= */ -#line 605 "sql.y" -{ yymsp[1].minor.yy681 = SHOW_KIND_ALL; } -#line 7256 "sql.c" - break; - case 344: /* db_kind_opt ::= USER */ -#line 606 "sql.y" -{ yymsp[0].minor.yy681 = SHOW_KIND_DATABASES_USER; } -#line 7261 "sql.c" - break; - case 345: /* db_kind_opt ::= SYSTEM */ -#line 607 "sql.y" -{ yymsp[0].minor.yy681 = SHOW_KIND_DATABASES_SYSTEM; } -#line 7266 "sql.c" - break; - case 346: /* cmd ::= CREATE TSMA not_exists_opt tsma_name ON full_table_name tsma_func_list INTERVAL NK_LP duration_literal NK_RP */ -#line 613 "sql.y" -{ pCxt->pRootNode = createCreateTSMAStmt(pCxt, yymsp[-8].minor.yy209, &yymsp[-7].minor.yy1109, yymsp[-4].minor.yy416, yymsp[-5].minor.yy416, releaseRawExprNode(pCxt, yymsp[-1].minor.yy416)); } -#line 7271 "sql.c" - break; - case 347: /* cmd ::= CREATE RECURSIVE TSMA not_exists_opt tsma_name ON full_table_name INTERVAL NK_LP duration_literal NK_RP */ -#line 615 "sql.y" -{ pCxt->pRootNode = createCreateTSMAStmt(pCxt, yymsp[-7].minor.yy209, &yymsp[-6].minor.yy1109, NULL, yymsp[-4].minor.yy416, releaseRawExprNode(pCxt, yymsp[-1].minor.yy416)); } -#line 7276 "sql.c" - break; - case 348: /* cmd ::= DROP TSMA exists_opt full_tsma_name */ -#line 616 "sql.y" -{ pCxt->pRootNode = createDropTSMAStmt(pCxt, yymsp[-1].minor.yy209, yymsp[0].minor.yy416); } -#line 7281 "sql.c" - break; - case 349: /* cmd ::= SHOW db_name_cond_opt TSMAS */ -#line 617 "sql.y" -{ pCxt->pRootNode = createShowTSMASStmt(pCxt, yymsp[-1].minor.yy416); } -#line 7286 "sql.c" - break; - case 352: /* tsma_func_list ::= FUNCTION NK_LP func_list NK_RP */ -#line 624 "sql.y" -{ yymsp[-3].minor.yy416 = createTSMAOptions(pCxt, yymsp[-1].minor.yy316); } -#line 7291 "sql.c" - break; - case 353: /* cmd ::= CREATE SMA INDEX not_exists_opt col_name ON full_table_name index_options */ -#line 628 "sql.y" -{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy209, yymsp[-3].minor.yy416, yymsp[-1].minor.yy416, NULL, yymsp[0].minor.yy416); } -#line 7296 "sql.c" - break; - case 354: /* cmd ::= CREATE INDEX not_exists_opt col_name ON full_table_name NK_LP col_name_list NK_RP */ -#line 630 "sql.y" -{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_NORMAL, yymsp[-6].minor.yy209, yymsp[-5].minor.yy416, yymsp[-3].minor.yy416, yymsp[-1].minor.yy316, NULL); } -#line 7301 "sql.c" - break; - case 355: /* cmd ::= DROP INDEX exists_opt full_index_name */ -#line 631 "sql.y" -{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-1].minor.yy209, yymsp[0].minor.yy416); } -#line 7306 "sql.c" - break; - case 356: /* full_index_name ::= index_name */ -#line 633 "sql.y" -{ yylhsminor.yy416 = createRealTableNodeForIndexName(pCxt, NULL, &yymsp[0].minor.yy1109); } -#line 7311 "sql.c" - yymsp[0].minor.yy416 = yylhsminor.yy416; - break; - case 357: /* full_index_name ::= db_name NK_DOT index_name */ -#line 634 "sql.y" -{ yylhsminor.yy416 = createRealTableNodeForIndexName(pCxt, &yymsp[-2].minor.yy1109, &yymsp[0].minor.yy1109); } -#line 7317 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 358: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ -#line 637 "sql.y" -{ yymsp[-9].minor.yy416 = createIndexOption(pCxt, yymsp[-7].minor.yy316, releaseRawExprNode(pCxt, yymsp[-3].minor.yy416), NULL, yymsp[-1].minor.yy416, yymsp[0].minor.yy416); } -#line 7323 "sql.c" - break; - case 359: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt sma_stream_opt */ -#line 640 "sql.y" -{ yymsp[-11].minor.yy416 = createIndexOption(pCxt, yymsp[-9].minor.yy316, releaseRawExprNode(pCxt, yymsp[-5].minor.yy416), releaseRawExprNode(pCxt, yymsp[-3].minor.yy416), yymsp[-1].minor.yy416, yymsp[0].minor.yy416); } -#line 7328 "sql.c" - break; - case 362: /* func ::= sma_func_name NK_LP expression_list NK_RP */ -#line 647 "sql.y" -{ yylhsminor.yy416 = createFunctionNode(pCxt, &yymsp[-3].minor.yy1109, yymsp[-1].minor.yy316); } -#line 7333 "sql.c" - yymsp[-3].minor.yy416 = yylhsminor.yy416; - break; - case 363: /* sma_func_name ::= function_name */ - case 637: /* alias_opt ::= table_alias */ yytestcase(yyruleno==637); -#line 651 "sql.y" -{ yylhsminor.yy1109 = yymsp[0].minor.yy1109; } -#line 7340 "sql.c" - yymsp[0].minor.yy1109 = yylhsminor.yy1109; - break; - case 368: /* sma_stream_opt ::= */ - case 418: /* stream_options ::= */ yytestcase(yyruleno==418); -#line 657 "sql.y" -{ yymsp[1].minor.yy416 = createStreamOptions(pCxt); } -#line 7347 "sql.c" - break; - case 369: /* sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ -#line 658 "sql.y" -{ ((SStreamOptions*)yymsp[-2].minor.yy416)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy416); yylhsminor.yy416 = yymsp[-2].minor.yy416; } -#line 7352 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 370: /* sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ -#line 659 "sql.y" -{ ((SStreamOptions*)yymsp[-2].minor.yy416)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy416); yylhsminor.yy416 = yymsp[-2].minor.yy416; } -#line 7358 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 371: /* sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ -#line 660 "sql.y" -{ ((SStreamOptions*)yymsp[-2].minor.yy416)->pDeleteMark = releaseRawExprNode(pCxt, yymsp[0].minor.yy416); yylhsminor.yy416 = yymsp[-2].minor.yy416; } -#line 7364 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 372: /* with_meta ::= AS */ -#line 665 "sql.y" -{ yymsp[0].minor.yy820 = 0; } -#line 7370 "sql.c" - break; - case 373: /* with_meta ::= WITH META AS */ -#line 666 "sql.y" -{ yymsp[-2].minor.yy820 = 1; } -#line 7375 "sql.c" - break; - case 374: /* with_meta ::= ONLY META AS */ -#line 667 "sql.y" -{ yymsp[-2].minor.yy820 = 2; } -#line 7380 "sql.c" - break; - case 375: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ -#line 669 "sql.y" -{ pCxt->pRootNode = createCreateTopicStmtUseQuery(pCxt, yymsp[-3].minor.yy209, &yymsp[-2].minor.yy1109, yymsp[0].minor.yy416); } -#line 7385 "sql.c" - break; - case 376: /* cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */ -#line 671 "sql.y" -{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-4].minor.yy209, &yymsp[-3].minor.yy1109, &yymsp[0].minor.yy1109, yymsp[-2].minor.yy820); } -#line 7390 "sql.c" - break; - case 377: /* cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */ -#line 673 "sql.y" -{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-5].minor.yy209, &yymsp[-4].minor.yy1109, yymsp[-1].minor.yy416, yymsp[-3].minor.yy820, yymsp[0].minor.yy416); } -#line 7395 "sql.c" - break; - case 378: /* cmd ::= DROP TOPIC exists_opt topic_name */ -#line 675 "sql.y" -{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy209, &yymsp[0].minor.yy1109); } -#line 7400 "sql.c" - break; - case 379: /* cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ -#line 676 "sql.y" -{ pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy209, &yymsp[-2].minor.yy1109, &yymsp[0].minor.yy1109); } -#line 7405 "sql.c" - break; - case 380: /* cmd ::= DESC full_table_name */ - case 381: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==381); -#line 679 "sql.y" -{ pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy416); } -#line 7411 "sql.c" - break; - case 382: /* cmd ::= RESET QUERY CACHE */ -#line 683 "sql.y" -{ pCxt->pRootNode = createResetQueryCacheStmt(pCxt); } -#line 7416 "sql.c" - break; - case 383: /* cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ - case 384: /* cmd ::= EXPLAIN analyze_opt explain_options insert_query */ yytestcase(yyruleno==384); -#line 686 "sql.y" -{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy209, yymsp[-1].minor.yy416, yymsp[0].minor.yy416); } -#line 7422 "sql.c" - break; - case 387: /* explain_options ::= */ -#line 694 "sql.y" -{ yymsp[1].minor.yy416 = createDefaultExplainOptions(pCxt); } -#line 7427 "sql.c" - break; - case 388: /* explain_options ::= explain_options VERBOSE NK_BOOL */ -#line 695 "sql.y" -{ yylhsminor.yy416 = setExplainVerbose(pCxt, yymsp[-2].minor.yy416, &yymsp[0].minor.yy0); } -#line 7432 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 389: /* explain_options ::= explain_options RATIO NK_FLOAT */ -#line 696 "sql.y" -{ yylhsminor.yy416 = setExplainRatio(pCxt, yymsp[-2].minor.yy416, &yymsp[0].minor.yy0); } -#line 7438 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 390: /* cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt */ -#line 701 "sql.y" -{ pCxt->pRootNode = createCreateFunctionStmt(pCxt, yymsp[-7].minor.yy209, yymsp[-9].minor.yy209, &yymsp[-6].minor.yy1109, &yymsp[-4].minor.yy0, yymsp[-2].minor.yy952, yymsp[-1].minor.yy820, &yymsp[0].minor.yy1109, yymsp[-10].minor.yy209); } -#line 7444 "sql.c" - break; - case 391: /* cmd ::= DROP FUNCTION exists_opt function_name */ -#line 702 "sql.y" -{ pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy209, &yymsp[0].minor.yy1109); } -#line 7449 "sql.c" - break; - case 396: /* language_opt ::= */ - case 441: /* on_vgroup_id ::= */ yytestcase(yyruleno==441); -#line 716 "sql.y" -{ yymsp[1].minor.yy1109 = nil_token; } -#line 7455 "sql.c" - break; - case 397: /* language_opt ::= LANGUAGE NK_STRING */ - case 442: /* on_vgroup_id ::= ON NK_INTEGER */ yytestcase(yyruleno==442); -#line 717 "sql.y" -{ yymsp[-1].minor.yy1109 = yymsp[0].minor.yy0; } -#line 7461 "sql.c" - break; - case 400: /* cmd ::= CREATE or_replace_opt VIEW full_view_name AS query_or_subquery */ -#line 726 "sql.y" -{ pCxt->pRootNode = createCreateViewStmt(pCxt, yymsp[-4].minor.yy209, yymsp[-2].minor.yy416, &yymsp[-1].minor.yy0, yymsp[0].minor.yy416); } -#line 7466 "sql.c" - break; - case 401: /* cmd ::= DROP VIEW exists_opt full_view_name */ -#line 727 "sql.y" -{ pCxt->pRootNode = createDropViewStmt(pCxt, yymsp[-1].minor.yy209, yymsp[0].minor.yy416); } -#line 7471 "sql.c" - break; - case 402: /* full_view_name ::= view_name */ -#line 729 "sql.y" -{ yylhsminor.yy416 = createViewNode(pCxt, NULL, &yymsp[0].minor.yy1109); } -#line 7476 "sql.c" - yymsp[0].minor.yy416 = yylhsminor.yy416; - break; - case 403: /* full_view_name ::= db_name NK_DOT view_name */ -#line 730 "sql.y" -{ yylhsminor.yy416 = createViewNode(pCxt, &yymsp[-2].minor.yy1109, &yymsp[0].minor.yy1109); } -#line 7482 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 404: /* cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery */ -#line 735 "sql.y" -{ pCxt->pRootNode = createCreateStreamStmt(pCxt, yymsp[-9].minor.yy209, &yymsp[-8].minor.yy1109, yymsp[-5].minor.yy416, yymsp[-7].minor.yy416, yymsp[-3].minor.yy316, yymsp[-2].minor.yy416, yymsp[0].minor.yy416, yymsp[-4].minor.yy316); } -#line 7488 "sql.c" - break; - case 405: /* cmd ::= DROP STREAM exists_opt stream_name */ -#line 736 "sql.y" -{ pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy209, &yymsp[0].minor.yy1109); } -#line 7493 "sql.c" - break; - case 406: /* cmd ::= PAUSE STREAM exists_opt stream_name */ -#line 737 "sql.y" -{ pCxt->pRootNode = createPauseStreamStmt(pCxt, yymsp[-1].minor.yy209, &yymsp[0].minor.yy1109); } -#line 7498 "sql.c" - break; - case 407: /* cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */ -#line 738 "sql.y" -{ pCxt->pRootNode = createResumeStreamStmt(pCxt, yymsp[-2].minor.yy209, yymsp[-1].minor.yy209, &yymsp[0].minor.yy1109); } -#line 7503 "sql.c" - break; - case 412: /* column_stream_def ::= column_name stream_col_options */ -#line 751 "sql.y" -{ yylhsminor.yy416 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy1109, createDataType(TSDB_DATA_TYPE_NULL), yymsp[0].minor.yy416); } -#line 7508 "sql.c" - yymsp[-1].minor.yy416 = yylhsminor.yy416; - break; - case 413: /* stream_col_options ::= */ - case 750: /* column_options ::= */ yytestcase(yyruleno==750); -#line 752 "sql.y" -{ yymsp[1].minor.yy416 = createDefaultColumnOptions(pCxt); } -#line 7515 "sql.c" - break; - case 414: /* stream_col_options ::= stream_col_options PRIMARY KEY */ - case 751: /* column_options ::= column_options PRIMARY KEY */ yytestcase(yyruleno==751); -#line 753 "sql.y" -{ yylhsminor.yy416 = setColumnOptions(pCxt, yymsp[-2].minor.yy416, COLUMN_OPTION_PRIMARYKEY, NULL); } -#line 7521 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 419: /* stream_options ::= stream_options TRIGGER AT_ONCE */ - case 420: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ yytestcase(yyruleno==420); -#line 763 "sql.y" -{ yylhsminor.yy416 = setStreamOptions(pCxt, yymsp[-2].minor.yy416, SOPT_TRIGGER_TYPE_SET, &yymsp[0].minor.yy0, NULL); } -#line 7528 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 421: /* stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ -#line 765 "sql.y" -{ yylhsminor.yy416 = setStreamOptions(pCxt, yymsp[-3].minor.yy416, SOPT_TRIGGER_TYPE_SET, &yymsp[-1].minor.yy0, releaseRawExprNode(pCxt, yymsp[0].minor.yy416)); } -#line 7534 "sql.c" - yymsp[-3].minor.yy416 = yylhsminor.yy416; - break; - case 422: /* stream_options ::= stream_options WATERMARK duration_literal */ -#line 766 "sql.y" -{ yylhsminor.yy416 = setStreamOptions(pCxt, yymsp[-2].minor.yy416, SOPT_WATERMARK_SET, NULL, releaseRawExprNode(pCxt, yymsp[0].minor.yy416)); } -#line 7540 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 423: /* stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ -#line 767 "sql.y" -{ yylhsminor.yy416 = setStreamOptions(pCxt, yymsp[-3].minor.yy416, SOPT_IGNORE_EXPIRED_SET, &yymsp[0].minor.yy0, NULL); } -#line 7546 "sql.c" - yymsp[-3].minor.yy416 = yylhsminor.yy416; - break; - case 424: /* stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ -#line 768 "sql.y" -{ yylhsminor.yy416 = setStreamOptions(pCxt, yymsp[-2].minor.yy416, SOPT_FILL_HISTORY_SET, &yymsp[0].minor.yy0, NULL); } -#line 7552 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 425: /* stream_options ::= stream_options DELETE_MARK duration_literal */ -#line 769 "sql.y" -{ yylhsminor.yy416 = setStreamOptions(pCxt, yymsp[-2].minor.yy416, SOPT_DELETE_MARK_SET, NULL, releaseRawExprNode(pCxt, yymsp[0].minor.yy416)); } -#line 7558 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 426: /* stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ -#line 770 "sql.y" -{ yylhsminor.yy416 = setStreamOptions(pCxt, yymsp[-3].minor.yy416, SOPT_IGNORE_UPDATE_SET, &yymsp[0].minor.yy0, NULL); } -#line 7564 "sql.c" - yymsp[-3].minor.yy416 = yylhsminor.yy416; - break; - case 428: /* subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ - case 694: /* sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ yytestcase(yyruleno==694); - case 718: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==718); -#line 773 "sql.y" -{ yymsp[-3].minor.yy416 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy416); } -#line 7572 "sql.c" - break; - case 431: /* cmd ::= KILL CONNECTION NK_INTEGER */ -#line 781 "sql.y" -{ pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_CONNECTION_STMT, &yymsp[0].minor.yy0); } -#line 7577 "sql.c" - break; - case 432: /* cmd ::= KILL QUERY NK_STRING */ -#line 782 "sql.y" -{ pCxt->pRootNode = createKillQueryStmt(pCxt, &yymsp[0].minor.yy0); } -#line 7582 "sql.c" - break; - case 433: /* cmd ::= KILL TRANSACTION NK_INTEGER */ -#line 783 "sql.y" -{ pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_TRANSACTION_STMT, &yymsp[0].minor.yy0); } -#line 7587 "sql.c" - break; - case 434: /* cmd ::= KILL COMPACT NK_INTEGER */ -#line 784 "sql.y" -{ pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_COMPACT_STMT, &yymsp[0].minor.yy0); } -#line 7592 "sql.c" - break; - case 435: /* cmd ::= BALANCE VGROUP */ -#line 787 "sql.y" -{ pCxt->pRootNode = createBalanceVgroupStmt(pCxt); } -#line 7597 "sql.c" - break; - case 436: /* cmd ::= BALANCE VGROUP LEADER on_vgroup_id */ -#line 788 "sql.y" -{ pCxt->pRootNode = createBalanceVgroupLeaderStmt(pCxt, &yymsp[0].minor.yy1109); } -#line 7602 "sql.c" - break; - case 437: /* cmd ::= BALANCE VGROUP LEADER DATABASE db_name */ -#line 789 "sql.y" -{ pCxt->pRootNode = createBalanceVgroupLeaderDBNameStmt(pCxt, &yymsp[0].minor.yy1109); } -#line 7607 "sql.c" - break; - case 438: /* cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ -#line 790 "sql.y" -{ pCxt->pRootNode = createMergeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } -#line 7612 "sql.c" - break; - case 439: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ -#line 791 "sql.y" -{ pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy316); } -#line 7617 "sql.c" - break; - case 440: /* cmd ::= SPLIT VGROUP NK_INTEGER */ -#line 792 "sql.y" -{ pCxt->pRootNode = createSplitVgroupStmt(pCxt, &yymsp[0].minor.yy0); } -#line 7622 "sql.c" - break; - case 443: /* dnode_list ::= DNODE NK_INTEGER */ -#line 801 "sql.y" -{ yymsp[-1].minor.yy316 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } -#line 7627 "sql.c" - break; - case 445: /* cmd ::= DELETE FROM full_table_name where_clause_opt */ -#line 808 "sql.y" -{ pCxt->pRootNode = createDeleteStmt(pCxt, yymsp[-1].minor.yy416, yymsp[0].minor.yy416); } -#line 7632 "sql.c" - break; - case 448: /* insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ -#line 817 "sql.y" -{ yymsp[-6].minor.yy416 = createInsertStmt(pCxt, yymsp[-4].minor.yy416, yymsp[-2].minor.yy316, yymsp[0].minor.yy416); } -#line 7637 "sql.c" - break; - case 449: /* insert_query ::= INSERT INTO full_table_name query_or_subquery */ -#line 818 "sql.y" -{ yymsp[-3].minor.yy416 = createInsertStmt(pCxt, yymsp[-1].minor.yy416, NULL, yymsp[0].minor.yy416); } -#line 7642 "sql.c" - break; - case 450: /* tags_literal ::= NK_INTEGER */ - case 462: /* tags_literal ::= NK_BIN */ yytestcase(yyruleno==462); - case 471: /* tags_literal ::= NK_HEX */ yytestcase(yyruleno==471); -#line 821 "sql.y" -{ yylhsminor.yy416 = createRawValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0, NULL); } -#line 7649 "sql.c" - yymsp[0].minor.yy416 = yylhsminor.yy416; - break; - case 451: /* tags_literal ::= NK_INTEGER NK_PLUS duration_literal */ - case 452: /* tags_literal ::= NK_INTEGER NK_MINUS duration_literal */ yytestcase(yyruleno==452); - case 463: /* tags_literal ::= NK_BIN NK_PLUS duration_literal */ yytestcase(yyruleno==463); - case 464: /* tags_literal ::= NK_BIN NK_MINUS duration_literal */ yytestcase(yyruleno==464); - case 472: /* tags_literal ::= NK_HEX NK_PLUS duration_literal */ yytestcase(yyruleno==472); - case 473: /* tags_literal ::= NK_HEX NK_MINUS duration_literal */ yytestcase(yyruleno==473); - case 481: /* tags_literal ::= NK_STRING NK_PLUS duration_literal */ yytestcase(yyruleno==481); - case 482: /* tags_literal ::= NK_STRING NK_MINUS duration_literal */ yytestcase(yyruleno==482); -#line 822 "sql.y" -{ - SToken l = yymsp[-2].minor.yy0; - SToken r = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy416); - l.n = (r.z + r.n) - l.z; - yylhsminor.yy416 = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, yymsp[0].minor.yy416); - } -#line 7667 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 453: /* tags_literal ::= NK_PLUS NK_INTEGER */ - case 456: /* tags_literal ::= NK_MINUS NK_INTEGER */ yytestcase(yyruleno==456); - case 465: /* tags_literal ::= NK_PLUS NK_BIN */ yytestcase(yyruleno==465); - case 468: /* tags_literal ::= NK_MINUS NK_BIN */ yytestcase(yyruleno==468); - case 474: /* tags_literal ::= NK_PLUS NK_HEX */ yytestcase(yyruleno==474); - case 477: /* tags_literal ::= NK_MINUS NK_HEX */ yytestcase(yyruleno==477); -#line 834 "sql.y" -{ - SToken t = yymsp[-1].minor.yy0; - t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy416 = createRawValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &t, NULL); - } -#line 7682 "sql.c" - yymsp[-1].minor.yy416 = yylhsminor.yy416; - break; - case 454: /* tags_literal ::= NK_PLUS NK_INTEGER NK_PLUS duration_literal */ - case 455: /* tags_literal ::= NK_PLUS NK_INTEGER NK_MINUS duration_literal */ yytestcase(yyruleno==455); - case 457: /* tags_literal ::= NK_MINUS NK_INTEGER NK_PLUS duration_literal */ yytestcase(yyruleno==457); - case 458: /* tags_literal ::= NK_MINUS NK_INTEGER NK_MINUS duration_literal */ yytestcase(yyruleno==458); - case 466: /* tags_literal ::= NK_PLUS NK_BIN NK_PLUS duration_literal */ yytestcase(yyruleno==466); - case 467: /* tags_literal ::= NK_PLUS NK_BIN NK_MINUS duration_literal */ yytestcase(yyruleno==467); - case 469: /* tags_literal ::= NK_MINUS NK_BIN NK_PLUS duration_literal */ yytestcase(yyruleno==469); - case 470: /* tags_literal ::= NK_MINUS NK_BIN NK_MINUS duration_literal */ yytestcase(yyruleno==470); - case 475: /* tags_literal ::= NK_PLUS NK_HEX NK_PLUS duration_literal */ yytestcase(yyruleno==475); - case 476: /* tags_literal ::= NK_PLUS NK_HEX NK_MINUS duration_literal */ yytestcase(yyruleno==476); - case 478: /* tags_literal ::= NK_MINUS NK_HEX NK_PLUS duration_literal */ yytestcase(yyruleno==478); - case 479: /* tags_literal ::= NK_MINUS NK_HEX NK_MINUS duration_literal */ yytestcase(yyruleno==479); -#line 839 "sql.y" -{ - SToken l = yymsp[-3].minor.yy0; - SToken r = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy416); - l.n = (r.z + r.n) - l.z; - yylhsminor.yy416 = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, yymsp[0].minor.yy416); - } -#line 7704 "sql.c" - yymsp[-3].minor.yy416 = yylhsminor.yy416; - break; - case 459: /* tags_literal ::= NK_FLOAT */ -#line 868 "sql.y" -{ yylhsminor.yy416 = createRawValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0, NULL); } -#line 7710 "sql.c" - yymsp[0].minor.yy416 = yylhsminor.yy416; - break; - case 460: /* tags_literal ::= NK_PLUS NK_FLOAT */ - case 461: /* tags_literal ::= NK_MINUS NK_FLOAT */ yytestcase(yyruleno==461); -#line 869 "sql.y" -{ - SToken t = yymsp[-1].minor.yy0; - t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy416 = createRawValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t, NULL); - } -#line 7721 "sql.c" - yymsp[-1].minor.yy416 = yylhsminor.yy416; - break; - case 480: /* tags_literal ::= NK_STRING */ -#line 975 "sql.y" -{ yylhsminor.yy416 = createRawValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0, NULL); } -#line 7727 "sql.c" - yymsp[0].minor.yy416 = yylhsminor.yy416; - break; - case 483: /* tags_literal ::= NK_BOOL */ -#line 988 "sql.y" -{ yylhsminor.yy416 = createRawValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0, NULL); } -#line 7733 "sql.c" - yymsp[0].minor.yy416 = yylhsminor.yy416; - break; - case 484: /* tags_literal ::= NULL */ -#line 989 "sql.y" -{ yylhsminor.yy416 = createRawValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0, NULL); } -#line 7739 "sql.c" - yymsp[0].minor.yy416 = yylhsminor.yy416; - break; - case 485: /* tags_literal ::= literal_func */ -#line 991 "sql.y" -{ yylhsminor.yy416 = createRawValueNode(pCxt, TSDB_DATA_TYPE_BINARY, NULL, yymsp[0].minor.yy416); } -#line 7745 "sql.c" - yymsp[0].minor.yy416 = yylhsminor.yy416; - break; - case 486: /* tags_literal ::= literal_func NK_PLUS duration_literal */ - case 487: /* tags_literal ::= literal_func NK_MINUS duration_literal */ yytestcase(yyruleno==487); -#line 992 "sql.y" -{ - SToken l = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy416); - SToken r = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy416); - l.n = (r.z + r.n) - l.z; - yylhsminor.yy416 = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, yymsp[-2].minor.yy416, yymsp[0].minor.yy416); - } -#line 7757 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 490: /* literal ::= NK_INTEGER */ -#line 1011 "sql.y" -{ yylhsminor.yy416 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0)); } -#line 7763 "sql.c" - yymsp[0].minor.yy416 = yylhsminor.yy416; - break; - case 491: /* literal ::= NK_FLOAT */ -#line 1012 "sql.y" -{ yylhsminor.yy416 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); } -#line 7769 "sql.c" - yymsp[0].minor.yy416 = yylhsminor.yy416; - break; - case 492: /* literal ::= NK_STRING */ -#line 1013 "sql.y" -{ yylhsminor.yy416 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } -#line 7775 "sql.c" - yymsp[0].minor.yy416 = yylhsminor.yy416; - break; - case 493: /* literal ::= NK_BOOL */ -#line 1014 "sql.y" -{ yylhsminor.yy416 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); } -#line 7781 "sql.c" - yymsp[0].minor.yy416 = yylhsminor.yy416; - break; - case 494: /* literal ::= TIMESTAMP NK_STRING */ -#line 1015 "sql.y" -{ yylhsminor.yy416 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); } -#line 7787 "sql.c" - yymsp[-1].minor.yy416 = yylhsminor.yy416; - break; - case 495: /* literal ::= duration_literal */ - case 505: /* signed_literal ::= signed */ yytestcase(yyruleno==505); - case 529: /* expr_or_subquery ::= expression */ yytestcase(yyruleno==529); - case 530: /* expression ::= literal */ yytestcase(yyruleno==530); - case 532: /* expression ::= column_reference */ yytestcase(yyruleno==532); - case 533: /* expression ::= function_expression */ yytestcase(yyruleno==533); - case 534: /* expression ::= case_when_expression */ yytestcase(yyruleno==534); - case 568: /* function_expression ::= literal_func */ yytestcase(yyruleno==568); - case 618: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==618); - case 622: /* boolean_primary ::= predicate */ yytestcase(yyruleno==622); - case 624: /* common_expression ::= expr_or_subquery */ yytestcase(yyruleno==624); - case 625: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==625); - case 628: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==628); - case 630: /* table_reference ::= table_primary */ yytestcase(yyruleno==630); - case 631: /* table_reference ::= joined_table */ yytestcase(yyruleno==631); - case 635: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==635); - case 720: /* query_simple ::= query_specification */ yytestcase(yyruleno==720); - case 721: /* query_simple ::= union_query_expression */ yytestcase(yyruleno==721); - case 724: /* query_simple_or_subquery ::= query_simple */ yytestcase(yyruleno==724); - case 726: /* query_or_subquery ::= query_expression */ yytestcase(yyruleno==726); -#line 1016 "sql.y" -{ yylhsminor.yy416 = yymsp[0].minor.yy416; } -#line 7812 "sql.c" - yymsp[0].minor.yy416 = yylhsminor.yy416; - break; - case 496: /* literal ::= NULL */ -#line 1017 "sql.y" -{ yylhsminor.yy416 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); } -#line 7818 "sql.c" - yymsp[0].minor.yy416 = yylhsminor.yy416; - break; - case 497: /* literal ::= NK_QUESTION */ -#line 1018 "sql.y" -{ yylhsminor.yy416 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); } -#line 7824 "sql.c" - yymsp[0].minor.yy416 = yylhsminor.yy416; - break; - case 498: /* duration_literal ::= NK_VARIABLE */ - case 695: /* interval_sliding_duration_literal ::= NK_VARIABLE */ yytestcase(yyruleno==695); - case 696: /* interval_sliding_duration_literal ::= NK_STRING */ yytestcase(yyruleno==696); - case 697: /* interval_sliding_duration_literal ::= NK_INTEGER */ yytestcase(yyruleno==697); -#line 1020 "sql.y" -{ yylhsminor.yy416 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } -#line 7833 "sql.c" - yymsp[0].minor.yy416 = yylhsminor.yy416; - break; - case 499: /* signed ::= NK_INTEGER */ -#line 1022 "sql.y" -{ yylhsminor.yy416 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } -#line 7839 "sql.c" - yymsp[0].minor.yy416 = yylhsminor.yy416; - break; - case 500: /* signed ::= NK_PLUS NK_INTEGER */ -#line 1023 "sql.y" -{ yymsp[-1].minor.yy416 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } -#line 7845 "sql.c" - break; - case 501: /* signed ::= NK_MINUS NK_INTEGER */ -#line 1024 "sql.y" -{ - SToken t = yymsp[-1].minor.yy0; - t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy416 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t); - } -#line 7854 "sql.c" - yymsp[-1].minor.yy416 = yylhsminor.yy416; - break; - case 502: /* signed ::= NK_FLOAT */ -#line 1029 "sql.y" -{ yylhsminor.yy416 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } -#line 7860 "sql.c" - yymsp[0].minor.yy416 = yylhsminor.yy416; - break; - case 503: /* signed ::= NK_PLUS NK_FLOAT */ -#line 1030 "sql.y" -{ yymsp[-1].minor.yy416 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } -#line 7866 "sql.c" - break; - case 504: /* signed ::= NK_MINUS NK_FLOAT */ -#line 1031 "sql.y" -{ - SToken t = yymsp[-1].minor.yy0; - t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy416 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t); - } -#line 7875 "sql.c" - yymsp[-1].minor.yy416 = yylhsminor.yy416; - break; - case 506: /* signed_literal ::= NK_STRING */ -#line 1038 "sql.y" -{ yylhsminor.yy416 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } -#line 7881 "sql.c" - yymsp[0].minor.yy416 = yylhsminor.yy416; - break; - case 507: /* signed_literal ::= NK_BOOL */ -#line 1039 "sql.y" -{ yylhsminor.yy416 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); } -#line 7887 "sql.c" - yymsp[0].minor.yy416 = yylhsminor.yy416; - break; - case 508: /* signed_literal ::= TIMESTAMP NK_STRING */ -#line 1040 "sql.y" -{ yymsp[-1].minor.yy416 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } -#line 7893 "sql.c" - break; - case 509: /* signed_literal ::= duration_literal */ - case 511: /* signed_literal ::= literal_func */ yytestcase(yyruleno==511); - case 589: /* star_func_para ::= expr_or_subquery */ yytestcase(yyruleno==589); - case 672: /* select_item ::= common_expression */ yytestcase(yyruleno==672); - case 682: /* partition_item ::= expr_or_subquery */ yytestcase(yyruleno==682); - case 725: /* query_simple_or_subquery ::= subquery */ yytestcase(yyruleno==725); - case 727: /* query_or_subquery ::= subquery */ yytestcase(yyruleno==727); - case 740: /* search_condition ::= common_expression */ yytestcase(yyruleno==740); -#line 1041 "sql.y" -{ yylhsminor.yy416 = releaseRawExprNode(pCxt, yymsp[0].minor.yy416); } -#line 7905 "sql.c" - yymsp[0].minor.yy416 = yylhsminor.yy416; - break; - case 510: /* signed_literal ::= NULL */ -#line 1042 "sql.y" -{ yylhsminor.yy416 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); } -#line 7911 "sql.c" - yymsp[0].minor.yy416 = yylhsminor.yy416; - break; - case 512: /* signed_literal ::= NK_QUESTION */ -#line 1044 "sql.y" -{ yylhsminor.yy416 = createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0); } -#line 7917 "sql.c" - yymsp[0].minor.yy416 = yylhsminor.yy416; - break; - case 531: /* expression ::= pseudo_column */ -#line 1110 "sql.y" -{ yylhsminor.yy416 = yymsp[0].minor.yy416; setRawExprNodeIsPseudoColumn(pCxt, yylhsminor.yy416, true); } -#line 7923 "sql.c" - yymsp[0].minor.yy416 = yylhsminor.yy416; - break; - case 535: /* expression ::= NK_LP expression NK_RP */ - case 623: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==623); - case 739: /* subquery ::= NK_LP subquery NK_RP */ yytestcase(yyruleno==739); -#line 1114 "sql.y" -{ yylhsminor.yy416 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy416)); } -#line 7931 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 536: /* expression ::= NK_PLUS expr_or_subquery */ -#line 1115 "sql.y" -{ - SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy416); - yylhsminor.yy416 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy416)); - } -#line 7940 "sql.c" - yymsp[-1].minor.yy416 = yylhsminor.yy416; - break; - case 537: /* expression ::= NK_MINUS expr_or_subquery */ -#line 1119 "sql.y" -{ - SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy416); - yylhsminor.yy416 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy416), NULL)); - } -#line 7949 "sql.c" - yymsp[-1].minor.yy416 = yylhsminor.yy416; - break; - case 538: /* expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ -#line 1123 "sql.y" -{ - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy416); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy416); - yylhsminor.yy416 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy416), releaseRawExprNode(pCxt, yymsp[0].minor.yy416))); - } -#line 7959 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 539: /* expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ -#line 1128 "sql.y" -{ - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy416); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy416); - yylhsminor.yy416 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy416), releaseRawExprNode(pCxt, yymsp[0].minor.yy416))); - } -#line 7969 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 540: /* expression ::= expr_or_subquery NK_STAR expr_or_subquery */ -#line 1133 "sql.y" -{ - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy416); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy416); - yylhsminor.yy416 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy416), releaseRawExprNode(pCxt, yymsp[0].minor.yy416))); - } -#line 7979 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 541: /* expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ -#line 1138 "sql.y" -{ - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy416); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy416); - yylhsminor.yy416 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy416), releaseRawExprNode(pCxt, yymsp[0].minor.yy416))); - } -#line 7989 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 542: /* expression ::= expr_or_subquery NK_REM expr_or_subquery */ -#line 1143 "sql.y" -{ - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy416); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy416); - yylhsminor.yy416 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_REM, releaseRawExprNode(pCxt, yymsp[-2].minor.yy416), releaseRawExprNode(pCxt, yymsp[0].minor.yy416))); - } -#line 7999 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 543: /* expression ::= column_reference NK_ARROW NK_STRING */ -#line 1148 "sql.y" -{ - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy416); - yylhsminor.yy416 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy416), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0))); - } -#line 8008 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 544: /* expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ -#line 1152 "sql.y" -{ - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy416); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy416); - yylhsminor.yy416 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy416), releaseRawExprNode(pCxt, yymsp[0].minor.yy416))); - } -#line 8018 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 545: /* expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ -#line 1157 "sql.y" -{ - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy416); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy416); - yylhsminor.yy416 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy416), releaseRawExprNode(pCxt, yymsp[0].minor.yy416))); - } -#line 8028 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 548: /* column_reference ::= column_name */ -#line 1168 "sql.y" -{ yylhsminor.yy416 = createRawExprNode(pCxt, &yymsp[0].minor.yy1109, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy1109)); } -#line 8034 "sql.c" - yymsp[0].minor.yy416 = yylhsminor.yy416; - break; - case 549: /* column_reference ::= table_name NK_DOT column_name */ -#line 1169 "sql.y" -{ yylhsminor.yy416 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy1109, &yymsp[0].minor.yy1109, createColumnNode(pCxt, &yymsp[-2].minor.yy1109, &yymsp[0].minor.yy1109)); } -#line 8040 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 550: /* column_reference ::= NK_ALIAS */ -#line 1170 "sql.y" -{ yylhsminor.yy416 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } -#line 8046 "sql.c" - yymsp[0].minor.yy416 = yylhsminor.yy416; - break; - case 551: /* column_reference ::= table_name NK_DOT NK_ALIAS */ -#line 1171 "sql.y" -{ yylhsminor.yy416 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy1109, &yymsp[0].minor.yy0, createColumnNode(pCxt, &yymsp[-2].minor.yy1109, &yymsp[0].minor.yy0)); } -#line 8052 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 552: /* pseudo_column ::= ROWTS */ - case 553: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==553); - case 555: /* pseudo_column ::= QSTART */ yytestcase(yyruleno==555); - case 556: /* pseudo_column ::= QEND */ yytestcase(yyruleno==556); - case 557: /* pseudo_column ::= QDURATION */ yytestcase(yyruleno==557); - case 558: /* pseudo_column ::= WSTART */ yytestcase(yyruleno==558); - case 559: /* pseudo_column ::= WEND */ yytestcase(yyruleno==559); - case 560: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==560); - case 561: /* pseudo_column ::= IROWTS */ yytestcase(yyruleno==561); - case 562: /* pseudo_column ::= ISFILLED */ yytestcase(yyruleno==562); - case 563: /* pseudo_column ::= QTAGS */ yytestcase(yyruleno==563); - case 570: /* literal_func ::= NOW */ yytestcase(yyruleno==570); - case 571: /* literal_func ::= TODAY */ yytestcase(yyruleno==571); -#line 1173 "sql.y" -{ yylhsminor.yy416 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); } -#line 8070 "sql.c" - yymsp[0].minor.yy416 = yylhsminor.yy416; - break; - case 554: /* pseudo_column ::= table_name NK_DOT TBNAME */ -#line 1175 "sql.y" -{ yylhsminor.yy416 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy1109, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy1109)))); } -#line 8076 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 564: /* function_expression ::= function_name NK_LP expression_list NK_RP */ - case 565: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==565); -#line 1186 "sql.y" -{ yylhsminor.yy416 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy1109, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy1109, yymsp[-1].minor.yy316)); } -#line 8083 "sql.c" - yymsp[-3].minor.yy416 = yylhsminor.yy416; - break; - case 566: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ - case 567: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name_default_len NK_RP */ yytestcase(yyruleno==567); -#line 1189 "sql.y" -{ yylhsminor.yy416 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy416), yymsp[-1].minor.yy952)); } -#line 8090 "sql.c" - yymsp[-5].minor.yy416 = yylhsminor.yy416; - break; - case 569: /* literal_func ::= noarg_func NK_LP NK_RP */ -#line 1195 "sql.y" -{ yylhsminor.yy416 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy1109, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy1109, NULL)); } -#line 8096 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 585: /* star_func_para_list ::= NK_STAR */ -#line 1220 "sql.y" -{ yylhsminor.yy316 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } -#line 8102 "sql.c" - yymsp[0].minor.yy316 = yylhsminor.yy316; - break; - case 590: /* star_func_para ::= table_name NK_DOT NK_STAR */ - case 675: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==675); -#line 1229 "sql.y" -{ yylhsminor.yy416 = createColumnNode(pCxt, &yymsp[-2].minor.yy1109, &yymsp[0].minor.yy0); } -#line 8109 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 591: /* case_when_expression ::= CASE when_then_list case_when_else_opt END */ -#line 1232 "sql.y" -{ yylhsminor.yy416 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, NULL, yymsp[-2].minor.yy316, yymsp[-1].minor.yy416)); } -#line 8115 "sql.c" - yymsp[-3].minor.yy416 = yylhsminor.yy416; - break; - case 592: /* case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ -#line 1234 "sql.y" -{ yylhsminor.yy416 = createRawExprNodeExt(pCxt, &yymsp[-4].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy416), yymsp[-2].minor.yy316, yymsp[-1].minor.yy416)); } -#line 8121 "sql.c" - yymsp[-4].minor.yy416 = yylhsminor.yy416; - break; - case 595: /* when_then_expr ::= WHEN common_expression THEN common_expression */ -#line 1241 "sql.y" -{ yymsp[-3].minor.yy416 = createWhenThenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy416), releaseRawExprNode(pCxt, yymsp[0].minor.yy416)); } -#line 8127 "sql.c" - break; - case 597: /* case_when_else_opt ::= ELSE common_expression */ -#line 1244 "sql.y" -{ yymsp[-1].minor.yy416 = releaseRawExprNode(pCxt, yymsp[0].minor.yy416); } -#line 8132 "sql.c" - break; - case 598: /* predicate ::= expr_or_subquery compare_op expr_or_subquery */ - case 603: /* predicate ::= expr_or_subquery in_op in_predicate_value */ yytestcase(yyruleno==603); -#line 1247 "sql.y" -{ - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy416); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy416); - yylhsminor.yy416 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy848, releaseRawExprNode(pCxt, yymsp[-2].minor.yy416), releaseRawExprNode(pCxt, yymsp[0].minor.yy416))); - } -#line 8142 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 599: /* predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ -#line 1254 "sql.y" -{ - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy416); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy416); - yylhsminor.yy416 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy416), releaseRawExprNode(pCxt, yymsp[-2].minor.yy416), releaseRawExprNode(pCxt, yymsp[0].minor.yy416))); - } -#line 8152 "sql.c" - yymsp[-4].minor.yy416 = yylhsminor.yy416; - break; - case 600: /* predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ -#line 1260 "sql.y" -{ - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy416); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy416); - yylhsminor.yy416 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy416), releaseRawExprNode(pCxt, yymsp[-2].minor.yy416), releaseRawExprNode(pCxt, yymsp[0].minor.yy416))); - } -#line 8162 "sql.c" - yymsp[-5].minor.yy416 = yylhsminor.yy416; - break; - case 601: /* predicate ::= expr_or_subquery IS NULL */ -#line 1265 "sql.y" -{ - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy416); - yylhsminor.yy416 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy416), NULL)); - } -#line 8171 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 602: /* predicate ::= expr_or_subquery IS NOT NULL */ -#line 1269 "sql.y" -{ - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy416); - yylhsminor.yy416 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy416), NULL)); - } -#line 8180 "sql.c" - yymsp[-3].minor.yy416 = yylhsminor.yy416; - break; - case 604: /* compare_op ::= NK_LT */ -#line 1281 "sql.y" -{ yymsp[0].minor.yy848 = OP_TYPE_LOWER_THAN; } -#line 8186 "sql.c" - break; - case 605: /* compare_op ::= NK_GT */ -#line 1282 "sql.y" -{ yymsp[0].minor.yy848 = OP_TYPE_GREATER_THAN; } -#line 8191 "sql.c" - break; - case 606: /* compare_op ::= NK_LE */ -#line 1283 "sql.y" -{ yymsp[0].minor.yy848 = OP_TYPE_LOWER_EQUAL; } -#line 8196 "sql.c" - break; - case 607: /* compare_op ::= NK_GE */ -#line 1284 "sql.y" -{ yymsp[0].minor.yy848 = OP_TYPE_GREATER_EQUAL; } -#line 8201 "sql.c" - break; - case 608: /* compare_op ::= NK_NE */ -#line 1285 "sql.y" -{ yymsp[0].minor.yy848 = OP_TYPE_NOT_EQUAL; } -#line 8206 "sql.c" - break; - case 609: /* compare_op ::= NK_EQ */ -#line 1286 "sql.y" -{ yymsp[0].minor.yy848 = OP_TYPE_EQUAL; } -#line 8211 "sql.c" - break; - case 610: /* compare_op ::= LIKE */ -#line 1287 "sql.y" -{ yymsp[0].minor.yy848 = OP_TYPE_LIKE; } -#line 8216 "sql.c" - break; - case 611: /* compare_op ::= NOT LIKE */ -#line 1288 "sql.y" -{ yymsp[-1].minor.yy848 = OP_TYPE_NOT_LIKE; } -#line 8221 "sql.c" - break; - case 612: /* compare_op ::= MATCH */ -#line 1289 "sql.y" -{ yymsp[0].minor.yy848 = OP_TYPE_MATCH; } -#line 8226 "sql.c" - break; - case 613: /* compare_op ::= NMATCH */ -#line 1290 "sql.y" -{ yymsp[0].minor.yy848 = OP_TYPE_NMATCH; } -#line 8231 "sql.c" - break; - case 614: /* compare_op ::= CONTAINS */ -#line 1291 "sql.y" -{ yymsp[0].minor.yy848 = OP_TYPE_JSON_CONTAINS; } -#line 8236 "sql.c" - break; - case 615: /* in_op ::= IN */ -#line 1295 "sql.y" -{ yymsp[0].minor.yy848 = OP_TYPE_IN; } -#line 8241 "sql.c" - break; - case 616: /* in_op ::= NOT IN */ -#line 1296 "sql.y" -{ yymsp[-1].minor.yy848 = OP_TYPE_NOT_IN; } -#line 8246 "sql.c" - break; - case 617: /* in_predicate_value ::= NK_LP literal_list NK_RP */ -#line 1298 "sql.y" -{ yylhsminor.yy416 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy316)); } -#line 8251 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 619: /* boolean_value_expression ::= NOT boolean_primary */ -#line 1302 "sql.y" -{ - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy416); - yylhsminor.yy416 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy416), NULL)); - } -#line 8260 "sql.c" - yymsp[-1].minor.yy416 = yylhsminor.yy416; - break; - case 620: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ -#line 1307 "sql.y" -{ - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy416); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy416); - yylhsminor.yy416 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy416), releaseRawExprNode(pCxt, yymsp[0].minor.yy416))); - } -#line 8270 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 621: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ -#line 1313 "sql.y" -{ - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy416); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy416); - yylhsminor.yy416 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy416), releaseRawExprNode(pCxt, yymsp[0].minor.yy416))); - } -#line 8280 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 629: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ -#line 1331 "sql.y" -{ yylhsminor.yy416 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, JOIN_STYPE_NONE, yymsp[-2].minor.yy416, yymsp[0].minor.yy416, NULL); } -#line 8286 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 632: /* table_primary ::= table_name alias_opt */ -#line 1337 "sql.y" -{ yylhsminor.yy416 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy1109, &yymsp[0].minor.yy1109); } -#line 8292 "sql.c" - yymsp[-1].minor.yy416 = yylhsminor.yy416; - break; - case 633: /* table_primary ::= db_name NK_DOT table_name alias_opt */ -#line 1338 "sql.y" -{ yylhsminor.yy416 = createRealTableNode(pCxt, &yymsp[-3].minor.yy1109, &yymsp[-1].minor.yy1109, &yymsp[0].minor.yy1109); } -#line 8298 "sql.c" - yymsp[-3].minor.yy416 = yylhsminor.yy416; - break; - case 634: /* table_primary ::= subquery alias_opt */ -#line 1339 "sql.y" -{ yylhsminor.yy416 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy416), &yymsp[0].minor.yy1109); } -#line 8304 "sql.c" - yymsp[-1].minor.yy416 = yylhsminor.yy416; - break; - case 636: /* alias_opt ::= */ -#line 1344 "sql.y" -{ yymsp[1].minor.yy1109 = nil_token; } -#line 8310 "sql.c" - break; - case 638: /* alias_opt ::= AS table_alias */ -#line 1346 "sql.y" -{ yymsp[-1].minor.yy1109 = yymsp[0].minor.yy1109; } -#line 8315 "sql.c" - break; - case 639: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - case 640: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==640); -#line 1348 "sql.y" -{ yymsp[-2].minor.yy416 = yymsp[-1].minor.yy416; } -#line 8321 "sql.c" - break; - case 641: /* joined_table ::= table_reference join_type join_subtype JOIN table_reference join_on_clause_opt window_offset_clause_opt jlimit_clause_opt */ -#line 1354 "sql.y" -{ - yylhsminor.yy416 = createJoinTableNode(pCxt, yymsp[-6].minor.yy972, yymsp[-5].minor.yy630, yymsp[-7].minor.yy416, yymsp[-3].minor.yy416, yymsp[-2].minor.yy416); - yylhsminor.yy416 = addWindowOffsetClause(pCxt, yylhsminor.yy416, yymsp[-1].minor.yy416); - yylhsminor.yy416 = addJLimitClause(pCxt, yylhsminor.yy416, yymsp[0].minor.yy416); - } -#line 8330 "sql.c" - yymsp[-7].minor.yy416 = yylhsminor.yy416; - break; - case 642: /* join_type ::= */ -#line 1362 "sql.y" -{ yymsp[1].minor.yy972 = JOIN_TYPE_INNER; } -#line 8336 "sql.c" - break; - case 643: /* join_type ::= INNER */ -#line 1363 "sql.y" -{ yymsp[0].minor.yy972 = JOIN_TYPE_INNER; } -#line 8341 "sql.c" - break; - case 644: /* join_type ::= LEFT */ -#line 1364 "sql.y" -{ yymsp[0].minor.yy972 = JOIN_TYPE_LEFT; } -#line 8346 "sql.c" - break; - case 645: /* join_type ::= RIGHT */ -#line 1365 "sql.y" -{ yymsp[0].minor.yy972 = JOIN_TYPE_RIGHT; } -#line 8351 "sql.c" - break; - case 646: /* join_type ::= FULL */ -#line 1366 "sql.y" -{ yymsp[0].minor.yy972 = JOIN_TYPE_FULL; } -#line 8356 "sql.c" - break; - case 647: /* join_subtype ::= */ -#line 1370 "sql.y" -{ yymsp[1].minor.yy630 = JOIN_STYPE_NONE; } -#line 8361 "sql.c" - break; - case 648: /* join_subtype ::= OUTER */ -#line 1371 "sql.y" -{ yymsp[0].minor.yy630 = JOIN_STYPE_OUTER; } -#line 8366 "sql.c" - break; - case 649: /* join_subtype ::= SEMI */ -#line 1372 "sql.y" -{ yymsp[0].minor.yy630 = JOIN_STYPE_SEMI; } -#line 8371 "sql.c" - break; - case 650: /* join_subtype ::= ANTI */ -#line 1373 "sql.y" -{ yymsp[0].minor.yy630 = JOIN_STYPE_ANTI; } -#line 8376 "sql.c" - break; - case 651: /* join_subtype ::= ASOF */ -#line 1374 "sql.y" -{ yymsp[0].minor.yy630 = JOIN_STYPE_ASOF; } -#line 8381 "sql.c" - break; - case 652: /* join_subtype ::= WINDOW */ -#line 1375 "sql.y" -{ yymsp[0].minor.yy630 = JOIN_STYPE_WIN; } -#line 8386 "sql.c" - break; - case 656: /* window_offset_clause_opt ::= WINDOW_OFFSET NK_LP window_offset_literal NK_COMMA window_offset_literal NK_RP */ -#line 1382 "sql.y" -{ yymsp[-5].minor.yy416 = createWindowOffsetNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy416), releaseRawExprNode(pCxt, yymsp[-1].minor.yy416)); } -#line 8391 "sql.c" - break; - case 657: /* window_offset_literal ::= NK_VARIABLE */ -#line 1384 "sql.y" -{ yylhsminor.yy416 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createTimeOffsetValueNode(pCxt, &yymsp[0].minor.yy0)); } -#line 8396 "sql.c" - yymsp[0].minor.yy416 = yylhsminor.yy416; - break; - case 658: /* window_offset_literal ::= NK_MINUS NK_VARIABLE */ -#line 1385 "sql.y" -{ - SToken t = yymsp[-1].minor.yy0; - t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy416 = createRawExprNode(pCxt, &t, createTimeOffsetValueNode(pCxt, &t)); - } -#line 8406 "sql.c" - yymsp[-1].minor.yy416 = yylhsminor.yy416; - break; - case 660: /* jlimit_clause_opt ::= JLIMIT NK_INTEGER */ - case 731: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ yytestcase(yyruleno==731); - case 735: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==735); -#line 1392 "sql.y" -{ yymsp[-1].minor.yy416 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } -#line 8414 "sql.c" - break; - case 661: /* query_specification ::= SELECT hint_list set_quantifier_opt tag_mode_opt select_list from_clause_opt where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ -#line 1398 "sql.y" -{ - yymsp[-13].minor.yy416 = createSelectStmt(pCxt, yymsp[-11].minor.yy209, yymsp[-9].minor.yy316, yymsp[-8].minor.yy416, yymsp[-12].minor.yy316); - yymsp[-13].minor.yy416 = setSelectStmtTagMode(pCxt, yymsp[-13].minor.yy416, yymsp[-10].minor.yy209); - yymsp[-13].minor.yy416 = addWhereClause(pCxt, yymsp[-13].minor.yy416, yymsp[-7].minor.yy416); - yymsp[-13].minor.yy416 = addPartitionByClause(pCxt, yymsp[-13].minor.yy416, yymsp[-6].minor.yy316); - yymsp[-13].minor.yy416 = addWindowClauseClause(pCxt, yymsp[-13].minor.yy416, yymsp[-2].minor.yy416); - yymsp[-13].minor.yy416 = addGroupByClause(pCxt, yymsp[-13].minor.yy416, yymsp[-1].minor.yy316); - yymsp[-13].minor.yy416 = addHavingClause(pCxt, yymsp[-13].minor.yy416, yymsp[0].minor.yy416); - yymsp[-13].minor.yy416 = addRangeClause(pCxt, yymsp[-13].minor.yy416, yymsp[-5].minor.yy416); - yymsp[-13].minor.yy416 = addEveryClause(pCxt, yymsp[-13].minor.yy416, yymsp[-4].minor.yy416); - yymsp[-13].minor.yy416 = addFillClause(pCxt, yymsp[-13].minor.yy416, yymsp[-3].minor.yy416); - } -#line 8430 "sql.c" - break; - case 662: /* hint_list ::= */ -#line 1413 "sql.y" -{ yymsp[1].minor.yy316 = createHintNodeList(pCxt, NULL); } -#line 8435 "sql.c" - break; - case 663: /* hint_list ::= NK_HINT */ -#line 1414 "sql.y" -{ yylhsminor.yy316 = createHintNodeList(pCxt, &yymsp[0].minor.yy0); } -#line 8440 "sql.c" - yymsp[0].minor.yy316 = yylhsminor.yy316; - break; - case 668: /* set_quantifier_opt ::= ALL */ -#line 1425 "sql.y" -{ yymsp[0].minor.yy209 = false; } -#line 8446 "sql.c" - break; - case 671: /* select_item ::= NK_STAR */ -#line 1432 "sql.y" -{ yylhsminor.yy416 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0); } -#line 8451 "sql.c" - yymsp[0].minor.yy416 = yylhsminor.yy416; - break; - case 673: /* select_item ::= common_expression column_alias */ - case 683: /* partition_item ::= expr_or_subquery column_alias */ yytestcase(yyruleno==683); -#line 1434 "sql.y" -{ yylhsminor.yy416 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy416), &yymsp[0].minor.yy1109); } -#line 8458 "sql.c" - yymsp[-1].minor.yy416 = yylhsminor.yy416; - break; - case 674: /* select_item ::= common_expression AS column_alias */ - case 684: /* partition_item ::= expr_or_subquery AS column_alias */ yytestcase(yyruleno==684); -#line 1435 "sql.y" -{ yylhsminor.yy416 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy416), &yymsp[0].minor.yy1109); } -#line 8465 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 679: /* partition_by_clause_opt ::= PARTITION BY partition_list */ - case 709: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==709); - case 729: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==729); -#line 1444 "sql.y" -{ yymsp[-2].minor.yy316 = yymsp[0].minor.yy316; } -#line 8473 "sql.c" - break; - case 686: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP */ -#line 1457 "sql.y" -{ yymsp[-5].minor.yy416 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy416), releaseRawExprNode(pCxt, yymsp[-1].minor.yy416)); } -#line 8478 "sql.c" - break; - case 687: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ -#line 1458 "sql.y" -{ yymsp[-3].minor.yy416 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy416)); } -#line 8483 "sql.c" - break; - case 688: /* twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ -#line 1460 "sql.y" -{ yymsp[-5].minor.yy416 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy416), NULL, yymsp[-1].minor.yy416, yymsp[0].minor.yy416); } -#line 8488 "sql.c" - break; - case 689: /* twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ -#line 1464 "sql.y" -{ yymsp[-7].minor.yy416 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy416), releaseRawExprNode(pCxt, yymsp[-3].minor.yy416), yymsp[-1].minor.yy416, yymsp[0].minor.yy416); } -#line 8493 "sql.c" - break; - case 690: /* twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ -#line 1466 "sql.y" -{ yymsp[-6].minor.yy416 = createEventWindowNode(pCxt, yymsp[-3].minor.yy416, yymsp[0].minor.yy416); } -#line 8498 "sql.c" - break; - case 691: /* twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP */ -#line 1468 "sql.y" -{ yymsp[-3].minor.yy416 = createCountWindowNode(pCxt, &yymsp[-1].minor.yy0, &yymsp[-1].minor.yy0); } -#line 8503 "sql.c" - break; - case 692: /* twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ -#line 1470 "sql.y" -{ yymsp[-5].minor.yy416 = createCountWindowNode(pCxt, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy0); } -#line 8508 "sql.c" - break; - case 699: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ -#line 1480 "sql.y" -{ yymsp[-3].minor.yy416 = createFillNode(pCxt, yymsp[-1].minor.yy882, NULL); } -#line 8513 "sql.c" - break; - case 700: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ -#line 1481 "sql.y" -{ yymsp[-5].minor.yy416 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy316)); } -#line 8518 "sql.c" - break; - case 701: /* fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ -#line 1482 "sql.y" -{ yymsp[-5].minor.yy416 = createFillNode(pCxt, FILL_MODE_VALUE_F, createNodeListNode(pCxt, yymsp[-1].minor.yy316)); } -#line 8523 "sql.c" - break; - case 702: /* fill_mode ::= NONE */ -#line 1486 "sql.y" -{ yymsp[0].minor.yy882 = FILL_MODE_NONE; } -#line 8528 "sql.c" - break; - case 703: /* fill_mode ::= PREV */ -#line 1487 "sql.y" -{ yymsp[0].minor.yy882 = FILL_MODE_PREV; } -#line 8533 "sql.c" - break; - case 704: /* fill_mode ::= NULL */ -#line 1488 "sql.y" -{ yymsp[0].minor.yy882 = FILL_MODE_NULL; } -#line 8538 "sql.c" - break; - case 705: /* fill_mode ::= NULL_F */ -#line 1489 "sql.y" -{ yymsp[0].minor.yy882 = FILL_MODE_NULL_F; } -#line 8543 "sql.c" - break; - case 706: /* fill_mode ::= LINEAR */ -#line 1490 "sql.y" -{ yymsp[0].minor.yy882 = FILL_MODE_LINEAR; } -#line 8548 "sql.c" - break; - case 707: /* fill_mode ::= NEXT */ -#line 1491 "sql.y" -{ yymsp[0].minor.yy882 = FILL_MODE_NEXT; } -#line 8553 "sql.c" - break; - case 710: /* group_by_list ::= expr_or_subquery */ -#line 1500 "sql.y" -{ yylhsminor.yy316 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy416))); } -#line 8558 "sql.c" - yymsp[0].minor.yy316 = yylhsminor.yy316; - break; - case 711: /* group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ -#line 1501 "sql.y" -{ yylhsminor.yy316 = addNodeToList(pCxt, yymsp[-2].minor.yy316, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy416))); } -#line 8564 "sql.c" - yymsp[-2].minor.yy316 = yylhsminor.yy316; - break; - case 715: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ -#line 1508 "sql.y" -{ yymsp[-5].minor.yy416 = createInterpTimeRange(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy416), releaseRawExprNode(pCxt, yymsp[-1].minor.yy416)); } -#line 8570 "sql.c" - break; - case 716: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ -#line 1510 "sql.y" -{ yymsp[-3].minor.yy416 = createInterpTimePoint(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy416)); } -#line 8575 "sql.c" - break; - case 719: /* query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ -#line 1517 "sql.y" -{ - yylhsminor.yy416 = addOrderByClause(pCxt, yymsp[-3].minor.yy416, yymsp[-2].minor.yy316); - yylhsminor.yy416 = addSlimitClause(pCxt, yylhsminor.yy416, yymsp[-1].minor.yy416); - yylhsminor.yy416 = addLimitClause(pCxt, yylhsminor.yy416, yymsp[0].minor.yy416); - } -#line 8584 "sql.c" - yymsp[-3].minor.yy416 = yylhsminor.yy416; - break; - case 722: /* union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ -#line 1527 "sql.y" -{ yylhsminor.yy416 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy416, yymsp[0].minor.yy416); } -#line 8590 "sql.c" - yymsp[-3].minor.yy416 = yylhsminor.yy416; - break; - case 723: /* union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ -#line 1529 "sql.y" -{ yylhsminor.yy416 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy416, yymsp[0].minor.yy416); } -#line 8596 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 732: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - case 736: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==736); -#line 1544 "sql.y" -{ yymsp[-3].minor.yy416 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } -#line 8603 "sql.c" - break; - case 733: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - case 737: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==737); -#line 1545 "sql.y" -{ yymsp[-3].minor.yy416 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } -#line 8609 "sql.c" - break; - case 738: /* subquery ::= NK_LP query_expression NK_RP */ -#line 1553 "sql.y" -{ yylhsminor.yy416 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy416); } -#line 8614 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 743: /* sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ -#line 1567 "sql.y" -{ yylhsminor.yy416 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy416), yymsp[-1].minor.yy506, yymsp[0].minor.yy1045); } -#line 8620 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 744: /* ordering_specification_opt ::= */ -#line 1571 "sql.y" -{ yymsp[1].minor.yy506 = ORDER_ASC; } -#line 8626 "sql.c" - break; - case 745: /* ordering_specification_opt ::= ASC */ -#line 1572 "sql.y" -{ yymsp[0].minor.yy506 = ORDER_ASC; } -#line 8631 "sql.c" - break; - case 746: /* ordering_specification_opt ::= DESC */ -#line 1573 "sql.y" -{ yymsp[0].minor.yy506 = ORDER_DESC; } -#line 8636 "sql.c" - break; - case 747: /* null_ordering_opt ::= */ -#line 1577 "sql.y" -{ yymsp[1].minor.yy1045 = NULL_ORDER_DEFAULT; } -#line 8641 "sql.c" - break; - case 748: /* null_ordering_opt ::= NULLS FIRST */ -#line 1578 "sql.y" -{ yymsp[-1].minor.yy1045 = NULL_ORDER_FIRST; } -#line 8646 "sql.c" - break; - case 749: /* null_ordering_opt ::= NULLS LAST */ -#line 1579 "sql.y" -{ yymsp[-1].minor.yy1045 = NULL_ORDER_LAST; } -#line 8651 "sql.c" - break; - case 752: /* column_options ::= column_options ENCODE NK_STRING */ -#line 1587 "sql.y" -{ yylhsminor.yy416 = setColumnOptions(pCxt, yymsp[-2].minor.yy416, COLUMN_OPTION_ENCODE, &yymsp[0].minor.yy0); } -#line 8656 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 753: /* column_options ::= column_options COMPRESS NK_STRING */ -#line 1588 "sql.y" -{ yylhsminor.yy416 = setColumnOptions(pCxt, yymsp[-2].minor.yy416, COLUMN_OPTION_COMPRESS, &yymsp[0].minor.yy0); } -#line 8662 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - case 754: /* column_options ::= column_options LEVEL NK_STRING */ -#line 1589 "sql.y" -{ yylhsminor.yy416 = setColumnOptions(pCxt, yymsp[-2].minor.yy416, COLUMN_OPTION_LEVEL, &yymsp[0].minor.yy0); } -#line 8668 "sql.c" - yymsp[-2].minor.yy416 = yylhsminor.yy416; - break; - default: - break; -/********** End reduce actions ************************************************/ + */ + /********** Begin reduce actions **********************************************/ + 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,386,&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,387,&yymsp[0].minor); + break; + case 2: /* account_options ::= */ + { } + break; + case 3: /* account_options ::= account_options PPS literal */ + case 4: /* account_options ::= account_options TSERIES literal */ yytestcase(yyruleno==4); + case 5: /* account_options ::= account_options STORAGE literal */ yytestcase(yyruleno==5); + case 6: /* account_options ::= account_options STREAMS literal */ yytestcase(yyruleno==6); + case 7: /* account_options ::= account_options QTIME literal */ yytestcase(yyruleno==7); + case 8: /* account_options ::= account_options DBS literal */ yytestcase(yyruleno==8); + 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,386,&yymsp[-2].minor); + { } + yy_destructor(yypParser,388,&yymsp[0].minor); + } + break; + case 12: /* alter_account_options ::= alter_account_option */ + { yy_destructor(yypParser,389,&yymsp[0].minor); + { } + } + break; + case 13: /* alter_account_options ::= alter_account_options alter_account_option */ + { yy_destructor(yypParser,387,&yymsp[-1].minor); + { } + yy_destructor(yypParser,389,&yymsp[0].minor); + } + break; + case 14: /* alter_account_option ::= PASS literal */ + case 15: /* alter_account_option ::= PPS literal */ yytestcase(yyruleno==15); + case 16: /* alter_account_option ::= TSERIES literal */ yytestcase(yyruleno==16); + case 17: /* alter_account_option ::= STORAGE literal */ yytestcase(yyruleno==17); + case 18: /* alter_account_option ::= STREAMS literal */ yytestcase(yyruleno==18); + case 19: /* alter_account_option ::= QTIME literal */ yytestcase(yyruleno==19); + case 20: /* alter_account_option ::= DBS literal */ yytestcase(yyruleno==20); + case 21: /* alter_account_option ::= USERS literal */ yytestcase(yyruleno==21); + case 22: /* alter_account_option ::= CONNS literal */ yytestcase(yyruleno==22); + case 23: /* alter_account_option ::= STATE literal */ yytestcase(yyruleno==23); + { } + yy_destructor(yypParser,388,&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; + 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; + break; + case 26: /* white_list ::= HOST ip_range_list */ + { yymsp[-1].minor.yy334 = yymsp[0].minor.yy334; } + break; + case 27: /* white_list_opt ::= */ + case 206: /* specific_cols_opt ::= */ yytestcase(yyruleno==206); + case 244: /* tags_def_opt ::= */ yytestcase(yyruleno==244); + case 335: /* tag_list_opt ::= */ yytestcase(yyruleno==335); + case 408: /* col_list_opt ::= */ yytestcase(yyruleno==408); + case 415: /* tag_def_or_ref_opt ::= */ yytestcase(yyruleno==415); + case 693: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==693); + case 723: /* group_by_clause_opt ::= */ yytestcase(yyruleno==723); + case 743: /* order_by_clause_opt ::= */ yytestcase(yyruleno==743); + { yymsp[1].minor.yy334 = NULL; } + break; + case 28: /* white_list_opt ::= white_list */ + case 245: /* tags_def_opt ::= tags_def */ yytestcase(yyruleno==245); + case 416: /* tag_def_or_ref_opt ::= tags_def */ yytestcase(yyruleno==416); + case 601: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==601); + { yylhsminor.yy334 = yymsp[0].minor.yy334; } + yymsp[0].minor.yy334 = yylhsminor.yy334; + break; + case 29: /* is_import_opt ::= */ + case 31: /* is_createdb_opt ::= */ yytestcase(yyruleno==31); + { yymsp[1].minor.yy719 = 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); } + 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); + } + 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); } + 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); } + 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); } + 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); } + 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); } + 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); } + break; + case 40: /* cmd ::= DROP USER user_name */ + { pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy533); } + break; + case 41: /* sysinfo_opt ::= */ + { yymsp[1].minor.yy719 = 1; } + break; + case 43: /* cmd ::= GRANT privileges ON priv_level with_opt TO user_name */ + { pCxt->pRootNode = createGrantStmt(pCxt, yymsp[-5].minor.yy585, &yymsp[-3].minor.yy399, &yymsp[0].minor.yy533, yymsp[-2].minor.yy560); } + break; + case 44: /* cmd ::= REVOKE privileges ON priv_level with_opt FROM user_name */ + { pCxt->pRootNode = createRevokeStmt(pCxt, yymsp[-5].minor.yy585, &yymsp[-3].minor.yy399, &yymsp[0].minor.yy533, yymsp[-2].minor.yy560); } + break; + case 45: /* privileges ::= ALL */ + { yymsp[0].minor.yy585 = 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; + break; + case 47: /* privileges ::= SUBSCRIBE */ + { yymsp[0].minor.yy585 = 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; + break; + case 50: /* priv_type ::= READ */ + { yymsp[0].minor.yy585 = PRIVILEGE_TYPE_READ; } + break; + case 51: /* priv_type ::= WRITE */ + { yymsp[0].minor.yy585 = PRIVILEGE_TYPE_WRITE; } + break; + case 52: /* priv_type ::= ALTER */ + { yymsp[0].minor.yy585 = 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; + 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; + 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; + 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; + break; + case 57: /* with_opt ::= */ + case 173: /* start_opt ::= */ yytestcase(yyruleno==173); + case 177: /* end_opt ::= */ yytestcase(yyruleno==177); + case 330: /* like_pattern_opt ::= */ yytestcase(yyruleno==330); + case 427: /* subtable_opt ::= */ yytestcase(yyruleno==427); + case 611: /* case_when_else_opt ::= */ yytestcase(yyruleno==611); + case 641: /* from_clause_opt ::= */ yytestcase(yyruleno==641); + case 668: /* join_on_clause_opt ::= */ yytestcase(yyruleno==668); + case 670: /* window_offset_clause_opt ::= */ yytestcase(yyruleno==670); + case 674: /* jlimit_clause_opt ::= */ yytestcase(yyruleno==674); + case 691: /* where_clause_opt ::= */ yytestcase(yyruleno==691); + case 700: /* twindow_clause_opt ::= */ yytestcase(yyruleno==700); + case 708: /* sliding_opt ::= */ yytestcase(yyruleno==708); + case 713: /* fill_opt ::= */ yytestcase(yyruleno==713); + case 727: /* having_clause_opt ::= */ yytestcase(yyruleno==727); + case 729: /* range_opt ::= */ yytestcase(yyruleno==729); + case 732: /* every_opt ::= */ yytestcase(yyruleno==732); + case 745: /* slimit_clause_opt ::= */ yytestcase(yyruleno==745); + case 749: /* limit_clause_opt ::= */ yytestcase(yyruleno==749); + { yymsp[1].minor.yy560 = NULL; } + break; + case 58: /* with_opt ::= WITH search_condition */ + case 642: /* from_clause_opt ::= FROM table_reference_list */ yytestcase(yyruleno==642); + case 669: /* join_on_clause_opt ::= ON search_condition */ yytestcase(yyruleno==669); + case 692: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==692); + case 728: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==728); + { yymsp[-1].minor.yy560 = yymsp[0].minor.yy560; } + 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); } + break; + case 61: /* cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */ + { pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy533, &yymsp[0].minor.yy0); } + break; + case 62: /* cmd ::= DROP DNODE NK_INTEGER force_opt */ + { pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy173, false); } + break; + case 63: /* cmd ::= DROP DNODE dnode_endpoint force_opt */ + { pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy533, yymsp[0].minor.yy173, false); } + break; + case 64: /* cmd ::= DROP DNODE NK_INTEGER unsafe_opt */ + { pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, false, yymsp[0].minor.yy173); } + break; + case 65: /* cmd ::= DROP DNODE dnode_endpoint unsafe_opt */ + { pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy533, false, yymsp[0].minor.yy173); } + break; + case 66: /* 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 */ + { 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 */ + { pCxt->pRootNode = createAlterDnodeStmt(pCxt, NULL, &yymsp[0].minor.yy0, NULL); } + break; + case 69: /* 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 */ + { 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 364: /* sma_func_name ::= COUNT */ yytestcase(yyruleno==364); + case 365: /* sma_func_name ::= FIRST */ yytestcase(yyruleno==365); + case 366: /* sma_func_name ::= LAST */ yytestcase(yyruleno==366); + case 367: /* sma_func_name ::= LAST_ROW */ yytestcase(yyruleno==367); + case 515: /* db_name ::= NK_ID */ yytestcase(yyruleno==515); + case 516: /* table_name ::= NK_ID */ yytestcase(yyruleno==516); + case 517: /* column_name ::= NK_ID */ yytestcase(yyruleno==517); + case 518: /* function_name ::= NK_ID */ yytestcase(yyruleno==518); + case 519: /* view_name ::= NK_ID */ yytestcase(yyruleno==519); + case 520: /* table_alias ::= NK_ID */ yytestcase(yyruleno==520); + case 521: /* column_alias ::= NK_ID */ yytestcase(yyruleno==521); + case 522: /* column_alias ::= NK_ALIAS */ yytestcase(yyruleno==522); + case 523: /* user_name ::= NK_ID */ yytestcase(yyruleno==523); + case 524: /* topic_name ::= NK_ID */ yytestcase(yyruleno==524); + case 525: /* stream_name ::= NK_ID */ yytestcase(yyruleno==525); + case 526: /* cgroup_name ::= NK_ID */ yytestcase(yyruleno==526); + case 527: /* index_name ::= NK_ID */ yytestcase(yyruleno==527); + case 528: /* tsma_name ::= NK_ID */ yytestcase(yyruleno==528); + case 580: /* substr_func ::= SUBSTR */ yytestcase(yyruleno==580); + case 581: /* substr_func ::= SUBSTRING */ yytestcase(yyruleno==581); + case 586: /* noarg_func ::= NOW */ yytestcase(yyruleno==586); + case 587: /* noarg_func ::= TODAY */ yytestcase(yyruleno==587); + case 588: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==588); + case 589: /* noarg_func ::= DATABASE */ yytestcase(yyruleno==589); + case 590: /* noarg_func ::= CLIENT_VERSION */ yytestcase(yyruleno==590); + case 591: /* noarg_func ::= SERVER_VERSION */ yytestcase(yyruleno==591); + case 592: /* noarg_func ::= SERVER_STATUS */ yytestcase(yyruleno==592); + case 593: /* noarg_func ::= CURRENT_USER */ yytestcase(yyruleno==593); + case 594: /* noarg_func ::= USER */ yytestcase(yyruleno==594); + case 595: /* noarg_func ::= PI */ yytestcase(yyruleno==595); + case 596: /* star_func ::= COUNT */ yytestcase(yyruleno==596); + case 597: /* star_func ::= FIRST */ yytestcase(yyruleno==597); + case 598: /* star_func ::= LAST */ yytestcase(yyruleno==598); + case 599: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==599); + { yylhsminor.yy533 = yymsp[0].minor.yy0; } + yymsp[0].minor.yy533 = yylhsminor.yy533; + break; + case 74: /* force_opt ::= */ + case 101: /* not_exists_opt ::= */ yytestcase(yyruleno==101); + case 103: /* exists_opt ::= */ yytestcase(yyruleno==103); + case 385: /* analyze_opt ::= */ yytestcase(yyruleno==385); + case 392: /* agg_func_opt ::= */ yytestcase(yyruleno==392); + case 398: /* or_replace_opt ::= */ yytestcase(yyruleno==398); + case 429: /* ignore_opt ::= */ yytestcase(yyruleno==429); + case 679: /* tag_mode_opt ::= */ yytestcase(yyruleno==679); + case 681: /* set_quantifier_opt ::= */ yytestcase(yyruleno==681); + { yymsp[1].minor.yy173 = false; } + break; + case 75: /* force_opt ::= FORCE */ + case 76: /* unsafe_opt ::= UNSAFE */ yytestcase(yyruleno==76); + case 386: /* analyze_opt ::= ANALYZE */ yytestcase(yyruleno==386); + case 393: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==393); + case 680: /* tag_mode_opt ::= TAGS */ yytestcase(yyruleno==680); + case 682: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==682); + { yymsp[0].minor.yy173 = true; } + break; + case 77: /* cmd ::= ALTER CLUSTER NK_STRING */ + { pCxt->pRootNode = createAlterClusterStmt(pCxt, &yymsp[0].minor.yy0, NULL); } + break; + case 78: /* 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 */ + { pCxt->pRootNode = createAlterLocalStmt(pCxt, &yymsp[0].minor.yy0, NULL); } + break; + case 80: /* 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 */ + { pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_QNODE_STMT, &yymsp[0].minor.yy0); } + break; + case 82: /* 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 */ + { pCxt->pRootNode = createRestoreComponentNodeStmt(pCxt, QUERY_NODE_RESTORE_QNODE_STMT, &yymsp[0].minor.yy0); } + break; + case 84: /* 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 */ + { pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_BNODE_STMT, &yymsp[0].minor.yy0); } + break; + case 86: /* 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 */ + { pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_SNODE_STMT, &yymsp[0].minor.yy0); } + break; + case 88: /* 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 */ + { pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_MNODE_STMT, &yymsp[0].minor.yy0); } + break; + case 90: /* 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 */ + { 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); } + break; + case 93: /* cmd ::= DROP DATABASE exists_opt db_name */ + { pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy173, &yymsp[0].minor.yy533); } + break; + case 94: /* cmd ::= USE db_name */ + { pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy533); } + break; + case 95: /* cmd ::= ALTER DATABASE db_name alter_db_options */ + { pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy533, yymsp[0].minor.yy560); } + break; + case 96: /* cmd ::= FLUSH DATABASE db_name */ + { pCxt->pRootNode = createFlushDatabaseStmt(pCxt, &yymsp[0].minor.yy533); } + break; + case 97: /* cmd ::= TRIM DATABASE db_name speed_opt */ + { pCxt->pRootNode = createTrimDatabaseStmt(pCxt, &yymsp[-1].minor.yy533, yymsp[0].minor.yy802); } + break; + case 98: /* cmd ::= S3MIGRATE DATABASE db_name */ + { pCxt->pRootNode = createS3MigrateDatabaseStmt(pCxt, &yymsp[0].minor.yy533); } + 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); } + break; + case 100: /* not_exists_opt ::= IF NOT EXISTS */ + { yymsp[-2].minor.yy173 = true; } + break; + case 102: /* exists_opt ::= IF EXISTS */ + case 399: /* or_replace_opt ::= OR REPLACE */ yytestcase(yyruleno==399); + case 430: /* ignore_opt ::= IGNORE UNTREATED */ yytestcase(yyruleno==430); + { yymsp[-1].minor.yy173 = true; } + break; + case 104: /* db_options ::= */ + { yymsp[1].minor.yy560 = 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; + 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; + 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; + 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; + 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; + 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; + 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; + 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; + 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; + 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; + 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; + 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; + 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; + 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; + 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; + 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; + 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; + 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; + 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; + 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; + break; + case 127: /* 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); + } + yymsp[-3].minor.yy560 = yylhsminor.yy560; + 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; + break; + case 129: /* 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); + } + yymsp[-3].minor.yy560 = yylhsminor.yy560; + 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; + 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; + 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; + 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; + 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; + 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; + 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; + 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; + 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; + 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; + 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; + 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; + 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; } + 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; } + 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; } + 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; } + 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; } + 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; } + 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; } + 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; } + 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; } + 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; } + 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; } + break; + case 155: /* 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; + } + 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; } + break; + case 157: /* 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; + } + 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 444: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==444); + { 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 210: /* tag_def_list ::= tag_def */ yytestcase(yyruleno==210); + case 213: /* column_def_list ::= column_def */ yytestcase(yyruleno==213); + case 261: /* rollup_func_list ::= rollup_func_name */ yytestcase(yyruleno==261); + case 266: /* col_name_list ::= col_name */ yytestcase(yyruleno==266); + case 336: /* tag_list_opt ::= tag_item */ yytestcase(yyruleno==336); + case 360: /* func_list ::= func */ yytestcase(yyruleno==360); + case 410: /* column_stream_def_list ::= column_stream_def */ yytestcase(yyruleno==410); + case 488: /* tags_literal_list ::= tags_literal */ yytestcase(yyruleno==488); + case 513: /* literal_list ::= signed_literal */ yytestcase(yyruleno==513); + case 602: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==602); + case 608: /* when_then_list ::= when_then_expr */ yytestcase(yyruleno==608); + case 684: /* select_list ::= select_item */ yytestcase(yyruleno==684); + case 695: /* partition_list ::= partition_item */ yytestcase(yyruleno==695); + case 756: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==756); + { 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 211: /* tag_def_list ::= tag_def_list NK_COMMA tag_def */ yytestcase(yyruleno==211); + case 214: /* column_def_list ::= column_def_list NK_COMMA column_def */ yytestcase(yyruleno==214); + case 262: /* rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ yytestcase(yyruleno==262); + case 267: /* col_name_list ::= col_name_list NK_COMMA col_name */ yytestcase(yyruleno==267); + case 337: /* tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ yytestcase(yyruleno==337); + case 361: /* func_list ::= func_list NK_COMMA func */ yytestcase(yyruleno==361); + case 411: /* column_stream_def_list ::= column_stream_def_list NK_COMMA column_stream_def */ yytestcase(yyruleno==411); + case 489: /* tags_literal_list ::= tags_literal_list NK_COMMA tags_literal */ yytestcase(yyruleno==489); + case 514: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==514); + case 603: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==603); + case 685: /* select_list ::= select_list NK_COMMA select_item */ yytestcase(yyruleno==685); + case 696: /* partition_list ::= partition_list NK_COMMA partition_item */ yytestcase(yyruleno==696); + case 757: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==757); + { 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 394: /* bufsize_opt ::= */ yytestcase(yyruleno==394); + { yymsp[1].minor.yy802 = 0; } + break; + case 172: /* speed_opt ::= BWLIMIT NK_INTEGER */ + case 395: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ yytestcase(yyruleno==395); + { 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 multi_drop_clause */ + { pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy334); } + break; + case 186: /* cmd ::= DROP STABLE exists_opt full_table_name */ + { pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy173, yymsp[0].minor.yy560); } + break; + case 187: /* cmd ::= ALTER TABLE alter_table_clause */ + case 446: /* cmd ::= query_or_subquery */ yytestcase(yyruleno==446); + case 447: /* cmd ::= insert_query */ yytestcase(yyruleno==447); + { 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; + 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; + 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; + 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; + 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; + break; + case 201: /* multi_create_clause ::= multi_create_clause create_subtable_clause */ + case 609: /* when_then_list ::= when_then_list when_then_expr */ yytestcase(yyruleno==609); + { yylhsminor.yy334 = addNodeToList(pCxt, yymsp[-1].minor.yy334, yymsp[0].minor.yy560); } + yymsp[-1].minor.yy334 = yylhsminor.yy334; + 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; + 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; + break; + case 207: /* specific_cols_opt ::= NK_LP col_name_list NK_RP */ + case 409: /* col_list_opt ::= NK_LP column_stream_def_list NK_RP */ yytestcase(yyruleno==409); + { yymsp[-2].minor.yy334 = yymsp[-1].minor.yy334; } + break; + case 208: /* full_table_name ::= table_name */ + case 350: /* full_tsma_name ::= tsma_name */ yytestcase(yyruleno==350); + { yylhsminor.yy560 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy533, NULL); } + yymsp[0].minor.yy560 = yylhsminor.yy560; + break; + case 209: /* full_table_name ::= db_name NK_DOT table_name */ + case 351: /* full_tsma_name ::= db_name NK_DOT tsma_name */ yytestcase(yyruleno==351); + { yylhsminor.yy560 = createRealTableNode(pCxt, &yymsp[-2].minor.yy533, &yymsp[0].minor.yy533, NULL); } + yymsp[-2].minor.yy560 = yylhsminor.yy560; + break; + case 212: /* 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; + break; + case 215: /* 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; + break; + case 216: /* type_name ::= BOOL */ + { yymsp[0].minor.yy952 = createDataType(TSDB_DATA_TYPE_BOOL); } + break; + case 217: /* type_name ::= TINYINT */ + { yymsp[0].minor.yy952 = createDataType(TSDB_DATA_TYPE_TINYINT); } + break; + case 218: /* type_name ::= SMALLINT */ + { yymsp[0].minor.yy952 = createDataType(TSDB_DATA_TYPE_SMALLINT); } + break; + case 219: /* type_name ::= INT */ + case 220: /* type_name ::= INTEGER */ yytestcase(yyruleno==220); + { yymsp[0].minor.yy952 = createDataType(TSDB_DATA_TYPE_INT); } + break; + case 221: /* type_name ::= BIGINT */ + { yymsp[0].minor.yy952 = createDataType(TSDB_DATA_TYPE_BIGINT); } + break; + case 222: /* type_name ::= FLOAT */ + { yymsp[0].minor.yy952 = createDataType(TSDB_DATA_TYPE_FLOAT); } + break; + case 223: /* type_name ::= DOUBLE */ + { yymsp[0].minor.yy952 = createDataType(TSDB_DATA_TYPE_DOUBLE); } + break; + case 224: /* type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ + { yymsp[-3].minor.yy952 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); } + break; + case 225: /* type_name ::= TIMESTAMP */ + { yymsp[0].minor.yy952 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); } + break; + case 226: /* type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ + { yymsp[-3].minor.yy952 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); } + break; + case 227: /* type_name ::= TINYINT UNSIGNED */ + { yymsp[-1].minor.yy952 = createDataType(TSDB_DATA_TYPE_UTINYINT); } + break; + case 228: /* type_name ::= SMALLINT UNSIGNED */ + { yymsp[-1].minor.yy952 = createDataType(TSDB_DATA_TYPE_USMALLINT); } + break; + case 229: /* type_name ::= INT UNSIGNED */ + { yymsp[-1].minor.yy952 = createDataType(TSDB_DATA_TYPE_UINT); } + break; + case 230: /* type_name ::= BIGINT UNSIGNED */ + { yymsp[-1].minor.yy952 = createDataType(TSDB_DATA_TYPE_UBIGINT); } + break; + case 231: /* type_name ::= JSON */ + { yymsp[0].minor.yy952 = createDataType(TSDB_DATA_TYPE_JSON); } + break; + case 232: /* type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ + { yymsp[-3].minor.yy952 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); } + break; + case 233: /* type_name ::= MEDIUMBLOB */ + { yymsp[0].minor.yy952 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); } + break; + case 234: /* type_name ::= BLOB */ + { yymsp[0].minor.yy952 = createDataType(TSDB_DATA_TYPE_BLOB); } + break; + case 235: /* type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ + { yymsp[-3].minor.yy952 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); } + break; + case 236: /* type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP */ + { yymsp[-3].minor.yy952 = createVarLenDataType(TSDB_DATA_TYPE_GEOMETRY, &yymsp[-1].minor.yy0); } + break; + case 237: /* type_name ::= DECIMAL */ + { yymsp[0].minor.yy952 = createDataType(TSDB_DATA_TYPE_DECIMAL); } + break; + case 238: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ + { yymsp[-3].minor.yy952 = createDataType(TSDB_DATA_TYPE_DECIMAL); } + break; + case 239: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ + { yymsp[-5].minor.yy952 = createDataType(TSDB_DATA_TYPE_DECIMAL); } + break; + case 240: /* type_name_default_len ::= BINARY */ + { yymsp[0].minor.yy952 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, NULL); } + break; + case 241: /* type_name_default_len ::= NCHAR */ + { yymsp[0].minor.yy952 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, NULL); } + break; + case 242: /* type_name_default_len ::= VARCHAR */ + { yymsp[0].minor.yy952 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, NULL); } + break; + case 243: /* type_name_default_len ::= VARBINARY */ + { yymsp[0].minor.yy952 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, NULL); } + break; + case 246: /* tags_def ::= TAGS NK_LP tag_def_list NK_RP */ + case 417: /* tag_def_or_ref_opt ::= TAGS NK_LP column_stream_def_list NK_RP */ yytestcase(yyruleno==417); + { yymsp[-3].minor.yy334 = yymsp[-1].minor.yy334; } + break; + case 247: /* table_options ::= */ + { yymsp[1].minor.yy560 = createDefaultTableOptions(pCxt); } + break; + case 248: /* 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; + break; + case 249: /* 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; + break; + case 250: /* 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; + break; + case 251: /* 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; + break; + case 252: /* 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; + break; + case 253: /* 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; + break; + case 254: /* 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; + break; + case 255: /* 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; + break; + case 256: /* 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; + break; + case 257: /* alter_table_option ::= COMMENT NK_STRING */ + { yymsp[-1].minor.yy389.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy389.val = yymsp[0].minor.yy0; } + break; + case 258: /* alter_table_option ::= TTL NK_INTEGER */ + { yymsp[-1].minor.yy389.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy389.val = yymsp[0].minor.yy0; } + break; + case 259: /* duration_list ::= duration_literal */ + case 546: /* expression_list ::= expr_or_subquery */ yytestcase(yyruleno==546); + { yylhsminor.yy334 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy560)); } + yymsp[0].minor.yy334 = yylhsminor.yy334; + break; + case 260: /* duration_list ::= duration_list NK_COMMA duration_literal */ + case 547: /* expression_list ::= expression_list NK_COMMA expr_or_subquery */ yytestcase(yyruleno==547); + { yylhsminor.yy334 = addNodeToList(pCxt, yymsp[-2].minor.yy334, releaseRawExprNode(pCxt, yymsp[0].minor.yy560)); } + yymsp[-2].minor.yy334 = yylhsminor.yy334; + break; + case 263: /* rollup_func_name ::= function_name */ + { yylhsminor.yy560 = createFunctionNode(pCxt, &yymsp[0].minor.yy533, NULL); } + yymsp[0].minor.yy560 = yylhsminor.yy560; + break; + case 264: /* rollup_func_name ::= FIRST */ + case 265: /* rollup_func_name ::= LAST */ yytestcase(yyruleno==265); + case 339: /* tag_item ::= QTAGS */ yytestcase(yyruleno==339); + { yylhsminor.yy560 = createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL); } + yymsp[0].minor.yy560 = yylhsminor.yy560; + break; + case 268: /* col_name ::= column_name */ + case 340: /* tag_item ::= column_name */ yytestcase(yyruleno==340); + { yylhsminor.yy560 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy533); } + yymsp[0].minor.yy560 = yylhsminor.yy560; + break; + case 269: /* cmd ::= SHOW DNODES */ + { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DNODES_STMT); } + break; + case 270: /* cmd ::= SHOW USERS */ + { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_USERS_STMT); } + break; + case 271: /* cmd ::= SHOW USERS FULL */ + { pCxt->pRootNode = createShowStmtWithFull(pCxt, QUERY_NODE_SHOW_USERS_FULL_STMT); } + break; + case 272: /* cmd ::= SHOW USER PRIVILEGES */ + { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_USER_PRIVILEGES_STMT); } + break; + case 273: /* cmd ::= SHOW db_kind_opt DATABASES */ + { + pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DATABASES_STMT); + (void)setShowKind(pCxt, pCxt->pRootNode, yymsp[-1].minor.yy537); + } + break; + case 274: /* 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); + } + break; + case 275: /* 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); } + break; + case 276: /* cmd ::= SHOW db_name_cond_opt VGROUPS */ + { pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy560, NULL, OP_TYPE_LIKE); } + break; + case 277: /* cmd ::= SHOW MNODES */ + { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MNODES_STMT); } + break; + case 278: /* cmd ::= SHOW QNODES */ + { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QNODES_STMT); } + break; + case 279: /* cmd ::= SHOW ARBGROUPS */ + { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_ARBGROUPS_STMT); } + break; + case 280: /* cmd ::= SHOW FUNCTIONS */ + { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_FUNCTIONS_STMT); } + break; + case 281: /* 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); } + break; + case 282: /* 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); } + break; + case 283: /* cmd ::= SHOW STREAMS */ + { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STREAMS_STMT); } + break; + case 284: /* cmd ::= SHOW ACCOUNTS */ + { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } + break; + case 285: /* cmd ::= SHOW APPS */ + { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_APPS_STMT); } + break; + case 286: /* cmd ::= SHOW CONNECTIONS */ + { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONNECTIONS_STMT); } + break; + case 287: /* cmd ::= SHOW LICENCES */ + case 288: /* cmd ::= SHOW GRANTS */ yytestcase(yyruleno==288); + { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LICENCES_STMT); } + break; + case 289: /* cmd ::= SHOW GRANTS FULL */ + { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_GRANTS_FULL_STMT); } + break; + case 290: /* cmd ::= SHOW GRANTS LOGS */ + { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_GRANTS_LOGS_STMT); } + break; + case 291: /* cmd ::= SHOW CLUSTER MACHINES */ + { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CLUSTER_MACHINES_STMT); } + break; + case 292: /* cmd ::= SHOW CREATE DATABASE db_name */ + { pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy533); } + break; + case 293: /* cmd ::= SHOW CREATE TABLE full_table_name */ + { pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy560); } + break; + case 294: /* cmd ::= SHOW CREATE STABLE full_table_name */ + { pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, + yymsp[0].minor.yy560); } + break; + case 295: /* cmd ::= SHOW ENCRYPTIONS */ + { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_ENCRYPTIONS_STMT); } + break; + case 296: /* cmd ::= SHOW QUERIES */ + { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QUERIES_STMT); } + break; + case 297: /* cmd ::= SHOW SCORES */ + { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SCORES_STMT); } + break; + case 298: /* cmd ::= SHOW TOPICS */ + { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TOPICS_STMT); } + break; + case 299: /* cmd ::= SHOW VARIABLES */ + case 300: /* cmd ::= SHOW CLUSTER VARIABLES */ yytestcase(yyruleno==300); + { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VARIABLES_STMT); } + break; + case 301: /* cmd ::= SHOW LOCAL VARIABLES */ + { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LOCAL_VARIABLES_STMT); } + break; + case 302: /* 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); } + break; + case 303: /* cmd ::= SHOW BNODES */ + { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_BNODES_STMT); } + break; + case 304: /* cmd ::= SHOW SNODES */ + { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SNODES_STMT); } + break; + case 305: /* cmd ::= SHOW CLUSTER */ + { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CLUSTER_STMT); } + break; + case 306: /* cmd ::= SHOW TRANSACTIONS */ + { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TRANSACTIONS_STMT); } + break; + case 307: /* cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ + { pCxt->pRootNode = createShowTableDistributedStmt(pCxt, yymsp[0].minor.yy560); } + break; + case 308: /* cmd ::= SHOW CONSUMERS */ + { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONSUMERS_STMT); } + break; + case 309: /* cmd ::= SHOW SUBSCRIPTIONS */ + { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SUBSCRIPTIONS_STMT); } + break; + case 310: /* 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); } + break; + case 311: /* 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); } + break; + case 312: /* 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); } + break; + case 313: /* 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); } + break; + case 314: /* cmd ::= SHOW VNODES ON DNODE NK_INTEGER */ + { pCxt->pRootNode = createShowVnodesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0), NULL); } + break; + case 315: /* cmd ::= SHOW VNODES */ + { pCxt->pRootNode = createShowVnodesStmt(pCxt, NULL, NULL); } + break; + case 316: /* cmd ::= SHOW db_name_cond_opt ALIVE */ + { pCxt->pRootNode = createShowAliveStmt(pCxt, yymsp[-1].minor.yy560, QUERY_NODE_SHOW_DB_ALIVE_STMT); } + break; + case 317: /* cmd ::= SHOW CLUSTER ALIVE */ + { pCxt->pRootNode = createShowAliveStmt(pCxt, NULL, QUERY_NODE_SHOW_CLUSTER_ALIVE_STMT); } + break; + case 318: /* 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); } + break; + case 319: /* cmd ::= SHOW CREATE VIEW full_table_name */ + { pCxt->pRootNode = createShowCreateViewStmt(pCxt, QUERY_NODE_SHOW_CREATE_VIEW_STMT, yymsp[0].minor.yy560); } + break; + case 320: /* cmd ::= SHOW COMPACTS */ + { pCxt->pRootNode = createShowCompactsStmt(pCxt, QUERY_NODE_SHOW_COMPACTS_STMT); } + break; + case 321: /* cmd ::= SHOW COMPACT NK_INTEGER */ + { pCxt->pRootNode = createShowCompactDetailsStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + break; + case 322: /* table_kind_db_name_cond_opt ::= */ + { yymsp[1].minor.yy709.kind = SHOW_KIND_ALL; yymsp[1].minor.yy709.dbName = nil_token; } + break; + case 323: /* 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; + break; + case 324: /* 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; + break; + case 325: /* 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; + break; + case 326: /* table_kind ::= NORMAL */ + { yymsp[0].minor.yy537 = SHOW_KIND_TABLES_NORMAL; } + break; + case 327: /* table_kind ::= CHILD */ + { yymsp[0].minor.yy537 = SHOW_KIND_TABLES_CHILD; } + break; + case 328: /* db_name_cond_opt ::= */ + case 333: /* from_db_opt ::= */ yytestcase(yyruleno==333); + { yymsp[1].minor.yy560 = createDefaultDatabaseCondValue(pCxt); } + break; + case 329: /* db_name_cond_opt ::= db_name NK_DOT */ + { yylhsminor.yy560 = createIdentifierValueNode(pCxt, &yymsp[-1].minor.yy533); } + yymsp[-1].minor.yy560 = yylhsminor.yy560; + break; + case 331: /* like_pattern_opt ::= LIKE NK_STRING */ + { yymsp[-1].minor.yy560 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } + break; + case 332: /* table_name_cond ::= table_name */ + { yylhsminor.yy560 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy533); } + yymsp[0].minor.yy560 = yylhsminor.yy560; + break; + case 334: /* from_db_opt ::= FROM db_name */ + { yymsp[-1].minor.yy560 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy533); } + break; + case 338: /* tag_item ::= TBNAME */ + { yylhsminor.yy560 = setProjectionAlias(pCxt, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL), &yymsp[0].minor.yy0); } + yymsp[0].minor.yy560 = yylhsminor.yy560; + break; + case 341: /* 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; + break; + case 342: /* 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; + break; + case 343: /* db_kind_opt ::= */ + { yymsp[1].minor.yy537 = SHOW_KIND_ALL; } + break; + case 344: /* db_kind_opt ::= USER */ + { yymsp[0].minor.yy537 = SHOW_KIND_DATABASES_USER; } + break; + case 345: /* db_kind_opt ::= SYSTEM */ + { yymsp[0].minor.yy537 = SHOW_KIND_DATABASES_SYSTEM; } + break; + case 346: /* 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)); } + break; + case 347: /* 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)); } + break; + case 348: /* cmd ::= DROP TSMA exists_opt full_tsma_name */ + { pCxt->pRootNode = createDropTSMAStmt(pCxt, yymsp[-1].minor.yy173, yymsp[0].minor.yy560); } + break; + case 349: /* cmd ::= SHOW db_name_cond_opt TSMAS */ + { pCxt->pRootNode = createShowTSMASStmt(pCxt, yymsp[-1].minor.yy560); } + break; + case 352: /* tsma_func_list ::= FUNCTION NK_LP func_list NK_RP */ + { yymsp[-3].minor.yy560 = createTSMAOptions(pCxt, yymsp[-1].minor.yy334); } + break; + case 353: /* 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); } + break; + case 354: /* 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); } + break; + case 355: /* cmd ::= DROP INDEX exists_opt full_index_name */ + { pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-1].minor.yy173, yymsp[0].minor.yy560); } + break; + case 356: /* full_index_name ::= index_name */ + { yylhsminor.yy560 = createRealTableNodeForIndexName(pCxt, NULL, &yymsp[0].minor.yy533); } + yymsp[0].minor.yy560 = yylhsminor.yy560; + break; + case 357: /* 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; + break; + case 358: /* 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); } + break; + case 359: /* 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); } + break; + case 362: /* 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; + break; + case 363: /* sma_func_name ::= function_name */ + case 652: /* alias_opt ::= table_alias */ yytestcase(yyruleno==652); + { yylhsminor.yy533 = yymsp[0].minor.yy533; } + yymsp[0].minor.yy533 = yylhsminor.yy533; + break; + case 368: /* sma_stream_opt ::= */ + case 418: /* stream_options ::= */ yytestcase(yyruleno==418); + { yymsp[1].minor.yy560 = createStreamOptions(pCxt); } + break; + case 369: /* 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; + break; + case 370: /* 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; + break; + case 371: /* 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; + break; + case 372: /* with_meta ::= AS */ + { yymsp[0].minor.yy802 = 0; } + break; + case 373: /* with_meta ::= WITH META AS */ + { yymsp[-2].minor.yy802 = 1; } + break; + case 374: /* with_meta ::= ONLY META AS */ + { yymsp[-2].minor.yy802 = 2; } + break; + case 375: /* 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); } + break; + case 376: /* 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); } + break; + case 377: /* 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); } + break; + case 378: /* cmd ::= DROP TOPIC exists_opt topic_name */ + { pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy173, &yymsp[0].minor.yy533); } + break; + case 379: /* 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); } + break; + case 380: /* cmd ::= DESC full_table_name */ + case 381: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==381); + { pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy560); } + break; + case 382: /* cmd ::= RESET QUERY CACHE */ + { pCxt->pRootNode = createResetQueryCacheStmt(pCxt); } + break; + case 383: /* cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ + case 384: /* cmd ::= EXPLAIN analyze_opt explain_options insert_query */ yytestcase(yyruleno==384); + { pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy173, yymsp[-1].minor.yy560, yymsp[0].minor.yy560); } + break; + case 387: /* explain_options ::= */ + { yymsp[1].minor.yy560 = createDefaultExplainOptions(pCxt); } + break; + case 388: /* 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; + break; + case 389: /* 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; + break; + case 390: /* 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); } + break; + case 391: /* cmd ::= DROP FUNCTION exists_opt function_name */ + { pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy173, &yymsp[0].minor.yy533); } + break; + case 396: /* language_opt ::= */ + case 441: /* on_vgroup_id ::= */ yytestcase(yyruleno==441); + { yymsp[1].minor.yy533 = nil_token; } + break; + case 397: /* language_opt ::= LANGUAGE NK_STRING */ + case 442: /* on_vgroup_id ::= ON NK_INTEGER */ yytestcase(yyruleno==442); + { yymsp[-1].minor.yy533 = yymsp[0].minor.yy0; } + break; + case 400: /* 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); } + break; + case 401: /* cmd ::= DROP VIEW exists_opt full_view_name */ + { pCxt->pRootNode = createDropViewStmt(pCxt, yymsp[-1].minor.yy173, yymsp[0].minor.yy560); } + break; + case 402: /* full_view_name ::= view_name */ + { yylhsminor.yy560 = createViewNode(pCxt, NULL, &yymsp[0].minor.yy533); } + yymsp[0].minor.yy560 = yylhsminor.yy560; + break; + case 403: /* 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; + break; + case 404: /* 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); } + break; + case 405: /* cmd ::= DROP STREAM exists_opt stream_name */ + { pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy173, &yymsp[0].minor.yy533); } + break; + case 406: /* cmd ::= PAUSE STREAM exists_opt stream_name */ + { pCxt->pRootNode = createPauseStreamStmt(pCxt, yymsp[-1].minor.yy173, &yymsp[0].minor.yy533); } + break; + case 407: /* 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); } + break; + case 412: /* 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; + break; + case 413: /* stream_col_options ::= */ + case 765: /* column_options ::= */ yytestcase(yyruleno==765); + { yymsp[1].minor.yy560 = createDefaultColumnOptions(pCxt); } + break; + case 414: /* stream_col_options ::= stream_col_options PRIMARY KEY */ + case 766: /* column_options ::= column_options PRIMARY KEY */ yytestcase(yyruleno==766); + { yylhsminor.yy560 = setColumnOptions(pCxt, yymsp[-2].minor.yy560, COLUMN_OPTION_PRIMARYKEY, NULL); } + yymsp[-2].minor.yy560 = yylhsminor.yy560; + break; + case 419: /* stream_options ::= stream_options TRIGGER AT_ONCE */ + case 420: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ yytestcase(yyruleno==420); + { yylhsminor.yy560 = setStreamOptions(pCxt, yymsp[-2].minor.yy560, SOPT_TRIGGER_TYPE_SET, &yymsp[0].minor.yy0, NULL); } + yymsp[-2].minor.yy560 = yylhsminor.yy560; + break; + case 421: /* 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; + break; + case 422: /* 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; + break; + case 423: /* 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; + break; + case 424: /* 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; + break; + case 425: /* 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; + break; + case 426: /* 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; + break; + case 428: /* subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ + case 709: /* sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ yytestcase(yyruleno==709); + case 733: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==733); + { yymsp[-3].minor.yy560 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy560); } + break; + case 431: /* cmd ::= KILL CONNECTION NK_INTEGER */ + { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_CONNECTION_STMT, &yymsp[0].minor.yy0); } + break; + case 432: /* cmd ::= KILL QUERY NK_STRING */ + { pCxt->pRootNode = createKillQueryStmt(pCxt, &yymsp[0].minor.yy0); } + break; + case 433: /* cmd ::= KILL TRANSACTION NK_INTEGER */ + { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_TRANSACTION_STMT, &yymsp[0].minor.yy0); } + break; + case 434: /* cmd ::= KILL COMPACT NK_INTEGER */ + { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_COMPACT_STMT, &yymsp[0].minor.yy0); } + break; + case 435: /* cmd ::= BALANCE VGROUP */ + { pCxt->pRootNode = createBalanceVgroupStmt(pCxt); } + break; + case 436: /* cmd ::= BALANCE VGROUP LEADER on_vgroup_id */ + { pCxt->pRootNode = createBalanceVgroupLeaderStmt(pCxt, &yymsp[0].minor.yy533); } + break; + case 437: /* cmd ::= BALANCE VGROUP LEADER DATABASE db_name */ + { pCxt->pRootNode = createBalanceVgroupLeaderDBNameStmt(pCxt, &yymsp[0].minor.yy533); } + break; + case 438: /* cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ + { pCxt->pRootNode = createMergeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } + break; + case 439: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ + { pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy334); } + break; + case 440: /* cmd ::= SPLIT VGROUP NK_INTEGER */ + { pCxt->pRootNode = createSplitVgroupStmt(pCxt, &yymsp[0].minor.yy0); } + break; + case 443: /* dnode_list ::= DNODE NK_INTEGER */ + { yymsp[-1].minor.yy334 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + break; + case 445: /* cmd ::= DELETE FROM full_table_name where_clause_opt */ + { pCxt->pRootNode = createDeleteStmt(pCxt, yymsp[-1].minor.yy560, yymsp[0].minor.yy560); } + break; + case 448: /* 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); } + break; + case 449: /* 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); } + break; + case 450: /* tags_literal ::= NK_INTEGER */ + case 462: /* tags_literal ::= NK_BIN */ yytestcase(yyruleno==462); + case 471: /* tags_literal ::= NK_HEX */ yytestcase(yyruleno==471); + { yylhsminor.yy560 = createRawValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0, NULL); } + yymsp[0].minor.yy560 = yylhsminor.yy560; + break; + case 451: /* tags_literal ::= NK_INTEGER NK_PLUS duration_literal */ + case 452: /* tags_literal ::= NK_INTEGER NK_MINUS duration_literal */ yytestcase(yyruleno==452); + case 463: /* tags_literal ::= NK_BIN NK_PLUS duration_literal */ yytestcase(yyruleno==463); + case 464: /* tags_literal ::= NK_BIN NK_MINUS duration_literal */ yytestcase(yyruleno==464); + case 472: /* tags_literal ::= NK_HEX NK_PLUS duration_literal */ yytestcase(yyruleno==472); + case 473: /* tags_literal ::= NK_HEX NK_MINUS duration_literal */ yytestcase(yyruleno==473); + case 481: /* tags_literal ::= NK_STRING NK_PLUS duration_literal */ yytestcase(yyruleno==481); + case 482: /* tags_literal ::= NK_STRING NK_MINUS duration_literal */ yytestcase(yyruleno==482); + { + SToken l = yymsp[-2].minor.yy0; + SToken r = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy560); + l.n = (r.z + r.n) - l.z; + yylhsminor.yy560 = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, yymsp[0].minor.yy560); + } + yymsp[-2].minor.yy560 = yylhsminor.yy560; + break; + case 453: /* tags_literal ::= NK_PLUS NK_INTEGER */ + case 456: /* tags_literal ::= NK_MINUS NK_INTEGER */ yytestcase(yyruleno==456); + case 465: /* tags_literal ::= NK_PLUS NK_BIN */ yytestcase(yyruleno==465); + case 468: /* tags_literal ::= NK_MINUS NK_BIN */ yytestcase(yyruleno==468); + case 474: /* tags_literal ::= NK_PLUS NK_HEX */ yytestcase(yyruleno==474); + case 477: /* tags_literal ::= NK_MINUS NK_HEX */ yytestcase(yyruleno==477); + { + 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); + } + yymsp[-1].minor.yy560 = yylhsminor.yy560; + break; + case 454: /* tags_literal ::= NK_PLUS NK_INTEGER NK_PLUS duration_literal */ + case 455: /* tags_literal ::= NK_PLUS NK_INTEGER NK_MINUS duration_literal */ yytestcase(yyruleno==455); + case 457: /* tags_literal ::= NK_MINUS NK_INTEGER NK_PLUS duration_literal */ yytestcase(yyruleno==457); + case 458: /* tags_literal ::= NK_MINUS NK_INTEGER NK_MINUS duration_literal */ yytestcase(yyruleno==458); + case 466: /* tags_literal ::= NK_PLUS NK_BIN NK_PLUS duration_literal */ yytestcase(yyruleno==466); + case 467: /* tags_literal ::= NK_PLUS NK_BIN NK_MINUS duration_literal */ yytestcase(yyruleno==467); + case 469: /* tags_literal ::= NK_MINUS NK_BIN NK_PLUS duration_literal */ yytestcase(yyruleno==469); + case 470: /* tags_literal ::= NK_MINUS NK_BIN NK_MINUS duration_literal */ yytestcase(yyruleno==470); + case 475: /* tags_literal ::= NK_PLUS NK_HEX NK_PLUS duration_literal */ yytestcase(yyruleno==475); + case 476: /* tags_literal ::= NK_PLUS NK_HEX NK_MINUS duration_literal */ yytestcase(yyruleno==476); + case 478: /* tags_literal ::= NK_MINUS NK_HEX NK_PLUS duration_literal */ yytestcase(yyruleno==478); + case 479: /* tags_literal ::= NK_MINUS NK_HEX NK_MINUS duration_literal */ yytestcase(yyruleno==479); + { + SToken l = yymsp[-3].minor.yy0; + SToken r = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy560); + l.n = (r.z + r.n) - l.z; + yylhsminor.yy560 = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, yymsp[0].minor.yy560); + } + yymsp[-3].minor.yy560 = yylhsminor.yy560; + break; + case 459: /* tags_literal ::= NK_FLOAT */ + { yylhsminor.yy560 = createRawValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0, NULL); } + yymsp[0].minor.yy560 = yylhsminor.yy560; + break; + case 460: /* tags_literal ::= NK_PLUS NK_FLOAT */ + case 461: /* tags_literal ::= NK_MINUS NK_FLOAT */ yytestcase(yyruleno==461); + { + 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); + } + yymsp[-1].minor.yy560 = yylhsminor.yy560; + break; + case 480: /* tags_literal ::= NK_STRING */ + { yylhsminor.yy560 = createRawValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0, NULL); } + yymsp[0].minor.yy560 = yylhsminor.yy560; + break; + case 483: /* tags_literal ::= NK_BOOL */ + { yylhsminor.yy560 = createRawValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0, NULL); } + yymsp[0].minor.yy560 = yylhsminor.yy560; + break; + case 484: /* tags_literal ::= NULL */ + { yylhsminor.yy560 = createRawValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0, NULL); } + yymsp[0].minor.yy560 = yylhsminor.yy560; + break; + case 485: /* tags_literal ::= literal_func */ + { yylhsminor.yy560 = createRawValueNode(pCxt, TSDB_DATA_TYPE_BINARY, NULL, yymsp[0].minor.yy560); } + yymsp[0].minor.yy560 = yylhsminor.yy560; + break; + case 486: /* tags_literal ::= literal_func NK_PLUS duration_literal */ + case 487: /* tags_literal ::= literal_func NK_MINUS duration_literal */ yytestcase(yyruleno==487); + { + SToken l = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy560); + SToken r = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy560); + 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); + } + yymsp[-2].minor.yy560 = yylhsminor.yy560; + break; + case 490: /* 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; + break; + case 491: /* 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; + break; + case 492: /* 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; + break; + case 493: /* 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; + break; + case 494: /* 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; + break; + case 495: /* literal ::= duration_literal */ + case 505: /* signed_literal ::= signed */ yytestcase(yyruleno==505); + case 529: /* expr_or_subquery ::= expression */ yytestcase(yyruleno==529); + case 530: /* expression ::= literal */ yytestcase(yyruleno==530); + case 532: /* expression ::= column_reference */ yytestcase(yyruleno==532); + case 533: /* expression ::= function_expression */ yytestcase(yyruleno==533); + case 534: /* expression ::= case_when_expression */ yytestcase(yyruleno==534); + case 576: /* function_expression ::= literal_func */ yytestcase(yyruleno==576); + case 633: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==633); + case 637: /* boolean_primary ::= predicate */ yytestcase(yyruleno==637); + case 639: /* common_expression ::= expr_or_subquery */ yytestcase(yyruleno==639); + case 640: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==640); + case 643: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==643); + case 645: /* table_reference ::= table_primary */ yytestcase(yyruleno==645); + case 646: /* table_reference ::= joined_table */ yytestcase(yyruleno==646); + case 650: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==650); + case 735: /* query_simple ::= query_specification */ yytestcase(yyruleno==735); + case 736: /* query_simple ::= union_query_expression */ yytestcase(yyruleno==736); + case 739: /* query_simple_or_subquery ::= query_simple */ yytestcase(yyruleno==739); + case 741: /* query_or_subquery ::= query_expression */ yytestcase(yyruleno==741); + { yylhsminor.yy560 = yymsp[0].minor.yy560; } + yymsp[0].minor.yy560 = yylhsminor.yy560; + break; + case 496: /* 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; + break; + case 497: /* literal ::= NK_QUESTION */ + { yylhsminor.yy560 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy560 = yylhsminor.yy560; + break; + case 498: /* duration_literal ::= NK_VARIABLE */ + case 710: /* interval_sliding_duration_literal ::= NK_VARIABLE */ yytestcase(yyruleno==710); + case 711: /* interval_sliding_duration_literal ::= NK_STRING */ yytestcase(yyruleno==711); + case 712: /* interval_sliding_duration_literal ::= NK_INTEGER */ yytestcase(yyruleno==712); + { yylhsminor.yy560 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy560 = yylhsminor.yy560; + break; + case 499: /* signed ::= NK_INTEGER */ + { yylhsminor.yy560 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy560 = yylhsminor.yy560; + break; + case 500: /* signed ::= NK_PLUS NK_INTEGER */ + { yymsp[-1].minor.yy560 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } + break; + case 501: /* 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); + } + yymsp[-1].minor.yy560 = yylhsminor.yy560; + break; + case 502: /* signed ::= NK_FLOAT */ + { yylhsminor.yy560 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy560 = yylhsminor.yy560; + break; + case 503: /* signed ::= NK_PLUS NK_FLOAT */ + { yymsp[-1].minor.yy560 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } + break; + case 504: /* 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); + } + yymsp[-1].minor.yy560 = yylhsminor.yy560; + break; + case 506: /* signed_literal ::= NK_STRING */ + { yylhsminor.yy560 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy560 = yylhsminor.yy560; + break; + case 507: /* signed_literal ::= NK_BOOL */ + { yylhsminor.yy560 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy560 = yylhsminor.yy560; + break; + case 508: /* signed_literal ::= TIMESTAMP NK_STRING */ + { yymsp[-1].minor.yy560 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } + break; + case 509: /* signed_literal ::= duration_literal */ + case 511: /* signed_literal ::= literal_func */ yytestcase(yyruleno==511); + case 604: /* star_func_para ::= expr_or_subquery */ yytestcase(yyruleno==604); + case 687: /* select_item ::= common_expression */ yytestcase(yyruleno==687); + case 697: /* partition_item ::= expr_or_subquery */ yytestcase(yyruleno==697); + case 740: /* query_simple_or_subquery ::= subquery */ yytestcase(yyruleno==740); + case 742: /* query_or_subquery ::= subquery */ yytestcase(yyruleno==742); + case 755: /* search_condition ::= common_expression */ yytestcase(yyruleno==755); + { yylhsminor.yy560 = releaseRawExprNode(pCxt, yymsp[0].minor.yy560); } + yymsp[0].minor.yy560 = yylhsminor.yy560; + break; + case 510: /* signed_literal ::= NULL */ + { yylhsminor.yy560 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy560 = yylhsminor.yy560; + break; + case 512: /* signed_literal ::= NK_QUESTION */ + { yylhsminor.yy560 = createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy560 = yylhsminor.yy560; + break; + case 531: /* expression ::= pseudo_column */ + { yylhsminor.yy560 = yymsp[0].minor.yy560; (void)setRawExprNodeIsPseudoColumn(pCxt, yylhsminor.yy560, true); } + yymsp[0].minor.yy560 = yylhsminor.yy560; + break; + case 535: /* expression ::= NK_LP expression NK_RP */ + case 638: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==638); + case 754: /* subquery ::= NK_LP subquery NK_RP */ yytestcase(yyruleno==754); + { yylhsminor.yy560 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy560)); } + yymsp[-2].minor.yy560 = yylhsminor.yy560; + break; + case 536: /* 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)); + } + yymsp[-1].minor.yy560 = yylhsminor.yy560; + break; + case 537: /* 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)); + } + yymsp[-1].minor.yy560 = yylhsminor.yy560; + break; + case 538: /* 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))); + } + yymsp[-2].minor.yy560 = yylhsminor.yy560; + break; + case 539: /* 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))); + } + yymsp[-2].minor.yy560 = yylhsminor.yy560; + break; + case 540: /* 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))); + } + yymsp[-2].minor.yy560 = yylhsminor.yy560; + break; + case 541: /* 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))); + } + yymsp[-2].minor.yy560 = yylhsminor.yy560; + break; + case 542: /* 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))); + } + yymsp[-2].minor.yy560 = yylhsminor.yy560; + break; + case 543: /* 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))); + } + yymsp[-2].minor.yy560 = yylhsminor.yy560; + break; + case 544: /* 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))); + } + yymsp[-2].minor.yy560 = yylhsminor.yy560; + break; + case 545: /* 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))); + } + yymsp[-2].minor.yy560 = yylhsminor.yy560; + break; + case 548: /* 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; + break; + case 549: /* 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; + break; + case 550: /* 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; + break; + case 551: /* 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; + break; + case 552: /* pseudo_column ::= ROWTS */ + case 553: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==553); + case 555: /* pseudo_column ::= QSTART */ yytestcase(yyruleno==555); + case 556: /* pseudo_column ::= QEND */ yytestcase(yyruleno==556); + case 557: /* pseudo_column ::= QDURATION */ yytestcase(yyruleno==557); + case 558: /* pseudo_column ::= WSTART */ yytestcase(yyruleno==558); + case 559: /* pseudo_column ::= WEND */ yytestcase(yyruleno==559); + case 560: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==560); + case 561: /* pseudo_column ::= IROWTS */ yytestcase(yyruleno==561); + case 562: /* pseudo_column ::= ISFILLED */ yytestcase(yyruleno==562); + case 563: /* pseudo_column ::= QTAGS */ yytestcase(yyruleno==563); + case 578: /* literal_func ::= NOW */ yytestcase(yyruleno==578); + case 579: /* literal_func ::= TODAY */ yytestcase(yyruleno==579); + { yylhsminor.yy560 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); } + yymsp[0].minor.yy560 = yylhsminor.yy560; + break; + case 554: /* 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; + break; + case 564: /* function_expression ::= function_name NK_LP expression_list NK_RP */ + case 565: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==565); + case 572: /* function_expression ::= substr_func NK_LP expression_list NK_RP */ yytestcase(yyruleno==572); + { 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; + break; + case 566: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ + case 567: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name_default_len NK_RP */ yytestcase(yyruleno==567); + { 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; + break; + case 568: /* 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; + break; + case 569: /* 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; + break; + case 570: /* 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; + break; + case 571: /* 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; + break; + case 573: /* 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; + break; + case 574: /* 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; + break; + case 575: /* function_expression ::= REPLACE NK_LP expression_list NK_RP */ + { 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; + break; + case 577: /* 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; + break; + case 582: /* trim_specification_type ::= */ + { yymsp[1].minor.yy672 = TRIM_TYPE_BOTH; } + break; + case 583: /* trim_specification_type ::= BOTH */ + { yymsp[0].minor.yy672 = TRIM_TYPE_BOTH; } + break; + case 584: /* trim_specification_type ::= TRAILING */ + { yymsp[0].minor.yy672 = TRIM_TYPE_TRAILING; } + break; + case 585: /* trim_specification_type ::= LEADING */ + { yymsp[0].minor.yy672 = TRIM_TYPE_LEADING; } + break; + case 600: /* star_func_para_list ::= NK_STAR */ + { yylhsminor.yy334 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy334 = yylhsminor.yy334; + break; + case 605: /* star_func_para ::= table_name NK_DOT NK_STAR */ + case 690: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==690); + { yylhsminor.yy560 = createColumnNode(pCxt, &yymsp[-2].minor.yy533, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy560 = yylhsminor.yy560; + break; + case 606: /* 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; + break; + case 607: /* 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; + break; + case 610: /* 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)); } + break; + case 612: /* case_when_else_opt ::= ELSE common_expression */ + { yymsp[-1].minor.yy560 = releaseRawExprNode(pCxt, yymsp[0].minor.yy560); } + break; + case 613: /* predicate ::= expr_or_subquery compare_op expr_or_subquery */ + case 618: /* predicate ::= expr_or_subquery in_op in_predicate_value */ yytestcase(yyruleno==618); + { + 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))); + } + yymsp[-2].minor.yy560 = yylhsminor.yy560; + break; + case 614: /* 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))); + } + yymsp[-4].minor.yy560 = yylhsminor.yy560; + break; + case 615: /* 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))); + } + yymsp[-5].minor.yy560 = yylhsminor.yy560; + break; + case 616: /* 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)); + } + yymsp[-2].minor.yy560 = yylhsminor.yy560; + break; + case 617: /* 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)); + } + yymsp[-3].minor.yy560 = yylhsminor.yy560; + break; + case 619: /* compare_op ::= NK_LT */ + { yymsp[0].minor.yy506 = OP_TYPE_LOWER_THAN; } + break; + case 620: /* compare_op ::= NK_GT */ + { yymsp[0].minor.yy506 = OP_TYPE_GREATER_THAN; } + break; + case 621: /* compare_op ::= NK_LE */ + { yymsp[0].minor.yy506 = OP_TYPE_LOWER_EQUAL; } + break; + case 622: /* compare_op ::= NK_GE */ + { yymsp[0].minor.yy506 = OP_TYPE_GREATER_EQUAL; } + break; + case 623: /* compare_op ::= NK_NE */ + { yymsp[0].minor.yy506 = OP_TYPE_NOT_EQUAL; } + break; + case 624: /* compare_op ::= NK_EQ */ + { yymsp[0].minor.yy506 = OP_TYPE_EQUAL; } + break; + case 625: /* compare_op ::= LIKE */ + { yymsp[0].minor.yy506 = OP_TYPE_LIKE; } + break; + case 626: /* compare_op ::= NOT LIKE */ + { yymsp[-1].minor.yy506 = OP_TYPE_NOT_LIKE; } + break; + case 627: /* compare_op ::= MATCH */ + { yymsp[0].minor.yy506 = OP_TYPE_MATCH; } + break; + case 628: /* compare_op ::= NMATCH */ + { yymsp[0].minor.yy506 = OP_TYPE_NMATCH; } + break; + case 629: /* compare_op ::= CONTAINS */ + { yymsp[0].minor.yy506 = OP_TYPE_JSON_CONTAINS; } + break; + case 630: /* in_op ::= IN */ + { yymsp[0].minor.yy506 = OP_TYPE_IN; } + break; + case 631: /* in_op ::= NOT IN */ + { yymsp[-1].minor.yy506 = OP_TYPE_NOT_IN; } + break; + case 632: /* 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; + break; + case 634: /* 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)); + } + yymsp[-1].minor.yy560 = yylhsminor.yy560; + break; + case 635: /* 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))); + } + yymsp[-2].minor.yy560 = yylhsminor.yy560; + break; + case 636: /* 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))); + } + yymsp[-2].minor.yy560 = yylhsminor.yy560; + break; + case 644: /* 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; + break; + case 647: /* 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; + break; + case 648: /* 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; + break; + case 649: /* 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; + break; + case 651: /* alias_opt ::= */ + { yymsp[1].minor.yy533 = nil_token; } + break; + case 653: /* alias_opt ::= AS table_alias */ + { yymsp[-1].minor.yy533 = yymsp[0].minor.yy533; } + break; + case 654: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + case 655: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==655); + { yymsp[-2].minor.yy560 = yymsp[-1].minor.yy560; } + break; + case 656: /* 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); + } + yymsp[-7].minor.yy560 = yylhsminor.yy560; + break; + case 657: /* join_type ::= */ + { yymsp[1].minor.yy36 = JOIN_TYPE_INNER; } + break; + case 658: /* join_type ::= INNER */ + { yymsp[0].minor.yy36 = JOIN_TYPE_INNER; } + break; + case 659: /* join_type ::= LEFT */ + { yymsp[0].minor.yy36 = JOIN_TYPE_LEFT; } + break; + case 660: /* join_type ::= RIGHT */ + { yymsp[0].minor.yy36 = JOIN_TYPE_RIGHT; } + break; + case 661: /* join_type ::= FULL */ + { yymsp[0].minor.yy36 = JOIN_TYPE_FULL; } + break; + case 662: /* join_subtype ::= */ + { yymsp[1].minor.yy648 = JOIN_STYPE_NONE; } + break; + case 663: /* join_subtype ::= OUTER */ + { yymsp[0].minor.yy648 = JOIN_STYPE_OUTER; } + break; + case 664: /* join_subtype ::= SEMI */ + { yymsp[0].minor.yy648 = JOIN_STYPE_SEMI; } + break; + case 665: /* join_subtype ::= ANTI */ + { yymsp[0].minor.yy648 = JOIN_STYPE_ANTI; } + break; + case 666: /* join_subtype ::= ASOF */ + { yymsp[0].minor.yy648 = JOIN_STYPE_ASOF; } + break; + case 667: /* join_subtype ::= WINDOW */ + { yymsp[0].minor.yy648 = JOIN_STYPE_WIN; } + break; + case 671: /* 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)); } + break; + case 672: /* 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; + break; + case 673: /* 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)); + } + yymsp[-1].minor.yy560 = yylhsminor.yy560; + break; + case 675: /* jlimit_clause_opt ::= JLIMIT NK_INTEGER */ + case 746: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ yytestcase(yyruleno==746); + case 750: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==750); + { yymsp[-1].minor.yy560 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } + break; + case 676: /* 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); + } + break; + case 677: /* hint_list ::= */ + { yymsp[1].minor.yy334 = createHintNodeList(pCxt, NULL); } + break; + case 678: /* hint_list ::= NK_HINT */ + { yylhsminor.yy334 = createHintNodeList(pCxt, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy334 = yylhsminor.yy334; + break; + case 683: /* set_quantifier_opt ::= ALL */ + { yymsp[0].minor.yy173 = false; } + break; + case 686: /* select_item ::= NK_STAR */ + { yylhsminor.yy560 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy560 = yylhsminor.yy560; + break; + case 688: /* select_item ::= common_expression column_alias */ + case 698: /* partition_item ::= expr_or_subquery column_alias */ yytestcase(yyruleno==698); + { yylhsminor.yy560 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy560), &yymsp[0].minor.yy533); } + yymsp[-1].minor.yy560 = yylhsminor.yy560; + break; + case 689: /* select_item ::= common_expression AS column_alias */ + case 699: /* partition_item ::= expr_or_subquery AS column_alias */ yytestcase(yyruleno==699); + { yylhsminor.yy560 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy560), &yymsp[0].minor.yy533); } + yymsp[-2].minor.yy560 = yylhsminor.yy560; + break; + case 694: /* partition_by_clause_opt ::= PARTITION BY partition_list */ + case 724: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==724); + case 744: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==744); + { yymsp[-2].minor.yy334 = yymsp[0].minor.yy334; } + break; + case 701: /* 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)); } + break; + case 702: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ + { yymsp[-3].minor.yy560 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy560)); } + break; + case 703: /* 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); } + break; + case 704: /* 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); } + break; + case 705: /* 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); } + break; + case 706: /* 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); } + break; + case 707: /* 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); } + break; + case 714: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ + { yymsp[-3].minor.yy560 = createFillNode(pCxt, yymsp[-1].minor.yy18, NULL); } + break; + case 715: /* 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)); } + break; + case 716: /* 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)); } + break; + case 717: /* fill_mode ::= NONE */ + { yymsp[0].minor.yy18 = FILL_MODE_NONE; } + break; + case 718: /* fill_mode ::= PREV */ + { yymsp[0].minor.yy18 = FILL_MODE_PREV; } + break; + case 719: /* fill_mode ::= NULL */ + { yymsp[0].minor.yy18 = FILL_MODE_NULL; } + break; + case 720: /* fill_mode ::= NULL_F */ + { yymsp[0].minor.yy18 = FILL_MODE_NULL_F; } + break; + case 721: /* fill_mode ::= LINEAR */ + { yymsp[0].minor.yy18 = FILL_MODE_LINEAR; } + break; + case 722: /* fill_mode ::= NEXT */ + { yymsp[0].minor.yy18 = FILL_MODE_NEXT; } + break; + case 725: /* group_by_list ::= expr_or_subquery */ + { yylhsminor.yy334 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy560))); } + yymsp[0].minor.yy334 = yylhsminor.yy334; + break; + case 726: /* 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; + break; + case 730: /* 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)); } + break; + case 731: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ + { yymsp[-3].minor.yy560 = createInterpTimePoint(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy560)); } + break; + case 734: /* 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); + } + yymsp[-3].minor.yy560 = yylhsminor.yy560; + break; + case 737: /* 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; + break; + case 738: /* 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; + break; + case 747: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + case 751: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==751); + { yymsp[-3].minor.yy560 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } + break; + case 748: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + case 752: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==752); + { yymsp[-3].minor.yy560 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } + break; + case 753: /* 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; + break; + case 758: /* 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; + break; + case 759: /* ordering_specification_opt ::= */ + { yymsp[1].minor.yy974 = ORDER_ASC; } + break; + case 760: /* ordering_specification_opt ::= ASC */ + { yymsp[0].minor.yy974 = ORDER_ASC; } + break; + case 761: /* ordering_specification_opt ::= DESC */ + { yymsp[0].minor.yy974 = ORDER_DESC; } + break; + case 762: /* null_ordering_opt ::= */ + { yymsp[1].minor.yy109 = NULL_ORDER_DEFAULT; } + break; + case 763: /* null_ordering_opt ::= NULLS FIRST */ + { yymsp[-1].minor.yy109 = NULL_ORDER_FIRST; } + break; + case 764: /* null_ordering_opt ::= NULLS LAST */ + { yymsp[-1].minor.yy109 = NULL_ORDER_LAST; } + break; + case 767: /* column_options ::= column_options ENCODE NK_STRING */ + { yylhsminor.yy560 = setColumnOptions(pCxt, yymsp[-2].minor.yy560, COLUMN_OPTION_ENCODE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy560 = yylhsminor.yy560; + break; + case 768: /* column_options ::= column_options COMPRESS NK_STRING */ + { yylhsminor.yy560 = setColumnOptions(pCxt, yymsp[-2].minor.yy560, COLUMN_OPTION_COMPRESS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy560 = yylhsminor.yy560; + break; + case 769: /* column_options ::= column_options LEVEL NK_STRING */ + { yylhsminor.yy560 = setColumnOptions(pCxt, yymsp[-2].minor.yy560, COLUMN_OPTION_LEVEL, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy560 = yylhsminor.yy560; + break; + default: + break; + /********** End reduce actions ************************************************/ }; assert( yyrulenoyytos>yypParser->yystack ) yy_pop_parser_stack(yypParser); /* Here code is inserted which will be executed whenever the ** parser fails */ -/************ Begin %parse_failure code ***************************************/ -/************ End %parse_failure code *****************************************/ + /************ Begin %parse_failure code ***************************************/ + /************ End %parse_failure code *****************************************/ ParseARG_STORE /* Suppress warning about unused %extra_argument variable */ - ParseCTX_STORE + ParseCTX_STORE } #endif /* YYNOERRORRECOVERY */ @@ -8720,17 +8020,16 @@ static void yy_parse_failed( ** The following code executes when a syntax error first occurs. */ static void yy_syntax_error( - yyParser *yypParser, /* The parser */ - int yymajor, /* The major type of the error token */ - ParseTOKENTYPE yyminor /* The minor type of the error token */ + yyParser *yypParser, /* The parser */ + int yymajor, /* The major type of the error token */ + ParseTOKENTYPE yyminor /* The minor type of the error token */ ){ ParseARG_FETCH - ParseCTX_FETCH + ParseCTX_FETCH #define TOKEN yyminor -/************ Begin %syntax_error code ****************************************/ -#line 29 "sql.y" + /************ Begin %syntax_error code ****************************************/ - if (TSDB_CODE_SUCCESS == pCxt->errCode) { + if (TSDB_CODE_SUCCESS == pCxt->errCode) { if(TOKEN.z) { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_SYNTAX_ERROR, TOKEN.z); } else { @@ -8739,22 +8038,21 @@ static void yy_syntax_error( } else if (TSDB_CODE_PAR_DB_NOT_SPECIFIED == pCxt->errCode && TK_NK_FLOAT == TOKEN.type) { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_SYNTAX_ERROR, TOKEN.z); } -#line 8742 "sql.c" -/************ End %syntax_error code ******************************************/ + /************ End %syntax_error code ******************************************/ ParseARG_STORE /* Suppress warning about unused %extra_argument variable */ - ParseCTX_STORE + ParseCTX_STORE } /* ** The following is executed when the parser accepts */ static void yy_accept( - yyParser *yypParser /* The parser */ + yyParser *yypParser /* The parser */ ){ ParseARG_FETCH - ParseCTX_FETCH + ParseCTX_FETCH #ifndef NDEBUG - if( yyTraceFILE ){ + if( yyTraceFILE ){ fprintf(yyTraceFILE,"%sAccept!\n",yyTracePrompt); } #endif @@ -8764,10 +8062,10 @@ static void yy_accept( assert( yypParser->yytos==yypParser->yystack ); /* Here code is inserted which will be executed whenever the ** parser accepts */ -/*********** Begin %parse_accept code *****************************************/ -/*********** End %parse_accept code *******************************************/ + /*********** Begin %parse_accept code *****************************************/ + /*********** End %parse_accept code *******************************************/ ParseARG_STORE /* Suppress warning about unused %extra_argument variable */ - ParseCTX_STORE + ParseCTX_STORE } /* The main parser program. @@ -8790,10 +8088,10 @@ static void yy_accept( ** None. */ void Parse( - void *yyp, /* The parser */ - int yymajor, /* The major token code number */ - ParseTOKENTYPE yyminor /* The value for the token */ - ParseARG_PDECL /* Optional %extra_argument parameter */ + void *yyp, /* The parser */ + int yymajor, /* The major token code number */ + ParseTOKENTYPE yyminor /* The value for the token */ + ParseARG_PDECL /* Optional %extra_argument parameter */ ){ YYMINORTYPE yyminorunion; YYACTIONTYPE yyact; /* The parser action. */ @@ -8805,9 +8103,9 @@ void Parse( #endif yyParser *yypParser = (yyParser*)yyp; /* The parser */ ParseCTX_FETCH - ParseARG_STORE + ParseARG_STORE - assert( yypParser->yytos!=0 ); + assert( yypParser->yytos!=0 ); #if !defined(YYERRORSYMBOL) && !defined(YYNOERRORRECOVERY) yyendofinput = (yymajor==0); #endif @@ -8837,14 +8135,14 @@ void Parse( int yysize = yyRuleInfoNRhs[yyruleno]; if( yysize ){ fprintf(yyTraceFILE, "%sReduce %d [%s]%s, pop back to state %d.\n", - yyTracePrompt, - yyruleno, yyRuleName[yyruleno], - yyrulenoyytos[yysize].stateno); + yyTracePrompt, + yyruleno, yyRuleName[yyruleno], + yyrulenoyytos[yysize].stateno); }else{ fprintf(yyTraceFILE, "%sReduce %d [%s]%s.\n", - yyTracePrompt, yyruleno, yyRuleName[yyruleno], - yyrulenoyytos - yypParser->yystack)>yypParser->yyhwm ){ yypParser->yyhwm++; assert( yypParser->yyhwm == - (int)(yypParser->yytos - yypParser->yystack)); + (int)(yypParser->yytos - yypParser->yystack)); } #endif -#if YYSTACKDEPTH>0 if( yypParser->yytos>=yypParser->yystackEnd ){ - yyStackOverflow(yypParser); - break; - } -#else - if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz-1] ){ if( yyGrowStack(yypParser) ){ yyStackOverflow(yypParser); break; } } -#endif } yyact = yy_reduce(yypParser,yyruleno,yymajor,yyminor ParseCTX_PARAM); }else if( yyact <= YY_MAX_SHIFTREDUCE ){ @@ -8899,7 +8190,7 @@ void Parse( #ifdef YYERRORSYMBOL /* A syntax error has occurred. ** The response to an error depends upon whether or not the - ** grammar defines an error token "ERROR". + ** grammar defines an error token "ERROR". ** ** This is what we do if the grammar does define ERROR: ** @@ -8924,7 +8215,7 @@ void Parse( #ifndef NDEBUG if( yyTraceFILE ){ fprintf(yyTraceFILE,"%sDiscard input token %s\n", - yyTracePrompt,yyTokenName[yymajor]); + yyTracePrompt,yyTokenName[yymajor]); } #endif yy_destructor(yypParser, (YYCODETYPE)yymajor, &yyminorunion); diff --git a/source/libs/scalar/inc/sclInt.h b/source/libs/scalar/inc/sclInt.h index 836cf7d69a..d6d77ffd7b 100644 --- a/source/libs/scalar/inc/sclInt.h +++ b/source/libs/scalar/inc/sclInt.h @@ -54,6 +54,52 @@ typedef struct SScalarCtx { #define SCL_DOWNGRADE_DATETYPE(_type) \ ((_type) == TSDB_DATA_TYPE_BIGINT || TSDB_DATA_TYPE_DOUBLE == (_type) || (_type) == TSDB_DATA_TYPE_UBIGINT) + +/** Flags for calculateWeekNum() function. */ +#define WEEK_FLAG_MONDAY_FIRST 1 /* If set this, monday is first day of week, else, sunday is first day.*/ +#define WEEK_FLAG_FROM_ONE 2 /* If set this, week start from 1, else, week start from 0. */ +#define WEEK_FLAG_INCLUDE_FIRST_DAY 4 /* If set this, week contains 'first day of week' is week one, + * else, weeks are numbered according to ISO 8601:1988. */ + +#ifndef M_PI +#define M_PI 3.14159265358979323846264338327950288 /* pi */ +#endif + +#ifndef M_1_PI +#define M_1_PI 0.318309886183790671537767526745028724 /* 1/pi */ +#endif + +#define INT1TOCHAR(T, A) \ + { \ + const unsigned long def_temp = (unsigned long)(A); \ + ((unsigned char *)(T))[0] = (unsigned char)(def_temp); \ + T += 1; \ + } +#define INT2TOCHAR(T, A) \ + { \ + const unsigned long def_temp = (unsigned long)(A); \ + ((unsigned char *)(T))[1] = (unsigned char)(def_temp); \ + ((unsigned char *)(T))[0] = (unsigned char)(def_temp >> 8); \ + T += 2; \ + } +#define INT3TOCHAR(T, A) \ + { \ + const unsigned long def_temp = (unsigned long)(A); \ + ((unsigned char *)(T))[2] = (unsigned char)(def_temp); \ + ((unsigned char *)(T))[1] = (unsigned char)(def_temp >> 8); \ + ((unsigned char *)(T))[0] = (unsigned char)(def_temp >> 16); \ + T += 3; \ + } +#define INT4TOCHAR(T, A) \ + { \ + const unsigned long def_temp = (unsigned long)(A); \ + ((unsigned char *)(T))[3] = (unsigned char)(def_temp); \ + ((unsigned char *)(T))[2] = (unsigned char)(def_temp >> 8); \ + ((unsigned char *)(T))[1] = (unsigned char)(def_temp >> 16); \ + ((unsigned char *)(T))[0] = (unsigned char)(def_temp >> 24); \ + T += 4; \ + } + #define sclFatal(...) qFatal(__VA_ARGS__) #define sclError(...) qError(__VA_ARGS__) #define sclWarn(...) qWarn(__VA_ARGS__) diff --git a/source/libs/scalar/src/sclfunc.c b/source/libs/scalar/src/sclfunc.c index 5db7aebeee..a666404838 100644 --- a/source/libs/scalar/src/sclfunc.c +++ b/source/libs/scalar/src/sclfunc.c @@ -8,11 +8,13 @@ #include "ttime.h" typedef float (*_float_fn)(float); +typedef float (*_float_fn_2)(float, float); typedef double (*_double_fn)(double); typedef double (*_double_fn_2)(double, double); typedef int (*_conv_fn)(int); -typedef void (*_trim_fn)(char *, char *, int32_t, int32_t); -typedef uint16_t (*_len_fn)(char *, int32_t); +typedef void (*_trim_space_fn)(char *, char *, int32_t, int32_t); +typedef int32_t (*_trim_fn)(char *, char *, char *, int32_t, int32_t); +typedef int32_t (*_len_fn)(char *, int32_t, VarDataLenT *); /** Math functions **/ static double tlog(double v) { return log(v); } @@ -31,6 +33,14 @@ static double tlog2(double v, double base) { } } +static double degrees(double v) { + return v * M_1_PI * 180.0; +} + +static double radians(double v) { + return v / 180.0 * M_PI ; +} + int32_t absFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput) { SColumnInfoData *pInputData = pInput->columnData; SColumnInfoData *pOutputData = pOutput->columnData; @@ -132,6 +142,155 @@ int32_t absFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutpu return TSDB_CODE_SUCCESS; } +int32_t signFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput) { + SColumnInfoData *pInputData = pInput->columnData; + SColumnInfoData *pOutputData = pOutput->columnData; + + int32_t type = GET_PARAM_TYPE(pInput); + + switch (type) { + case TSDB_DATA_TYPE_FLOAT: { + float *in = (float *)pInputData->pData; + float *out = (float *)pOutputData->pData; + for (int32_t i = 0; i < pInput->numOfRows; ++i) { + if (colDataIsNull_s(pInputData, i)) { + colDataSetNULL(pOutputData, i); + continue; + } + out[i] = (float)(in[i] < 0.0 ? -1 : (in[i] > 0.0 ? 1 : 0)); + } + break; + } + + case TSDB_DATA_TYPE_DOUBLE: { + double *in = (double *)pInputData->pData; + double *out = (double *)pOutputData->pData; + for (int32_t i = 0; i < pInput->numOfRows; ++i) { + if (colDataIsNull_s(pInputData, i)) { + colDataSetNULL(pOutputData, i); + continue; + } + out[i] = (double)(in[i] < 0.0 ? -1 : (in[i] > 0.0 ? 1 : 0)); + } + break; + } + + case TSDB_DATA_TYPE_TINYINT: { + int8_t *in = (int8_t *)pInputData->pData; + int8_t *out = (int8_t *)pOutputData->pData; + for (int32_t i = 0; i < pInput->numOfRows; ++i) { + if (colDataIsNull_s(pInputData, i)) { + colDataSetNULL(pOutputData, i); + continue; + } + out[i] = (int8_t)(in[i] < 0 ? -1 : (in[i] > 0 ? 1 : 0)); + } + break; + } + + case TSDB_DATA_TYPE_SMALLINT: { + int16_t *in = (int16_t *)pInputData->pData; + int16_t *out = (int16_t *)pOutputData->pData; + for (int32_t i = 0; i < pInput->numOfRows; ++i) { + if (colDataIsNull_s(pInputData, i)) { + colDataSetNULL(pOutputData, i); + continue; + } + out[i] = (int16_t)(in[i] < 0 ? -1 : (in[i] > 0 ? 1 : 0)); + } + break; + } + + case TSDB_DATA_TYPE_INT: { + int32_t *in = (int32_t *)pInputData->pData; + int32_t *out = (int32_t *)pOutputData->pData; + for (int32_t i = 0; i < pInput->numOfRows; ++i) { + if (colDataIsNull_s(pInputData, i)) { + colDataSetNULL(pOutputData, i); + continue; + } + out[i] = (int32_t)(in[i] < 0 ? -1 : (in[i] > 0 ? 1 : 0)); + } + break; + } + + case TSDB_DATA_TYPE_BIGINT: { + int64_t *in = (int64_t *)pInputData->pData; + int64_t *out = (int64_t *)pOutputData->pData; + for (int32_t i = 0; i < pInput->numOfRows; ++i) { + if (colDataIsNull_s(pInputData, i)) { + colDataSetNULL(pOutputData, i); + continue; + } + out[i] = (int64_t)(in[i] < 0 ? -1 : (in[i] > 0 ? 1 : 0)); + } + break; + } + + case TSDB_DATA_TYPE_UTINYINT: { + uint8_t *in = (uint8_t *)pInputData->pData; + uint8_t *out = (uint8_t *)pOutputData->pData; + for (int32_t i = 0; i < pInput->numOfRows; ++i) { + if (colDataIsNull_s(pInputData, i)) { + colDataSetNULL(pOutputData, i); + continue; + } + out[i] = (uint8_t)(in[i] > 0 ? 1 : 0); + } + break; + } + case TSDB_DATA_TYPE_USMALLINT: { + uint16_t *in = (uint16_t *)pInputData->pData; + uint16_t *out = (uint16_t *)pOutputData->pData; + for (int32_t i = 0; i < pInput->numOfRows; ++i) { + if (colDataIsNull_s(pInputData, i)) { + colDataSetNULL(pOutputData, i); + continue; + } + out[i] = (uint16_t)(in[i] > 0 ? 1 : 0); + } + break; + } + case TSDB_DATA_TYPE_UINT: { + uint32_t *in = (uint32_t *)pInputData->pData; + uint32_t *out = (uint32_t *)pOutputData->pData; + for (int32_t i = 0; i < pInput->numOfRows; ++i) { + if (colDataIsNull_s(pInputData, i)) { + colDataSetNULL(pOutputData, i); + continue; + } + out[i] = (uint32_t)(in[i] > 0 ? 1 : 0); + } + break; + } + case TSDB_DATA_TYPE_UBIGINT: { + uint64_t *in = (uint64_t *)pInputData->pData; + uint64_t *out = (uint64_t *)pOutputData->pData; + for (int32_t i = 0; i < pInput->numOfRows; ++i) { + if (colDataIsNull_s(pInputData, i)) { + colDataSetNULL(pOutputData, i); + continue; + } + out[i] = (uint64_t)(in[i] > 0 ? 1 : 0); + } + break; + } + case TSDB_DATA_TYPE_NULL: { + for (int32_t i = 0; i < pInput->numOfRows; ++i) { + colDataSetNULL(pOutputData, i); + } + break; + } + + default: { + SCL_ERR_RET(TSDB_CODE_FUNC_FUNTION_PARA_TYPE); + } + } + + pOutput->numOfRows = pInput->numOfRows; + return TSDB_CODE_SUCCESS; +} + static int32_t doScalarFunctionUnique(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput, _double_fn valFn) { int32_t type = GET_PARAM_TYPE(pInput); @@ -298,17 +457,49 @@ static int32_t doScalarFunction(SScalarParam *pInput, int32_t inputNum, SScalarP } /** String functions **/ -static VarDataLenT tlength(char *input, int32_t type) { return varDataLen(input); } +static int32_t tlength(char *input, int32_t type, VarDataLenT *len) { + *len = varDataLen(input); + return TSDB_CODE_SUCCESS; +} -static VarDataLenT tcharlength(char *input, int32_t type) { - if (type == TSDB_DATA_TYPE_VARCHAR || type == TSDB_DATA_TYPE_GEOMETRY) { - return varDataLen(input); - } else { // NCHAR - return varDataLen(input) / TSDB_NCHAR_SIZE; +uint8_t getCharLen(const unsigned char *str) { + if (strcasecmp(tsCharset, "UTF-8") != 0) { + return 1; + } + if ((str[0] & 0x80) == 0) { + return 1; + } else if ((str[0] & 0xE0) == 0xC0) { + return 2; + } else if ((str[0] & 0xF0) == 0xE0) { + return 3; + } else if ((str[0] & 0xF8) == 0xF0) { + return 4; + } else { + return 1; } } -static void tltrim(char *input, char *output, int32_t type, int32_t charLen) { +static int32_t tcharlength(char *input, int32_t type, VarDataLenT *len) { + if (type == TSDB_DATA_TYPE_VARCHAR) { + // calculate the number of characters in the string considering the multi-byte character + char *str = varDataVal(input); + VarDataLenT strLen = 0; + VarDataLenT pos = 0; + while(pos < varDataLen(input)) { + strLen++; + pos += getCharLen((unsigned char *)(str + pos)); + } + *len = strLen; + return TSDB_CODE_SUCCESS; + } else if (type == TSDB_DATA_TYPE_GEOMETRY) { + *len = varDataLen(input); + } else { // NCHAR + *len = varDataLen(input) / TSDB_NCHAR_SIZE; + } + return TSDB_CODE_SUCCESS; +} + +static void tltrimspace(char *input, char *output, int32_t type, int32_t charLen) { int32_t numOfSpaces = 0; if (type == TSDB_DATA_TYPE_VARCHAR) { for (int32_t i = 0; i < charLen; ++i) { @@ -338,7 +529,160 @@ static void tltrim(char *input, char *output, int32_t type, int32_t charLen) { varDataSetLen(output, resLen); } -static void trtrim(char *input, char *output, int32_t type, int32_t charLen) { +static void tlrtrimspace(char *input, char *output, int32_t type, int32_t charLen) { + int32_t numOfLeftSpaces = 0; + int32_t numOfRightSpaces = 0; + if (type == TSDB_DATA_TYPE_VARCHAR) { + for (int32_t i = 0; i < charLen; ++i) { + if (!isspace(*(varDataVal(input) + i))) { + break; + } + numOfLeftSpaces++; + } + } else { // NCHAR + for (int32_t i = 0; i < charLen; ++i) { + if (!iswspace(*((uint32_t *)varDataVal(input) + i))) { + break; + } + numOfLeftSpaces++; + } + } + + if (type == TSDB_DATA_TYPE_VARCHAR) { + for (int32_t i = charLen - 1; i >= 0; --i) { + if (!isspace(*(varDataVal(input) + i))) { + break; + } + numOfRightSpaces++; + } + } else { // NCHAR + for (int32_t i = charLen - 1; i >= 0; --i) { + if (!iswspace(*((uint32_t *)varDataVal(input) + i))) { + break; + } + numOfRightSpaces++; + } + } + + int32_t resLen; + if (type == TSDB_DATA_TYPE_VARCHAR) { + resLen = charLen - (numOfLeftSpaces + numOfRightSpaces); + (void)memcpy(varDataVal(output), varDataVal(input) + numOfLeftSpaces, resLen); + } else { + resLen = (charLen - (numOfLeftSpaces + numOfRightSpaces)) * TSDB_NCHAR_SIZE; + (void)memcpy(varDataVal(output), varDataVal(input) + numOfLeftSpaces * TSDB_NCHAR_SIZE, resLen); + } + + varDataSetLen(output, resLen); +} + +static bool isCharStart(char c) { + return strcasecmp(tsCharset, "UTF-8") == 0 ? ((c & 0xC0) != 0x80) : true; +} + +static int32_t trimHelper(char *orgStr, char* remStr, int32_t orgLen, int32_t remLen, bool trimLeft) { + if (trimLeft) { + int32_t pos = 0; + for (int32_t i = 0; i < orgLen; i += remLen) { + if (memcmp(orgStr + i, remStr, remLen) == 0) { + if (isCharStart(orgStr[i + remLen])) { + pos = i + remLen; + continue; + } else { + return pos; + } + } else { + return pos; + } + } + return pos; + } else { + int32_t pos = orgLen; + for (int32_t i = orgLen - remLen; i >= 0; i -= remLen) { + if (memcmp(orgStr + i, remStr, remLen) == 0) { + if (isCharStart(orgStr[i])) { + pos = i; + continue; + } else { + return pos; + } + } else { + return pos; + } + } + return pos; + } +} + +static int32_t convVarcharToNchar(char *input, char **output, int32_t inputLen, int32_t *outputLen) { + *output = taosMemoryCalloc(inputLen * TSDB_NCHAR_SIZE, 1); + if (NULL == *output) { + return TSDB_CODE_OUT_OF_MEMORY; + } + bool ret = taosMbsToUcs4(input, inputLen, (TdUcs4 *)*output, inputLen * TSDB_NCHAR_SIZE, outputLen); + if (!ret) { + taosMemoryFreeClear(*output); + return TSDB_CODE_SCALAR_CONVERT_ERROR; + } + return TSDB_CODE_SUCCESS; +} + +static int32_t convNcharToVarchar(char *input, char **output, int32_t inputLen, int32_t *outputLen) { + *output = taosMemoryCalloc(inputLen, 1); + if (NULL == *output) { + return TSDB_CODE_OUT_OF_MEMORY; + } + *outputLen = taosUcs4ToMbs((TdUcs4 *)input, inputLen, *output); + if (*outputLen < 0) { + taosMemoryFree(*output); + return TSDB_CODE_SCALAR_CONVERT_ERROR; + } + return TSDB_CODE_SUCCESS; +} + +static int32_t convBetweenNcharAndVarchar(char *input, char **output, int32_t inputLen, int32_t *outputLen, int32_t wantType) { + if (wantType == TSDB_DATA_TYPE_NCHAR) { + return convVarcharToNchar(input, output, inputLen, outputLen); + } else { + return convNcharToVarchar(input, output, inputLen, outputLen); + } +} +static int32_t tltrim(char *input, char *remInput, char *output, int32_t inputType, int32_t remType) { + int32_t orgLen = varDataLen(input); + char *orgStr = varDataVal(input); + int32_t remLen = varDataLen(remInput); + char *remStr = varDataVal(remInput); + if (orgLen == 0) { + varDataSetLen(output, 0); + return TSDB_CODE_SUCCESS; + } + int32_t pos = 0; + + bool needFree = false; + if (inputType != remType) { + SCL_ERR_RET(convBetweenNcharAndVarchar(varDataVal(remInput), &remStr, varDataLen(remInput), &remLen, inputType)); + needFree = true; + } + + if (remLen == 0 || remLen > orgLen) { + (void)memcpy(varDataVal(output), orgStr, orgLen); + varDataSetLen(output, orgLen); + return TSDB_CODE_SUCCESS; + } + + pos = trimHelper(orgStr, remStr, orgLen, remLen, true); + + if (needFree) { + taosMemoryFree(remStr); + } + + int32_t resLen = orgLen - pos; + (void)memcpy(varDataVal(output), orgStr + pos, resLen); + varDataSetLen(output, resLen); + return TSDB_CODE_SUCCESS; +} + +static void trtrimspace(char *input, char *output, int32_t type, int32_t charLen) { int32_t numOfSpaces = 0; if (type == TSDB_DATA_TYPE_VARCHAR) { for (int32_t i = charLen - 1; i >= 0; --i) { @@ -367,6 +711,79 @@ static void trtrim(char *input, char *output, int32_t type, int32_t charLen) { varDataSetLen(output, resLen); } +static int32_t trtrim(char *input, char *remInput, char *output, int32_t inputType, int32_t remType) { + int32_t orgLen = varDataLen(input); + char *orgStr = varDataVal(input); + int32_t remLen = varDataLen(remInput); + char *remStr = varDataVal(remInput); + if (orgLen == 0) { + varDataSetLen(output, 0); + return TSDB_CODE_SUCCESS; + } + int32_t pos = 0; + bool needFree = false; + + if (inputType != remType) { + SCL_ERR_RET(convBetweenNcharAndVarchar(varDataVal(remInput), &remStr, varDataLen(remInput), &remLen, inputType)); + needFree = true; + } + + if (remLen == 0 || remLen > orgLen) { + (void)memcpy(varDataVal(output), orgStr, orgLen); + varDataSetLen(output, orgLen); + return TSDB_CODE_SUCCESS; + } + + pos = trimHelper(orgStr, remStr, orgLen, remLen, false); + + if (needFree) { + taosMemoryFree(remStr); + } + + (void)memcpy(varDataVal(output), orgStr, pos); + varDataSetLen(output, pos); + return TSDB_CODE_SUCCESS; +} + +static int32_t tlrtrim(char *input, char *remInput, char *output, int32_t inputType, int32_t remType) { + int32_t orgLen = varDataLen(input); + char *orgStr = varDataVal(input); + int32_t remLen = varDataLen(remInput); + char *remStr = varDataVal(remInput); + if (orgLen == 0) { + varDataSetLen(output, 0); + return TSDB_CODE_SUCCESS; + } + + bool needFree = false; + + if (inputType != remType) { + SCL_ERR_RET(convBetweenNcharAndVarchar(varDataVal(remInput), &remStr, varDataLen(remInput), &remLen, inputType)); + needFree = true; + } + + if (remLen == 0 || remLen > orgLen) { + (void)memcpy(varDataVal(output), orgStr, orgLen); + varDataSetLen(output, orgLen); + return TSDB_CODE_SUCCESS; + } + + int32_t leftPos = trimHelper(orgStr, remStr, orgLen, remLen, true); + int32_t rightPos = trimHelper(orgStr, remStr, orgLen, remLen, false); + + if (needFree) { + taosMemoryFree(remStr); + } + + if (leftPos >= rightPos) { + varDataSetLen(output, 0); + return TSDB_CODE_SUCCESS; + } + (void)memcpy(varDataVal(output), orgStr + leftPos, rightPos - leftPos); + varDataSetLen(output, rightPos - leftPos); + return TSDB_CODE_SUCCESS; +} + static int32_t doLengthFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput, _len_fn lenFn) { int32_t type = GET_PARAM_TYPE(pInput); @@ -382,7 +799,7 @@ static int32_t doLengthFunction(SScalarParam *pInput, int32_t inputNum, SScalarP } char *in = colDataGetData(pInputData, i); - out[i] = lenFn(in, type); + SCL_ERR_RET(lenFn(in, type, (VarDataLenT *)&(out[i]))); } pOutput->numOfRows = pInput->numOfRows; @@ -645,53 +1062,123 @@ static int32_t doCaseConvFunction(SScalarParam *pInput, int32_t inputNum, SScala return TSDB_CODE_SUCCESS; } -static int32_t doTrimFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput, _trim_fn trimFn) { - int32_t type = GET_PARAM_TYPE(pInput); - - SColumnInfoData *pInputData = pInput->columnData; - SColumnInfoData *pOutputData = pOutput->columnData; - - int32_t outputLen = pInputData->varmeta.length; - char *outputBuf = taosMemoryCalloc(outputLen, 1); +static int32_t doTrimFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput, _trim_space_fn trimSpaceFn, _trim_fn trimFn) { + int32_t code = TSDB_CODE_SUCCESS; + SColumnInfoData *pInputData[2]; + SColumnInfoData *pOutputData = pOutput[0].columnData; + int32_t outputLen; + int32_t numOfRows; + pInputData[0] = pInput[0].columnData; + if (inputNum == 3) { + pInputData[1] = pInput[1].columnData; + outputLen = pInputData[1]->info.bytes; + numOfRows = TMAX(pInput[0].numOfRows, pInput[1].numOfRows); + } else { + outputLen = pInputData[0]->info.bytes; + numOfRows = pInput[0].numOfRows; + } + char *outputBuf = taosMemoryCalloc(outputLen, 1); if (outputBuf == NULL) { SCL_ERR_RET(TSDB_CODE_OUT_OF_MEMORY); } char *output = outputBuf; - for (int32_t i = 0; i < pInput->numOfRows; ++i) { - if (colDataIsNull_s(pInputData, i)) { - colDataSetNULL(pOutputData, i); - continue; + if (inputNum == 3) { + bool hasNullType = (IS_NULL_TYPE(GET_PARAM_TYPE(&pInput[0])) || IS_NULL_TYPE(GET_PARAM_TYPE(&pInput[1]))); + + if (hasNullType || + (pInput[0].numOfRows == 1 && colDataIsNull_s(pInputData[0], 0)) || + (pInput[1].numOfRows == 1 && colDataIsNull_s(pInputData[1], 0))) { + colDataSetNNULL(pOutputData, 0, numOfRows); } - char *input = colDataGetData(pInputData, i); - int32_t len = varDataLen(input); - int32_t charLen = (type == TSDB_DATA_TYPE_VARCHAR) ? len : len / TSDB_NCHAR_SIZE; - trimFn(input, output, type, charLen); - - int32_t code = colDataSetVal(pOutputData, i, output, false); - if (TSDB_CODE_SUCCESS != code) { - taosMemoryFree(outputBuf); - SCL_ERR_RET(code); + for (int32_t i = 0; i < numOfRows; ++i) { + int32_t colIdx1 = (pInput[0].numOfRows == 1) ? 0 : i; + int32_t colIdx2 = (pInput[1].numOfRows == 1) ? 0 : i; + if (colDataIsNull_s(pInputData[0], colIdx1) || colDataIsNull_s(pInputData[1], colIdx2)) { + colDataSetNULL(pOutputData, i); + continue; + } + SCL_ERR_JRET(trimFn(colDataGetData(pInputData[1], colIdx2), colDataGetData(pInputData[0], colIdx1), + output, GET_PARAM_TYPE(&pInput[1]), GET_PARAM_TYPE(&pInput[0]))); + SCL_ERR_JRET(colDataSetVal(pOutputData, i, output, false)); + } + } else { + for (int32_t i = 0; i < numOfRows; ++i) { + if (colDataIsNull_s(pInputData[0], i)) { + colDataSetNULL(pOutputData, i); + continue; + } + int32_t type = GET_PARAM_TYPE(pInput); + char *input = colDataGetData(pInputData[0], i); + int32_t len = varDataLen(input); + int32_t charLen = (type == TSDB_DATA_TYPE_VARCHAR) ? len : len / TSDB_NCHAR_SIZE; + trimSpaceFn(input, output, type, charLen); + SCL_ERR_JRET(colDataSetVal(pOutputData, i, output, false)); } - output += varDataTLen(output); } - - pOutput->numOfRows = pInput->numOfRows; + pOutput->numOfRows = numOfRows; +_return: taosMemoryFree(outputBuf); + return code; +} - return TSDB_CODE_SUCCESS; +static int32_t findPosBytes(char *orgStr, char *delimStr, int32_t orgLen, int32_t delimLen, int32_t charNums) { + int32_t charCount = 0; + if (charNums > 0) { + for (int32_t pos = 0; pos < orgLen; pos++) { + if (delimStr) { + if (isCharStart(orgStr[pos]) && memcmp(orgStr + pos, delimStr, delimLen) == 0) { + charCount++; + if (charCount == charNums) { + return pos; + } + pos = pos + delimLen - 1; + } + } else { + if (isCharStart(orgStr[pos])) { + charCount++; + if (charCount == charNums) { + return pos; + } + } + } + } + return orgLen; + } else { + if (delimStr) { + for (int32_t pos = orgLen - 1; pos >= 0; pos--) { + if (isCharStart(orgStr[pos]) && memcmp(orgStr + pos, delimStr, delimLen) == 0) { + charCount++; + if (charCount == -charNums) { + return pos + delimLen; + } + pos = pos - delimLen + 1; + } + } + } else { + for (int32_t pos = orgLen - 1; pos >= 0; pos--) { + if (isCharStart(orgStr[pos])) { + charCount++; + if (charCount == -charNums) { + return pos; + } + } + } + } + return 0; + } } int32_t substrFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput) { + int32_t code = TSDB_CODE_SUCCESS; int32_t subPos = 0; GET_TYPED_DATA(subPos, int32_t, GET_PARAM_TYPE(&pInput[1]), pInput[1].columnData->pData); int32_t subLen = INT16_MAX; if (inputNum == 3) { GET_TYPED_DATA(subLen, int32_t, GET_PARAM_TYPE(&pInput[2]), pInput[2].columnData->pData); - subLen = (GET_PARAM_TYPE(pInput) == TSDB_DATA_TYPE_VARCHAR) ? subLen : subLen * TSDB_NCHAR_SIZE; } SColumnInfoData *pInputData = pInput->columnData; @@ -709,21 +1196,33 @@ int32_t substrFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOu colDataSetNULL(pOutputData, i); continue; } + if (subPos == 0 || subLen < 1) { + varDataSetLen(outputBuf, 0); + SCL_ERR_JRET(colDataSetVal(pOutputData, i, outputBuf, false)); + continue; + } char *input = colDataGetData(pInput[0].columnData, i); int32_t len = varDataLen(input); int32_t startPosBytes; - + int32_t endPosBytes = len; if (subPos > 0) { - startPosBytes = (GET_PARAM_TYPE(pInput) == TSDB_DATA_TYPE_VARCHAR) ? subPos - 1 : (subPos - 1) * TSDB_NCHAR_SIZE; + startPosBytes = (GET_PARAM_TYPE(pInput) == TSDB_DATA_TYPE_VARCHAR) ? findPosBytes(varDataVal(input), NULL, varDataLen(input), -1, subPos) : (subPos - 1) * TSDB_NCHAR_SIZE; startPosBytes = TMIN(startPosBytes, len); } else { startPosBytes = - (GET_PARAM_TYPE(pInput) == TSDB_DATA_TYPE_VARCHAR) ? len + subPos : len + subPos * TSDB_NCHAR_SIZE; + (GET_PARAM_TYPE(pInput) == TSDB_DATA_TYPE_VARCHAR) ? findPosBytes(varDataVal(input), NULL, varDataLen(input), -1, subPos) : len + subPos * TSDB_NCHAR_SIZE; startPosBytes = TMAX(startPosBytes, 0); } + if (inputNum == 3) { + endPosBytes = + (GET_PARAM_TYPE(pInput) == TSDB_DATA_TYPE_VARCHAR) + ? startPosBytes + findPosBytes(varDataVal(input) + startPosBytes, NULL, varDataLen(input) - startPosBytes, -1, subLen + 1) + : startPosBytes + subLen * TSDB_NCHAR_SIZE; + endPosBytes = TMIN(endPosBytes, len); + } char *output = outputBuf; - int32_t resLen = TMIN(subLen, len - startPosBytes); + int32_t resLen = endPosBytes - startPosBytes; if (resLen > 0) { (void)memcpy(varDataVal(output), varDataVal(input) + startPosBytes, resLen); varDataSetLen(output, resLen); @@ -731,17 +1230,14 @@ int32_t substrFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOu varDataSetLen(output, 0); } - int32_t code = colDataSetVal(pOutputData, i, output, false); - if (TSDB_CODE_SUCCESS != code) { - taosMemoryFree(outputBuf); - SCL_ERR_RET(code); - } + SCL_ERR_JRET(colDataSetVal(pOutputData, i, output, false)); } pOutput->numOfRows = pInput->numOfRows; +_return: taosMemoryFree(outputBuf); - return TSDB_CODE_SUCCESS; + return code; } int32_t md5Function(SScalarParam* pInput, int32_t inputNum, SScalarParam* pOutput) { @@ -783,6 +1279,453 @@ int32_t md5Function(SScalarParam* pInput, int32_t inputNum, SScalarParam* pOutpu return TSDB_CODE_SUCCESS; } +static void getAsciiChar(int32_t num, char **output) { + if (num & 0xFF000000L) { + INT4TOCHAR(*output, num); + } else if (num & 0xFF0000L) { + INT3TOCHAR(*output, num); + } else if (num & 0xFF00L) { + INT2TOCHAR(*output, num); + } else { + INT1TOCHAR(*output, num); + } +} +int32_t charFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput) { + int32_t code = TSDB_CODE_SUCCESS; + int32_t outputLen = inputNum * 4 + 2; + char *outputBuf = taosMemoryCalloc(outputLen, 1); + if (outputBuf == NULL) { + SCL_ERR_RET(TSDB_CODE_OUT_OF_MEMORY); + } + for (int32_t i = 0; i < pInput[0].numOfRows; ++i) { + char *output = varDataVal(outputBuf); + for (int32_t j = 0; j < inputNum; ++j) { + int32_t num; + if (colDataIsNull_s(pInput[j].columnData, i)) { + continue; + } else if (IS_NUMERIC_TYPE(GET_PARAM_TYPE(&pInput[j]))) { + GET_TYPED_DATA(num, int32_t, GET_PARAM_TYPE(&pInput[j]), pInput[j].columnData->pData); + getAsciiChar(num, &output); + } else if (TSDB_DATA_TYPE_BINARY == GET_PARAM_TYPE(&pInput[j])) { + num = taosStr2Int32(varDataVal(pInput[j].columnData->pData), NULL, 10); + getAsciiChar(num, &output); + } else if (TSDB_DATA_TYPE_NCHAR == GET_PARAM_TYPE(&pInput[j])) { + char *convBuf = taosMemoryMalloc(GET_PARAM_BYTES(&pInput[j])); + int32_t len = taosUcs4ToMbs((TdUcs4 *)varDataVal(pInput[j].columnData->pData), varDataLen(pInput[j].columnData->pData), convBuf); + if (len < 0) { + code = TSDB_CODE_SCALAR_CONVERT_ERROR; + goto _return; + } + convBuf[len] = 0; + num = taosStr2Int32(convBuf, NULL, 10); + getAsciiChar(num, &output); + } else { + code = TSDB_CODE_FUNC_FUNTION_PARA_TYPE; + goto _return; + } + } + varDataSetLen(outputBuf, output - varDataVal(outputBuf)); + SCL_ERR_JRET(colDataSetVal(pOutput->columnData, i, outputBuf, false)); + } + pOutput->numOfRows = pInput->numOfRows; + +_return: + taosMemoryFree(outputBuf); + return code; +} + +int32_t asciiFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput) { + int32_t type = GET_PARAM_TYPE(pInput); + + SColumnInfoData *pInputData = pInput->columnData; + SColumnInfoData *pOutputData = pOutput->columnData; + + uint8_t *out = (uint8_t *)pOutputData->pData; + + for (int32_t i = 0; i < pInput->numOfRows; ++i) { + if (colDataIsNull_s(pInputData, i)) { + colDataSetNULL(pOutputData, i); + continue; + } + char *in = colDataGetData(pInputData, i); + out[i] = (uint8_t)(varDataVal(in))[0]; + } + + pOutput->numOfRows = pInput->numOfRows; + return TSDB_CODE_SUCCESS; +} + +static int32_t findPosChars(char *orgStr, char *delimStr, int32_t orgLen, int32_t delimLen, bool isUcs4) { + int32_t charCount = 0; + for (int32_t pos = 0; pos < orgLen; pos += isUcs4 ? TSDB_NCHAR_SIZE : 1) { + if (isUcs4 || isCharStart(orgStr[pos])) { + if (memcmp(orgStr + pos, delimStr, delimLen) == 0) { + return charCount + 1; + } else { + charCount++; + } + } + } + return 0; +} + +int32_t positionFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput) { + int32_t code = TSDB_CODE_SUCCESS; + int32_t numOfRows = 0; + SColumnInfoData *pInputData[2]; + SColumnInfoData *pOutputData = pOutput[0].columnData; + + pInputData[0] = pInput[0].columnData; + pInputData[1] = pInput[1].columnData; + numOfRows = TMAX(pInput[0].numOfRows, pInput[1].numOfRows); + + bool hasNullType = (IS_NULL_TYPE(GET_PARAM_TYPE(&pInput[0])) || IS_NULL_TYPE(GET_PARAM_TYPE(&pInput[1]))); + + if (hasNullType || + (pInput[0].numOfRows == 1 && colDataIsNull_s(pInputData[0], 0)) || + (pInput[1].numOfRows == 1 && colDataIsNull_s(pInputData[1], 0))) { + colDataSetNNULL(pOutputData, 0, numOfRows); + } + + for (int32_t i = 0; i < numOfRows; ++i) { + int32_t colIdx1 = (pInput[0].numOfRows == 1) ? 0 : i; + int32_t colIdx2 = (pInput[1].numOfRows == 1) ? 0 : i; + if (colDataIsNull_s(pInputData[0], colIdx1) || colDataIsNull_s(pInputData[1], colIdx2)) { + colDataSetNULL(pOutputData, i); + continue; + } + int64_t offset = 0; + if (varDataLen(colDataGetData(pInputData[0], colIdx1)) == 0) { + offset = 1; + colDataSetInt64(pOutputData, i, &offset); + continue; + } + + char *substr = varDataVal(colDataGetData(pInputData[0], colIdx1)); + char *orgstr = varDataVal(colDataGetData(pInputData[1], colIdx2)); + int32_t subLen = varDataLen(colDataGetData(pInputData[0], colIdx1)); + int32_t orgLen = varDataLen(colDataGetData(pInputData[1], colIdx2)); + bool needFreeSub = false; + if (GET_PARAM_TYPE(&pInput[1]) != GET_PARAM_TYPE(&pInput[0])) { + SCL_ERR_RET(convBetweenNcharAndVarchar(varDataVal(colDataGetData(pInputData[0], colIdx1)), &substr, varDataLen(colDataGetData(pInputData[0], colIdx1)), &subLen, GET_PARAM_TYPE(&pInput[1]))); + needFreeSub = true; + } + + offset = findPosChars(orgstr, substr, orgLen, subLen, GET_PARAM_TYPE(&pInput[1]) == TSDB_DATA_TYPE_NCHAR); + if (needFreeSub) { + taosMemoryFree(substr); + } + colDataSetInt64(pOutput->columnData, i, &offset); + } + + pOutput->numOfRows = numOfRows; + return code; +} + +int32_t trimFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput) { + // trim space + uint8_t trimType = 0; + GET_TYPED_DATA(trimType, int32_t, GET_PARAM_TYPE(&pInput[inputNum - 1]), pInput[inputNum - 1].columnData->pData); + switch (trimType) { + case TRIM_TYPE_LEADING: { + SCL_ERR_RET(doTrimFunction(pInput, inputNum, pOutput, tltrimspace, tltrim)); + break; + } + case TRIM_TYPE_TRAILING: { + SCL_ERR_RET(doTrimFunction(pInput, inputNum, pOutput, trtrimspace, trtrim)); + break; + } + case TRIM_TYPE_BOTH: { + SCL_ERR_RET(doTrimFunction(pInput, inputNum, pOutput, tlrtrimspace, tlrtrim)); + break; + } + } + return TSDB_CODE_SUCCESS; +} + +int32_t replaceFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput) { + int32_t code = TSDB_CODE_SUCCESS; + SColumnInfoData *pInputData[3]; + SColumnInfoData *pOutputData = pOutput[0].columnData; + int32_t outputLen; + int32_t numOfRows = 0; + + pInputData[0] = pInput[0].columnData; + pInputData[1] = pInput[1].columnData; + pInputData[2] = pInput[2].columnData; + + for (int i = 0; i < 3; i++) { + numOfRows = TMAX(numOfRows, pInput[i].numOfRows); + } + + outputLen = pInputData[0]->info.bytes + pInputData[0]->info.bytes / pInputData[1]->info.bytes * (pInputData[2]->info.bytes - pInputData[1]->info.bytes); + if (GET_PARAM_TYPE(&pInput[0]) == TSDB_DATA_TYPE_NULL || + GET_PARAM_TYPE(&pInput[1]) == TSDB_DATA_TYPE_NULL || + GET_PARAM_TYPE(&pInput[2]) == TSDB_DATA_TYPE_NULL || + (pInput[0].numOfRows == 1 && colDataIsNull_s(pInputData[0], 0)) || + (pInput[1].numOfRows == 1 && colDataIsNull_s(pInputData[1], 0)) || + (pInput[2].numOfRows == 1 && colDataIsNull_s(pInputData[2], 0))) { + colDataSetNNULL(pOutputData, 0, numOfRows); + pOutput->numOfRows = numOfRows; + return TSDB_CODE_SUCCESS; + } + + char *outputBuf = taosMemoryCalloc(outputLen + VARSTR_HEADER_SIZE, 1); + if (NULL == outputBuf) { + SCL_ERR_RET(TSDB_CODE_OUT_OF_MEMORY); + } + + for (int32_t i = 0; i < numOfRows; ++i) { + int32_t colIdx1 = (pInput[0].numOfRows == 1) ? 0 : i; + int32_t colIdx2 = (pInput[1].numOfRows == 1) ? 0 : i; + int32_t colIdx3 = (pInput[2].numOfRows == 1) ? 0 : i; + if (colDataIsNull_s(pInputData[0], colIdx1) || colDataIsNull_s(pInputData[1], colIdx2) || colDataIsNull_s(pInputData[2], colIdx3)) { + colDataSetNULL(pOutputData, i); + continue; + } + char *output = outputBuf + VARSTR_HEADER_SIZE; + int32_t totalLen = 0; + + char *orgStr = varDataVal(colDataGetData(pInputData[0], i)); + int32_t orgLen = varDataLen(colDataGetData(pInputData[0], i)); + char *fromStr = varDataVal(colDataGetData(pInputData[1], colIdx2)); + int32_t fromLen = varDataLen(colDataGetData(pInputData[1], colIdx2)); + char *toStr = varDataVal(colDataGetData(pInputData[2], colIdx3)); + int32_t toLen = varDataLen(colDataGetData(pInputData[2], colIdx3)); + bool needFreeFrom = false; + bool needFreeTo = false; + + if (GET_PARAM_TYPE(&pInput[1]) != GET_PARAM_TYPE(&pInput[0])) { + SCL_ERR_RET(convBetweenNcharAndVarchar(varDataVal(colDataGetData(pInputData[1], colIdx2)), &fromStr, + varDataLen(colDataGetData(pInputData[1], colIdx2)), &fromLen, + GET_PARAM_TYPE(&pInput[0]))); + needFreeFrom = true; + } + if (GET_PARAM_TYPE(&pInput[2]) != GET_PARAM_TYPE(&pInput[0])) { + SCL_ERR_RET(convBetweenNcharAndVarchar(varDataVal(colDataGetData(pInputData[2], colIdx3)), &toStr, + varDataLen(colDataGetData(pInputData[2], colIdx3)), &toLen, + GET_PARAM_TYPE(&pInput[0]))); + needFreeTo = true; + } + + int32_t pos = 0; + while (pos < orgLen) { + if (memcmp(orgStr + pos, fromStr, fromLen) == 0) { + (void)memcpy(output, toStr, toLen); + output += toLen; + pos += fromLen; + totalLen += toLen; + } else { + int32_t charLen = GET_PARAM_TYPE(&pInput[0]) == TSDB_DATA_TYPE_NCHAR ? TSDB_NCHAR_SIZE : getCharLen(orgStr + pos); + (void)memcpy(output, orgStr + pos, charLen); + output += charLen; + totalLen += charLen; + pos += charLen; + } + } + if (needFreeTo) { + taosMemoryFree(toStr); + } + if (needFreeFrom) { + taosMemoryFree(fromStr); + } + varDataSetLen(outputBuf, totalLen); + SCL_ERR_RET(colDataSetVal(pOutputData, i, outputBuf, false)); + } + pOutput->numOfRows = numOfRows; + return code; +} + +int32_t substrIdxFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput) { + int32_t code = TSDB_CODE_SUCCESS; + SColumnInfoData *pInputData[3]; + SColumnInfoData *pOutputData = pOutput[0].columnData; + int32_t outputLen; + int32_t numOfRows; + + pInputData[0] = pInput[0].columnData; + pInputData[1] = pInput[1].columnData; + pInputData[2] = pInput[2].columnData; + + outputLen = pInputData[0]->info.bytes; + if (GET_PARAM_TYPE(&pInput[0]) == TSDB_DATA_TYPE_NULL || GET_PARAM_TYPE(&pInput[1]) == TSDB_DATA_TYPE_NULL || GET_PARAM_TYPE(&pInput[2]) == TSDB_DATA_TYPE_NULL) { + colDataSetNNULL(pOutputData, 0, pInput[0].numOfRows); + pOutput->numOfRows = pInput[0].numOfRows; + return TSDB_CODE_SUCCESS; + } + char *outputBuf = taosMemoryCalloc(outputLen + VARSTR_HEADER_SIZE, 1); + if (NULL == outputBuf) { + SCL_ERR_RET(TSDB_CODE_OUT_OF_MEMORY); + } + + for (int32_t i = 0; i < inputNum; ++i) { + if (pInput[i].numOfRows > numOfRows) { + numOfRows = pInput[i].numOfRows; + } + } + + for (int32_t k = 0; k < numOfRows; ++k) { + bool hasNull = false; + for (int32_t i = 0; i < inputNum; ++i) { + if (colDataIsNull_s(pInputData[i], k) || IS_NULL_TYPE(GET_PARAM_TYPE(&pInput[i]))) { + colDataSetNULL(pOutputData, k); + continue; + } + } + + int32_t colIdx1 = (pInput[0].numOfRows == 1) ? 0 : k; + int32_t colIdx2 = (pInput[1].numOfRows == 1) ? 0 : k; + int32_t count = 0; + char *orgStr = varDataVal(colDataGetData(pInputData[0], colIdx1)); + int32_t orgLen = varDataLen(colDataGetData(pInputData[0], colIdx1)); + char *delimStr = varDataVal(colDataGetData(pInputData[1], colIdx2)); + int32_t delimLen = varDataLen(colDataGetData(pInputData[1], colIdx2)); + bool needFreeDelim = false; + GET_TYPED_DATA(count, int32_t, GET_PARAM_TYPE(&pInput[2]), colDataGetData(pInputData[2], (pInput[2].numOfRows == 1) ? 0 : k)); + + int32_t startPosBytes; + int32_t endPosBytes; + if (GET_PARAM_TYPE(&pInput[0]) != GET_PARAM_TYPE(&pInput[1])) { + SCL_ERR_RET(convBetweenNcharAndVarchar(varDataVal(colDataGetData(pInputData[1], colIdx2)), &delimStr, + varDataLen(colDataGetData(pInputData[1], colIdx2)), &delimLen, + GET_PARAM_TYPE(&pInput[0]))); + needFreeDelim = true; + } + + if (count > 0) { + startPosBytes = 0; + endPosBytes = findPosBytes(orgStr, delimStr, orgLen, delimLen, count); + } else if (count < 0) { + startPosBytes = findPosBytes(orgStr, delimStr, orgLen, delimLen, count); + endPosBytes = orgLen; + } else { + startPosBytes = endPosBytes = 0; + } + + char *output = outputBuf; + int32_t resLen = endPosBytes - startPosBytes; + if (resLen > 0) { + (void)memcpy(varDataVal(output), orgStr + startPosBytes, resLen); + varDataSetLen(output, resLen); + } else { + varDataSetLen(output, 0); + } + if (needFreeDelim) { + taosMemoryFree(delimStr); + } + + SCL_ERR_JRET(colDataSetVal(pOutputData, k, output, false)); + } + +_return: + pOutput->numOfRows = numOfRows; + return code; +} + +static int32_t repeatStringHelper(char *input, int32_t inputLen, int32_t count, char *output) { + for (int32_t i = 0; i < count; ++i) { + (void)memcpy(output, input, inputLen); + output += inputLen; + } + return TSDB_CODE_SUCCESS; +} + +int32_t repeatFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput) { + int32_t code = TSDB_CODE_SUCCESS; + SColumnInfoData *pInputData[2]; + SColumnInfoData *pOutputData = pOutput[0].columnData; + int32_t outputLen; + int32_t numOfRows; + int32_t maxCount = 0; + + for (int32_t i = 0; i < pInput[1].numOfRows; i++) { + maxCount = TMAX(maxCount, *(int32_t *)colDataGetData(pInput[1].columnData, i)); + } + pInputData[0] = pInput[0].columnData; + pInputData[1] = pInput[1].columnData; + outputLen = (int32_t)(pInputData[0]->info.bytes * maxCount + VARSTR_HEADER_SIZE); + if (outputLen > TSDB_MAX_FIELD_LEN) { + return TSDB_CODE_FUNC_INVALID_RES_LENGTH; + } + numOfRows = TMAX(pInput[0].numOfRows, pInput[1].numOfRows); + char *outputBuf = taosMemoryCalloc(outputLen, 1); + if (outputBuf == NULL) { + SCL_ERR_RET(TSDB_CODE_OUT_OF_MEMORY); + } + + char *output = outputBuf; + + bool hasNullType = (IS_NULL_TYPE(GET_PARAM_TYPE(&pInput[0])) || IS_NULL_TYPE(GET_PARAM_TYPE(&pInput[1]))); + if (pInput[0].numOfRows == pInput[1].numOfRows) { + for (int32_t i = 0; i < numOfRows; ++i) { + output = outputBuf; + if (colDataIsNull_s(pInputData[0], i) || colDataIsNull_s(pInputData[1], i) || hasNullType) { + colDataSetNULL(pOutputData, i); + continue; + } + int32_t count = *(int32_t *)colDataGetData(pInputData[1], i); + if (count <= 0) { + varDataSetLen(output, 0); + SCL_ERR_JRET(colDataSetVal(pOutputData, i, outputBuf, false)); + } else { + char *orgStr = colDataGetData(pInputData[0], i); + varDataSetLen(output, varDataLen(orgStr) * count); + SCL_ERR_JRET(repeatStringHelper(varDataVal(orgStr), varDataLen(orgStr), count, varDataVal(output))); + SCL_ERR_JRET(colDataSetVal(pOutputData, i, outputBuf, false)); + } + } + } else if (pInput[0].numOfRows == 1) { + if (colDataIsNull_s(pInputData[0], 0) || hasNullType) { + colDataSetNNULL(pOutputData, 0, pInput[1].numOfRows); + } else { + for (int32_t i = 0; i < numOfRows; ++i) { + output = outputBuf; + if (colDataIsNull_s(pInputData[1], i)) { + colDataSetNULL(pOutputData, i); + continue; + } + int32_t count = *(int32_t *)colDataGetData(pInputData[1], i); + if (count <= 0) { + varDataSetLen(output, 0); + SCL_ERR_JRET(colDataSetVal(pOutputData, i, outputBuf, false)); + } else { + char *orgStr = colDataGetData(pInputData[0], 0); + varDataSetLen(output, varDataLen(orgStr) * count); + SCL_ERR_JRET(repeatStringHelper(varDataVal(orgStr), varDataLen(orgStr), count, varDataVal(output))); + SCL_ERR_JRET(colDataSetVal(pOutputData, i, outputBuf, false)); + } + } + } + } else if (pInput[1].numOfRows == 1) { + if (colDataIsNull_s(pInputData[1], 0) || hasNullType) { + colDataSetNNULL(pOutputData, 0, pInput[0].numOfRows); + } else { + for (int32_t i = 0; i < numOfRows; ++i) { + output = outputBuf; + if (colDataIsNull_s(pInputData[0], i)) { + colDataSetNULL(pOutputData, i); + continue; + } + int32_t count = *(int32_t *)colDataGetData(pInputData[1], 0); + if (count <= 0) { + varDataSetLen(output, 0); + SCL_ERR_JRET(colDataSetVal(pOutputData, i, outputBuf, false)); + } else { + char *orgStr = colDataGetData(pInputData[0], i); + varDataSetLen(output, varDataLen(orgStr) * count); + SCL_ERR_JRET(repeatStringHelper(varDataVal(orgStr), varDataLen(orgStr), count, varDataVal(output))); + SCL_ERR_JRET(colDataSetVal(pOutputData, i, outputBuf, false)); + } + } + } + } + + pOutput->numOfRows = numOfRows; +_return: + taosMemoryFree(outputBuf); + return code; +} + /** Conversion functions **/ int32_t castFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput) { int16_t inputType = GET_PARAM_TYPE(&pInput[0]); @@ -1535,7 +2478,7 @@ int32_t timeDiffFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *p continue; } - int64_t result = (timeVal[0] >= timeVal[1]) ? (timeVal[0] - timeVal[1]) : (timeVal[1] - timeVal[0]); + int64_t result = timeVal[0] - timeVal[1]; if (timeUnit < 0) { // if no time unit given use db precision switch (timePrec) { @@ -1636,6 +2579,172 @@ int32_t timezoneFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *p return TSDB_CODE_SUCCESS; } +int32_t weekdayFunctionImpl(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput, bool startFromZero) { + int32_t type = GET_PARAM_TYPE(&pInput[0]); + + int64_t timePrec, timeVal = 0; + + GET_TYPED_DATA(timePrec, int64_t, GET_PARAM_TYPE(&pInput[1]), pInput[1].columnData->pData); + + for (int32_t i = 0; i < pInput[0].numOfRows; ++i) { + if (colDataIsNull_s(pInput[0].columnData, i)) { + colDataSetNULL(pOutput->columnData, i); + continue; + } + + char *input = colDataGetData(pInput[0].columnData, i); + + if (IS_VAR_DATA_TYPE(type)) { /* datetime format strings */ + int32_t ret = convertStringToTimestamp(type, input, timePrec, &timeVal); + if (ret != TSDB_CODE_SUCCESS) { + colDataSetNULL(pOutput->columnData, i); + continue; + } + } else if (type == TSDB_DATA_TYPE_BIGINT) { /* unix timestamp */ + GET_TYPED_DATA(timeVal, int64_t, type, input); + } else if (type == TSDB_DATA_TYPE_TIMESTAMP) { /* timestamp column*/ + GET_TYPED_DATA(timeVal, int64_t, type, input); + } + struct STm tm; + TAOS_CHECK_RETURN(taosTs2Tm(timeVal, timePrec, &tm)); + int32_t ret = startFromZero ? (tm.tm.tm_wday + 6) % 7 : tm.tm.tm_wday + 1; + SCL_ERR_RET(colDataSetVal(pOutput->columnData, i, (const char*)&ret, false)); + } + + pOutput->numOfRows = pInput->numOfRows; + + return TSDB_CODE_SUCCESS; +} + +int32_t weekdayFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput) { + return weekdayFunctionImpl(pInput, inputNum, pOutput, true); +} + +int32_t dayofweekFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput) { + return weekdayFunctionImpl(pInput, inputNum, pOutput, false); +} + +// calculate day number from 0000-00-00 +static int32_t getDayNum(int32_t year, int32_t month, int32_t day) { + int32_t delsum; + int32_t temp; + int32_t y = year; + + if (y == 0 && month == 0) { + return 0; + } + + delsum = 365 * y + 31 * (month - 1) + day; + if (month <= 2) + y--; + else + delsum -= (month * 4 + 23) / 10; + temp = ((y / 100 + 1) * 3) / 4; + return (delsum + y / 4 - temp); +} + +static int32_t getDaysInYear(int32_t year) { + return (((year % 100) == 0) ? ((year % 400) == 0) : ((year % 4) == 0)) ? 366 : 365; +} + +static int32_t getWeekday(int32_t daynr, bool sundayFirstDay) { + return (daynr + 5 + (sundayFirstDay ? 1 : 0)) % 7; +} + +static int32_t calculateWeekNum(struct tm date, int32_t weekFlag) { + int32_t days; + int32_t year = date.tm_year + 1900; + int32_t month = date.tm_mon + 1; + int32_t day = date.tm_mday; + int32_t dayNum = getDayNum(year, month, day); + int32_t firstDayNum = getDayNum(year, 1, 1); + bool mondayFirst = (weekFlag & WEEK_FLAG_MONDAY_FIRST); + bool weekStartFromOne = (weekFlag & WEEK_FLAG_FROM_ONE); + bool firstWeekday = (weekFlag & WEEK_FLAG_INCLUDE_FIRST_DAY); + + int32_t weekday = getWeekday(firstDayNum, !mondayFirst); + if (month == 1 && day <= 7 - weekday) { + if (!weekStartFromOne && ((firstWeekday && weekday != 0) || (!firstWeekday && weekday >= 4))) { + return 0; + } + weekStartFromOne = true; + days = getDaysInYear(--year); + firstDayNum -= days; + weekday = (weekday + 53 * 7 - days) % 7; + } + + if ((firstWeekday && weekday != 0) || (!firstWeekday && weekday >= 4)) + days = dayNum - (firstDayNum + (7 - weekday)); + else + days = dayNum - (firstDayNum - weekday); + + if (weekStartFromOne && days >= 52 * 7) { + weekday = (weekday + getDaysInYear(year)) % 7; + if ((!firstWeekday && weekday < 4) || (firstWeekday && weekday == 0)) { + return 1; + } + } + return days / 7 + 1; +} + +static int32_t weekMode(int32_t mode) { + return mode & WEEK_FLAG_MONDAY_FIRST ? mode : mode ^ WEEK_FLAG_INCLUDE_FIRST_DAY; +} + +int32_t weekFunctionImpl(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput, int64_t prec, int32_t mode) { + int32_t type = GET_PARAM_TYPE(&pInput[0]); + + int64_t timeVal = 0; + + for (int32_t i = 0; i < pInput[0].numOfRows; ++i) { + if (colDataIsNull_s(pInput[0].columnData, i)) { + colDataSetNULL(pOutput->columnData, i); + continue; + } + + char *input = colDataGetData(pInput[0].columnData, i); + + if (IS_VAR_DATA_TYPE(type)) { /* datetime format strings */ + int32_t ret = convertStringToTimestamp(type, input, prec, &timeVal); + if (ret != TSDB_CODE_SUCCESS) { + colDataSetNULL(pOutput->columnData, i); + continue; + } + } else if (type == TSDB_DATA_TYPE_BIGINT) { /* unix timestamp */ + GET_TYPED_DATA(timeVal, int64_t, type, input); + } else if (type == TSDB_DATA_TYPE_TIMESTAMP) { /* timestamp column*/ + GET_TYPED_DATA(timeVal, int64_t, type, input); + } + struct STm tm; + SCL_ERR_RET(taosTs2Tm(timeVal, prec, &tm)); + int32_t ret = calculateWeekNum(tm.tm, weekMode(mode)); + SCL_ERR_RET(colDataSetVal(pOutput->columnData, i, (const char*)&ret, false)); + } + + pOutput->numOfRows = pInput->numOfRows; + + return TSDB_CODE_SUCCESS; +} + +int32_t weekFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput) { + int64_t timePrec; + int32_t mode = 0; + if (inputNum == 2) { + GET_TYPED_DATA(timePrec, int64_t, GET_PARAM_TYPE(&pInput[1]), pInput[1].columnData->pData); + return weekFunctionImpl(pInput, inputNum, pOutput, timePrec, mode); + } else { + GET_TYPED_DATA(mode, int32_t , GET_PARAM_TYPE(&pInput[1]), pInput[1].columnData->pData); + GET_TYPED_DATA(timePrec, int64_t, GET_PARAM_TYPE(&pInput[2]), pInput[2].columnData->pData); + return weekFunctionImpl(pInput, inputNum, pOutput, timePrec, mode); + } +} + +int32_t weekofyearFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput) { + int64_t timePrec; + GET_TYPED_DATA(timePrec, int64_t, GET_PARAM_TYPE(&pInput[1]), pInput[1].columnData->pData); + return weekFunctionImpl(pInput, inputNum, pOutput, timePrec, 3); +} + int32_t atanFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput) { return doScalarFunctionUnique(pInput, inputNum, pOutput, atan); } @@ -1684,8 +2793,294 @@ int32_t floorFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOut return doScalarFunction(pInput, inputNum, pOutput, floorf, floor); } +static double decimalFn(double val1, double val2, _double_fn fn) { + if (val1 > DBL_MAX || val1 < -DBL_MAX) { + return val1; + } + + double scale = pow(10, val2); + + if (val2 < 0) { + return fn(val1 * scale) / scale; + } else { + double scaled_number = val1 * scale; + + if (scaled_number > DBL_MAX || scaled_number < -DBL_MAX) { + return val1; + } + + return fn(scaled_number) / scale; + } +} + +static float decimalfFn(float val1, float val2, _float_fn fn) { + if (val1 > FLT_MAX || val1 < -FLT_MAX) { + return val1; + } + + float scale = powf(10, val2); + + if (val2 < 0) { + return fn(val1 * scale) / scale; + } else { + float scaled_number = val1 * scale; + + if (scaled_number > FLT_MAX || scaled_number < -FLT_MAX) { + return val1; + } + + return fn(scaled_number) / scale; + } +} + +static double roundFn(double val1, double val2) { + return decimalFn(val1, val2, round); +} + +static float roundfFn(float val1, float val2) { + return decimalfFn(val1, val2, roundf); +} + +static double truncFn(double val1, double val2) { + return decimalFn(val1, val2, trunc); +} + +static float truncfFn(float val1, float val2) { + return decimalfFn(val1, val2, truncf); +} + +static int32_t doScalarFunction2(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput, _float_fn_2 f1, + _double_fn_2 d1) { + SColumnInfoData *pInputData[2]; + SColumnInfoData *pOutputData = pOutput->columnData; + _getDoubleValue_fn_t getValueFn[2]; + + for (int32_t i = 0; i < inputNum; ++i) { + pInputData[i] = pInput[i].columnData; + getValueFn[i] = getVectorDoubleValueFn(GET_PARAM_TYPE(&pInput[i])); + } + + bool hasNullType = (IS_NULL_TYPE(GET_PARAM_TYPE(&pInput[0])) || IS_NULL_TYPE(GET_PARAM_TYPE(&pInput[1]))); + + int32_t numOfRows = TMAX(pInput[0].numOfRows, pInput[1].numOfRows); + if (pInput[0].numOfRows == pInput[1].numOfRows) { + for (int32_t i = 0; i < numOfRows; ++i) { + if (colDataIsNull_s(pInputData[0], i) || colDataIsNull_s(pInputData[1], i) || hasNullType) { + colDataSetNULL(pOutputData, i); + continue; + } + switch (GET_PARAM_TYPE(&pInput[0])) { + case TSDB_DATA_TYPE_DOUBLE: { + double *in = (double *)pInputData[0]->pData; + int64_t *in2 = (int64_t *)pInputData[1]->pData; + double *out = (double *)pOutputData->pData; + double result = d1(in[i], (double)in2[i]); + if (isinf(result) || isnan(result)) { + colDataSetNULL(pOutputData, i); + } else { + out[i] = result; + } + break; + } + case TSDB_DATA_TYPE_FLOAT: { + float *in = (float *)pInputData[0]->pData; + int64_t *in2 = (int64_t *)pInputData[1]->pData; + float *out = (float *)pOutputData->pData; + float result = f1(in[i], (float)in2[i]); + if (isinf(result) || isnan(result)) { + colDataSetNULL(pOutputData, i); + } else { + out[i] = result; + } + break; + } + case TSDB_DATA_TYPE_TINYINT: + case TSDB_DATA_TYPE_SMALLINT: + case TSDB_DATA_TYPE_INT: + case TSDB_DATA_TYPE_BIGINT:{ + int64_t *in = (int64_t *)pInputData[0]->pData; + int64_t *in2 = (int64_t *)pInputData[1]->pData; + int64_t *out = (int64_t *)pOutputData->pData; + int64_t result = (int64_t)d1((double)in[i], (double)in2[i]); + out[i] = result; + break; + } + case TSDB_DATA_TYPE_UTINYINT: + case TSDB_DATA_TYPE_USMALLINT: + case TSDB_DATA_TYPE_UINT: + case TSDB_DATA_TYPE_UBIGINT:{ + uint64_t *in = (uint64_t *)pInputData[0]->pData; + int64_t *in2 = (int64_t *)pInputData[1]->pData; + uint64_t *out = (uint64_t *)pOutputData->pData; + uint64_t result = (uint64_t)d1((double)in[i], (double)in2[i]); + out[i] = result; + break; + } + } + } + } else if (pInput[0].numOfRows == 1) { // left operand is constant + if (colDataIsNull_s(pInputData[0], 0) || hasNullType) { + colDataSetNNULL(pOutputData, 0, pInput[1].numOfRows); + } else { + for (int32_t i = 0; i < numOfRows; ++i) { + if (colDataIsNull_s(pInputData[1], i)) { + colDataSetNULL(pOutputData, i); + continue; + } + switch (GET_PARAM_TYPE(&pInput[0])) { + case TSDB_DATA_TYPE_DOUBLE: { + double *in = (double *)pInputData[0]->pData; + int64_t *in2 = (int64_t *)pInputData[1]->pData; + double *out = (double *)pOutputData->pData; + double result = d1(in[0], (double)in2[i]); + if (isinf(result) || isnan(result)) { + colDataSetNULL(pOutputData, i); + } else { + out[i] = result; + } + break; + } + case TSDB_DATA_TYPE_FLOAT: { + float *in = (float *)pInputData[0]->pData; + int64_t *in2 = (int64_t *)pInputData[1]->pData; + float *out = (float *)pOutputData->pData; + float result = f1(in[0], (float)in2[i]); + if (isinf(result) || isnan(result)) { + colDataSetNULL(pOutputData, i); + } else { + out[i] = result; + } + break; + } + case TSDB_DATA_TYPE_TINYINT: + case TSDB_DATA_TYPE_SMALLINT: + case TSDB_DATA_TYPE_INT: + case TSDB_DATA_TYPE_BIGINT:{ + int64_t *in = (int64_t *)pInputData[0]->pData; + int64_t *in2 = (int64_t *)pInputData[1]->pData; + int64_t *out = (int64_t *)pOutputData->pData; + int64_t result = (int64_t)d1((double)in[0], (double)in2[i]); + out[i] = result; + break; + } + case TSDB_DATA_TYPE_UTINYINT: + case TSDB_DATA_TYPE_USMALLINT: + case TSDB_DATA_TYPE_UINT: + case TSDB_DATA_TYPE_UBIGINT:{ + uint64_t *in = (uint64_t *)pInputData[0]->pData; + int64_t *in2 = (int64_t *)pInputData[1]->pData; + uint64_t *out = (uint64_t *)pOutputData->pData; + uint64_t result = (uint64_t)d1((double)in[0], (double)in2[i]); + out[i] = result; + break; + } + } + } + } + } else if (pInput[1].numOfRows == 1) { + if (colDataIsNull_s(pInputData[1], 0) || hasNullType) { + colDataSetNNULL(pOutputData, 0, pInput[0].numOfRows); + } else { + for (int32_t i = 0; i < numOfRows; ++i) { + if (colDataIsNull_s(pInputData[0], i)) { + colDataSetNULL(pOutputData, i); + continue; + } + switch (GET_PARAM_TYPE(&pInput[0])) { + case TSDB_DATA_TYPE_DOUBLE: { + double *in = (double *)pInputData[0]->pData; + int64_t *in2 = (int64_t *)pInputData[1]->pData; + double *out = (double *)pOutputData->pData; + double result = d1(in[i], (double)in2[0]); + if (isinf(result) || isnan(result)) { + colDataSetNULL(pOutputData, i); + } else { + out[i] = result; + } + break; + } + case TSDB_DATA_TYPE_FLOAT: { + float *in = (float *)pInputData[0]->pData; + int64_t *in2 = (int64_t *)pInputData[1]->pData; + float *out = (float *)pOutputData->pData; + float result = f1(in[i], (float)in2[0]); + if (isinf(result) || isnan(result)) { + colDataSetNULL(pOutputData, i); + } else { + out[i] = result; + } + break; + } + case TSDB_DATA_TYPE_TINYINT: + case TSDB_DATA_TYPE_SMALLINT: + case TSDB_DATA_TYPE_INT: + case TSDB_DATA_TYPE_BIGINT:{ + int64_t *in = (int64_t *)pInputData[0]->pData; + int64_t *in2 = (int64_t *)pInputData[1]->pData; + int64_t *out = (int64_t *)pOutputData->pData; + int64_t result = (int64_t)d1((double)in[i], (double)in2[0]); + out[i] = result; + break; + } + case TSDB_DATA_TYPE_UTINYINT: + case TSDB_DATA_TYPE_USMALLINT: + case TSDB_DATA_TYPE_UINT: + case TSDB_DATA_TYPE_UBIGINT:{ + uint64_t *in = (uint64_t *)pInputData[0]->pData; + int64_t *in2 = (int64_t *)pInputData[1]->pData; + uint64_t *out = (uint64_t *)pOutputData->pData; + uint64_t result = (uint64_t)d1((double)in[i], (double)in2[0]); + out[i] = result; + break; + } + } + } + } + } + + pOutput->numOfRows = numOfRows; + return TSDB_CODE_SUCCESS; +} + int32_t roundFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput) { - return doScalarFunction(pInput, inputNum, pOutput, roundf, round); + if (inputNum == 1) { + return doScalarFunction(pInput, inputNum, pOutput, roundf, round); + } else { + return doScalarFunction2(pInput, inputNum, pOutput, roundfFn, roundFn); + } +} + +int32_t truncFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput) { + return doScalarFunction2(pInput, inputNum, pOutput, truncfFn, truncFn); +} + +int32_t piFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput) { + double_t value = M_PI; + for (int32_t i = 0; i < pInput->numOfRows; ++i) { + colDataSetDouble(pOutput->columnData, i, &value); + } + pOutput->numOfRows = pInput->numOfRows; + return TSDB_CODE_SUCCESS; +} + +int32_t expFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput) { + return doScalarFunctionUnique(pInput, inputNum, pOutput, exp); +} + +int32_t lnFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput) { + return doScalarFunctionUnique(pInput, inputNum, pOutput, tlog); +} + +int32_t modFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput) { + return doScalarFunctionUnique2(pInput, inputNum, pOutput, fmod); +} + +int32_t degreesFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput) { + return doScalarFunctionUnique(pInput, inputNum, pOutput, degrees); +} + +int32_t radiansFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput) { + return doScalarFunctionUnique(pInput, inputNum, pOutput, radians); } int32_t lowerFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput) { @@ -1705,11 +3100,11 @@ int32_t upperFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOut } int32_t ltrimFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput) { - return doTrimFunction(pInput, inputNum, pOutput, tltrim); + return doTrimFunction(pInput, inputNum, pOutput, tltrimspace, tltrim); } int32_t rtrimFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput) { - return doTrimFunction(pInput, inputNum, pOutput, trtrim); + return doTrimFunction(pInput, inputNum, pOutput, trtrimspace, tltrim); } int32_t lengthFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput) { @@ -2070,7 +3465,7 @@ int32_t avgScalarFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam * return TSDB_CODE_SUCCESS; } -int32_t stddevScalarFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput) { +int32_t stdScalarFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput) { SColumnInfoData *pInputData = pInput->columnData; SColumnInfoData *pOutputData = pOutput->columnData; diff --git a/source/util/src/terror.c b/source/util/src/terror.c index 2f4414cd03..7a7b769ef7 100644 --- a/source/util/src/terror.c +++ b/source/util/src/terror.c @@ -723,6 +723,7 @@ TAOS_DEFINE_ERROR(TSDB_CODE_FUNC_TIME_UNIT_INVALID, "Invalid function tim TAOS_DEFINE_ERROR(TSDB_CODE_FUNC_TIME_UNIT_TOO_SMALL, "Function time unit cannot be smaller than db precision") TAOS_DEFINE_ERROR(TSDB_CODE_FUNC_INVALID_VALUE_RANGE, "Function got invalid value range") TAOS_DEFINE_ERROR(TSDB_CODE_FUNC_SETUP_ERROR, "Function set up failed") +TAOS_DEFINE_ERROR(TSDB_CODE_FUNC_INVALID_RES_LENGTH, "Function result exceed max length") //udf TAOS_DEFINE_ERROR(TSDB_CODE_UDF_STOPPING, "udf is stopping") diff --git a/tests/army/query/query_basic.py b/tests/army/query/query_basic.py index d2e0201860..f700ee3153 100644 --- a/tests/army/query/query_basic.py +++ b/tests/army/query/query_basic.py @@ -262,9 +262,9 @@ class TDTestCase(TBase): sql1 = f"select substr(bin,1) from {self.db}.d0 order by ts desc limit 100" sql2 = f"select bin from {self.db}.d0 order by ts desc limit 100" self.checkSameResult(sql1, sql2) - #substr error input pos is zero sql = f"select substr(bin,0,3) from {self.db}.d0 order by ts desc limit 100" - tdSql.error(sql) + tdSql.query(sql) + tdSql.checkData(0, 0, "") # cast nch = 99 diff --git a/tests/script/tsim/scalar/tsConvert.sim b/tests/script/tsim/scalar/tsConvert.sim index ad8d3b3b93..689a36f13d 100644 --- a/tests/script/tsim/scalar/tsConvert.sim +++ b/tests/script/tsim/scalar/tsConvert.sim @@ -13,7 +13,7 @@ sql insert into tb1 values ('2022-07-10 16:31:00', 1, '1'); sql insert into tb1 values ('2022-07-10 16:32:00', 2, '2'); sql insert into tb1 values ('2022-07-10 16:33:00', 3, '3'); sql insert into tb1 values ('2022-07-10 16:34:00', 4, '4'); -sql select * from (select ts,TIMETRUNCATE(ts,1d),TIMETRUNCATE(ts,1h),timediff(TIMETRUNCATE(ts,1d),TIMETRUNCATE(ts,1h),1h) as td from tb1 where ts >='2022-06-01 00:00:00' and ts <='2022-11-3 23:59:59' ) t where td >12; +sql select * from (select ts,TIMETRUNCATE(ts,1d),TIMETRUNCATE(ts,1h), abs(timediff(TIMETRUNCATE(ts,1d),TIMETRUNCATE(ts,1h),1h)) as td from tb1 where ts >='2022-06-01 00:00:00' and ts <='2022-11-3 23:59:59' ) t where td >12; if $rows != 4 then return -1 endi diff --git a/tests/system-test/1-insert/precisionNS.py b/tests/system-test/1-insert/precisionNS.py index 84e1218d0d..3de60b718a 100644 --- a/tests/system-test/1-insert/precisionNS.py +++ b/tests/system-test/1-insert/precisionNS.py @@ -176,52 +176,52 @@ class TDTestCase: def checkTimeMacro(self): # 2 week val = 2 - nsval = val*7*24*60*60*1000*1000*1000 + nsval = -val*7*24*60*60*1000*1000*1000 expectVal = self.childCnt * self.childRow sql = f"select count(ts) from st where timediff(ts - {val}w, ts1) = {nsval} " self.checkExpect(sql, expectVal) # 20 day val = 20 - nsval = val*24*60*60*1000*1000*1000 + nsval = -val*24*60*60*1000*1000*1000 uint = "d" sql = f"select count(ts) from st where timediff(ts - {val}{uint}, ts1) = {nsval} " self.checkExpect(sql, expectVal) # 30 hour val = 30 - nsval = val*60*60*1000*1000*1000 + nsval = -val*60*60*1000*1000*1000 uint = "h" sql = f"select count(ts) from st where timediff(ts - {val}{uint}, ts1) = {nsval} " self.checkExpect(sql, expectVal) # 90 minutes val = 90 - nsval = val*60*1000*1000*1000 + nsval = -val*60*1000*1000*1000 uint = "m" sql = f"select count(ts) from st where timediff(ts - {val}{uint}, ts1) = {nsval} " self.checkExpect(sql, expectVal) # 2s val = 2 - nsval = val*1000*1000*1000 + nsval = -val*1000*1000*1000 uint = "s" sql = f"select count(ts) from st where timediff(ts - {val}{uint}, ts1) = {nsval} " self.checkExpect(sql, expectVal) # 20a val = 5 - nsval = val*1000*1000 + nsval = -val*1000*1000 uint = "a" sql = f"select count(ts) from st where timediff(ts - {val}{uint}, ts1) = {nsval} " self.checkExpect(sql, expectVal) # 300u val = 300 - nsval = val*1000 + nsval = -val*1000 uint = "u" sql = f"select count(ts) from st where timediff(ts - {val}{uint}, ts1) = {nsval} " self.checkExpect(sql, expectVal) # 8b val = 8 - sql = f"select timediff(ts - {val}b, ts1) from st " + sql = f"select timediff(ts1, ts - {val}b) from st " self.checkExpect(sql, val) # timetruncate check @@ -249,14 +249,14 @@ class TDTestCase: timediff(ts,ts+1w,1w) from t0 order by ts desc limit 1;''' tdSql.query(sql) - tdSql.checkData(0,1, 1) - tdSql.checkData(0,2, 1) - tdSql.checkData(0,3, 1) - tdSql.checkData(0,4, 1) - tdSql.checkData(0,5, 1) - tdSql.checkData(0,6, 1) - tdSql.checkData(0,7, 1) - tdSql.checkData(0,8, 1) + tdSql.checkData(0,1, -1) + tdSql.checkData(0,2, -1) + tdSql.checkData(0,3, -1) + tdSql.checkData(0,4, -1) + tdSql.checkData(0,5, -1) + tdSql.checkData(0,6, -1) + tdSql.checkData(0,7, -1) + tdSql.checkData(0,8, -1) # init def init(self, conn, logSql, replicaVar=1): diff --git a/tests/system-test/1-insert/precisionUS.py b/tests/system-test/1-insert/precisionUS.py index 7eab452811..25171ddd88 100644 --- a/tests/system-test/1-insert/precisionUS.py +++ b/tests/system-test/1-insert/precisionUS.py @@ -174,46 +174,46 @@ class TDTestCase: def checkTimeMacro(self): # 2 week val = 2 - usval = val*7*24*60*60*1000*1000 + usval = -val*7*24*60*60*1000*1000 expectVal = self.childCnt * self.childRow sql = f"select count(ts) from st where timediff(ts - {val}w, ts1) = {usval} " self.checkExpect(sql, expectVal) # 20 day val = 20 - usval = val*24*60*60*1000*1000 + usval = -val*24*60*60*1000*1000 uint = "d" sql = f"select count(ts) from st where timediff(ts - {val}{uint}, ts1) = {usval} " self.checkExpect(sql, expectVal) # 30 hour val = 30 - usval = val*60*60*1000*1000 + usval = -val*60*60*1000*1000 uint = "h" sql = f"select count(ts) from st where timediff(ts - {val}{uint}, ts1) = {usval} " self.checkExpect(sql, expectVal) # 90 minutes val = 90 - usval = val*60*1000*1000 + usval = -val*60*1000*1000 uint = "m" sql = f"select count(ts) from st where timediff(ts - {val}{uint}, ts1) = {usval} " self.checkExpect(sql, expectVal) # 2s val = 2 - usval = val*1000*1000 + usval = -val*1000*1000 uint = "s" sql = f"select count(ts) from st where timediff(ts - {val}{uint}, ts1) = {usval} " self.checkExpect(sql, expectVal) # 20a val = 20 - usval = val*1000 + usval = -val*1000 uint = "a" sql = f"select count(ts) from st where timediff(ts - {val}{uint}, ts1) = {usval} " self.checkExpect(sql, expectVal) # 300u val = 300 - usval = val*1 + usval = -val*1 uint = "u" sql = f"select count(ts) from st where timediff(ts - {val}{uint}, ts1) = {usval} " self.checkExpect(sql, expectVal) diff --git a/tests/system-test/1-insert/test_stmt_set_tbname_tag.py b/tests/system-test/1-insert/test_stmt_set_tbname_tag.py index 1f70daff4a..3251c01aa4 100644 --- a/tests/system-test/1-insert/test_stmt_set_tbname_tag.py +++ b/tests/system-test/1-insert/test_stmt_set_tbname_tag.py @@ -178,8 +178,8 @@ class TDTestCase: queryparam[0].binary('中文字符') rows=self.stmtExe(conn,"select CHAR_LENGTH(?) from log ",queryparam) tdLog.debug("assert 4th case %s"%rows) - assert rows[0][0] == 12, '4th case is failed' - assert rows[1][0] == 12, '4th case is failed' + assert rows[0][0] == 4, '4th case is failed' + assert rows[1][0] == 4, '4th case is failed' queryparam=new_bind_params(1) queryparam[0].binary('123') @@ -209,8 +209,8 @@ class TDTestCase: queryparam[0].timestamp(1626861392591112) rows=self.stmtExe(conn,"select timediff('2021-07-21 17:56:32.590111',?,1a) from log",queryparam) tdLog.debug("assert 7th case %s"%rows) - assert rows[0][0] == 1, '7th case is failed' - assert rows[1][0] == 1, '7th case is failed' + assert rows[0][0] == -1, '7th case is failed' + assert rows[1][0] == -1, '7th case is failed' #query: aggregate Functions queryparam=new_bind_params(1) diff --git a/tests/system-test/2-query/round.py b/tests/system-test/2-query/round.py index f87f234fa3..0a3dfcd518 100644 --- a/tests/system-test/2-query/round.py +++ b/tests/system-test/2-query/round.py @@ -99,8 +99,8 @@ class TDTestCase: # f"select round(tbname+1) from {dbname}.t1 ", f"select round(123--123)==1 from {dbname}.t1", f"select round(c1) as 'd1' from {dbname}.t1", - f"select round(c1 ,c2 ) from {dbname}.t1", - f"select round(c1 ,NULL) from {dbname}.t1", + # f"select round(c1 ,c2 ) from {dbname}.t1", + # f"select round(c1 ,NULL) from {dbname}.t1", f"select round(,) from {dbname}.t1;", f"select round(round(c1) ab from {dbname}.t1)", f"select round(c1) as int from {dbname}.t1", @@ -113,8 +113,8 @@ class TDTestCase: # f"select round(tbname+1) from {dbname}.stb1 ", f"select round(123--123)==1 from {dbname}.stb1", f"select round(c1) as 'd1' from {dbname}.stb1", - f"select round(c1 ,c2 ) from {dbname}.stb1", - f"select round(c1 ,NULL) from {dbname}.stb1", + # f"select round(c1 ,c2 ) from {dbname}.stb1", + # f"select round(c1 ,NULL) from {dbname}.stb1", f"select round(,) from {dbname}.stb1;", f"select round(round(c1) ab from {dbname}.stb1)", f"select round(c1) as int from {dbname}.stb1" diff --git a/tests/system-test/2-query/substr.py b/tests/system-test/2-query/substr.py index ad5a2bba55..ee9e2e5b4d 100644 --- a/tests/system-test/2-query/substr.py +++ b/tests/system-test/2-query/substr.py @@ -79,7 +79,7 @@ class TDTestCase: groups = ["", substr_group_having, substr_group_no_having] if pos < 1: - tdSql.error(f"select substr( {condition}, {pos}, {lens}) , {condition} from {tbname} ") + tdSql.query(f"select substr( {condition}, {pos}, {lens}) , {condition} from {tbname} ") break tdSql.query(f"select substr( {condition}, {pos}, {lens}) , {condition} from {tbname} ")