diff --git a/src/client/src/tscSQLParser.c b/src/client/src/tscSQLParser.c index 946702f54ba542f7944b9a66f53bac8cb39d5479..6f4ab16e4d7ced3b6072446fd4b0717714460800 100644 --- a/src/client/src/tscSQLParser.c +++ b/src/client/src/tscSQLParser.c @@ -1078,12 +1078,13 @@ int32_t validateIntervalNode(SSqlObj* pSql, SQueryInfo* pQueryInfo, SSqlNode* pS const char* msg1 = "sliding cannot be used without interval"; const char* msg2 = "interval cannot be less than 1 us"; const char* msg3 = "interval value is too small"; + const char* msg4 = "only point interpolation query requires keyword EVERY"; SSqlCmd* pCmd = &pSql->cmd; STableMetaInfo* pTableMetaInfo = tscGetMetaInfo(pQueryInfo, 0); STableComInfo tinfo = tscGetTableInfo(pTableMetaInfo->pTableMeta); - + if (!TPARSER_HAS_TOKEN(pSqlNode->interval.interval)) { if (TPARSER_HAS_TOKEN(pSqlNode->sliding)) { return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg1); @@ -1109,7 +1110,6 @@ int32_t validateIntervalNode(SSqlObj* pSql, SQueryInfo* pQueryInfo, SSqlNode* pS } if (pQueryInfo->interval.intervalUnit != 'n' && pQueryInfo->interval.intervalUnit != 'y') { - // interval cannot be less than 10 milliseconds if (convertTimePrecision(pQueryInfo->interval.interval, tinfo.precision, TSDB_TIME_PRECISION_MICRO) < tsMinIntervalTime) { return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg2); @@ -1124,6 +1124,11 @@ int32_t validateIntervalNode(SSqlObj* pSql, SQueryInfo* pQueryInfo, SSqlNode* pS return TSDB_CODE_TSC_INVALID_OPERATION; } + bool interpQuery = tscIsPointInterpQuery(pQueryInfo); + if ((pSqlNode->interval.token == TK_EVERY && (!interpQuery)) || (pSqlNode->interval.token == TK_INTERVAL && interpQuery)) { + return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg4); + } + // The following part is used to check for the invalid query expression. return checkInvalidExprForTimeWindow(pCmd, pQueryInfo); } diff --git a/src/inc/ttokendef.h b/src/inc/ttokendef.h index e89fed628262eb78067c63e0f74347dc29123378..0a84d7f13b735e0589b4df5e17122ed2b0fe69b2 100644 --- a/src/inc/ttokendef.h +++ b/src/inc/ttokendef.h @@ -92,124 +92,125 @@ #define TK_ACCOUNT 74 #define TK_USE 75 #define TK_DESCRIBE 76 -#define TK_ALTER 77 -#define TK_PASS 78 -#define TK_PRIVILEGE 79 -#define TK_LOCAL 80 -#define TK_COMPACT 81 -#define TK_LP 82 -#define TK_RP 83 -#define TK_IF 84 -#define TK_EXISTS 85 -#define TK_AS 86 -#define TK_OUTPUTTYPE 87 -#define TK_AGGREGATE 88 -#define TK_BUFSIZE 89 -#define TK_PPS 90 -#define TK_TSERIES 91 -#define TK_DBS 92 -#define TK_STORAGE 93 -#define TK_QTIME 94 -#define TK_CONNS 95 -#define TK_STATE 96 -#define TK_COMMA 97 -#define TK_KEEP 98 -#define TK_CACHE 99 -#define TK_REPLICA 100 -#define TK_QUORUM 101 -#define TK_DAYS 102 -#define TK_MINROWS 103 -#define TK_MAXROWS 104 -#define TK_BLOCKS 105 -#define TK_CTIME 106 -#define TK_WAL 107 -#define TK_FSYNC 108 -#define TK_COMP 109 -#define TK_PRECISION 110 -#define TK_UPDATE 111 -#define TK_CACHELAST 112 -#define TK_PARTITIONS 113 -#define TK_UNSIGNED 114 -#define TK_TAGS 115 -#define TK_USING 116 -#define TK_NULL 117 -#define TK_NOW 118 -#define TK_SELECT 119 -#define TK_UNION 120 -#define TK_ALL 121 -#define TK_DISTINCT 122 -#define TK_FROM 123 -#define TK_VARIABLE 124 -#define TK_INTERVAL 125 -#define TK_SESSION 126 -#define TK_STATE_WINDOW 127 -#define TK_FILL 128 -#define TK_SLIDING 129 -#define TK_ORDER 130 -#define TK_BY 131 -#define TK_ASC 132 -#define TK_DESC 133 -#define TK_GROUP 134 -#define TK_HAVING 135 -#define TK_LIMIT 136 -#define TK_OFFSET 137 -#define TK_SLIMIT 138 -#define TK_SOFFSET 139 -#define TK_WHERE 140 -#define TK_RESET 141 -#define TK_QUERY 142 -#define TK_SYNCDB 143 -#define TK_ADD 144 -#define TK_COLUMN 145 -#define TK_MODIFY 146 -#define TK_TAG 147 -#define TK_CHANGE 148 -#define TK_SET 149 -#define TK_KILL 150 -#define TK_CONNECTION 151 -#define TK_STREAM 152 -#define TK_COLON 153 -#define TK_ABORT 154 -#define TK_AFTER 155 -#define TK_ATTACH 156 -#define TK_BEFORE 157 -#define TK_BEGIN 158 -#define TK_CASCADE 159 -#define TK_CLUSTER 160 -#define TK_CONFLICT 161 -#define TK_COPY 162 -#define TK_DEFERRED 163 -#define TK_DELIMITERS 164 -#define TK_DETACH 165 -#define TK_EACH 166 -#define TK_END 167 -#define TK_EXPLAIN 168 -#define TK_FAIL 169 -#define TK_FOR 170 -#define TK_IGNORE 171 -#define TK_IMMEDIATE 172 -#define TK_INITIALLY 173 -#define TK_INSTEAD 174 -#define TK_MATCH 175 -#define TK_KEY 176 -#define TK_OF 177 -#define TK_RAISE 178 -#define TK_REPLACE 179 -#define TK_RESTRICT 180 -#define TK_ROW 181 -#define TK_STATEMENT 182 -#define TK_TRIGGER 183 -#define TK_VIEW 184 -#define TK_SEMI 185 -#define TK_NONE 186 -#define TK_PREV 187 -#define TK_LINEAR 188 -#define TK_IMPORT 189 -#define TK_TBNAME 190 -#define TK_JOIN 191 -#define TK_INSERT 192 -#define TK_INTO 193 -#define TK_VALUES 194 +#define TK_DESC 77 +#define TK_ALTER 78 +#define TK_PASS 79 +#define TK_PRIVILEGE 80 +#define TK_LOCAL 81 +#define TK_COMPACT 82 +#define TK_LP 83 +#define TK_RP 84 +#define TK_IF 85 +#define TK_EXISTS 86 +#define TK_AS 87 +#define TK_OUTPUTTYPE 88 +#define TK_AGGREGATE 89 +#define TK_BUFSIZE 90 +#define TK_PPS 91 +#define TK_TSERIES 92 +#define TK_DBS 93 +#define TK_STORAGE 94 +#define TK_QTIME 95 +#define TK_CONNS 96 +#define TK_STATE 97 +#define TK_COMMA 98 +#define TK_KEEP 99 +#define TK_CACHE 100 +#define TK_REPLICA 101 +#define TK_QUORUM 102 +#define TK_DAYS 103 +#define TK_MINROWS 104 +#define TK_MAXROWS 105 +#define TK_BLOCKS 106 +#define TK_CTIME 107 +#define TK_WAL 108 +#define TK_FSYNC 109 +#define TK_COMP 110 +#define TK_PRECISION 111 +#define TK_UPDATE 112 +#define TK_CACHELAST 113 +#define TK_PARTITIONS 114 +#define TK_UNSIGNED 115 +#define TK_TAGS 116 +#define TK_USING 117 +#define TK_NULL 118 +#define TK_NOW 119 +#define TK_SELECT 120 +#define TK_UNION 121 +#define TK_ALL 122 +#define TK_DISTINCT 123 +#define TK_FROM 124 +#define TK_VARIABLE 125 +#define TK_INTERVAL 126 +#define TK_EVERY 127 +#define TK_SESSION 128 +#define TK_STATE_WINDOW 129 +#define TK_FILL 130 +#define TK_SLIDING 131 +#define TK_ORDER 132 +#define TK_BY 133 +#define TK_ASC 134 +#define TK_GROUP 135 +#define TK_HAVING 136 +#define TK_LIMIT 137 +#define TK_OFFSET 138 +#define TK_SLIMIT 139 +#define TK_SOFFSET 140 +#define TK_WHERE 141 +#define TK_RESET 142 +#define TK_QUERY 143 +#define TK_SYNCDB 144 +#define TK_ADD 145 +#define TK_COLUMN 146 +#define TK_MODIFY 147 +#define TK_TAG 148 +#define TK_CHANGE 149 +#define TK_SET 150 +#define TK_KILL 151 +#define TK_CONNECTION 152 +#define TK_STREAM 153 +#define TK_COLON 154 +#define TK_ABORT 155 +#define TK_AFTER 156 +#define TK_ATTACH 157 +#define TK_BEFORE 158 +#define TK_BEGIN 159 +#define TK_CASCADE 160 +#define TK_CLUSTER 161 +#define TK_CONFLICT 162 +#define TK_COPY 163 +#define TK_DEFERRED 164 +#define TK_DELIMITERS 165 +#define TK_DETACH 166 +#define TK_EACH 167 +#define TK_END 168 +#define TK_EXPLAIN 169 +#define TK_FAIL 170 +#define TK_FOR 171 +#define TK_IGNORE 172 +#define TK_IMMEDIATE 173 +#define TK_INITIALLY 174 +#define TK_INSTEAD 175 +#define TK_MATCH 176 +#define TK_KEY 177 +#define TK_OF 178 +#define TK_RAISE 179 +#define TK_REPLACE 180 +#define TK_RESTRICT 181 +#define TK_ROW 182 +#define TK_STATEMENT 183 +#define TK_TRIGGER 184 +#define TK_VIEW 185 +#define TK_SEMI 186 +#define TK_NONE 187 +#define TK_PREV 188 +#define TK_LINEAR 189 +#define TK_IMPORT 190 +#define TK_TBNAME 191 +#define TK_JOIN 192 +#define TK_INSERT 193 +#define TK_INTO 194 +#define TK_VALUES 195 #define TK_SPACE 300 diff --git a/src/query/inc/qSqlparser.h b/src/query/inc/qSqlparser.h index 531ff06565dba837c696c6069d409ccf536cbe8c..c231c90996e00d84a70c7141eac69c5a59e20254 100644 --- a/src/query/inc/qSqlparser.h +++ b/src/query/inc/qSqlparser.h @@ -80,6 +80,7 @@ typedef struct tVariantListItem { } tVariantListItem; typedef struct SIntervalVal { + int32_t token; SStrToken interval; SStrToken offset; } SIntervalVal; diff --git a/src/query/inc/sql.y b/src/query/inc/sql.y index 96f1e680f17a650b1033c4b77719838d9119e539..920443232e9bfbe59f4b571646793a1c515928bc 100644 --- a/src/query/inc/sql.y +++ b/src/query/inc/sql.y @@ -94,15 +94,15 @@ cpxName(A) ::= DOT ids(Y). {A = Y; A.n += 1; } cmd ::= SHOW CREATE TABLE ids(X) cpxName(Y). { X.n += Y.n; setDCLSqlElems(pInfo, TSDB_SQL_SHOW_CREATE_TABLE, 1, &X); -} +} cmd ::= SHOW CREATE STABLE ids(X) cpxName(Y). { X.n += Y.n; setDCLSqlElems(pInfo, TSDB_SQL_SHOW_CREATE_STABLE, 1, &X); -} +} cmd ::= SHOW CREATE DATABASE ids(X). { setDCLSqlElems(pInfo, TSDB_SQL_SHOW_CREATE_DATABASE, 1, &X); -} +} cmd ::= SHOW dbPrefix(X) TABLES. { setShowOptions(pInfo, TSDB_MGMT_TABLE_TABLE, &X, 0); @@ -163,6 +163,11 @@ cmd ::= DESCRIBE ids(X) cpxName(Y). { setDCLSqlElems(pInfo, TSDB_SQL_DESCRIBE_TABLE, 1, &X); } +cmd ::= DESC ids(X) cpxName(Y). { + X.n += Y.n; + setDCLSqlElems(pInfo, TSDB_SQL_DESCRIBE_TABLE, 1, &X); +} + /////////////////////////////////THE ALTER STATEMENT//////////////////////////////////////// cmd ::= ALTER USER ids(X) PASS ids(Y). { setAlterUserSql(pInfo, TSDB_ALTER_USER_PASSWD, &X, &Y, NULL); } cmd ::= ALTER USER ids(X) PRIVILEGE ids(Y). { setAlterUserSql(pInfo, TSDB_ALTER_USER_PRIVILEGES, &X, NULL, &Y);} @@ -274,7 +279,7 @@ wal(Y) ::= WAL INTEGER(X). { Y = X; } fsync(Y) ::= FSYNC INTEGER(X). { Y = X; } comp(Y) ::= COMP INTEGER(X). { Y = X; } prec(Y) ::= PRECISION STRING(X). { Y = X; } -update(Y) ::= UPDATE INTEGER(X). { Y = X; } +update(Y) ::= UPDATE INTEGER(X). { Y = X; } cachelast(Y) ::= CACHELAST INTEGER(X). { Y = X; } partitions(Y) ::= PARTITIONS INTEGER(X). { Y = X; } @@ -323,7 +328,7 @@ alter_topic_optr(Y) ::= alter_db_optr(Z). { Y = Z; Y.dbTyp alter_topic_optr(Y) ::= alter_topic_optr(Z) partitions(X). { Y = Z; Y.partitions = strtol(X.z, NULL, 10); } %type typename {TAOS_FIELD} -typename(A) ::= ids(X). { +typename(A) ::= ids(X). { X.type = 0; tSetColumnType (&A, &X); } @@ -479,7 +484,7 @@ tagitem(A) ::= PLUS(X) FLOAT(Y). { //////////////////////// The SELECT statement ///////////////////////////////// %type select {SSqlNode*} %destructor select {destroySqlNode($$);} -select(A) ::= SELECT(T) selcollist(W) from(X) where_opt(Y) interval_opt(K) sliding_opt(S) session_option(H) windowstate_option(D) fill_opt(F)groupby_opt(P) having_opt(N) orderby_opt(Z) slimit_opt(G) limit_opt(L). { +select(A) ::= SELECT(T) selcollist(W) from(X) where_opt(Y) interval_option(K) sliding_opt(S) session_option(H) windowstate_option(D) fill_opt(F)groupby_opt(P) having_opt(N) orderby_opt(Z) slimit_opt(G) limit_opt(L). { A = tSetQuerySqlNode(&T, W, X, Y, P, Z, &K, &H, &D, &S, F, &L, &G, N); } @@ -569,10 +574,14 @@ tablelist(A) ::= tablelist(Y) COMMA ids(X) cpxName(Z) ids(F). { %type tmvar {SStrToken} tmvar(A) ::= VARIABLE(X). {A = X;} -%type interval_opt {SIntervalVal} -interval_opt(N) ::= INTERVAL LP tmvar(E) RP. {N.interval = E; N.offset.n = 0;} -interval_opt(N) ::= INTERVAL LP tmvar(E) COMMA tmvar(X) RP. {N.interval = E; N.offset = X;} -interval_opt(N) ::= . {memset(&N, 0, sizeof(N));} +%type interval_option {SIntervalVal} +interval_option(N) ::= intervalKey(A) LP tmvar(E) RP. {N.interval = E; N.offset.n = 0; N.token = A;} +interval_option(N) ::= intervalKey(A) LP tmvar(E) COMMA tmvar(X) RP. {N.interval = E; N.offset = X; N.token = A;} +interval_option(N) ::= . {memset(&N, 0, sizeof(N));} + +%type intervalKey {int32_t} +intervalKey(A) ::= INTERVAL. {A = TK_INTERVAL;} +intervalKey(A) ::= EVERY. {A = TK_EVERY; } %type session_option {SSessionWindowVal} session_option(X) ::= . {X.col.n = 0; X.gap.n = 0;} @@ -581,6 +590,7 @@ session_option(X) ::= SESSION LP ids(V) cpxName(Z) COMMA tmvar(Y) RP. { X.col = V; X.gap = Y; } + %type windowstate_option {SWindowStateVal} windowstate_option(X) ::= . { X.col.n = 0; X.col.z = NULL;} windowstate_option(X) ::= STATE_WINDOW LP ids(V) RP. { X.col = V; } diff --git a/src/query/src/sql.c b/src/query/src/sql.c index dc5123b7fbbe2b442e8f1c6d8a57b9a6b1d3678c..15b94f6d4ad0badbcb8b4bea662bac888f8b1047 100644 --- a/src/query/src/sql.c +++ b/src/query/src/sql.c @@ -97,28 +97,29 @@ #endif /************* Begin control #defines *****************************************/ #define YYCODETYPE unsigned short int -#define YYNOCODE 277 +#define YYNOCODE 279 #define YYACTIONTYPE unsigned short int #define ParseTOKENTYPE SStrToken typedef union { int yyinit; ParseTOKENTYPE yy0; - TAOS_FIELD yy31; - int yy52; - SLimitVal yy126; - SWindowStateVal yy144; - SCreateTableSql* yy158; - SCreateDbInfo yy214; - SSessionWindowVal yy259; - tSqlExpr* yy370; - SRelationInfo* yy412; - SCreatedTableInfo yy432; - SSqlNode* yy464; - int64_t yy501; - tVariant yy506; - SIntervalVal yy520; - SArray* yy525; - SCreateAcctInfo yy547; + SRelationInfo* yy8; + SWindowStateVal yy40; + SSqlNode* yy56; + SCreateDbInfo yy90; + int yy96; + int32_t yy104; + SSessionWindowVal yy147; + SCreatedTableInfo yy152; + SLimitVal yy166; + SCreateAcctInfo yy171; + TAOS_FIELD yy183; + int64_t yy325; + SIntervalVal yy400; + SArray* yy421; + tVariant yy430; + SCreateTableSql* yy438; + tSqlExpr* yy439; } YYMINORTYPE; #ifndef YYSTACKDEPTH #define YYSTACKDEPTH 100 @@ -128,17 +129,17 @@ typedef union { #define ParseARG_FETCH SSqlInfo* pInfo = yypParser->pInfo #define ParseARG_STORE yypParser->pInfo = pInfo #define YYFALLBACK 1 -#define YYNSTATE 362 -#define YYNRULE 289 -#define YYNTOKEN 195 -#define YY_MAX_SHIFT 361 -#define YY_MIN_SHIFTREDUCE 567 -#define YY_MAX_SHIFTREDUCE 855 -#define YY_ERROR_ACTION 856 -#define YY_ACCEPT_ACTION 857 -#define YY_NO_ACTION 858 -#define YY_MIN_REDUCE 859 -#define YY_MAX_REDUCE 1147 +#define YYNSTATE 364 +#define YYNRULE 292 +#define YYNTOKEN 196 +#define YY_MAX_SHIFT 363 +#define YY_MIN_SHIFTREDUCE 572 +#define YY_MAX_SHIFTREDUCE 863 +#define YY_ERROR_ACTION 864 +#define YY_ACCEPT_ACTION 865 +#define YY_NO_ACTION 866 +#define YY_MIN_REDUCE 867 +#define YY_MAX_REDUCE 1158 /************* End control #defines *******************************************/ /* Define the yytestcase() macro to be a no-op if is not already defined @@ -204,288 +205,289 @@ typedef union { ** yy_default[] Default action for each state. ** *********** Begin parsing tables **********************************************/ -#define YY_ACTTAB_COUNT (753) +#define YY_ACTTAB_COUNT (758) static const YYACTIONTYPE yy_action[] = { - /* 0 */ 206, 618, 245, 618, 618, 97, 244, 228, 359, 619, - /* 10 */ 1123, 619, 619, 56, 57, 152, 60, 61, 654, 1027, - /* 20 */ 248, 50, 1036, 59, 317, 64, 62, 65, 63, 984, - /* 30 */ 249, 982, 983, 55, 54, 231, 985, 53, 52, 51, - /* 40 */ 986, 1002, 987, 988, 53, 52, 51, 568, 569, 570, - /* 50 */ 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, - /* 60 */ 581, 360, 206, 257, 229, 159, 206, 56, 57, 37, - /* 70 */ 60, 61, 1124, 174, 248, 50, 1124, 59, 317, 64, - /* 80 */ 62, 65, 63, 277, 276, 29, 79, 55, 54, 1033, - /* 90 */ 206, 53, 52, 51, 56, 57, 315, 60, 61, 234, - /* 100 */ 1124, 248, 50, 1014, 59, 317, 64, 62, 65, 63, - /* 110 */ 358, 357, 144, 230, 55, 54, 85, 1011, 53, 52, - /* 120 */ 51, 56, 58, 240, 60, 61, 347, 1014, 248, 50, - /* 130 */ 94, 59, 317, 64, 62, 65, 63, 794, 1073, 242, - /* 140 */ 289, 55, 54, 1014, 618, 53, 52, 51, 57, 23, - /* 150 */ 60, 61, 619, 44, 248, 50, 1000, 59, 317, 64, - /* 160 */ 62, 65, 63, 997, 998, 34, 1001, 55, 54, 857, - /* 170 */ 361, 53, 52, 51, 43, 313, 354, 353, 312, 311, - /* 180 */ 310, 352, 309, 308, 307, 351, 306, 350, 349, 976, - /* 190 */ 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, - /* 200 */ 974, 975, 977, 978, 60, 61, 24, 1008, 248, 50, - /* 210 */ 257, 59, 317, 64, 62, 65, 63, 1027, 122, 1027, - /* 220 */ 175, 55, 54, 37, 209, 53, 52, 51, 247, 809, - /* 230 */ 347, 215, 798, 232, 801, 270, 804, 135, 134, 214, - /* 240 */ 315, 247, 809, 322, 85, 798, 14, 801, 37, 804, - /* 250 */ 93, 159, 726, 241, 203, 723, 800, 724, 803, 725, - /* 260 */ 226, 227, 257, 16, 318, 15, 37, 238, 5, 40, - /* 270 */ 178, 1011, 1012, 226, 227, 177, 103, 108, 99, 107, - /* 280 */ 96, 44, 204, 253, 254, 210, 64, 62, 65, 63, - /* 290 */ 355, 945, 159, 302, 55, 54, 1010, 251, 53, 52, - /* 300 */ 51, 1013, 78, 269, 256, 77, 120, 114, 125, 66, - /* 310 */ 239, 702, 222, 124, 1011, 130, 133, 123, 37, 197, - /* 320 */ 195, 193, 66, 127, 1072, 37, 192, 139, 138, 137, - /* 330 */ 136, 799, 159, 802, 37, 43, 999, 354, 353, 337, - /* 340 */ 336, 37, 352, 262, 810, 805, 351, 37, 350, 349, - /* 350 */ 37, 806, 266, 265, 742, 55, 54, 810, 805, 53, - /* 360 */ 52, 51, 326, 291, 806, 90, 1011, 727, 728, 327, - /* 370 */ 37, 37, 252, 1011, 250, 807, 325, 324, 328, 258, - /* 380 */ 82, 255, 1011, 332, 331, 329, 150, 148, 147, 1011, - /* 390 */ 907, 333, 83, 917, 334, 1011, 908, 188, 1011, 271, - /* 400 */ 188, 739, 92, 188, 70, 91, 1, 176, 3, 189, - /* 410 */ 775, 776, 758, 38, 335, 339, 80, 273, 1011, 1011, - /* 420 */ 766, 767, 73, 712, 294, 33, 154, 9, 714, 273, - /* 430 */ 296, 713, 796, 830, 67, 26, 246, 38, 38, 746, - /* 440 */ 811, 319, 67, 76, 95, 67, 71, 25, 1120, 617, - /* 450 */ 808, 132, 131, 113, 25, 112, 1119, 6, 297, 18, - /* 460 */ 1118, 17, 74, 25, 731, 729, 732, 730, 797, 20, - /* 470 */ 1083, 19, 119, 224, 118, 701, 22, 225, 21, 207, - /* 480 */ 208, 211, 205, 212, 213, 217, 218, 219, 216, 202, - /* 490 */ 1143, 1082, 1135, 236, 267, 1079, 1078, 237, 338, 151, - /* 500 */ 1035, 1046, 47, 1065, 1043, 149, 1064, 1025, 1028, 1044, - /* 510 */ 274, 1048, 153, 170, 158, 1009, 278, 285, 171, 1007, - /* 520 */ 172, 233, 166, 280, 161, 757, 160, 173, 162, 922, - /* 530 */ 163, 299, 300, 301, 304, 305, 282, 292, 45, 290, - /* 540 */ 75, 200, 288, 813, 272, 41, 72, 49, 316, 164, - /* 550 */ 916, 323, 1142, 110, 1141, 1138, 286, 179, 330, 1134, - /* 560 */ 284, 116, 1133, 1130, 180, 281, 942, 42, 39, 46, - /* 570 */ 201, 904, 279, 126, 303, 902, 128, 129, 900, 899, - /* 580 */ 259, 191, 897, 896, 895, 894, 893, 892, 891, 194, - /* 590 */ 196, 888, 886, 884, 882, 198, 879, 199, 48, 81, - /* 600 */ 86, 348, 283, 1066, 121, 340, 341, 342, 343, 344, - /* 610 */ 223, 345, 346, 356, 855, 243, 298, 260, 261, 854, - /* 620 */ 263, 220, 221, 264, 853, 836, 104, 921, 920, 105, - /* 630 */ 835, 268, 273, 10, 293, 734, 275, 84, 30, 898, - /* 640 */ 890, 183, 182, 943, 187, 181, 184, 185, 2, 140, - /* 650 */ 186, 141, 142, 889, 4, 143, 980, 881, 87, 944, - /* 660 */ 759, 165, 167, 168, 169, 880, 155, 157, 768, 156, - /* 670 */ 235, 762, 88, 89, 990, 764, 287, 31, 11, 32, - /* 680 */ 12, 13, 27, 295, 28, 96, 98, 101, 35, 100, - /* 690 */ 632, 36, 102, 667, 665, 664, 663, 661, 660, 659, - /* 700 */ 656, 314, 622, 106, 7, 320, 812, 321, 8, 109, - /* 710 */ 814, 111, 68, 69, 115, 704, 703, 38, 117, 700, - /* 720 */ 648, 646, 638, 644, 640, 642, 636, 634, 670, 669, - /* 730 */ 668, 666, 662, 658, 657, 190, 620, 585, 583, 859, - /* 740 */ 858, 858, 858, 858, 858, 858, 858, 858, 858, 858, - /* 750 */ 858, 145, 146, + /* 0 */ 170, 624, 236, 624, 230, 361, 1023, 1045, 242, 625, + /* 10 */ 247, 625, 1023, 57, 58, 154, 61, 62, 281, 38, + /* 20 */ 250, 51, 624, 60, 319, 65, 63, 66, 64, 993, + /* 30 */ 625, 991, 992, 56, 55, 161, 994, 54, 53, 52, + /* 40 */ 995, 161, 996, 997, 865, 363, 1036, 573, 574, 575, + /* 50 */ 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, + /* 60 */ 586, 362, 233, 232, 231, 57, 58, 1020, 61, 62, + /* 70 */ 208, 660, 250, 51, 1042, 60, 319, 65, 63, 66, + /* 80 */ 64, 1135, 1009, 279, 278, 56, 55, 80, 98, 54, + /* 90 */ 53, 52, 57, 58, 1036, 61, 62, 208, 86, 250, + /* 100 */ 51, 1017, 60, 319, 65, 63, 66, 64, 1134, 1084, + /* 110 */ 272, 291, 56, 55, 317, 1083, 54, 53, 52, 57, + /* 120 */ 59, 244, 61, 62, 1011, 1023, 250, 51, 95, 60, + /* 130 */ 319, 65, 63, 66, 64, 45, 802, 349, 1036, 56, + /* 140 */ 55, 161, 1022, 54, 53, 52, 58, 243, 61, 62, + /* 150 */ 767, 768, 250, 51, 234, 60, 319, 65, 63, 66, + /* 160 */ 64, 1006, 1007, 35, 1010, 56, 55, 317, 246, 54, + /* 170 */ 53, 52, 44, 315, 356, 355, 314, 313, 312, 354, + /* 180 */ 311, 310, 309, 353, 308, 352, 351, 985, 973, 974, + /* 190 */ 975, 976, 977, 978, 979, 980, 981, 982, 983, 984, + /* 200 */ 986, 987, 61, 62, 24, 23, 250, 51, 264, 60, + /* 210 */ 319, 65, 63, 66, 64, 92, 79, 268, 267, 56, + /* 220 */ 55, 123, 211, 54, 53, 52, 249, 817, 208, 217, + /* 230 */ 806, 93, 809, 349, 812, 137, 136, 135, 216, 1135, + /* 240 */ 249, 817, 324, 86, 806, 81, 809, 259, 812, 251, + /* 250 */ 1008, 205, 65, 63, 66, 64, 161, 175, 228, 229, + /* 260 */ 56, 55, 320, 916, 54, 53, 52, 5, 41, 179, + /* 270 */ 189, 624, 228, 229, 178, 104, 109, 100, 108, 625, + /* 280 */ 45, 732, 357, 954, 729, 38, 730, 38, 731, 121, + /* 290 */ 115, 126, 253, 304, 38, 16, 125, 15, 131, 134, + /* 300 */ 124, 206, 271, 38, 78, 258, 784, 128, 67, 208, + /* 310 */ 748, 224, 255, 256, 3, 190, 199, 197, 195, 808, + /* 320 */ 1135, 811, 67, 194, 141, 140, 139, 138, 293, 240, + /* 330 */ 91, 241, 926, 1020, 44, 1020, 356, 355, 328, 189, + /* 340 */ 38, 354, 1020, 818, 813, 353, 38, 352, 351, 708, + /* 350 */ 814, 1019, 807, 29, 810, 212, 38, 818, 813, 38, + /* 360 */ 1094, 56, 55, 783, 814, 54, 53, 52, 254, 38, + /* 370 */ 252, 38, 327, 326, 38, 14, 1131, 339, 338, 94, + /* 380 */ 917, 260, 745, 257, 329, 334, 333, 189, 1020, 259, + /* 390 */ 330, 54, 53, 52, 1020, 259, 752, 733, 734, 176, + /* 400 */ 331, 1, 177, 335, 1020, 1021, 273, 1020, 9, 97, + /* 410 */ 83, 84, 34, 336, 71, 337, 764, 1020, 341, 1020, + /* 420 */ 39, 774, 1020, 360, 359, 146, 152, 150, 149, 775, + /* 430 */ 156, 74, 718, 804, 321, 68, 296, 720, 77, 815, + /* 440 */ 248, 133, 132, 26, 298, 299, 39, 275, 275, 719, + /* 450 */ 39, 68, 838, 819, 623, 114, 72, 113, 96, 18, + /* 460 */ 1130, 17, 6, 68, 1129, 226, 25, 25, 25, 805, + /* 470 */ 707, 75, 816, 737, 735, 738, 736, 20, 227, 19, + /* 480 */ 120, 22, 119, 21, 209, 210, 213, 207, 214, 1154, + /* 490 */ 215, 1146, 1037, 1093, 219, 238, 220, 221, 218, 204, + /* 500 */ 1090, 1089, 239, 340, 269, 153, 1044, 1055, 48, 1076, + /* 510 */ 1052, 1053, 276, 1075, 1018, 1057, 151, 155, 160, 287, + /* 520 */ 171, 172, 280, 1016, 173, 174, 163, 235, 282, 284, + /* 530 */ 931, 164, 165, 1034, 166, 763, 301, 821, 302, 303, + /* 540 */ 306, 307, 46, 202, 162, 294, 42, 290, 168, 318, + /* 550 */ 925, 325, 76, 73, 50, 292, 1153, 288, 111, 1152, + /* 560 */ 283, 1149, 286, 49, 180, 305, 332, 1145, 167, 122, + /* 570 */ 350, 117, 1144, 1141, 181, 951, 43, 40, 47, 342, + /* 580 */ 203, 913, 127, 911, 129, 130, 909, 908, 261, 192, + /* 590 */ 193, 905, 904, 903, 902, 901, 900, 899, 196, 198, + /* 600 */ 896, 894, 892, 890, 200, 887, 201, 343, 274, 82, + /* 610 */ 87, 344, 285, 1077, 345, 346, 347, 348, 358, 863, + /* 620 */ 263, 262, 862, 266, 225, 245, 300, 265, 861, 844, + /* 630 */ 843, 270, 222, 275, 10, 85, 295, 930, 929, 223, + /* 640 */ 105, 740, 106, 277, 30, 88, 765, 907, 906, 157, + /* 650 */ 158, 142, 143, 898, 184, 183, 952, 187, 182, 185, + /* 660 */ 186, 188, 144, 897, 776, 145, 953, 889, 989, 2, + /* 670 */ 169, 888, 770, 33, 4, 159, 89, 237, 772, 90, + /* 680 */ 289, 999, 31, 11, 32, 12, 13, 27, 297, 28, + /* 690 */ 97, 99, 102, 36, 101, 638, 37, 103, 673, 671, + /* 700 */ 670, 669, 667, 666, 665, 662, 628, 316, 107, 7, + /* 710 */ 822, 820, 322, 8, 323, 710, 110, 69, 112, 70, + /* 720 */ 39, 709, 116, 118, 706, 654, 652, 644, 650, 646, + /* 730 */ 648, 642, 640, 676, 675, 674, 672, 668, 664, 663, + /* 740 */ 191, 590, 626, 588, 867, 866, 866, 866, 866, 866, + /* 750 */ 866, 866, 866, 866, 866, 866, 147, 148, }; static const YYCODETYPE yy_lookahead[] = { - /* 0 */ 265, 1, 205, 1, 1, 206, 205, 198, 199, 9, - /* 10 */ 275, 9, 9, 13, 14, 199, 16, 17, 5, 246, - /* 20 */ 20, 21, 199, 23, 24, 25, 26, 27, 28, 222, - /* 30 */ 205, 224, 225, 33, 34, 262, 229, 37, 38, 39, - /* 40 */ 233, 242, 235, 236, 37, 38, 39, 45, 46, 47, + /* 0 */ 253, 1, 245, 1, 199, 200, 249, 200, 245, 9, + /* 10 */ 206, 9, 249, 13, 14, 200, 16, 17, 271, 200, + /* 20 */ 20, 21, 1, 23, 24, 25, 26, 27, 28, 223, + /* 30 */ 9, 225, 226, 33, 34, 200, 230, 37, 38, 39, + /* 40 */ 234, 200, 236, 237, 197, 198, 247, 45, 46, 47, /* 50 */ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, - /* 60 */ 58, 59, 265, 199, 62, 199, 265, 13, 14, 199, - /* 70 */ 16, 17, 275, 209, 20, 21, 275, 23, 24, 25, - /* 80 */ 26, 27, 28, 267, 268, 82, 86, 33, 34, 266, - /* 90 */ 265, 37, 38, 39, 13, 14, 84, 16, 17, 244, - /* 100 */ 275, 20, 21, 248, 23, 24, 25, 26, 27, 28, - /* 110 */ 66, 67, 68, 243, 33, 34, 82, 247, 37, 38, - /* 120 */ 39, 13, 14, 244, 16, 17, 90, 248, 20, 21, - /* 130 */ 206, 23, 24, 25, 26, 27, 28, 83, 272, 244, - /* 140 */ 274, 33, 34, 248, 1, 37, 38, 39, 14, 265, - /* 150 */ 16, 17, 9, 119, 20, 21, 0, 23, 24, 25, - /* 160 */ 26, 27, 28, 239, 240, 241, 242, 33, 34, 196, - /* 170 */ 197, 37, 38, 39, 98, 99, 100, 101, 102, 103, - /* 180 */ 104, 105, 106, 107, 108, 109, 110, 111, 112, 222, - /* 190 */ 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, - /* 200 */ 233, 234, 235, 236, 16, 17, 44, 199, 20, 21, - /* 210 */ 199, 23, 24, 25, 26, 27, 28, 246, 78, 246, - /* 220 */ 209, 33, 34, 199, 62, 37, 38, 39, 1, 2, - /* 230 */ 90, 69, 5, 262, 7, 262, 9, 75, 76, 77, - /* 240 */ 84, 1, 2, 81, 82, 5, 82, 7, 199, 9, - /* 250 */ 86, 199, 2, 245, 265, 5, 5, 7, 7, 9, - /* 260 */ 33, 34, 199, 145, 37, 147, 199, 243, 63, 64, - /* 270 */ 65, 247, 209, 33, 34, 70, 71, 72, 73, 74, - /* 280 */ 116, 119, 265, 33, 34, 265, 25, 26, 27, 28, - /* 290 */ 220, 221, 199, 88, 33, 34, 247, 69, 37, 38, - /* 300 */ 39, 248, 206, 141, 69, 143, 63, 64, 65, 82, - /* 310 */ 243, 5, 150, 70, 247, 72, 73, 74, 199, 63, - /* 320 */ 64, 65, 82, 80, 272, 199, 70, 71, 72, 73, - /* 330 */ 74, 5, 199, 7, 199, 98, 240, 100, 101, 33, - /* 340 */ 34, 199, 105, 142, 117, 118, 109, 199, 111, 112, - /* 350 */ 199, 124, 151, 152, 37, 33, 34, 117, 118, 37, - /* 360 */ 38, 39, 243, 270, 124, 272, 247, 117, 118, 243, - /* 370 */ 199, 199, 144, 247, 146, 124, 148, 149, 243, 144, - /* 380 */ 83, 146, 247, 148, 149, 243, 63, 64, 65, 247, - /* 390 */ 204, 243, 83, 204, 243, 247, 204, 211, 247, 83, - /* 400 */ 211, 97, 249, 211, 97, 272, 207, 208, 202, 203, - /* 410 */ 132, 133, 83, 97, 243, 243, 263, 120, 247, 247, - /* 420 */ 83, 83, 97, 83, 83, 82, 97, 123, 83, 120, - /* 430 */ 83, 83, 1, 83, 97, 97, 61, 97, 97, 122, - /* 440 */ 83, 15, 97, 82, 97, 97, 139, 97, 265, 83, - /* 450 */ 124, 78, 79, 145, 97, 147, 265, 82, 115, 145, - /* 460 */ 265, 147, 137, 97, 5, 5, 7, 7, 37, 145, - /* 470 */ 238, 147, 145, 265, 147, 114, 145, 265, 147, 265, - /* 480 */ 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, - /* 490 */ 248, 238, 248, 238, 199, 238, 238, 238, 238, 199, - /* 500 */ 199, 199, 264, 273, 199, 61, 273, 261, 246, 199, - /* 510 */ 246, 199, 199, 250, 199, 246, 269, 199, 199, 199, - /* 520 */ 199, 269, 254, 269, 259, 124, 260, 199, 258, 199, - /* 530 */ 257, 199, 199, 199, 199, 199, 269, 130, 199, 134, - /* 540 */ 136, 199, 128, 117, 200, 199, 138, 135, 199, 256, - /* 550 */ 199, 199, 199, 199, 199, 199, 127, 199, 199, 199, - /* 560 */ 126, 199, 199, 199, 199, 129, 199, 199, 199, 199, - /* 570 */ 199, 199, 125, 199, 89, 199, 199, 199, 199, 199, - /* 580 */ 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, - /* 590 */ 199, 199, 199, 199, 199, 199, 199, 199, 140, 200, - /* 600 */ 200, 113, 200, 200, 96, 95, 51, 92, 94, 55, - /* 610 */ 200, 93, 91, 84, 5, 200, 200, 153, 5, 5, - /* 620 */ 153, 200, 200, 5, 5, 100, 206, 210, 210, 206, - /* 630 */ 99, 142, 120, 82, 115, 83, 97, 121, 82, 200, - /* 640 */ 200, 213, 217, 219, 212, 218, 216, 214, 207, 201, - /* 650 */ 215, 201, 201, 200, 202, 201, 237, 200, 97, 221, - /* 660 */ 83, 255, 253, 252, 251, 200, 82, 97, 83, 82, - /* 670 */ 1, 83, 82, 82, 237, 83, 82, 97, 131, 97, - /* 680 */ 131, 82, 82, 115, 82, 116, 78, 71, 87, 86, - /* 690 */ 5, 87, 86, 9, 5, 5, 5, 5, 5, 5, - /* 700 */ 5, 15, 85, 78, 82, 24, 83, 59, 82, 147, - /* 710 */ 117, 147, 16, 16, 147, 5, 5, 97, 147, 83, - /* 720 */ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - /* 730 */ 5, 5, 5, 5, 5, 97, 85, 61, 60, 0, - /* 740 */ 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, - /* 750 */ 276, 21, 21, 276, 276, 276, 276, 276, 276, 276, - /* 760 */ 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, - /* 770 */ 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, - /* 780 */ 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, - /* 790 */ 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, - /* 800 */ 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, - /* 810 */ 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, - /* 820 */ 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, - /* 830 */ 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, - /* 840 */ 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, - /* 850 */ 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, - /* 860 */ 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, - /* 870 */ 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, - /* 880 */ 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, - /* 890 */ 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, - /* 900 */ 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, - /* 910 */ 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, - /* 920 */ 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, - /* 930 */ 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, - /* 940 */ 276, 276, 276, 276, 276, 276, 276, 276, + /* 60 */ 58, 59, 263, 244, 62, 13, 14, 248, 16, 17, + /* 70 */ 266, 5, 20, 21, 267, 23, 24, 25, 26, 27, + /* 80 */ 28, 277, 0, 268, 269, 33, 34, 87, 207, 37, + /* 90 */ 38, 39, 13, 14, 247, 16, 17, 266, 83, 20, + /* 100 */ 21, 200, 23, 24, 25, 26, 27, 28, 277, 274, + /* 110 */ 263, 276, 33, 34, 85, 274, 37, 38, 39, 13, + /* 120 */ 14, 245, 16, 17, 243, 249, 20, 21, 207, 23, + /* 130 */ 24, 25, 26, 27, 28, 120, 84, 91, 247, 33, + /* 140 */ 34, 200, 249, 37, 38, 39, 14, 246, 16, 17, + /* 150 */ 126, 127, 20, 21, 263, 23, 24, 25, 26, 27, + /* 160 */ 28, 240, 241, 242, 243, 33, 34, 85, 206, 37, + /* 170 */ 38, 39, 99, 100, 101, 102, 103, 104, 105, 106, + /* 180 */ 107, 108, 109, 110, 111, 112, 113, 223, 224, 225, + /* 190 */ 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, + /* 200 */ 236, 237, 16, 17, 44, 266, 20, 21, 143, 23, + /* 210 */ 24, 25, 26, 27, 28, 274, 207, 152, 153, 33, + /* 220 */ 34, 79, 62, 37, 38, 39, 1, 2, 266, 69, + /* 230 */ 5, 250, 7, 91, 9, 75, 76, 77, 78, 277, + /* 240 */ 1, 2, 82, 83, 5, 264, 7, 200, 9, 206, + /* 250 */ 241, 266, 25, 26, 27, 28, 200, 210, 33, 34, + /* 260 */ 33, 34, 37, 205, 37, 38, 39, 63, 64, 65, + /* 270 */ 212, 1, 33, 34, 70, 71, 72, 73, 74, 9, + /* 280 */ 120, 2, 221, 222, 5, 200, 7, 200, 9, 63, + /* 290 */ 64, 65, 69, 89, 200, 146, 70, 148, 72, 73, + /* 300 */ 74, 266, 142, 200, 144, 69, 77, 81, 83, 266, + /* 310 */ 37, 151, 33, 34, 203, 204, 63, 64, 65, 5, + /* 320 */ 277, 7, 83, 70, 71, 72, 73, 74, 272, 244, + /* 330 */ 274, 244, 205, 248, 99, 248, 101, 102, 244, 212, + /* 340 */ 200, 106, 248, 118, 119, 110, 200, 112, 113, 5, + /* 350 */ 125, 248, 5, 83, 7, 266, 200, 118, 119, 200, + /* 360 */ 239, 33, 34, 134, 125, 37, 38, 39, 145, 200, + /* 370 */ 147, 200, 149, 150, 200, 83, 266, 33, 34, 87, + /* 380 */ 205, 145, 98, 147, 244, 149, 150, 212, 248, 200, + /* 390 */ 244, 37, 38, 39, 248, 200, 123, 118, 119, 210, + /* 400 */ 244, 208, 209, 244, 248, 210, 84, 248, 124, 117, + /* 410 */ 84, 84, 83, 244, 98, 244, 84, 248, 244, 248, + /* 420 */ 98, 84, 248, 66, 67, 68, 63, 64, 65, 84, + /* 430 */ 98, 98, 84, 1, 15, 98, 84, 84, 83, 125, + /* 440 */ 61, 79, 80, 98, 84, 116, 98, 121, 121, 84, + /* 450 */ 98, 98, 84, 84, 84, 146, 140, 148, 98, 146, + /* 460 */ 266, 148, 83, 98, 266, 266, 98, 98, 98, 37, + /* 470 */ 115, 138, 125, 5, 5, 7, 7, 146, 266, 148, + /* 480 */ 146, 146, 148, 148, 266, 266, 266, 266, 266, 249, + /* 490 */ 266, 249, 247, 239, 266, 239, 266, 266, 266, 266, + /* 500 */ 239, 239, 239, 239, 200, 200, 200, 200, 265, 275, + /* 510 */ 200, 200, 247, 275, 247, 200, 61, 200, 200, 200, + /* 520 */ 251, 200, 270, 200, 200, 200, 260, 270, 270, 270, + /* 530 */ 200, 259, 258, 262, 257, 125, 200, 118, 200, 200, + /* 540 */ 200, 200, 200, 200, 261, 132, 200, 130, 255, 200, + /* 550 */ 200, 200, 137, 139, 136, 135, 200, 129, 200, 200, + /* 560 */ 131, 200, 128, 141, 200, 90, 200, 200, 256, 97, + /* 570 */ 114, 200, 200, 200, 200, 200, 200, 200, 200, 96, + /* 580 */ 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, + /* 590 */ 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, + /* 600 */ 200, 200, 200, 200, 200, 200, 200, 51, 201, 201, + /* 610 */ 201, 93, 201, 201, 95, 55, 94, 92, 85, 5, + /* 620 */ 5, 154, 5, 5, 201, 201, 201, 154, 5, 101, + /* 630 */ 100, 143, 201, 121, 83, 122, 116, 211, 211, 201, + /* 640 */ 207, 84, 207, 98, 83, 98, 84, 201, 201, 83, + /* 650 */ 83, 202, 202, 201, 214, 218, 220, 216, 219, 217, + /* 660 */ 215, 213, 202, 201, 84, 202, 222, 201, 238, 208, + /* 670 */ 254, 201, 84, 252, 203, 98, 83, 1, 84, 83, + /* 680 */ 83, 238, 98, 133, 98, 133, 83, 83, 116, 83, + /* 690 */ 117, 79, 71, 88, 87, 5, 88, 87, 9, 5, + /* 700 */ 5, 5, 5, 5, 5, 5, 86, 15, 79, 83, + /* 710 */ 118, 84, 24, 83, 59, 5, 148, 16, 148, 16, + /* 720 */ 98, 5, 148, 148, 84, 5, 5, 5, 5, 5, + /* 730 */ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + /* 740 */ 98, 61, 86, 60, 0, 278, 278, 278, 278, 278, + /* 750 */ 278, 278, 278, 278, 278, 278, 21, 21, 278, 278, + /* 760 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, + /* 770 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, + /* 780 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, + /* 790 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, + /* 800 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, + /* 810 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, + /* 820 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, + /* 830 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, + /* 840 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, + /* 850 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, + /* 860 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, + /* 870 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, + /* 880 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, + /* 890 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, + /* 900 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, + /* 910 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, + /* 920 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, + /* 930 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, + /* 940 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, + /* 950 */ 278, 278, 278, 278, }; -#define YY_SHIFT_COUNT (361) +#define YY_SHIFT_COUNT (363) #define YY_SHIFT_MIN (0) -#define YY_SHIFT_MAX (739) +#define YY_SHIFT_MAX (744) static const unsigned short int yy_shift_ofst[] = { - /* 0 */ 162, 76, 76, 237, 237, 12, 227, 240, 240, 3, - /* 10 */ 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, - /* 20 */ 143, 143, 143, 0, 2, 240, 250, 250, 250, 34, - /* 30 */ 34, 143, 143, 143, 156, 143, 143, 143, 143, 140, - /* 40 */ 12, 36, 36, 13, 753, 753, 753, 240, 240, 240, - /* 50 */ 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, - /* 60 */ 240, 240, 240, 240, 240, 240, 240, 250, 250, 250, - /* 70 */ 306, 306, 306, 306, 306, 306, 306, 143, 143, 143, - /* 80 */ 317, 143, 143, 143, 34, 34, 143, 143, 143, 143, - /* 90 */ 278, 278, 304, 34, 143, 143, 143, 143, 143, 143, - /* 100 */ 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, - /* 110 */ 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, - /* 120 */ 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, - /* 130 */ 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, - /* 140 */ 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, - /* 150 */ 143, 444, 444, 444, 401, 401, 401, 401, 444, 444, - /* 160 */ 404, 408, 407, 412, 405, 414, 429, 434, 436, 447, - /* 170 */ 458, 444, 444, 444, 485, 485, 488, 12, 12, 444, - /* 180 */ 444, 508, 510, 555, 515, 514, 554, 518, 521, 488, - /* 190 */ 13, 444, 529, 529, 444, 529, 444, 529, 444, 444, - /* 200 */ 753, 753, 54, 81, 81, 108, 81, 134, 188, 205, - /* 210 */ 261, 261, 261, 261, 243, 256, 322, 322, 322, 322, - /* 220 */ 228, 235, 201, 164, 7, 7, 251, 326, 44, 323, - /* 230 */ 316, 297, 309, 329, 337, 338, 307, 325, 340, 341, - /* 240 */ 345, 347, 348, 343, 350, 357, 431, 375, 426, 366, - /* 250 */ 118, 308, 314, 459, 460, 324, 327, 361, 331, 373, - /* 260 */ 609, 464, 613, 614, 467, 618, 619, 525, 531, 489, - /* 270 */ 512, 519, 551, 516, 552, 556, 539, 561, 577, 584, - /* 280 */ 585, 587, 588, 570, 590, 592, 591, 669, 594, 580, - /* 290 */ 547, 582, 549, 599, 519, 600, 568, 602, 569, 608, - /* 300 */ 601, 603, 616, 685, 604, 606, 684, 689, 690, 691, - /* 310 */ 692, 693, 694, 695, 617, 686, 625, 622, 623, 593, - /* 320 */ 626, 681, 648, 696, 562, 564, 620, 620, 620, 620, - /* 330 */ 697, 567, 571, 620, 620, 620, 710, 711, 636, 620, - /* 340 */ 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, - /* 350 */ 725, 726, 727, 728, 729, 638, 651, 730, 731, 676, - /* 360 */ 678, 739, + /* 0 */ 160, 73, 73, 235, 235, 29, 225, 239, 239, 270, + /* 10 */ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + /* 20 */ 21, 21, 21, 0, 2, 239, 279, 279, 279, 15, + /* 30 */ 15, 21, 21, 24, 21, 82, 21, 21, 21, 21, + /* 40 */ 142, 29, 46, 46, 66, 758, 758, 758, 239, 239, + /* 50 */ 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, + /* 60 */ 239, 239, 239, 239, 239, 239, 239, 239, 279, 279, + /* 70 */ 279, 344, 344, 344, 344, 344, 344, 344, 21, 21, + /* 80 */ 21, 273, 21, 21, 21, 15, 15, 21, 21, 21, + /* 90 */ 21, 229, 229, 284, 15, 21, 21, 21, 21, 21, + /* 100 */ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + /* 110 */ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + /* 120 */ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + /* 130 */ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + /* 140 */ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + /* 150 */ 21, 21, 21, 455, 455, 455, 410, 410, 410, 410, + /* 160 */ 455, 455, 415, 414, 413, 418, 420, 417, 428, 434, + /* 170 */ 429, 422, 455, 455, 455, 475, 475, 456, 29, 29, + /* 180 */ 455, 455, 472, 483, 556, 518, 519, 560, 522, 525, + /* 190 */ 456, 66, 455, 455, 533, 533, 455, 533, 455, 533, + /* 200 */ 455, 455, 758, 758, 52, 79, 79, 106, 79, 132, + /* 210 */ 186, 204, 227, 227, 227, 227, 226, 253, 328, 328, + /* 220 */ 328, 328, 223, 236, 65, 292, 354, 354, 314, 347, + /* 230 */ 357, 363, 322, 326, 327, 332, 337, 345, 316, 333, + /* 240 */ 348, 352, 353, 360, 365, 329, 368, 369, 432, 379, + /* 250 */ 419, 370, 149, 309, 313, 468, 469, 331, 334, 355, + /* 260 */ 335, 362, 614, 467, 615, 617, 473, 618, 623, 528, + /* 270 */ 530, 488, 512, 520, 551, 513, 557, 561, 545, 547, + /* 280 */ 562, 566, 580, 567, 588, 577, 593, 594, 596, 676, + /* 290 */ 597, 584, 550, 586, 552, 603, 520, 604, 572, 606, + /* 300 */ 573, 612, 605, 607, 621, 690, 608, 610, 689, 694, + /* 310 */ 695, 696, 697, 698, 699, 700, 620, 692, 629, 626, + /* 320 */ 627, 592, 630, 688, 655, 701, 568, 570, 622, 622, + /* 330 */ 622, 622, 703, 574, 575, 622, 622, 622, 710, 716, + /* 340 */ 640, 622, 720, 721, 722, 723, 724, 725, 726, 727, + /* 350 */ 728, 729, 730, 731, 732, 733, 734, 642, 656, 735, + /* 360 */ 736, 680, 683, 744, }; -#define YY_REDUCE_COUNT (201) -#define YY_REDUCE_MIN (-265) -#define YY_REDUCE_MAX (465) +#define YY_REDUCE_COUNT (203) +#define YY_REDUCE_MIN (-253) +#define YY_REDUCE_MAX (471) static const short yy_reduce_ofst[] = { - /* 0 */ -27, -33, -33, -193, -193, -76, -203, -199, -175, -184, - /* 10 */ -130, -134, 93, 24, 67, 119, 126, 135, 142, 148, - /* 20 */ 151, 171, 172, -177, -191, -265, -145, -121, -105, -227, - /* 30 */ -29, 52, 133, 8, -201, -136, 11, 63, 49, 186, - /* 40 */ 96, 189, 192, 70, 153, 199, 206, -116, -11, 17, - /* 50 */ 20, 183, 191, 195, 208, 212, 214, 215, 216, 217, - /* 60 */ 218, 219, 220, 221, 222, 223, 224, 53, 242, 244, - /* 70 */ 232, 253, 255, 257, 258, 259, 260, 295, 300, 301, - /* 80 */ 238, 302, 305, 310, 262, 264, 312, 313, 315, 318, - /* 90 */ 230, 233, 263, 269, 319, 320, 321, 328, 330, 332, - /* 100 */ 333, 334, 335, 336, 339, 342, 346, 349, 351, 352, - /* 110 */ 353, 354, 355, 356, 358, 359, 360, 362, 363, 364, - /* 120 */ 365, 367, 368, 369, 370, 371, 372, 374, 376, 377, - /* 130 */ 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, - /* 140 */ 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, - /* 150 */ 398, 344, 399, 400, 247, 252, 254, 267, 402, 403, - /* 160 */ 246, 266, 265, 270, 273, 293, 406, 268, 409, 411, - /* 170 */ 413, 410, 415, 416, 417, 418, 419, 420, 423, 421, - /* 180 */ 422, 424, 427, 425, 428, 430, 433, 435, 432, 437, - /* 190 */ 438, 439, 448, 450, 440, 451, 453, 454, 457, 465, - /* 200 */ 441, 452, + /* 0 */ -153, -36, -36, -194, -194, -79, -196, -38, 43, -185, + /* 10 */ -181, -165, 56, 85, 87, 94, 140, 146, 156, 159, + /* 20 */ 169, 171, 174, -193, -195, -169, -243, -237, -124, -201, + /* 30 */ -109, -159, -59, -253, -99, -119, 47, 189, 195, 103, + /* 40 */ 58, 9, 127, 175, 61, -19, 193, 111, -61, -15, + /* 50 */ 35, 89, 110, 194, 198, 199, 212, 218, 219, 220, + /* 60 */ 221, 222, 224, 228, 230, 231, 232, 233, -107, 240, + /* 70 */ 242, 121, 254, 256, 261, 262, 263, 264, 304, 305, + /* 80 */ 306, 243, 307, 310, 311, 245, 265, 315, 317, 318, + /* 90 */ 319, 234, 238, 269, 267, 321, 323, 324, 325, 330, + /* 100 */ 336, 338, 339, 340, 341, 342, 343, 346, 349, 350, + /* 110 */ 351, 356, 358, 359, 361, 364, 366, 367, 371, 372, + /* 120 */ 373, 374, 375, 376, 377, 378, 380, 381, 382, 383, + /* 130 */ 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, + /* 140 */ 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, + /* 150 */ 404, 405, 406, 407, 408, 409, 252, 257, 258, 259, + /* 160 */ 411, 412, 271, 283, 266, 272, 274, 277, 312, 293, + /* 170 */ 416, 421, 423, 424, 425, 426, 427, 430, 433, 435, + /* 180 */ 431, 438, 436, 439, 437, 440, 442, 445, 441, 448, + /* 190 */ 443, 444, 446, 447, 449, 450, 452, 460, 462, 463, + /* 200 */ 466, 470, 461, 471, }; static const YYACTIONTYPE yy_default[] = { - /* 0 */ 856, 979, 918, 989, 905, 915, 1126, 1126, 1126, 856, - /* 10 */ 856, 856, 856, 856, 856, 856, 856, 856, 856, 856, - /* 20 */ 856, 856, 856, 1037, 876, 1126, 856, 856, 856, 856, - /* 30 */ 856, 856, 856, 856, 915, 856, 856, 856, 856, 925, - /* 40 */ 915, 925, 925, 856, 1032, 963, 981, 856, 856, 856, - /* 50 */ 856, 856, 856, 856, 856, 856, 856, 856, 856, 856, - /* 60 */ 856, 856, 856, 856, 856, 856, 856, 856, 856, 856, - /* 70 */ 856, 856, 856, 856, 856, 856, 856, 856, 856, 856, - /* 80 */ 1039, 1045, 1042, 856, 856, 856, 1047, 856, 856, 856, - /* 90 */ 1069, 1069, 1030, 856, 856, 856, 856, 856, 856, 856, - /* 100 */ 856, 856, 856, 856, 856, 856, 856, 856, 856, 856, - /* 110 */ 856, 856, 856, 856, 856, 856, 856, 856, 856, 856, - /* 120 */ 856, 856, 856, 856, 856, 856, 903, 856, 901, 856, - /* 130 */ 856, 856, 856, 856, 856, 856, 856, 856, 856, 856, - /* 140 */ 856, 856, 856, 856, 887, 856, 856, 856, 856, 856, - /* 150 */ 856, 878, 878, 878, 856, 856, 856, 856, 878, 878, - /* 160 */ 1076, 1080, 1062, 1074, 1070, 1057, 1055, 1053, 1061, 1052, - /* 170 */ 1084, 878, 878, 878, 923, 923, 919, 915, 915, 878, - /* 180 */ 878, 941, 939, 937, 929, 935, 931, 933, 927, 906, - /* 190 */ 856, 878, 913, 913, 878, 913, 878, 913, 878, 878, - /* 200 */ 963, 981, 856, 1085, 1075, 856, 1125, 1115, 1114, 856, - /* 210 */ 1121, 1113, 1112, 1111, 856, 856, 1107, 1110, 1109, 1108, - /* 220 */ 856, 856, 856, 856, 1117, 1116, 856, 856, 856, 856, - /* 230 */ 856, 856, 856, 856, 856, 856, 1081, 1077, 856, 856, - /* 240 */ 856, 856, 856, 856, 856, 856, 856, 1087, 856, 856, - /* 250 */ 856, 856, 856, 856, 856, 856, 856, 991, 856, 856, - /* 260 */ 856, 856, 856, 856, 856, 856, 856, 856, 856, 856, - /* 270 */ 1029, 856, 856, 856, 856, 856, 1041, 1040, 856, 856, - /* 280 */ 856, 856, 856, 856, 856, 856, 856, 856, 856, 1071, - /* 290 */ 856, 1063, 856, 856, 1003, 856, 856, 856, 856, 856, - /* 300 */ 856, 856, 856, 856, 856, 856, 856, 856, 856, 856, - /* 310 */ 856, 856, 856, 856, 856, 856, 856, 856, 856, 856, - /* 320 */ 856, 856, 856, 856, 856, 856, 1144, 1139, 1140, 1137, - /* 330 */ 856, 856, 856, 1136, 1131, 1132, 856, 856, 856, 1129, - /* 340 */ 856, 856, 856, 856, 856, 856, 856, 856, 856, 856, - /* 350 */ 856, 856, 856, 856, 856, 947, 856, 885, 883, 856, - /* 360 */ 874, 856, + /* 0 */ 864, 988, 927, 998, 914, 924, 1137, 1137, 1137, 864, + /* 10 */ 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, + /* 20 */ 864, 864, 864, 1046, 884, 1137, 864, 864, 864, 864, + /* 30 */ 864, 864, 864, 1061, 864, 924, 864, 864, 864, 864, + /* 40 */ 934, 924, 934, 934, 864, 1041, 972, 990, 864, 864, + /* 50 */ 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, + /* 60 */ 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, + /* 70 */ 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, + /* 80 */ 864, 1048, 1054, 1051, 864, 864, 864, 1056, 864, 864, + /* 90 */ 864, 1080, 1080, 1039, 864, 864, 864, 864, 864, 864, + /* 100 */ 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, + /* 110 */ 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, + /* 120 */ 864, 864, 864, 864, 864, 864, 864, 912, 864, 910, + /* 130 */ 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, + /* 140 */ 864, 864, 864, 864, 864, 864, 895, 864, 864, 864, + /* 150 */ 864, 864, 864, 886, 886, 886, 864, 864, 864, 864, + /* 160 */ 886, 886, 1087, 1091, 1073, 1085, 1081, 1068, 1066, 1064, + /* 170 */ 1072, 1095, 886, 886, 886, 932, 932, 928, 924, 924, + /* 180 */ 886, 886, 950, 948, 946, 938, 944, 940, 942, 936, + /* 190 */ 915, 864, 886, 886, 922, 922, 886, 922, 886, 922, + /* 200 */ 886, 886, 972, 990, 864, 1096, 1086, 864, 1136, 1126, + /* 210 */ 1125, 864, 1132, 1124, 1123, 1122, 864, 864, 1118, 1121, + /* 220 */ 1120, 1119, 864, 864, 864, 864, 1128, 1127, 864, 864, + /* 230 */ 864, 864, 864, 864, 864, 864, 864, 864, 1092, 1088, + /* 240 */ 864, 864, 864, 864, 864, 864, 864, 864, 864, 1098, + /* 250 */ 864, 864, 864, 864, 864, 864, 864, 864, 864, 1000, + /* 260 */ 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, + /* 270 */ 864, 864, 1038, 864, 864, 864, 864, 864, 1050, 1049, + /* 280 */ 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, + /* 290 */ 864, 1082, 864, 1074, 864, 864, 1012, 864, 864, 864, + /* 300 */ 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, + /* 310 */ 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, + /* 320 */ 864, 864, 864, 864, 864, 864, 864, 864, 1155, 1150, + /* 330 */ 1151, 1148, 864, 864, 864, 1147, 1142, 1143, 864, 864, + /* 340 */ 864, 1140, 864, 864, 864, 864, 864, 864, 864, 864, + /* 350 */ 864, 864, 864, 864, 864, 864, 864, 956, 864, 893, + /* 360 */ 891, 864, 882, 864, }; /********** End of lemon-generated parsing tables *****************************/ @@ -582,6 +584,7 @@ static const YYCODETYPE yyFallback[] = { 0, /* ACCOUNT => nothing */ 0, /* USE => nothing */ 0, /* DESCRIBE => nothing */ + 1, /* DESC => ID */ 0, /* ALTER => nothing */ 0, /* PASS => nothing */ 0, /* PRIVILEGE => nothing */ @@ -631,6 +634,7 @@ static const YYCODETYPE yyFallback[] = { 0, /* FROM => nothing */ 0, /* VARIABLE => nothing */ 0, /* INTERVAL => nothing */ + 0, /* EVERY => nothing */ 0, /* SESSION => nothing */ 0, /* STATE_WINDOW => nothing */ 0, /* FILL => nothing */ @@ -638,7 +642,6 @@ static const YYCODETYPE yyFallback[] = { 0, /* ORDER => nothing */ 0, /* BY => nothing */ 1, /* ASC => ID */ - 1, /* DESC => ID */ 0, /* GROUP => nothing */ 0, /* HAVING => nothing */ 0, /* LIMIT => nothing */ @@ -863,205 +866,207 @@ static const char *const yyTokenName[] = { /* 74 */ "ACCOUNT", /* 75 */ "USE", /* 76 */ "DESCRIBE", - /* 77 */ "ALTER", - /* 78 */ "PASS", - /* 79 */ "PRIVILEGE", - /* 80 */ "LOCAL", - /* 81 */ "COMPACT", - /* 82 */ "LP", - /* 83 */ "RP", - /* 84 */ "IF", - /* 85 */ "EXISTS", - /* 86 */ "AS", - /* 87 */ "OUTPUTTYPE", - /* 88 */ "AGGREGATE", - /* 89 */ "BUFSIZE", - /* 90 */ "PPS", - /* 91 */ "TSERIES", - /* 92 */ "DBS", - /* 93 */ "STORAGE", - /* 94 */ "QTIME", - /* 95 */ "CONNS", - /* 96 */ "STATE", - /* 97 */ "COMMA", - /* 98 */ "KEEP", - /* 99 */ "CACHE", - /* 100 */ "REPLICA", - /* 101 */ "QUORUM", - /* 102 */ "DAYS", - /* 103 */ "MINROWS", - /* 104 */ "MAXROWS", - /* 105 */ "BLOCKS", - /* 106 */ "CTIME", - /* 107 */ "WAL", - /* 108 */ "FSYNC", - /* 109 */ "COMP", - /* 110 */ "PRECISION", - /* 111 */ "UPDATE", - /* 112 */ "CACHELAST", - /* 113 */ "PARTITIONS", - /* 114 */ "UNSIGNED", - /* 115 */ "TAGS", - /* 116 */ "USING", - /* 117 */ "NULL", - /* 118 */ "NOW", - /* 119 */ "SELECT", - /* 120 */ "UNION", - /* 121 */ "ALL", - /* 122 */ "DISTINCT", - /* 123 */ "FROM", - /* 124 */ "VARIABLE", - /* 125 */ "INTERVAL", - /* 126 */ "SESSION", - /* 127 */ "STATE_WINDOW", - /* 128 */ "FILL", - /* 129 */ "SLIDING", - /* 130 */ "ORDER", - /* 131 */ "BY", - /* 132 */ "ASC", - /* 133 */ "DESC", - /* 134 */ "GROUP", - /* 135 */ "HAVING", - /* 136 */ "LIMIT", - /* 137 */ "OFFSET", - /* 138 */ "SLIMIT", - /* 139 */ "SOFFSET", - /* 140 */ "WHERE", - /* 141 */ "RESET", - /* 142 */ "QUERY", - /* 143 */ "SYNCDB", - /* 144 */ "ADD", - /* 145 */ "COLUMN", - /* 146 */ "MODIFY", - /* 147 */ "TAG", - /* 148 */ "CHANGE", - /* 149 */ "SET", - /* 150 */ "KILL", - /* 151 */ "CONNECTION", - /* 152 */ "STREAM", - /* 153 */ "COLON", - /* 154 */ "ABORT", - /* 155 */ "AFTER", - /* 156 */ "ATTACH", - /* 157 */ "BEFORE", - /* 158 */ "BEGIN", - /* 159 */ "CASCADE", - /* 160 */ "CLUSTER", - /* 161 */ "CONFLICT", - /* 162 */ "COPY", - /* 163 */ "DEFERRED", - /* 164 */ "DELIMITERS", - /* 165 */ "DETACH", - /* 166 */ "EACH", - /* 167 */ "END", - /* 168 */ "EXPLAIN", - /* 169 */ "FAIL", - /* 170 */ "FOR", - /* 171 */ "IGNORE", - /* 172 */ "IMMEDIATE", - /* 173 */ "INITIALLY", - /* 174 */ "INSTEAD", - /* 175 */ "MATCH", - /* 176 */ "KEY", - /* 177 */ "OF", - /* 178 */ "RAISE", - /* 179 */ "REPLACE", - /* 180 */ "RESTRICT", - /* 181 */ "ROW", - /* 182 */ "STATEMENT", - /* 183 */ "TRIGGER", - /* 184 */ "VIEW", - /* 185 */ "SEMI", - /* 186 */ "NONE", - /* 187 */ "PREV", - /* 188 */ "LINEAR", - /* 189 */ "IMPORT", - /* 190 */ "TBNAME", - /* 191 */ "JOIN", - /* 192 */ "INSERT", - /* 193 */ "INTO", - /* 194 */ "VALUES", - /* 195 */ "error", - /* 196 */ "program", - /* 197 */ "cmd", - /* 198 */ "dbPrefix", - /* 199 */ "ids", - /* 200 */ "cpxName", - /* 201 */ "ifexists", - /* 202 */ "alter_db_optr", - /* 203 */ "alter_topic_optr", - /* 204 */ "acct_optr", - /* 205 */ "exprlist", - /* 206 */ "ifnotexists", - /* 207 */ "db_optr", - /* 208 */ "topic_optr", - /* 209 */ "typename", - /* 210 */ "bufsize", - /* 211 */ "pps", - /* 212 */ "tseries", - /* 213 */ "dbs", - /* 214 */ "streams", - /* 215 */ "storage", - /* 216 */ "qtime", - /* 217 */ "users", - /* 218 */ "conns", - /* 219 */ "state", - /* 220 */ "intitemlist", - /* 221 */ "intitem", - /* 222 */ "keep", - /* 223 */ "cache", - /* 224 */ "replica", - /* 225 */ "quorum", - /* 226 */ "days", - /* 227 */ "minrows", - /* 228 */ "maxrows", - /* 229 */ "blocks", - /* 230 */ "ctime", - /* 231 */ "wal", - /* 232 */ "fsync", - /* 233 */ "comp", - /* 234 */ "prec", - /* 235 */ "update", - /* 236 */ "cachelast", - /* 237 */ "partitions", - /* 238 */ "signed", - /* 239 */ "create_table_args", - /* 240 */ "create_stable_args", - /* 241 */ "create_table_list", - /* 242 */ "create_from_stable", - /* 243 */ "columnlist", - /* 244 */ "tagitemlist", - /* 245 */ "tagNamelist", - /* 246 */ "select", - /* 247 */ "column", - /* 248 */ "tagitem", - /* 249 */ "selcollist", - /* 250 */ "from", - /* 251 */ "where_opt", - /* 252 */ "interval_opt", - /* 253 */ "sliding_opt", - /* 254 */ "session_option", - /* 255 */ "windowstate_option", - /* 256 */ "fill_opt", - /* 257 */ "groupby_opt", - /* 258 */ "having_opt", - /* 259 */ "orderby_opt", - /* 260 */ "slimit_opt", - /* 261 */ "limit_opt", - /* 262 */ "union", - /* 263 */ "sclp", - /* 264 */ "distinct", - /* 265 */ "expr", - /* 266 */ "as", - /* 267 */ "tablelist", - /* 268 */ "sub", - /* 269 */ "tmvar", - /* 270 */ "sortlist", - /* 271 */ "sortitem", - /* 272 */ "item", - /* 273 */ "sortorder", - /* 274 */ "grouplist", - /* 275 */ "expritem", + /* 77 */ "DESC", + /* 78 */ "ALTER", + /* 79 */ "PASS", + /* 80 */ "PRIVILEGE", + /* 81 */ "LOCAL", + /* 82 */ "COMPACT", + /* 83 */ "LP", + /* 84 */ "RP", + /* 85 */ "IF", + /* 86 */ "EXISTS", + /* 87 */ "AS", + /* 88 */ "OUTPUTTYPE", + /* 89 */ "AGGREGATE", + /* 90 */ "BUFSIZE", + /* 91 */ "PPS", + /* 92 */ "TSERIES", + /* 93 */ "DBS", + /* 94 */ "STORAGE", + /* 95 */ "QTIME", + /* 96 */ "CONNS", + /* 97 */ "STATE", + /* 98 */ "COMMA", + /* 99 */ "KEEP", + /* 100 */ "CACHE", + /* 101 */ "REPLICA", + /* 102 */ "QUORUM", + /* 103 */ "DAYS", + /* 104 */ "MINROWS", + /* 105 */ "MAXROWS", + /* 106 */ "BLOCKS", + /* 107 */ "CTIME", + /* 108 */ "WAL", + /* 109 */ "FSYNC", + /* 110 */ "COMP", + /* 111 */ "PRECISION", + /* 112 */ "UPDATE", + /* 113 */ "CACHELAST", + /* 114 */ "PARTITIONS", + /* 115 */ "UNSIGNED", + /* 116 */ "TAGS", + /* 117 */ "USING", + /* 118 */ "NULL", + /* 119 */ "NOW", + /* 120 */ "SELECT", + /* 121 */ "UNION", + /* 122 */ "ALL", + /* 123 */ "DISTINCT", + /* 124 */ "FROM", + /* 125 */ "VARIABLE", + /* 126 */ "INTERVAL", + /* 127 */ "EVERY", + /* 128 */ "SESSION", + /* 129 */ "STATE_WINDOW", + /* 130 */ "FILL", + /* 131 */ "SLIDING", + /* 132 */ "ORDER", + /* 133 */ "BY", + /* 134 */ "ASC", + /* 135 */ "GROUP", + /* 136 */ "HAVING", + /* 137 */ "LIMIT", + /* 138 */ "OFFSET", + /* 139 */ "SLIMIT", + /* 140 */ "SOFFSET", + /* 141 */ "WHERE", + /* 142 */ "RESET", + /* 143 */ "QUERY", + /* 144 */ "SYNCDB", + /* 145 */ "ADD", + /* 146 */ "COLUMN", + /* 147 */ "MODIFY", + /* 148 */ "TAG", + /* 149 */ "CHANGE", + /* 150 */ "SET", + /* 151 */ "KILL", + /* 152 */ "CONNECTION", + /* 153 */ "STREAM", + /* 154 */ "COLON", + /* 155 */ "ABORT", + /* 156 */ "AFTER", + /* 157 */ "ATTACH", + /* 158 */ "BEFORE", + /* 159 */ "BEGIN", + /* 160 */ "CASCADE", + /* 161 */ "CLUSTER", + /* 162 */ "CONFLICT", + /* 163 */ "COPY", + /* 164 */ "DEFERRED", + /* 165 */ "DELIMITERS", + /* 166 */ "DETACH", + /* 167 */ "EACH", + /* 168 */ "END", + /* 169 */ "EXPLAIN", + /* 170 */ "FAIL", + /* 171 */ "FOR", + /* 172 */ "IGNORE", + /* 173 */ "IMMEDIATE", + /* 174 */ "INITIALLY", + /* 175 */ "INSTEAD", + /* 176 */ "MATCH", + /* 177 */ "KEY", + /* 178 */ "OF", + /* 179 */ "RAISE", + /* 180 */ "REPLACE", + /* 181 */ "RESTRICT", + /* 182 */ "ROW", + /* 183 */ "STATEMENT", + /* 184 */ "TRIGGER", + /* 185 */ "VIEW", + /* 186 */ "SEMI", + /* 187 */ "NONE", + /* 188 */ "PREV", + /* 189 */ "LINEAR", + /* 190 */ "IMPORT", + /* 191 */ "TBNAME", + /* 192 */ "JOIN", + /* 193 */ "INSERT", + /* 194 */ "INTO", + /* 195 */ "VALUES", + /* 196 */ "error", + /* 197 */ "program", + /* 198 */ "cmd", + /* 199 */ "dbPrefix", + /* 200 */ "ids", + /* 201 */ "cpxName", + /* 202 */ "ifexists", + /* 203 */ "alter_db_optr", + /* 204 */ "alter_topic_optr", + /* 205 */ "acct_optr", + /* 206 */ "exprlist", + /* 207 */ "ifnotexists", + /* 208 */ "db_optr", + /* 209 */ "topic_optr", + /* 210 */ "typename", + /* 211 */ "bufsize", + /* 212 */ "pps", + /* 213 */ "tseries", + /* 214 */ "dbs", + /* 215 */ "streams", + /* 216 */ "storage", + /* 217 */ "qtime", + /* 218 */ "users", + /* 219 */ "conns", + /* 220 */ "state", + /* 221 */ "intitemlist", + /* 222 */ "intitem", + /* 223 */ "keep", + /* 224 */ "cache", + /* 225 */ "replica", + /* 226 */ "quorum", + /* 227 */ "days", + /* 228 */ "minrows", + /* 229 */ "maxrows", + /* 230 */ "blocks", + /* 231 */ "ctime", + /* 232 */ "wal", + /* 233 */ "fsync", + /* 234 */ "comp", + /* 235 */ "prec", + /* 236 */ "update", + /* 237 */ "cachelast", + /* 238 */ "partitions", + /* 239 */ "signed", + /* 240 */ "create_table_args", + /* 241 */ "create_stable_args", + /* 242 */ "create_table_list", + /* 243 */ "create_from_stable", + /* 244 */ "columnlist", + /* 245 */ "tagitemlist", + /* 246 */ "tagNamelist", + /* 247 */ "select", + /* 248 */ "column", + /* 249 */ "tagitem", + /* 250 */ "selcollist", + /* 251 */ "from", + /* 252 */ "where_opt", + /* 253 */ "interval_option", + /* 254 */ "sliding_opt", + /* 255 */ "session_option", + /* 256 */ "windowstate_option", + /* 257 */ "fill_opt", + /* 258 */ "groupby_opt", + /* 259 */ "having_opt", + /* 260 */ "orderby_opt", + /* 261 */ "slimit_opt", + /* 262 */ "limit_opt", + /* 263 */ "union", + /* 264 */ "sclp", + /* 265 */ "distinct", + /* 266 */ "expr", + /* 267 */ "as", + /* 268 */ "tablelist", + /* 269 */ "sub", + /* 270 */ "tmvar", + /* 271 */ "intervalKey", + /* 272 */ "sortlist", + /* 273 */ "sortitem", + /* 274 */ "item", + /* 275 */ "sortorder", + /* 276 */ "grouplist", + /* 277 */ "expritem", }; #endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */ @@ -1109,255 +1114,258 @@ static const char *const yyRuleName[] = { /* 37 */ "cmd ::= DROP ACCOUNT ids", /* 38 */ "cmd ::= USE ids", /* 39 */ "cmd ::= DESCRIBE ids cpxName", - /* 40 */ "cmd ::= ALTER USER ids PASS ids", - /* 41 */ "cmd ::= ALTER USER ids PRIVILEGE ids", - /* 42 */ "cmd ::= ALTER DNODE ids ids", - /* 43 */ "cmd ::= ALTER DNODE ids ids ids", - /* 44 */ "cmd ::= ALTER LOCAL ids", - /* 45 */ "cmd ::= ALTER LOCAL ids ids", - /* 46 */ "cmd ::= ALTER DATABASE ids alter_db_optr", - /* 47 */ "cmd ::= ALTER TOPIC ids alter_topic_optr", - /* 48 */ "cmd ::= ALTER ACCOUNT ids acct_optr", - /* 49 */ "cmd ::= ALTER ACCOUNT ids PASS ids acct_optr", - /* 50 */ "cmd ::= COMPACT VNODES IN LP exprlist RP", - /* 51 */ "ids ::= ID", - /* 52 */ "ids ::= STRING", - /* 53 */ "ifexists ::= IF EXISTS", - /* 54 */ "ifexists ::=", - /* 55 */ "ifnotexists ::= IF NOT EXISTS", - /* 56 */ "ifnotexists ::=", - /* 57 */ "cmd ::= CREATE DNODE ids", - /* 58 */ "cmd ::= CREATE ACCOUNT ids PASS ids acct_optr", - /* 59 */ "cmd ::= CREATE DATABASE ifnotexists ids db_optr", - /* 60 */ "cmd ::= CREATE TOPIC ifnotexists ids topic_optr", - /* 61 */ "cmd ::= CREATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize", - /* 62 */ "cmd ::= CREATE AGGREGATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize", - /* 63 */ "cmd ::= CREATE USER ids PASS ids", - /* 64 */ "bufsize ::=", - /* 65 */ "bufsize ::= BUFSIZE INTEGER", - /* 66 */ "pps ::=", - /* 67 */ "pps ::= PPS INTEGER", - /* 68 */ "tseries ::=", - /* 69 */ "tseries ::= TSERIES INTEGER", - /* 70 */ "dbs ::=", - /* 71 */ "dbs ::= DBS INTEGER", - /* 72 */ "streams ::=", - /* 73 */ "streams ::= STREAMS INTEGER", - /* 74 */ "storage ::=", - /* 75 */ "storage ::= STORAGE INTEGER", - /* 76 */ "qtime ::=", - /* 77 */ "qtime ::= QTIME INTEGER", - /* 78 */ "users ::=", - /* 79 */ "users ::= USERS INTEGER", - /* 80 */ "conns ::=", - /* 81 */ "conns ::= CONNS INTEGER", - /* 82 */ "state ::=", - /* 83 */ "state ::= STATE ids", - /* 84 */ "acct_optr ::= pps tseries storage streams qtime dbs users conns state", - /* 85 */ "intitemlist ::= intitemlist COMMA intitem", - /* 86 */ "intitemlist ::= intitem", - /* 87 */ "intitem ::= INTEGER", - /* 88 */ "keep ::= KEEP intitemlist", - /* 89 */ "cache ::= CACHE INTEGER", - /* 90 */ "replica ::= REPLICA INTEGER", - /* 91 */ "quorum ::= QUORUM INTEGER", - /* 92 */ "days ::= DAYS INTEGER", - /* 93 */ "minrows ::= MINROWS INTEGER", - /* 94 */ "maxrows ::= MAXROWS INTEGER", - /* 95 */ "blocks ::= BLOCKS INTEGER", - /* 96 */ "ctime ::= CTIME INTEGER", - /* 97 */ "wal ::= WAL INTEGER", - /* 98 */ "fsync ::= FSYNC INTEGER", - /* 99 */ "comp ::= COMP INTEGER", - /* 100 */ "prec ::= PRECISION STRING", - /* 101 */ "update ::= UPDATE INTEGER", - /* 102 */ "cachelast ::= CACHELAST INTEGER", - /* 103 */ "partitions ::= PARTITIONS INTEGER", - /* 104 */ "db_optr ::=", - /* 105 */ "db_optr ::= db_optr cache", - /* 106 */ "db_optr ::= db_optr replica", - /* 107 */ "db_optr ::= db_optr quorum", - /* 108 */ "db_optr ::= db_optr days", - /* 109 */ "db_optr ::= db_optr minrows", - /* 110 */ "db_optr ::= db_optr maxrows", - /* 111 */ "db_optr ::= db_optr blocks", - /* 112 */ "db_optr ::= db_optr ctime", - /* 113 */ "db_optr ::= db_optr wal", - /* 114 */ "db_optr ::= db_optr fsync", - /* 115 */ "db_optr ::= db_optr comp", - /* 116 */ "db_optr ::= db_optr prec", - /* 117 */ "db_optr ::= db_optr keep", - /* 118 */ "db_optr ::= db_optr update", - /* 119 */ "db_optr ::= db_optr cachelast", - /* 120 */ "topic_optr ::= db_optr", - /* 121 */ "topic_optr ::= topic_optr partitions", - /* 122 */ "alter_db_optr ::=", - /* 123 */ "alter_db_optr ::= alter_db_optr replica", - /* 124 */ "alter_db_optr ::= alter_db_optr quorum", - /* 125 */ "alter_db_optr ::= alter_db_optr keep", - /* 126 */ "alter_db_optr ::= alter_db_optr blocks", - /* 127 */ "alter_db_optr ::= alter_db_optr comp", - /* 128 */ "alter_db_optr ::= alter_db_optr update", - /* 129 */ "alter_db_optr ::= alter_db_optr cachelast", - /* 130 */ "alter_topic_optr ::= alter_db_optr", - /* 131 */ "alter_topic_optr ::= alter_topic_optr partitions", - /* 132 */ "typename ::= ids", - /* 133 */ "typename ::= ids LP signed RP", - /* 134 */ "typename ::= ids UNSIGNED", - /* 135 */ "signed ::= INTEGER", - /* 136 */ "signed ::= PLUS INTEGER", - /* 137 */ "signed ::= MINUS INTEGER", - /* 138 */ "cmd ::= CREATE TABLE create_table_args", - /* 139 */ "cmd ::= CREATE TABLE create_stable_args", - /* 140 */ "cmd ::= CREATE STABLE create_stable_args", - /* 141 */ "cmd ::= CREATE TABLE create_table_list", - /* 142 */ "create_table_list ::= create_from_stable", - /* 143 */ "create_table_list ::= create_table_list create_from_stable", - /* 144 */ "create_table_args ::= ifnotexists ids cpxName LP columnlist RP", - /* 145 */ "create_stable_args ::= ifnotexists ids cpxName LP columnlist RP TAGS LP columnlist RP", - /* 146 */ "create_from_stable ::= ifnotexists ids cpxName USING ids cpxName TAGS LP tagitemlist RP", - /* 147 */ "create_from_stable ::= ifnotexists ids cpxName USING ids cpxName LP tagNamelist RP TAGS LP tagitemlist RP", - /* 148 */ "tagNamelist ::= tagNamelist COMMA ids", - /* 149 */ "tagNamelist ::= ids", - /* 150 */ "create_table_args ::= ifnotexists ids cpxName AS select", - /* 151 */ "columnlist ::= columnlist COMMA column", - /* 152 */ "columnlist ::= column", - /* 153 */ "column ::= ids typename", - /* 154 */ "tagitemlist ::= tagitemlist COMMA tagitem", - /* 155 */ "tagitemlist ::= tagitem", - /* 156 */ "tagitem ::= INTEGER", - /* 157 */ "tagitem ::= FLOAT", - /* 158 */ "tagitem ::= STRING", - /* 159 */ "tagitem ::= BOOL", - /* 160 */ "tagitem ::= NULL", - /* 161 */ "tagitem ::= NOW", - /* 162 */ "tagitem ::= MINUS INTEGER", - /* 163 */ "tagitem ::= MINUS FLOAT", - /* 164 */ "tagitem ::= PLUS INTEGER", - /* 165 */ "tagitem ::= PLUS FLOAT", - /* 166 */ "select ::= SELECT selcollist from where_opt interval_opt sliding_opt session_option windowstate_option fill_opt groupby_opt having_opt orderby_opt slimit_opt limit_opt", - /* 167 */ "select ::= LP select RP", - /* 168 */ "union ::= select", - /* 169 */ "union ::= union UNION ALL select", - /* 170 */ "cmd ::= union", - /* 171 */ "select ::= SELECT selcollist", - /* 172 */ "sclp ::= selcollist COMMA", - /* 173 */ "sclp ::=", - /* 174 */ "selcollist ::= sclp distinct expr as", - /* 175 */ "selcollist ::= sclp STAR", - /* 176 */ "as ::= AS ids", - /* 177 */ "as ::= ids", - /* 178 */ "as ::=", - /* 179 */ "distinct ::= DISTINCT", - /* 180 */ "distinct ::=", - /* 181 */ "from ::= FROM tablelist", - /* 182 */ "from ::= FROM sub", - /* 183 */ "sub ::= LP union RP", - /* 184 */ "sub ::= LP union RP ids", - /* 185 */ "sub ::= sub COMMA LP union RP ids", - /* 186 */ "tablelist ::= ids cpxName", - /* 187 */ "tablelist ::= ids cpxName ids", - /* 188 */ "tablelist ::= tablelist COMMA ids cpxName", - /* 189 */ "tablelist ::= tablelist COMMA ids cpxName ids", - /* 190 */ "tmvar ::= VARIABLE", - /* 191 */ "interval_opt ::= INTERVAL LP tmvar RP", - /* 192 */ "interval_opt ::= INTERVAL LP tmvar COMMA tmvar RP", - /* 193 */ "interval_opt ::=", - /* 194 */ "session_option ::=", - /* 195 */ "session_option ::= SESSION LP ids cpxName COMMA tmvar RP", - /* 196 */ "windowstate_option ::=", - /* 197 */ "windowstate_option ::= STATE_WINDOW LP ids RP", - /* 198 */ "fill_opt ::=", - /* 199 */ "fill_opt ::= FILL LP ID COMMA tagitemlist RP", - /* 200 */ "fill_opt ::= FILL LP ID RP", - /* 201 */ "sliding_opt ::= SLIDING LP tmvar RP", - /* 202 */ "sliding_opt ::=", - /* 203 */ "orderby_opt ::=", - /* 204 */ "orderby_opt ::= ORDER BY sortlist", - /* 205 */ "sortlist ::= sortlist COMMA item sortorder", - /* 206 */ "sortlist ::= item sortorder", - /* 207 */ "item ::= ids cpxName", - /* 208 */ "sortorder ::= ASC", - /* 209 */ "sortorder ::= DESC", - /* 210 */ "sortorder ::=", - /* 211 */ "groupby_opt ::=", - /* 212 */ "groupby_opt ::= GROUP BY grouplist", - /* 213 */ "grouplist ::= grouplist COMMA item", - /* 214 */ "grouplist ::= item", - /* 215 */ "having_opt ::=", - /* 216 */ "having_opt ::= HAVING expr", - /* 217 */ "limit_opt ::=", - /* 218 */ "limit_opt ::= LIMIT signed", - /* 219 */ "limit_opt ::= LIMIT signed OFFSET signed", - /* 220 */ "limit_opt ::= LIMIT signed COMMA signed", - /* 221 */ "slimit_opt ::=", - /* 222 */ "slimit_opt ::= SLIMIT signed", - /* 223 */ "slimit_opt ::= SLIMIT signed SOFFSET signed", - /* 224 */ "slimit_opt ::= SLIMIT signed COMMA signed", - /* 225 */ "where_opt ::=", - /* 226 */ "where_opt ::= WHERE expr", - /* 227 */ "expr ::= LP expr RP", - /* 228 */ "expr ::= ID", - /* 229 */ "expr ::= ID DOT ID", - /* 230 */ "expr ::= ID DOT STAR", - /* 231 */ "expr ::= INTEGER", - /* 232 */ "expr ::= MINUS INTEGER", - /* 233 */ "expr ::= PLUS INTEGER", - /* 234 */ "expr ::= FLOAT", - /* 235 */ "expr ::= MINUS FLOAT", - /* 236 */ "expr ::= PLUS FLOAT", - /* 237 */ "expr ::= STRING", - /* 238 */ "expr ::= NOW", - /* 239 */ "expr ::= VARIABLE", - /* 240 */ "expr ::= PLUS VARIABLE", - /* 241 */ "expr ::= MINUS VARIABLE", - /* 242 */ "expr ::= BOOL", - /* 243 */ "expr ::= NULL", - /* 244 */ "expr ::= ID LP exprlist RP", - /* 245 */ "expr ::= ID LP STAR RP", - /* 246 */ "expr ::= expr IS NULL", - /* 247 */ "expr ::= expr IS NOT NULL", - /* 248 */ "expr ::= expr LT expr", - /* 249 */ "expr ::= expr GT expr", - /* 250 */ "expr ::= expr LE expr", - /* 251 */ "expr ::= expr GE expr", - /* 252 */ "expr ::= expr NE expr", - /* 253 */ "expr ::= expr EQ expr", - /* 254 */ "expr ::= expr BETWEEN expr AND expr", - /* 255 */ "expr ::= expr AND expr", - /* 256 */ "expr ::= expr OR expr", - /* 257 */ "expr ::= expr PLUS expr", - /* 258 */ "expr ::= expr MINUS expr", - /* 259 */ "expr ::= expr STAR expr", - /* 260 */ "expr ::= expr SLASH expr", - /* 261 */ "expr ::= expr REM expr", - /* 262 */ "expr ::= expr LIKE expr", - /* 263 */ "expr ::= expr IN LP exprlist RP", - /* 264 */ "exprlist ::= exprlist COMMA expritem", - /* 265 */ "exprlist ::= expritem", - /* 266 */ "expritem ::= expr", - /* 267 */ "expritem ::=", - /* 268 */ "cmd ::= RESET QUERY CACHE", - /* 269 */ "cmd ::= SYNCDB ids REPLICA", - /* 270 */ "cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist", - /* 271 */ "cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids", - /* 272 */ "cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist", - /* 273 */ "cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist", - /* 274 */ "cmd ::= ALTER TABLE ids cpxName DROP TAG ids", - /* 275 */ "cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids", - /* 276 */ "cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem", - /* 277 */ "cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist", - /* 278 */ "cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist", - /* 279 */ "cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids", - /* 280 */ "cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist", - /* 281 */ "cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist", - /* 282 */ "cmd ::= ALTER STABLE ids cpxName DROP TAG ids", - /* 283 */ "cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids", - /* 284 */ "cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem", - /* 285 */ "cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist", - /* 286 */ "cmd ::= KILL CONNECTION INTEGER", - /* 287 */ "cmd ::= KILL STREAM INTEGER COLON INTEGER", - /* 288 */ "cmd ::= KILL QUERY INTEGER COLON INTEGER", + /* 40 */ "cmd ::= DESC ids cpxName", + /* 41 */ "cmd ::= ALTER USER ids PASS ids", + /* 42 */ "cmd ::= ALTER USER ids PRIVILEGE ids", + /* 43 */ "cmd ::= ALTER DNODE ids ids", + /* 44 */ "cmd ::= ALTER DNODE ids ids ids", + /* 45 */ "cmd ::= ALTER LOCAL ids", + /* 46 */ "cmd ::= ALTER LOCAL ids ids", + /* 47 */ "cmd ::= ALTER DATABASE ids alter_db_optr", + /* 48 */ "cmd ::= ALTER TOPIC ids alter_topic_optr", + /* 49 */ "cmd ::= ALTER ACCOUNT ids acct_optr", + /* 50 */ "cmd ::= ALTER ACCOUNT ids PASS ids acct_optr", + /* 51 */ "cmd ::= COMPACT VNODES IN LP exprlist RP", + /* 52 */ "ids ::= ID", + /* 53 */ "ids ::= STRING", + /* 54 */ "ifexists ::= IF EXISTS", + /* 55 */ "ifexists ::=", + /* 56 */ "ifnotexists ::= IF NOT EXISTS", + /* 57 */ "ifnotexists ::=", + /* 58 */ "cmd ::= CREATE DNODE ids", + /* 59 */ "cmd ::= CREATE ACCOUNT ids PASS ids acct_optr", + /* 60 */ "cmd ::= CREATE DATABASE ifnotexists ids db_optr", + /* 61 */ "cmd ::= CREATE TOPIC ifnotexists ids topic_optr", + /* 62 */ "cmd ::= CREATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize", + /* 63 */ "cmd ::= CREATE AGGREGATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize", + /* 64 */ "cmd ::= CREATE USER ids PASS ids", + /* 65 */ "bufsize ::=", + /* 66 */ "bufsize ::= BUFSIZE INTEGER", + /* 67 */ "pps ::=", + /* 68 */ "pps ::= PPS INTEGER", + /* 69 */ "tseries ::=", + /* 70 */ "tseries ::= TSERIES INTEGER", + /* 71 */ "dbs ::=", + /* 72 */ "dbs ::= DBS INTEGER", + /* 73 */ "streams ::=", + /* 74 */ "streams ::= STREAMS INTEGER", + /* 75 */ "storage ::=", + /* 76 */ "storage ::= STORAGE INTEGER", + /* 77 */ "qtime ::=", + /* 78 */ "qtime ::= QTIME INTEGER", + /* 79 */ "users ::=", + /* 80 */ "users ::= USERS INTEGER", + /* 81 */ "conns ::=", + /* 82 */ "conns ::= CONNS INTEGER", + /* 83 */ "state ::=", + /* 84 */ "state ::= STATE ids", + /* 85 */ "acct_optr ::= pps tseries storage streams qtime dbs users conns state", + /* 86 */ "intitemlist ::= intitemlist COMMA intitem", + /* 87 */ "intitemlist ::= intitem", + /* 88 */ "intitem ::= INTEGER", + /* 89 */ "keep ::= KEEP intitemlist", + /* 90 */ "cache ::= CACHE INTEGER", + /* 91 */ "replica ::= REPLICA INTEGER", + /* 92 */ "quorum ::= QUORUM INTEGER", + /* 93 */ "days ::= DAYS INTEGER", + /* 94 */ "minrows ::= MINROWS INTEGER", + /* 95 */ "maxrows ::= MAXROWS INTEGER", + /* 96 */ "blocks ::= BLOCKS INTEGER", + /* 97 */ "ctime ::= CTIME INTEGER", + /* 98 */ "wal ::= WAL INTEGER", + /* 99 */ "fsync ::= FSYNC INTEGER", + /* 100 */ "comp ::= COMP INTEGER", + /* 101 */ "prec ::= PRECISION STRING", + /* 102 */ "update ::= UPDATE INTEGER", + /* 103 */ "cachelast ::= CACHELAST INTEGER", + /* 104 */ "partitions ::= PARTITIONS INTEGER", + /* 105 */ "db_optr ::=", + /* 106 */ "db_optr ::= db_optr cache", + /* 107 */ "db_optr ::= db_optr replica", + /* 108 */ "db_optr ::= db_optr quorum", + /* 109 */ "db_optr ::= db_optr days", + /* 110 */ "db_optr ::= db_optr minrows", + /* 111 */ "db_optr ::= db_optr maxrows", + /* 112 */ "db_optr ::= db_optr blocks", + /* 113 */ "db_optr ::= db_optr ctime", + /* 114 */ "db_optr ::= db_optr wal", + /* 115 */ "db_optr ::= db_optr fsync", + /* 116 */ "db_optr ::= db_optr comp", + /* 117 */ "db_optr ::= db_optr prec", + /* 118 */ "db_optr ::= db_optr keep", + /* 119 */ "db_optr ::= db_optr update", + /* 120 */ "db_optr ::= db_optr cachelast", + /* 121 */ "topic_optr ::= db_optr", + /* 122 */ "topic_optr ::= topic_optr partitions", + /* 123 */ "alter_db_optr ::=", + /* 124 */ "alter_db_optr ::= alter_db_optr replica", + /* 125 */ "alter_db_optr ::= alter_db_optr quorum", + /* 126 */ "alter_db_optr ::= alter_db_optr keep", + /* 127 */ "alter_db_optr ::= alter_db_optr blocks", + /* 128 */ "alter_db_optr ::= alter_db_optr comp", + /* 129 */ "alter_db_optr ::= alter_db_optr update", + /* 130 */ "alter_db_optr ::= alter_db_optr cachelast", + /* 131 */ "alter_topic_optr ::= alter_db_optr", + /* 132 */ "alter_topic_optr ::= alter_topic_optr partitions", + /* 133 */ "typename ::= ids", + /* 134 */ "typename ::= ids LP signed RP", + /* 135 */ "typename ::= ids UNSIGNED", + /* 136 */ "signed ::= INTEGER", + /* 137 */ "signed ::= PLUS INTEGER", + /* 138 */ "signed ::= MINUS INTEGER", + /* 139 */ "cmd ::= CREATE TABLE create_table_args", + /* 140 */ "cmd ::= CREATE TABLE create_stable_args", + /* 141 */ "cmd ::= CREATE STABLE create_stable_args", + /* 142 */ "cmd ::= CREATE TABLE create_table_list", + /* 143 */ "create_table_list ::= create_from_stable", + /* 144 */ "create_table_list ::= create_table_list create_from_stable", + /* 145 */ "create_table_args ::= ifnotexists ids cpxName LP columnlist RP", + /* 146 */ "create_stable_args ::= ifnotexists ids cpxName LP columnlist RP TAGS LP columnlist RP", + /* 147 */ "create_from_stable ::= ifnotexists ids cpxName USING ids cpxName TAGS LP tagitemlist RP", + /* 148 */ "create_from_stable ::= ifnotexists ids cpxName USING ids cpxName LP tagNamelist RP TAGS LP tagitemlist RP", + /* 149 */ "tagNamelist ::= tagNamelist COMMA ids", + /* 150 */ "tagNamelist ::= ids", + /* 151 */ "create_table_args ::= ifnotexists ids cpxName AS select", + /* 152 */ "columnlist ::= columnlist COMMA column", + /* 153 */ "columnlist ::= column", + /* 154 */ "column ::= ids typename", + /* 155 */ "tagitemlist ::= tagitemlist COMMA tagitem", + /* 156 */ "tagitemlist ::= tagitem", + /* 157 */ "tagitem ::= INTEGER", + /* 158 */ "tagitem ::= FLOAT", + /* 159 */ "tagitem ::= STRING", + /* 160 */ "tagitem ::= BOOL", + /* 161 */ "tagitem ::= NULL", + /* 162 */ "tagitem ::= NOW", + /* 163 */ "tagitem ::= MINUS INTEGER", + /* 164 */ "tagitem ::= MINUS FLOAT", + /* 165 */ "tagitem ::= PLUS INTEGER", + /* 166 */ "tagitem ::= PLUS FLOAT", + /* 167 */ "select ::= SELECT selcollist from where_opt interval_option sliding_opt session_option windowstate_option fill_opt groupby_opt having_opt orderby_opt slimit_opt limit_opt", + /* 168 */ "select ::= LP select RP", + /* 169 */ "union ::= select", + /* 170 */ "union ::= union UNION ALL select", + /* 171 */ "cmd ::= union", + /* 172 */ "select ::= SELECT selcollist", + /* 173 */ "sclp ::= selcollist COMMA", + /* 174 */ "sclp ::=", + /* 175 */ "selcollist ::= sclp distinct expr as", + /* 176 */ "selcollist ::= sclp STAR", + /* 177 */ "as ::= AS ids", + /* 178 */ "as ::= ids", + /* 179 */ "as ::=", + /* 180 */ "distinct ::= DISTINCT", + /* 181 */ "distinct ::=", + /* 182 */ "from ::= FROM tablelist", + /* 183 */ "from ::= FROM sub", + /* 184 */ "sub ::= LP union RP", + /* 185 */ "sub ::= LP union RP ids", + /* 186 */ "sub ::= sub COMMA LP union RP ids", + /* 187 */ "tablelist ::= ids cpxName", + /* 188 */ "tablelist ::= ids cpxName ids", + /* 189 */ "tablelist ::= tablelist COMMA ids cpxName", + /* 190 */ "tablelist ::= tablelist COMMA ids cpxName ids", + /* 191 */ "tmvar ::= VARIABLE", + /* 192 */ "interval_option ::= intervalKey LP tmvar RP", + /* 193 */ "interval_option ::= intervalKey LP tmvar COMMA tmvar RP", + /* 194 */ "interval_option ::=", + /* 195 */ "intervalKey ::= INTERVAL", + /* 196 */ "intervalKey ::= EVERY", + /* 197 */ "session_option ::=", + /* 198 */ "session_option ::= SESSION LP ids cpxName COMMA tmvar RP", + /* 199 */ "windowstate_option ::=", + /* 200 */ "windowstate_option ::= STATE_WINDOW LP ids RP", + /* 201 */ "fill_opt ::=", + /* 202 */ "fill_opt ::= FILL LP ID COMMA tagitemlist RP", + /* 203 */ "fill_opt ::= FILL LP ID RP", + /* 204 */ "sliding_opt ::= SLIDING LP tmvar RP", + /* 205 */ "sliding_opt ::=", + /* 206 */ "orderby_opt ::=", + /* 207 */ "orderby_opt ::= ORDER BY sortlist", + /* 208 */ "sortlist ::= sortlist COMMA item sortorder", + /* 209 */ "sortlist ::= item sortorder", + /* 210 */ "item ::= ids cpxName", + /* 211 */ "sortorder ::= ASC", + /* 212 */ "sortorder ::= DESC", + /* 213 */ "sortorder ::=", + /* 214 */ "groupby_opt ::=", + /* 215 */ "groupby_opt ::= GROUP BY grouplist", + /* 216 */ "grouplist ::= grouplist COMMA item", + /* 217 */ "grouplist ::= item", + /* 218 */ "having_opt ::=", + /* 219 */ "having_opt ::= HAVING expr", + /* 220 */ "limit_opt ::=", + /* 221 */ "limit_opt ::= LIMIT signed", + /* 222 */ "limit_opt ::= LIMIT signed OFFSET signed", + /* 223 */ "limit_opt ::= LIMIT signed COMMA signed", + /* 224 */ "slimit_opt ::=", + /* 225 */ "slimit_opt ::= SLIMIT signed", + /* 226 */ "slimit_opt ::= SLIMIT signed SOFFSET signed", + /* 227 */ "slimit_opt ::= SLIMIT signed COMMA signed", + /* 228 */ "where_opt ::=", + /* 229 */ "where_opt ::= WHERE expr", + /* 230 */ "expr ::= LP expr RP", + /* 231 */ "expr ::= ID", + /* 232 */ "expr ::= ID DOT ID", + /* 233 */ "expr ::= ID DOT STAR", + /* 234 */ "expr ::= INTEGER", + /* 235 */ "expr ::= MINUS INTEGER", + /* 236 */ "expr ::= PLUS INTEGER", + /* 237 */ "expr ::= FLOAT", + /* 238 */ "expr ::= MINUS FLOAT", + /* 239 */ "expr ::= PLUS FLOAT", + /* 240 */ "expr ::= STRING", + /* 241 */ "expr ::= NOW", + /* 242 */ "expr ::= VARIABLE", + /* 243 */ "expr ::= PLUS VARIABLE", + /* 244 */ "expr ::= MINUS VARIABLE", + /* 245 */ "expr ::= BOOL", + /* 246 */ "expr ::= NULL", + /* 247 */ "expr ::= ID LP exprlist RP", + /* 248 */ "expr ::= ID LP STAR RP", + /* 249 */ "expr ::= expr IS NULL", + /* 250 */ "expr ::= expr IS NOT NULL", + /* 251 */ "expr ::= expr LT expr", + /* 252 */ "expr ::= expr GT expr", + /* 253 */ "expr ::= expr LE expr", + /* 254 */ "expr ::= expr GE expr", + /* 255 */ "expr ::= expr NE expr", + /* 256 */ "expr ::= expr EQ expr", + /* 257 */ "expr ::= expr BETWEEN expr AND expr", + /* 258 */ "expr ::= expr AND expr", + /* 259 */ "expr ::= expr OR expr", + /* 260 */ "expr ::= expr PLUS expr", + /* 261 */ "expr ::= expr MINUS expr", + /* 262 */ "expr ::= expr STAR expr", + /* 263 */ "expr ::= expr SLASH expr", + /* 264 */ "expr ::= expr REM expr", + /* 265 */ "expr ::= expr LIKE expr", + /* 266 */ "expr ::= expr IN LP exprlist RP", + /* 267 */ "exprlist ::= exprlist COMMA expritem", + /* 268 */ "exprlist ::= expritem", + /* 269 */ "expritem ::= expr", + /* 270 */ "expritem ::=", + /* 271 */ "cmd ::= RESET QUERY CACHE", + /* 272 */ "cmd ::= SYNCDB ids REPLICA", + /* 273 */ "cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist", + /* 274 */ "cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids", + /* 275 */ "cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist", + /* 276 */ "cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist", + /* 277 */ "cmd ::= ALTER TABLE ids cpxName DROP TAG ids", + /* 278 */ "cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids", + /* 279 */ "cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem", + /* 280 */ "cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist", + /* 281 */ "cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist", + /* 282 */ "cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids", + /* 283 */ "cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist", + /* 284 */ "cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist", + /* 285 */ "cmd ::= ALTER STABLE ids cpxName DROP TAG ids", + /* 286 */ "cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids", + /* 287 */ "cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem", + /* 288 */ "cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist", + /* 289 */ "cmd ::= KILL CONNECTION INTEGER", + /* 290 */ "cmd ::= KILL STREAM INTEGER COLON INTEGER", + /* 291 */ "cmd ::= KILL QUERY INTEGER COLON INTEGER", }; #endif /* NDEBUG */ @@ -1478,60 +1486,60 @@ static void yy_destructor( ** inside the C code. */ /********* Begin destructor definitions ***************************************/ - case 205: /* exprlist */ - case 249: /* selcollist */ - case 263: /* sclp */ + case 206: /* exprlist */ + case 250: /* selcollist */ + case 264: /* sclp */ { -tSqlExprListDestroy((yypminor->yy525)); +tSqlExprListDestroy((yypminor->yy421)); } break; - case 220: /* intitemlist */ - case 222: /* keep */ - case 243: /* columnlist */ - case 244: /* tagitemlist */ - case 245: /* tagNamelist */ - case 256: /* fill_opt */ - case 257: /* groupby_opt */ - case 259: /* orderby_opt */ - case 270: /* sortlist */ - case 274: /* grouplist */ -{ -taosArrayDestroy((yypminor->yy525)); + case 221: /* intitemlist */ + case 223: /* keep */ + case 244: /* columnlist */ + case 245: /* tagitemlist */ + case 246: /* tagNamelist */ + case 257: /* fill_opt */ + case 258: /* groupby_opt */ + case 260: /* orderby_opt */ + case 272: /* sortlist */ + case 276: /* grouplist */ +{ +taosArrayDestroy((yypminor->yy421)); } break; - case 241: /* create_table_list */ + case 242: /* create_table_list */ { -destroyCreateTableSql((yypminor->yy158)); +destroyCreateTableSql((yypminor->yy438)); } break; - case 246: /* select */ + case 247: /* select */ { -destroySqlNode((yypminor->yy464)); +destroySqlNode((yypminor->yy56)); } break; - case 250: /* from */ - case 267: /* tablelist */ - case 268: /* sub */ + case 251: /* from */ + case 268: /* tablelist */ + case 269: /* sub */ { -destroyRelationInfo((yypminor->yy412)); +destroyRelationInfo((yypminor->yy8)); } break; - case 251: /* where_opt */ - case 258: /* having_opt */ - case 265: /* expr */ - case 275: /* expritem */ + case 252: /* where_opt */ + case 259: /* having_opt */ + case 266: /* expr */ + case 277: /* expritem */ { -tSqlExprDestroy((yypminor->yy370)); +tSqlExprDestroy((yypminor->yy439)); } break; - case 262: /* union */ + case 263: /* union */ { -destroyAllSqlNode((yypminor->yy525)); +destroyAllSqlNode((yypminor->yy421)); } break; - case 271: /* sortitem */ + case 273: /* sortitem */ { -tVariantDestroy(&(yypminor->yy506)); +tVariantDestroy(&(yypminor->yy430)); } break; /********* End destructor definitions *****************************************/ @@ -1825,295 +1833,298 @@ static const struct { YYCODETYPE lhs; /* Symbol on the left-hand side of the rule */ signed char nrhs; /* Negative of the number of RHS symbols in the rule */ } yyRuleInfo[] = { - { 196, -1 }, /* (0) program ::= cmd */ - { 197, -2 }, /* (1) cmd ::= SHOW DATABASES */ - { 197, -2 }, /* (2) cmd ::= SHOW TOPICS */ - { 197, -2 }, /* (3) cmd ::= SHOW FUNCTIONS */ - { 197, -2 }, /* (4) cmd ::= SHOW MNODES */ - { 197, -2 }, /* (5) cmd ::= SHOW DNODES */ - { 197, -2 }, /* (6) cmd ::= SHOW ACCOUNTS */ - { 197, -2 }, /* (7) cmd ::= SHOW USERS */ - { 197, -2 }, /* (8) cmd ::= SHOW MODULES */ - { 197, -2 }, /* (9) cmd ::= SHOW QUERIES */ - { 197, -2 }, /* (10) cmd ::= SHOW CONNECTIONS */ - { 197, -2 }, /* (11) cmd ::= SHOW STREAMS */ - { 197, -2 }, /* (12) cmd ::= SHOW VARIABLES */ - { 197, -2 }, /* (13) cmd ::= SHOW SCORES */ - { 197, -2 }, /* (14) cmd ::= SHOW GRANTS */ - { 197, -2 }, /* (15) cmd ::= SHOW VNODES */ - { 197, -3 }, /* (16) cmd ::= SHOW VNODES IPTOKEN */ - { 198, 0 }, /* (17) dbPrefix ::= */ - { 198, -2 }, /* (18) dbPrefix ::= ids DOT */ - { 200, 0 }, /* (19) cpxName ::= */ - { 200, -2 }, /* (20) cpxName ::= DOT ids */ - { 197, -5 }, /* (21) cmd ::= SHOW CREATE TABLE ids cpxName */ - { 197, -5 }, /* (22) cmd ::= SHOW CREATE STABLE ids cpxName */ - { 197, -4 }, /* (23) cmd ::= SHOW CREATE DATABASE ids */ - { 197, -3 }, /* (24) cmd ::= SHOW dbPrefix TABLES */ - { 197, -5 }, /* (25) cmd ::= SHOW dbPrefix TABLES LIKE ids */ - { 197, -3 }, /* (26) cmd ::= SHOW dbPrefix STABLES */ - { 197, -5 }, /* (27) cmd ::= SHOW dbPrefix STABLES LIKE ids */ - { 197, -3 }, /* (28) cmd ::= SHOW dbPrefix VGROUPS */ - { 197, -4 }, /* (29) cmd ::= SHOW dbPrefix VGROUPS ids */ - { 197, -5 }, /* (30) cmd ::= DROP TABLE ifexists ids cpxName */ - { 197, -5 }, /* (31) cmd ::= DROP STABLE ifexists ids cpxName */ - { 197, -4 }, /* (32) cmd ::= DROP DATABASE ifexists ids */ - { 197, -4 }, /* (33) cmd ::= DROP TOPIC ifexists ids */ - { 197, -3 }, /* (34) cmd ::= DROP FUNCTION ids */ - { 197, -3 }, /* (35) cmd ::= DROP DNODE ids */ - { 197, -3 }, /* (36) cmd ::= DROP USER ids */ - { 197, -3 }, /* (37) cmd ::= DROP ACCOUNT ids */ - { 197, -2 }, /* (38) cmd ::= USE ids */ - { 197, -3 }, /* (39) cmd ::= DESCRIBE ids cpxName */ - { 197, -5 }, /* (40) cmd ::= ALTER USER ids PASS ids */ - { 197, -5 }, /* (41) cmd ::= ALTER USER ids PRIVILEGE ids */ - { 197, -4 }, /* (42) cmd ::= ALTER DNODE ids ids */ - { 197, -5 }, /* (43) cmd ::= ALTER DNODE ids ids ids */ - { 197, -3 }, /* (44) cmd ::= ALTER LOCAL ids */ - { 197, -4 }, /* (45) cmd ::= ALTER LOCAL ids ids */ - { 197, -4 }, /* (46) cmd ::= ALTER DATABASE ids alter_db_optr */ - { 197, -4 }, /* (47) cmd ::= ALTER TOPIC ids alter_topic_optr */ - { 197, -4 }, /* (48) cmd ::= ALTER ACCOUNT ids acct_optr */ - { 197, -6 }, /* (49) cmd ::= ALTER ACCOUNT ids PASS ids acct_optr */ - { 197, -6 }, /* (50) cmd ::= COMPACT VNODES IN LP exprlist RP */ - { 199, -1 }, /* (51) ids ::= ID */ - { 199, -1 }, /* (52) ids ::= STRING */ - { 201, -2 }, /* (53) ifexists ::= IF EXISTS */ - { 201, 0 }, /* (54) ifexists ::= */ - { 206, -3 }, /* (55) ifnotexists ::= IF NOT EXISTS */ - { 206, 0 }, /* (56) ifnotexists ::= */ - { 197, -3 }, /* (57) cmd ::= CREATE DNODE ids */ - { 197, -6 }, /* (58) cmd ::= CREATE ACCOUNT ids PASS ids acct_optr */ - { 197, -5 }, /* (59) cmd ::= CREATE DATABASE ifnotexists ids db_optr */ - { 197, -5 }, /* (60) cmd ::= CREATE TOPIC ifnotexists ids topic_optr */ - { 197, -8 }, /* (61) cmd ::= CREATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */ - { 197, -9 }, /* (62) cmd ::= CREATE AGGREGATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */ - { 197, -5 }, /* (63) cmd ::= CREATE USER ids PASS ids */ - { 210, 0 }, /* (64) bufsize ::= */ - { 210, -2 }, /* (65) bufsize ::= BUFSIZE INTEGER */ - { 211, 0 }, /* (66) pps ::= */ - { 211, -2 }, /* (67) pps ::= PPS INTEGER */ - { 212, 0 }, /* (68) tseries ::= */ - { 212, -2 }, /* (69) tseries ::= TSERIES INTEGER */ - { 213, 0 }, /* (70) dbs ::= */ - { 213, -2 }, /* (71) dbs ::= DBS INTEGER */ - { 214, 0 }, /* (72) streams ::= */ - { 214, -2 }, /* (73) streams ::= STREAMS INTEGER */ - { 215, 0 }, /* (74) storage ::= */ - { 215, -2 }, /* (75) storage ::= STORAGE INTEGER */ - { 216, 0 }, /* (76) qtime ::= */ - { 216, -2 }, /* (77) qtime ::= QTIME INTEGER */ - { 217, 0 }, /* (78) users ::= */ - { 217, -2 }, /* (79) users ::= USERS INTEGER */ - { 218, 0 }, /* (80) conns ::= */ - { 218, -2 }, /* (81) conns ::= CONNS INTEGER */ - { 219, 0 }, /* (82) state ::= */ - { 219, -2 }, /* (83) state ::= STATE ids */ - { 204, -9 }, /* (84) acct_optr ::= pps tseries storage streams qtime dbs users conns state */ - { 220, -3 }, /* (85) intitemlist ::= intitemlist COMMA intitem */ - { 220, -1 }, /* (86) intitemlist ::= intitem */ - { 221, -1 }, /* (87) intitem ::= INTEGER */ - { 222, -2 }, /* (88) keep ::= KEEP intitemlist */ - { 223, -2 }, /* (89) cache ::= CACHE INTEGER */ - { 224, -2 }, /* (90) replica ::= REPLICA INTEGER */ - { 225, -2 }, /* (91) quorum ::= QUORUM INTEGER */ - { 226, -2 }, /* (92) days ::= DAYS INTEGER */ - { 227, -2 }, /* (93) minrows ::= MINROWS INTEGER */ - { 228, -2 }, /* (94) maxrows ::= MAXROWS INTEGER */ - { 229, -2 }, /* (95) blocks ::= BLOCKS INTEGER */ - { 230, -2 }, /* (96) ctime ::= CTIME INTEGER */ - { 231, -2 }, /* (97) wal ::= WAL INTEGER */ - { 232, -2 }, /* (98) fsync ::= FSYNC INTEGER */ - { 233, -2 }, /* (99) comp ::= COMP INTEGER */ - { 234, -2 }, /* (100) prec ::= PRECISION STRING */ - { 235, -2 }, /* (101) update ::= UPDATE INTEGER */ - { 236, -2 }, /* (102) cachelast ::= CACHELAST INTEGER */ - { 237, -2 }, /* (103) partitions ::= PARTITIONS INTEGER */ - { 207, 0 }, /* (104) db_optr ::= */ - { 207, -2 }, /* (105) db_optr ::= db_optr cache */ - { 207, -2 }, /* (106) db_optr ::= db_optr replica */ - { 207, -2 }, /* (107) db_optr ::= db_optr quorum */ - { 207, -2 }, /* (108) db_optr ::= db_optr days */ - { 207, -2 }, /* (109) db_optr ::= db_optr minrows */ - { 207, -2 }, /* (110) db_optr ::= db_optr maxrows */ - { 207, -2 }, /* (111) db_optr ::= db_optr blocks */ - { 207, -2 }, /* (112) db_optr ::= db_optr ctime */ - { 207, -2 }, /* (113) db_optr ::= db_optr wal */ - { 207, -2 }, /* (114) db_optr ::= db_optr fsync */ - { 207, -2 }, /* (115) db_optr ::= db_optr comp */ - { 207, -2 }, /* (116) db_optr ::= db_optr prec */ - { 207, -2 }, /* (117) db_optr ::= db_optr keep */ - { 207, -2 }, /* (118) db_optr ::= db_optr update */ - { 207, -2 }, /* (119) db_optr ::= db_optr cachelast */ - { 208, -1 }, /* (120) topic_optr ::= db_optr */ - { 208, -2 }, /* (121) topic_optr ::= topic_optr partitions */ - { 202, 0 }, /* (122) alter_db_optr ::= */ - { 202, -2 }, /* (123) alter_db_optr ::= alter_db_optr replica */ - { 202, -2 }, /* (124) alter_db_optr ::= alter_db_optr quorum */ - { 202, -2 }, /* (125) alter_db_optr ::= alter_db_optr keep */ - { 202, -2 }, /* (126) alter_db_optr ::= alter_db_optr blocks */ - { 202, -2 }, /* (127) alter_db_optr ::= alter_db_optr comp */ - { 202, -2 }, /* (128) alter_db_optr ::= alter_db_optr update */ - { 202, -2 }, /* (129) alter_db_optr ::= alter_db_optr cachelast */ - { 203, -1 }, /* (130) alter_topic_optr ::= alter_db_optr */ - { 203, -2 }, /* (131) alter_topic_optr ::= alter_topic_optr partitions */ - { 209, -1 }, /* (132) typename ::= ids */ - { 209, -4 }, /* (133) typename ::= ids LP signed RP */ - { 209, -2 }, /* (134) typename ::= ids UNSIGNED */ - { 238, -1 }, /* (135) signed ::= INTEGER */ - { 238, -2 }, /* (136) signed ::= PLUS INTEGER */ - { 238, -2 }, /* (137) signed ::= MINUS INTEGER */ - { 197, -3 }, /* (138) cmd ::= CREATE TABLE create_table_args */ - { 197, -3 }, /* (139) cmd ::= CREATE TABLE create_stable_args */ - { 197, -3 }, /* (140) cmd ::= CREATE STABLE create_stable_args */ - { 197, -3 }, /* (141) cmd ::= CREATE TABLE create_table_list */ - { 241, -1 }, /* (142) create_table_list ::= create_from_stable */ - { 241, -2 }, /* (143) create_table_list ::= create_table_list create_from_stable */ - { 239, -6 }, /* (144) create_table_args ::= ifnotexists ids cpxName LP columnlist RP */ - { 240, -10 }, /* (145) create_stable_args ::= ifnotexists ids cpxName LP columnlist RP TAGS LP columnlist RP */ - { 242, -10 }, /* (146) create_from_stable ::= ifnotexists ids cpxName USING ids cpxName TAGS LP tagitemlist RP */ - { 242, -13 }, /* (147) create_from_stable ::= ifnotexists ids cpxName USING ids cpxName LP tagNamelist RP TAGS LP tagitemlist RP */ - { 245, -3 }, /* (148) tagNamelist ::= tagNamelist COMMA ids */ - { 245, -1 }, /* (149) tagNamelist ::= ids */ - { 239, -5 }, /* (150) create_table_args ::= ifnotexists ids cpxName AS select */ - { 243, -3 }, /* (151) columnlist ::= columnlist COMMA column */ - { 243, -1 }, /* (152) columnlist ::= column */ - { 247, -2 }, /* (153) column ::= ids typename */ - { 244, -3 }, /* (154) tagitemlist ::= tagitemlist COMMA tagitem */ - { 244, -1 }, /* (155) tagitemlist ::= tagitem */ - { 248, -1 }, /* (156) tagitem ::= INTEGER */ - { 248, -1 }, /* (157) tagitem ::= FLOAT */ - { 248, -1 }, /* (158) tagitem ::= STRING */ - { 248, -1 }, /* (159) tagitem ::= BOOL */ - { 248, -1 }, /* (160) tagitem ::= NULL */ - { 248, -1 }, /* (161) tagitem ::= NOW */ - { 248, -2 }, /* (162) tagitem ::= MINUS INTEGER */ - { 248, -2 }, /* (163) tagitem ::= MINUS FLOAT */ - { 248, -2 }, /* (164) tagitem ::= PLUS INTEGER */ - { 248, -2 }, /* (165) tagitem ::= PLUS FLOAT */ - { 246, -14 }, /* (166) select ::= SELECT selcollist from where_opt interval_opt sliding_opt session_option windowstate_option fill_opt groupby_opt having_opt orderby_opt slimit_opt limit_opt */ - { 246, -3 }, /* (167) select ::= LP select RP */ - { 262, -1 }, /* (168) union ::= select */ - { 262, -4 }, /* (169) union ::= union UNION ALL select */ - { 197, -1 }, /* (170) cmd ::= union */ - { 246, -2 }, /* (171) select ::= SELECT selcollist */ - { 263, -2 }, /* (172) sclp ::= selcollist COMMA */ - { 263, 0 }, /* (173) sclp ::= */ - { 249, -4 }, /* (174) selcollist ::= sclp distinct expr as */ - { 249, -2 }, /* (175) selcollist ::= sclp STAR */ - { 266, -2 }, /* (176) as ::= AS ids */ - { 266, -1 }, /* (177) as ::= ids */ - { 266, 0 }, /* (178) as ::= */ - { 264, -1 }, /* (179) distinct ::= DISTINCT */ - { 264, 0 }, /* (180) distinct ::= */ - { 250, -2 }, /* (181) from ::= FROM tablelist */ - { 250, -2 }, /* (182) from ::= FROM sub */ - { 268, -3 }, /* (183) sub ::= LP union RP */ - { 268, -4 }, /* (184) sub ::= LP union RP ids */ - { 268, -6 }, /* (185) sub ::= sub COMMA LP union RP ids */ - { 267, -2 }, /* (186) tablelist ::= ids cpxName */ - { 267, -3 }, /* (187) tablelist ::= ids cpxName ids */ - { 267, -4 }, /* (188) tablelist ::= tablelist COMMA ids cpxName */ - { 267, -5 }, /* (189) tablelist ::= tablelist COMMA ids cpxName ids */ - { 269, -1 }, /* (190) tmvar ::= VARIABLE */ - { 252, -4 }, /* (191) interval_opt ::= INTERVAL LP tmvar RP */ - { 252, -6 }, /* (192) interval_opt ::= INTERVAL LP tmvar COMMA tmvar RP */ - { 252, 0 }, /* (193) interval_opt ::= */ - { 254, 0 }, /* (194) session_option ::= */ - { 254, -7 }, /* (195) session_option ::= SESSION LP ids cpxName COMMA tmvar RP */ - { 255, 0 }, /* (196) windowstate_option ::= */ - { 255, -4 }, /* (197) windowstate_option ::= STATE_WINDOW LP ids RP */ - { 256, 0 }, /* (198) fill_opt ::= */ - { 256, -6 }, /* (199) fill_opt ::= FILL LP ID COMMA tagitemlist RP */ - { 256, -4 }, /* (200) fill_opt ::= FILL LP ID RP */ - { 253, -4 }, /* (201) sliding_opt ::= SLIDING LP tmvar RP */ - { 253, 0 }, /* (202) sliding_opt ::= */ - { 259, 0 }, /* (203) orderby_opt ::= */ - { 259, -3 }, /* (204) orderby_opt ::= ORDER BY sortlist */ - { 270, -4 }, /* (205) sortlist ::= sortlist COMMA item sortorder */ - { 270, -2 }, /* (206) sortlist ::= item sortorder */ - { 272, -2 }, /* (207) item ::= ids cpxName */ - { 273, -1 }, /* (208) sortorder ::= ASC */ - { 273, -1 }, /* (209) sortorder ::= DESC */ - { 273, 0 }, /* (210) sortorder ::= */ - { 257, 0 }, /* (211) groupby_opt ::= */ - { 257, -3 }, /* (212) groupby_opt ::= GROUP BY grouplist */ - { 274, -3 }, /* (213) grouplist ::= grouplist COMMA item */ - { 274, -1 }, /* (214) grouplist ::= item */ - { 258, 0 }, /* (215) having_opt ::= */ - { 258, -2 }, /* (216) having_opt ::= HAVING expr */ - { 261, 0 }, /* (217) limit_opt ::= */ - { 261, -2 }, /* (218) limit_opt ::= LIMIT signed */ - { 261, -4 }, /* (219) limit_opt ::= LIMIT signed OFFSET signed */ - { 261, -4 }, /* (220) limit_opt ::= LIMIT signed COMMA signed */ - { 260, 0 }, /* (221) slimit_opt ::= */ - { 260, -2 }, /* (222) slimit_opt ::= SLIMIT signed */ - { 260, -4 }, /* (223) slimit_opt ::= SLIMIT signed SOFFSET signed */ - { 260, -4 }, /* (224) slimit_opt ::= SLIMIT signed COMMA signed */ - { 251, 0 }, /* (225) where_opt ::= */ - { 251, -2 }, /* (226) where_opt ::= WHERE expr */ - { 265, -3 }, /* (227) expr ::= LP expr RP */ - { 265, -1 }, /* (228) expr ::= ID */ - { 265, -3 }, /* (229) expr ::= ID DOT ID */ - { 265, -3 }, /* (230) expr ::= ID DOT STAR */ - { 265, -1 }, /* (231) expr ::= INTEGER */ - { 265, -2 }, /* (232) expr ::= MINUS INTEGER */ - { 265, -2 }, /* (233) expr ::= PLUS INTEGER */ - { 265, -1 }, /* (234) expr ::= FLOAT */ - { 265, -2 }, /* (235) expr ::= MINUS FLOAT */ - { 265, -2 }, /* (236) expr ::= PLUS FLOAT */ - { 265, -1 }, /* (237) expr ::= STRING */ - { 265, -1 }, /* (238) expr ::= NOW */ - { 265, -1 }, /* (239) expr ::= VARIABLE */ - { 265, -2 }, /* (240) expr ::= PLUS VARIABLE */ - { 265, -2 }, /* (241) expr ::= MINUS VARIABLE */ - { 265, -1 }, /* (242) expr ::= BOOL */ - { 265, -1 }, /* (243) expr ::= NULL */ - { 265, -4 }, /* (244) expr ::= ID LP exprlist RP */ - { 265, -4 }, /* (245) expr ::= ID LP STAR RP */ - { 265, -3 }, /* (246) expr ::= expr IS NULL */ - { 265, -4 }, /* (247) expr ::= expr IS NOT NULL */ - { 265, -3 }, /* (248) expr ::= expr LT expr */ - { 265, -3 }, /* (249) expr ::= expr GT expr */ - { 265, -3 }, /* (250) expr ::= expr LE expr */ - { 265, -3 }, /* (251) expr ::= expr GE expr */ - { 265, -3 }, /* (252) expr ::= expr NE expr */ - { 265, -3 }, /* (253) expr ::= expr EQ expr */ - { 265, -5 }, /* (254) expr ::= expr BETWEEN expr AND expr */ - { 265, -3 }, /* (255) expr ::= expr AND expr */ - { 265, -3 }, /* (256) expr ::= expr OR expr */ - { 265, -3 }, /* (257) expr ::= expr PLUS expr */ - { 265, -3 }, /* (258) expr ::= expr MINUS expr */ - { 265, -3 }, /* (259) expr ::= expr STAR expr */ - { 265, -3 }, /* (260) expr ::= expr SLASH expr */ - { 265, -3 }, /* (261) expr ::= expr REM expr */ - { 265, -3 }, /* (262) expr ::= expr LIKE expr */ - { 265, -5 }, /* (263) expr ::= expr IN LP exprlist RP */ - { 205, -3 }, /* (264) exprlist ::= exprlist COMMA expritem */ - { 205, -1 }, /* (265) exprlist ::= expritem */ - { 275, -1 }, /* (266) expritem ::= expr */ - { 275, 0 }, /* (267) expritem ::= */ - { 197, -3 }, /* (268) cmd ::= RESET QUERY CACHE */ - { 197, -3 }, /* (269) cmd ::= SYNCDB ids REPLICA */ - { 197, -7 }, /* (270) cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */ - { 197, -7 }, /* (271) cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */ - { 197, -7 }, /* (272) cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */ - { 197, -7 }, /* (273) cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */ - { 197, -7 }, /* (274) cmd ::= ALTER TABLE ids cpxName DROP TAG ids */ - { 197, -8 }, /* (275) cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */ - { 197, -9 }, /* (276) cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */ - { 197, -7 }, /* (277) cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */ - { 197, -7 }, /* (278) cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */ - { 197, -7 }, /* (279) cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */ - { 197, -7 }, /* (280) cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */ - { 197, -7 }, /* (281) cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */ - { 197, -7 }, /* (282) cmd ::= ALTER STABLE ids cpxName DROP TAG ids */ - { 197, -8 }, /* (283) cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */ - { 197, -9 }, /* (284) cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem */ - { 197, -7 }, /* (285) cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */ - { 197, -3 }, /* (286) cmd ::= KILL CONNECTION INTEGER */ - { 197, -5 }, /* (287) cmd ::= KILL STREAM INTEGER COLON INTEGER */ - { 197, -5 }, /* (288) cmd ::= KILL QUERY INTEGER COLON INTEGER */ + { 197, -1 }, /* (0) program ::= cmd */ + { 198, -2 }, /* (1) cmd ::= SHOW DATABASES */ + { 198, -2 }, /* (2) cmd ::= SHOW TOPICS */ + { 198, -2 }, /* (3) cmd ::= SHOW FUNCTIONS */ + { 198, -2 }, /* (4) cmd ::= SHOW MNODES */ + { 198, -2 }, /* (5) cmd ::= SHOW DNODES */ + { 198, -2 }, /* (6) cmd ::= SHOW ACCOUNTS */ + { 198, -2 }, /* (7) cmd ::= SHOW USERS */ + { 198, -2 }, /* (8) cmd ::= SHOW MODULES */ + { 198, -2 }, /* (9) cmd ::= SHOW QUERIES */ + { 198, -2 }, /* (10) cmd ::= SHOW CONNECTIONS */ + { 198, -2 }, /* (11) cmd ::= SHOW STREAMS */ + { 198, -2 }, /* (12) cmd ::= SHOW VARIABLES */ + { 198, -2 }, /* (13) cmd ::= SHOW SCORES */ + { 198, -2 }, /* (14) cmd ::= SHOW GRANTS */ + { 198, -2 }, /* (15) cmd ::= SHOW VNODES */ + { 198, -3 }, /* (16) cmd ::= SHOW VNODES IPTOKEN */ + { 199, 0 }, /* (17) dbPrefix ::= */ + { 199, -2 }, /* (18) dbPrefix ::= ids DOT */ + { 201, 0 }, /* (19) cpxName ::= */ + { 201, -2 }, /* (20) cpxName ::= DOT ids */ + { 198, -5 }, /* (21) cmd ::= SHOW CREATE TABLE ids cpxName */ + { 198, -5 }, /* (22) cmd ::= SHOW CREATE STABLE ids cpxName */ + { 198, -4 }, /* (23) cmd ::= SHOW CREATE DATABASE ids */ + { 198, -3 }, /* (24) cmd ::= SHOW dbPrefix TABLES */ + { 198, -5 }, /* (25) cmd ::= SHOW dbPrefix TABLES LIKE ids */ + { 198, -3 }, /* (26) cmd ::= SHOW dbPrefix STABLES */ + { 198, -5 }, /* (27) cmd ::= SHOW dbPrefix STABLES LIKE ids */ + { 198, -3 }, /* (28) cmd ::= SHOW dbPrefix VGROUPS */ + { 198, -4 }, /* (29) cmd ::= SHOW dbPrefix VGROUPS ids */ + { 198, -5 }, /* (30) cmd ::= DROP TABLE ifexists ids cpxName */ + { 198, -5 }, /* (31) cmd ::= DROP STABLE ifexists ids cpxName */ + { 198, -4 }, /* (32) cmd ::= DROP DATABASE ifexists ids */ + { 198, -4 }, /* (33) cmd ::= DROP TOPIC ifexists ids */ + { 198, -3 }, /* (34) cmd ::= DROP FUNCTION ids */ + { 198, -3 }, /* (35) cmd ::= DROP DNODE ids */ + { 198, -3 }, /* (36) cmd ::= DROP USER ids */ + { 198, -3 }, /* (37) cmd ::= DROP ACCOUNT ids */ + { 198, -2 }, /* (38) cmd ::= USE ids */ + { 198, -3 }, /* (39) cmd ::= DESCRIBE ids cpxName */ + { 198, -3 }, /* (40) cmd ::= DESC ids cpxName */ + { 198, -5 }, /* (41) cmd ::= ALTER USER ids PASS ids */ + { 198, -5 }, /* (42) cmd ::= ALTER USER ids PRIVILEGE ids */ + { 198, -4 }, /* (43) cmd ::= ALTER DNODE ids ids */ + { 198, -5 }, /* (44) cmd ::= ALTER DNODE ids ids ids */ + { 198, -3 }, /* (45) cmd ::= ALTER LOCAL ids */ + { 198, -4 }, /* (46) cmd ::= ALTER LOCAL ids ids */ + { 198, -4 }, /* (47) cmd ::= ALTER DATABASE ids alter_db_optr */ + { 198, -4 }, /* (48) cmd ::= ALTER TOPIC ids alter_topic_optr */ + { 198, -4 }, /* (49) cmd ::= ALTER ACCOUNT ids acct_optr */ + { 198, -6 }, /* (50) cmd ::= ALTER ACCOUNT ids PASS ids acct_optr */ + { 198, -6 }, /* (51) cmd ::= COMPACT VNODES IN LP exprlist RP */ + { 200, -1 }, /* (52) ids ::= ID */ + { 200, -1 }, /* (53) ids ::= STRING */ + { 202, -2 }, /* (54) ifexists ::= IF EXISTS */ + { 202, 0 }, /* (55) ifexists ::= */ + { 207, -3 }, /* (56) ifnotexists ::= IF NOT EXISTS */ + { 207, 0 }, /* (57) ifnotexists ::= */ + { 198, -3 }, /* (58) cmd ::= CREATE DNODE ids */ + { 198, -6 }, /* (59) cmd ::= CREATE ACCOUNT ids PASS ids acct_optr */ + { 198, -5 }, /* (60) cmd ::= CREATE DATABASE ifnotexists ids db_optr */ + { 198, -5 }, /* (61) cmd ::= CREATE TOPIC ifnotexists ids topic_optr */ + { 198, -8 }, /* (62) cmd ::= CREATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */ + { 198, -9 }, /* (63) cmd ::= CREATE AGGREGATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */ + { 198, -5 }, /* (64) cmd ::= CREATE USER ids PASS ids */ + { 211, 0 }, /* (65) bufsize ::= */ + { 211, -2 }, /* (66) bufsize ::= BUFSIZE INTEGER */ + { 212, 0 }, /* (67) pps ::= */ + { 212, -2 }, /* (68) pps ::= PPS INTEGER */ + { 213, 0 }, /* (69) tseries ::= */ + { 213, -2 }, /* (70) tseries ::= TSERIES INTEGER */ + { 214, 0 }, /* (71) dbs ::= */ + { 214, -2 }, /* (72) dbs ::= DBS INTEGER */ + { 215, 0 }, /* (73) streams ::= */ + { 215, -2 }, /* (74) streams ::= STREAMS INTEGER */ + { 216, 0 }, /* (75) storage ::= */ + { 216, -2 }, /* (76) storage ::= STORAGE INTEGER */ + { 217, 0 }, /* (77) qtime ::= */ + { 217, -2 }, /* (78) qtime ::= QTIME INTEGER */ + { 218, 0 }, /* (79) users ::= */ + { 218, -2 }, /* (80) users ::= USERS INTEGER */ + { 219, 0 }, /* (81) conns ::= */ + { 219, -2 }, /* (82) conns ::= CONNS INTEGER */ + { 220, 0 }, /* (83) state ::= */ + { 220, -2 }, /* (84) state ::= STATE ids */ + { 205, -9 }, /* (85) acct_optr ::= pps tseries storage streams qtime dbs users conns state */ + { 221, -3 }, /* (86) intitemlist ::= intitemlist COMMA intitem */ + { 221, -1 }, /* (87) intitemlist ::= intitem */ + { 222, -1 }, /* (88) intitem ::= INTEGER */ + { 223, -2 }, /* (89) keep ::= KEEP intitemlist */ + { 224, -2 }, /* (90) cache ::= CACHE INTEGER */ + { 225, -2 }, /* (91) replica ::= REPLICA INTEGER */ + { 226, -2 }, /* (92) quorum ::= QUORUM INTEGER */ + { 227, -2 }, /* (93) days ::= DAYS INTEGER */ + { 228, -2 }, /* (94) minrows ::= MINROWS INTEGER */ + { 229, -2 }, /* (95) maxrows ::= MAXROWS INTEGER */ + { 230, -2 }, /* (96) blocks ::= BLOCKS INTEGER */ + { 231, -2 }, /* (97) ctime ::= CTIME INTEGER */ + { 232, -2 }, /* (98) wal ::= WAL INTEGER */ + { 233, -2 }, /* (99) fsync ::= FSYNC INTEGER */ + { 234, -2 }, /* (100) comp ::= COMP INTEGER */ + { 235, -2 }, /* (101) prec ::= PRECISION STRING */ + { 236, -2 }, /* (102) update ::= UPDATE INTEGER */ + { 237, -2 }, /* (103) cachelast ::= CACHELAST INTEGER */ + { 238, -2 }, /* (104) partitions ::= PARTITIONS INTEGER */ + { 208, 0 }, /* (105) db_optr ::= */ + { 208, -2 }, /* (106) db_optr ::= db_optr cache */ + { 208, -2 }, /* (107) db_optr ::= db_optr replica */ + { 208, -2 }, /* (108) db_optr ::= db_optr quorum */ + { 208, -2 }, /* (109) db_optr ::= db_optr days */ + { 208, -2 }, /* (110) db_optr ::= db_optr minrows */ + { 208, -2 }, /* (111) db_optr ::= db_optr maxrows */ + { 208, -2 }, /* (112) db_optr ::= db_optr blocks */ + { 208, -2 }, /* (113) db_optr ::= db_optr ctime */ + { 208, -2 }, /* (114) db_optr ::= db_optr wal */ + { 208, -2 }, /* (115) db_optr ::= db_optr fsync */ + { 208, -2 }, /* (116) db_optr ::= db_optr comp */ + { 208, -2 }, /* (117) db_optr ::= db_optr prec */ + { 208, -2 }, /* (118) db_optr ::= db_optr keep */ + { 208, -2 }, /* (119) db_optr ::= db_optr update */ + { 208, -2 }, /* (120) db_optr ::= db_optr cachelast */ + { 209, -1 }, /* (121) topic_optr ::= db_optr */ + { 209, -2 }, /* (122) topic_optr ::= topic_optr partitions */ + { 203, 0 }, /* (123) alter_db_optr ::= */ + { 203, -2 }, /* (124) alter_db_optr ::= alter_db_optr replica */ + { 203, -2 }, /* (125) alter_db_optr ::= alter_db_optr quorum */ + { 203, -2 }, /* (126) alter_db_optr ::= alter_db_optr keep */ + { 203, -2 }, /* (127) alter_db_optr ::= alter_db_optr blocks */ + { 203, -2 }, /* (128) alter_db_optr ::= alter_db_optr comp */ + { 203, -2 }, /* (129) alter_db_optr ::= alter_db_optr update */ + { 203, -2 }, /* (130) alter_db_optr ::= alter_db_optr cachelast */ + { 204, -1 }, /* (131) alter_topic_optr ::= alter_db_optr */ + { 204, -2 }, /* (132) alter_topic_optr ::= alter_topic_optr partitions */ + { 210, -1 }, /* (133) typename ::= ids */ + { 210, -4 }, /* (134) typename ::= ids LP signed RP */ + { 210, -2 }, /* (135) typename ::= ids UNSIGNED */ + { 239, -1 }, /* (136) signed ::= INTEGER */ + { 239, -2 }, /* (137) signed ::= PLUS INTEGER */ + { 239, -2 }, /* (138) signed ::= MINUS INTEGER */ + { 198, -3 }, /* (139) cmd ::= CREATE TABLE create_table_args */ + { 198, -3 }, /* (140) cmd ::= CREATE TABLE create_stable_args */ + { 198, -3 }, /* (141) cmd ::= CREATE STABLE create_stable_args */ + { 198, -3 }, /* (142) cmd ::= CREATE TABLE create_table_list */ + { 242, -1 }, /* (143) create_table_list ::= create_from_stable */ + { 242, -2 }, /* (144) create_table_list ::= create_table_list create_from_stable */ + { 240, -6 }, /* (145) create_table_args ::= ifnotexists ids cpxName LP columnlist RP */ + { 241, -10 }, /* (146) create_stable_args ::= ifnotexists ids cpxName LP columnlist RP TAGS LP columnlist RP */ + { 243, -10 }, /* (147) create_from_stable ::= ifnotexists ids cpxName USING ids cpxName TAGS LP tagitemlist RP */ + { 243, -13 }, /* (148) create_from_stable ::= ifnotexists ids cpxName USING ids cpxName LP tagNamelist RP TAGS LP tagitemlist RP */ + { 246, -3 }, /* (149) tagNamelist ::= tagNamelist COMMA ids */ + { 246, -1 }, /* (150) tagNamelist ::= ids */ + { 240, -5 }, /* (151) create_table_args ::= ifnotexists ids cpxName AS select */ + { 244, -3 }, /* (152) columnlist ::= columnlist COMMA column */ + { 244, -1 }, /* (153) columnlist ::= column */ + { 248, -2 }, /* (154) column ::= ids typename */ + { 245, -3 }, /* (155) tagitemlist ::= tagitemlist COMMA tagitem */ + { 245, -1 }, /* (156) tagitemlist ::= tagitem */ + { 249, -1 }, /* (157) tagitem ::= INTEGER */ + { 249, -1 }, /* (158) tagitem ::= FLOAT */ + { 249, -1 }, /* (159) tagitem ::= STRING */ + { 249, -1 }, /* (160) tagitem ::= BOOL */ + { 249, -1 }, /* (161) tagitem ::= NULL */ + { 249, -1 }, /* (162) tagitem ::= NOW */ + { 249, -2 }, /* (163) tagitem ::= MINUS INTEGER */ + { 249, -2 }, /* (164) tagitem ::= MINUS FLOAT */ + { 249, -2 }, /* (165) tagitem ::= PLUS INTEGER */ + { 249, -2 }, /* (166) tagitem ::= PLUS FLOAT */ + { 247, -14 }, /* (167) select ::= SELECT selcollist from where_opt interval_option sliding_opt session_option windowstate_option fill_opt groupby_opt having_opt orderby_opt slimit_opt limit_opt */ + { 247, -3 }, /* (168) select ::= LP select RP */ + { 263, -1 }, /* (169) union ::= select */ + { 263, -4 }, /* (170) union ::= union UNION ALL select */ + { 198, -1 }, /* (171) cmd ::= union */ + { 247, -2 }, /* (172) select ::= SELECT selcollist */ + { 264, -2 }, /* (173) sclp ::= selcollist COMMA */ + { 264, 0 }, /* (174) sclp ::= */ + { 250, -4 }, /* (175) selcollist ::= sclp distinct expr as */ + { 250, -2 }, /* (176) selcollist ::= sclp STAR */ + { 267, -2 }, /* (177) as ::= AS ids */ + { 267, -1 }, /* (178) as ::= ids */ + { 267, 0 }, /* (179) as ::= */ + { 265, -1 }, /* (180) distinct ::= DISTINCT */ + { 265, 0 }, /* (181) distinct ::= */ + { 251, -2 }, /* (182) from ::= FROM tablelist */ + { 251, -2 }, /* (183) from ::= FROM sub */ + { 269, -3 }, /* (184) sub ::= LP union RP */ + { 269, -4 }, /* (185) sub ::= LP union RP ids */ + { 269, -6 }, /* (186) sub ::= sub COMMA LP union RP ids */ + { 268, -2 }, /* (187) tablelist ::= ids cpxName */ + { 268, -3 }, /* (188) tablelist ::= ids cpxName ids */ + { 268, -4 }, /* (189) tablelist ::= tablelist COMMA ids cpxName */ + { 268, -5 }, /* (190) tablelist ::= tablelist COMMA ids cpxName ids */ + { 270, -1 }, /* (191) tmvar ::= VARIABLE */ + { 253, -4 }, /* (192) interval_option ::= intervalKey LP tmvar RP */ + { 253, -6 }, /* (193) interval_option ::= intervalKey LP tmvar COMMA tmvar RP */ + { 253, 0 }, /* (194) interval_option ::= */ + { 271, -1 }, /* (195) intervalKey ::= INTERVAL */ + { 271, -1 }, /* (196) intervalKey ::= EVERY */ + { 255, 0 }, /* (197) session_option ::= */ + { 255, -7 }, /* (198) session_option ::= SESSION LP ids cpxName COMMA tmvar RP */ + { 256, 0 }, /* (199) windowstate_option ::= */ + { 256, -4 }, /* (200) windowstate_option ::= STATE_WINDOW LP ids RP */ + { 257, 0 }, /* (201) fill_opt ::= */ + { 257, -6 }, /* (202) fill_opt ::= FILL LP ID COMMA tagitemlist RP */ + { 257, -4 }, /* (203) fill_opt ::= FILL LP ID RP */ + { 254, -4 }, /* (204) sliding_opt ::= SLIDING LP tmvar RP */ + { 254, 0 }, /* (205) sliding_opt ::= */ + { 260, 0 }, /* (206) orderby_opt ::= */ + { 260, -3 }, /* (207) orderby_opt ::= ORDER BY sortlist */ + { 272, -4 }, /* (208) sortlist ::= sortlist COMMA item sortorder */ + { 272, -2 }, /* (209) sortlist ::= item sortorder */ + { 274, -2 }, /* (210) item ::= ids cpxName */ + { 275, -1 }, /* (211) sortorder ::= ASC */ + { 275, -1 }, /* (212) sortorder ::= DESC */ + { 275, 0 }, /* (213) sortorder ::= */ + { 258, 0 }, /* (214) groupby_opt ::= */ + { 258, -3 }, /* (215) groupby_opt ::= GROUP BY grouplist */ + { 276, -3 }, /* (216) grouplist ::= grouplist COMMA item */ + { 276, -1 }, /* (217) grouplist ::= item */ + { 259, 0 }, /* (218) having_opt ::= */ + { 259, -2 }, /* (219) having_opt ::= HAVING expr */ + { 262, 0 }, /* (220) limit_opt ::= */ + { 262, -2 }, /* (221) limit_opt ::= LIMIT signed */ + { 262, -4 }, /* (222) limit_opt ::= LIMIT signed OFFSET signed */ + { 262, -4 }, /* (223) limit_opt ::= LIMIT signed COMMA signed */ + { 261, 0 }, /* (224) slimit_opt ::= */ + { 261, -2 }, /* (225) slimit_opt ::= SLIMIT signed */ + { 261, -4 }, /* (226) slimit_opt ::= SLIMIT signed SOFFSET signed */ + { 261, -4 }, /* (227) slimit_opt ::= SLIMIT signed COMMA signed */ + { 252, 0 }, /* (228) where_opt ::= */ + { 252, -2 }, /* (229) where_opt ::= WHERE expr */ + { 266, -3 }, /* (230) expr ::= LP expr RP */ + { 266, -1 }, /* (231) expr ::= ID */ + { 266, -3 }, /* (232) expr ::= ID DOT ID */ + { 266, -3 }, /* (233) expr ::= ID DOT STAR */ + { 266, -1 }, /* (234) expr ::= INTEGER */ + { 266, -2 }, /* (235) expr ::= MINUS INTEGER */ + { 266, -2 }, /* (236) expr ::= PLUS INTEGER */ + { 266, -1 }, /* (237) expr ::= FLOAT */ + { 266, -2 }, /* (238) expr ::= MINUS FLOAT */ + { 266, -2 }, /* (239) expr ::= PLUS FLOAT */ + { 266, -1 }, /* (240) expr ::= STRING */ + { 266, -1 }, /* (241) expr ::= NOW */ + { 266, -1 }, /* (242) expr ::= VARIABLE */ + { 266, -2 }, /* (243) expr ::= PLUS VARIABLE */ + { 266, -2 }, /* (244) expr ::= MINUS VARIABLE */ + { 266, -1 }, /* (245) expr ::= BOOL */ + { 266, -1 }, /* (246) expr ::= NULL */ + { 266, -4 }, /* (247) expr ::= ID LP exprlist RP */ + { 266, -4 }, /* (248) expr ::= ID LP STAR RP */ + { 266, -3 }, /* (249) expr ::= expr IS NULL */ + { 266, -4 }, /* (250) expr ::= expr IS NOT NULL */ + { 266, -3 }, /* (251) expr ::= expr LT expr */ + { 266, -3 }, /* (252) expr ::= expr GT expr */ + { 266, -3 }, /* (253) expr ::= expr LE expr */ + { 266, -3 }, /* (254) expr ::= expr GE expr */ + { 266, -3 }, /* (255) expr ::= expr NE expr */ + { 266, -3 }, /* (256) expr ::= expr EQ expr */ + { 266, -5 }, /* (257) expr ::= expr BETWEEN expr AND expr */ + { 266, -3 }, /* (258) expr ::= expr AND expr */ + { 266, -3 }, /* (259) expr ::= expr OR expr */ + { 266, -3 }, /* (260) expr ::= expr PLUS expr */ + { 266, -3 }, /* (261) expr ::= expr MINUS expr */ + { 266, -3 }, /* (262) expr ::= expr STAR expr */ + { 266, -3 }, /* (263) expr ::= expr SLASH expr */ + { 266, -3 }, /* (264) expr ::= expr REM expr */ + { 266, -3 }, /* (265) expr ::= expr LIKE expr */ + { 266, -5 }, /* (266) expr ::= expr IN LP exprlist RP */ + { 206, -3 }, /* (267) exprlist ::= exprlist COMMA expritem */ + { 206, -1 }, /* (268) exprlist ::= expritem */ + { 277, -1 }, /* (269) expritem ::= expr */ + { 277, 0 }, /* (270) expritem ::= */ + { 198, -3 }, /* (271) cmd ::= RESET QUERY CACHE */ + { 198, -3 }, /* (272) cmd ::= SYNCDB ids REPLICA */ + { 198, -7 }, /* (273) cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */ + { 198, -7 }, /* (274) cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */ + { 198, -7 }, /* (275) cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */ + { 198, -7 }, /* (276) cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */ + { 198, -7 }, /* (277) cmd ::= ALTER TABLE ids cpxName DROP TAG ids */ + { 198, -8 }, /* (278) cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */ + { 198, -9 }, /* (279) cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */ + { 198, -7 }, /* (280) cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */ + { 198, -7 }, /* (281) cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */ + { 198, -7 }, /* (282) cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */ + { 198, -7 }, /* (283) cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */ + { 198, -7 }, /* (284) cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */ + { 198, -7 }, /* (285) cmd ::= ALTER STABLE ids cpxName DROP TAG ids */ + { 198, -8 }, /* (286) cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */ + { 198, -9 }, /* (287) cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem */ + { 198, -7 }, /* (288) cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */ + { 198, -3 }, /* (289) cmd ::= KILL CONNECTION INTEGER */ + { 198, -5 }, /* (290) cmd ::= KILL STREAM INTEGER COLON INTEGER */ + { 198, -5 }, /* (291) cmd ::= KILL QUERY INTEGER COLON INTEGER */ }; static void yy_accept(yyParser*); /* Forward Declaration */ @@ -2194,9 +2205,9 @@ static void yy_reduce( /********** Begin reduce actions **********************************************/ YYMINORTYPE yylhsminor; case 0: /* program ::= cmd */ - case 138: /* cmd ::= CREATE TABLE create_table_args */ yytestcase(yyruleno==138); - case 139: /* cmd ::= CREATE TABLE create_stable_args */ yytestcase(yyruleno==139); - case 140: /* cmd ::= CREATE STABLE create_stable_args */ yytestcase(yyruleno==140); + case 139: /* cmd ::= CREATE TABLE create_table_args */ yytestcase(yyruleno==139); + case 140: /* cmd ::= CREATE TABLE create_stable_args */ yytestcase(yyruleno==140); + case 141: /* cmd ::= CREATE STABLE create_stable_args */ yytestcase(yyruleno==141); {} break; case 1: /* cmd ::= SHOW DATABASES */ @@ -2347,784 +2358,793 @@ static void yy_reduce( { setDCLSqlElems(pInfo, TSDB_SQL_USE_DB, 1, &yymsp[0].minor.yy0);} break; case 39: /* cmd ::= DESCRIBE ids cpxName */ + case 40: /* cmd ::= DESC ids cpxName */ yytestcase(yyruleno==40); { yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; setDCLSqlElems(pInfo, TSDB_SQL_DESCRIBE_TABLE, 1, &yymsp[-1].minor.yy0); } break; - case 40: /* cmd ::= ALTER USER ids PASS ids */ + case 41: /* cmd ::= ALTER USER ids PASS ids */ { setAlterUserSql(pInfo, TSDB_ALTER_USER_PASSWD, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, NULL); } break; - case 41: /* cmd ::= ALTER USER ids PRIVILEGE ids */ + case 42: /* cmd ::= ALTER USER ids PRIVILEGE ids */ { setAlterUserSql(pInfo, TSDB_ALTER_USER_PRIVILEGES, &yymsp[-2].minor.yy0, NULL, &yymsp[0].minor.yy0);} break; - case 42: /* cmd ::= ALTER DNODE ids ids */ + case 43: /* cmd ::= ALTER DNODE ids ids */ { setDCLSqlElems(pInfo, TSDB_SQL_CFG_DNODE, 2, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } break; - case 43: /* cmd ::= ALTER DNODE ids ids ids */ + case 44: /* cmd ::= ALTER DNODE ids ids ids */ { setDCLSqlElems(pInfo, TSDB_SQL_CFG_DNODE, 3, &yymsp[-2].minor.yy0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } break; - case 44: /* cmd ::= ALTER LOCAL ids */ + case 45: /* cmd ::= ALTER LOCAL ids */ { setDCLSqlElems(pInfo, TSDB_SQL_CFG_LOCAL, 1, &yymsp[0].minor.yy0); } break; - case 45: /* cmd ::= ALTER LOCAL ids ids */ + case 46: /* cmd ::= ALTER LOCAL ids ids */ { setDCLSqlElems(pInfo, TSDB_SQL_CFG_LOCAL, 2, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } break; - case 46: /* cmd ::= ALTER DATABASE ids alter_db_optr */ - case 47: /* cmd ::= ALTER TOPIC ids alter_topic_optr */ yytestcase(yyruleno==47); -{ SStrToken t = {0}; setCreateDbInfo(pInfo, TSDB_SQL_ALTER_DB, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy214, &t);} + case 47: /* cmd ::= ALTER DATABASE ids alter_db_optr */ + case 48: /* cmd ::= ALTER TOPIC ids alter_topic_optr */ yytestcase(yyruleno==48); +{ SStrToken t = {0}; setCreateDbInfo(pInfo, TSDB_SQL_ALTER_DB, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy90, &t);} break; - case 48: /* cmd ::= ALTER ACCOUNT ids acct_optr */ -{ setCreateAcctSql(pInfo, TSDB_SQL_ALTER_ACCT, &yymsp[-1].minor.yy0, NULL, &yymsp[0].minor.yy547);} + case 49: /* cmd ::= ALTER ACCOUNT ids acct_optr */ +{ setCreateAcctSql(pInfo, TSDB_SQL_ALTER_ACCT, &yymsp[-1].minor.yy0, NULL, &yymsp[0].minor.yy171);} break; - case 49: /* cmd ::= ALTER ACCOUNT ids PASS ids acct_optr */ -{ setCreateAcctSql(pInfo, TSDB_SQL_ALTER_ACCT, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy547);} + case 50: /* cmd ::= ALTER ACCOUNT ids PASS ids acct_optr */ +{ setCreateAcctSql(pInfo, TSDB_SQL_ALTER_ACCT, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy171);} break; - case 50: /* cmd ::= COMPACT VNODES IN LP exprlist RP */ -{ setCompactVnodeSql(pInfo, TSDB_SQL_COMPACT_VNODE, yymsp[-1].minor.yy525);} + case 51: /* cmd ::= COMPACT VNODES IN LP exprlist RP */ +{ setCompactVnodeSql(pInfo, TSDB_SQL_COMPACT_VNODE, yymsp[-1].minor.yy421);} break; - case 51: /* ids ::= ID */ - case 52: /* ids ::= STRING */ yytestcase(yyruleno==52); + case 52: /* ids ::= ID */ + case 53: /* ids ::= STRING */ yytestcase(yyruleno==53); {yylhsminor.yy0 = yymsp[0].minor.yy0; } yymsp[0].minor.yy0 = yylhsminor.yy0; break; - case 53: /* ifexists ::= IF EXISTS */ + case 54: /* ifexists ::= IF EXISTS */ { yymsp[-1].minor.yy0.n = 1;} break; - case 54: /* ifexists ::= */ - case 56: /* ifnotexists ::= */ yytestcase(yyruleno==56); - case 180: /* distinct ::= */ yytestcase(yyruleno==180); + case 55: /* ifexists ::= */ + case 57: /* ifnotexists ::= */ yytestcase(yyruleno==57); + case 181: /* distinct ::= */ yytestcase(yyruleno==181); { yymsp[1].minor.yy0.n = 0;} break; - case 55: /* ifnotexists ::= IF NOT EXISTS */ + case 56: /* ifnotexists ::= IF NOT EXISTS */ { yymsp[-2].minor.yy0.n = 1;} break; - case 57: /* cmd ::= CREATE DNODE ids */ + case 58: /* cmd ::= CREATE DNODE ids */ { setDCLSqlElems(pInfo, TSDB_SQL_CREATE_DNODE, 1, &yymsp[0].minor.yy0);} break; - case 58: /* cmd ::= CREATE ACCOUNT ids PASS ids acct_optr */ -{ setCreateAcctSql(pInfo, TSDB_SQL_CREATE_ACCT, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy547);} + case 59: /* cmd ::= CREATE ACCOUNT ids PASS ids acct_optr */ +{ setCreateAcctSql(pInfo, TSDB_SQL_CREATE_ACCT, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy171);} break; - case 59: /* cmd ::= CREATE DATABASE ifnotexists ids db_optr */ - case 60: /* cmd ::= CREATE TOPIC ifnotexists ids topic_optr */ yytestcase(yyruleno==60); -{ setCreateDbInfo(pInfo, TSDB_SQL_CREATE_DB, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy214, &yymsp[-2].minor.yy0);} + case 60: /* cmd ::= CREATE DATABASE ifnotexists ids db_optr */ + case 61: /* cmd ::= CREATE TOPIC ifnotexists ids topic_optr */ yytestcase(yyruleno==61); +{ setCreateDbInfo(pInfo, TSDB_SQL_CREATE_DB, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy90, &yymsp[-2].minor.yy0);} break; - case 61: /* cmd ::= CREATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */ -{ setCreateFuncInfo(pInfo, TSDB_SQL_CREATE_FUNCTION, &yymsp[-5].minor.yy0, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy31, &yymsp[0].minor.yy0, 1);} + case 62: /* cmd ::= CREATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */ +{ setCreateFuncInfo(pInfo, TSDB_SQL_CREATE_FUNCTION, &yymsp[-5].minor.yy0, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy183, &yymsp[0].minor.yy0, 1);} break; - case 62: /* cmd ::= CREATE AGGREGATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */ -{ setCreateFuncInfo(pInfo, TSDB_SQL_CREATE_FUNCTION, &yymsp[-5].minor.yy0, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy31, &yymsp[0].minor.yy0, 2);} + case 63: /* cmd ::= CREATE AGGREGATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */ +{ setCreateFuncInfo(pInfo, TSDB_SQL_CREATE_FUNCTION, &yymsp[-5].minor.yy0, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy183, &yymsp[0].minor.yy0, 2);} break; - case 63: /* cmd ::= CREATE USER ids PASS ids */ + case 64: /* cmd ::= CREATE USER ids PASS ids */ { setCreateUserSql(pInfo, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0);} break; - case 64: /* bufsize ::= */ - case 66: /* pps ::= */ yytestcase(yyruleno==66); - case 68: /* tseries ::= */ yytestcase(yyruleno==68); - case 70: /* dbs ::= */ yytestcase(yyruleno==70); - case 72: /* streams ::= */ yytestcase(yyruleno==72); - case 74: /* storage ::= */ yytestcase(yyruleno==74); - case 76: /* qtime ::= */ yytestcase(yyruleno==76); - case 78: /* users ::= */ yytestcase(yyruleno==78); - case 80: /* conns ::= */ yytestcase(yyruleno==80); - case 82: /* state ::= */ yytestcase(yyruleno==82); + case 65: /* bufsize ::= */ + case 67: /* pps ::= */ yytestcase(yyruleno==67); + case 69: /* tseries ::= */ yytestcase(yyruleno==69); + case 71: /* dbs ::= */ yytestcase(yyruleno==71); + case 73: /* streams ::= */ yytestcase(yyruleno==73); + case 75: /* storage ::= */ yytestcase(yyruleno==75); + case 77: /* qtime ::= */ yytestcase(yyruleno==77); + case 79: /* users ::= */ yytestcase(yyruleno==79); + case 81: /* conns ::= */ yytestcase(yyruleno==81); + case 83: /* state ::= */ yytestcase(yyruleno==83); { yymsp[1].minor.yy0.n = 0; } break; - case 65: /* bufsize ::= BUFSIZE INTEGER */ - case 67: /* pps ::= PPS INTEGER */ yytestcase(yyruleno==67); - case 69: /* tseries ::= TSERIES INTEGER */ yytestcase(yyruleno==69); - case 71: /* dbs ::= DBS INTEGER */ yytestcase(yyruleno==71); - case 73: /* streams ::= STREAMS INTEGER */ yytestcase(yyruleno==73); - case 75: /* storage ::= STORAGE INTEGER */ yytestcase(yyruleno==75); - case 77: /* qtime ::= QTIME INTEGER */ yytestcase(yyruleno==77); - case 79: /* users ::= USERS INTEGER */ yytestcase(yyruleno==79); - case 81: /* conns ::= CONNS INTEGER */ yytestcase(yyruleno==81); - case 83: /* state ::= STATE ids */ yytestcase(yyruleno==83); + case 66: /* bufsize ::= BUFSIZE INTEGER */ + case 68: /* pps ::= PPS INTEGER */ yytestcase(yyruleno==68); + case 70: /* tseries ::= TSERIES INTEGER */ yytestcase(yyruleno==70); + case 72: /* dbs ::= DBS INTEGER */ yytestcase(yyruleno==72); + case 74: /* streams ::= STREAMS INTEGER */ yytestcase(yyruleno==74); + case 76: /* storage ::= STORAGE INTEGER */ yytestcase(yyruleno==76); + case 78: /* qtime ::= QTIME INTEGER */ yytestcase(yyruleno==78); + case 80: /* users ::= USERS INTEGER */ yytestcase(yyruleno==80); + case 82: /* conns ::= CONNS INTEGER */ yytestcase(yyruleno==82); + case 84: /* state ::= STATE ids */ yytestcase(yyruleno==84); { yymsp[-1].minor.yy0 = yymsp[0].minor.yy0; } break; - case 84: /* acct_optr ::= pps tseries storage streams qtime dbs users conns state */ -{ - yylhsminor.yy547.maxUsers = (yymsp[-2].minor.yy0.n>0)?atoi(yymsp[-2].minor.yy0.z):-1; - yylhsminor.yy547.maxDbs = (yymsp[-3].minor.yy0.n>0)?atoi(yymsp[-3].minor.yy0.z):-1; - yylhsminor.yy547.maxTimeSeries = (yymsp[-7].minor.yy0.n>0)?atoi(yymsp[-7].minor.yy0.z):-1; - yylhsminor.yy547.maxStreams = (yymsp[-5].minor.yy0.n>0)?atoi(yymsp[-5].minor.yy0.z):-1; - yylhsminor.yy547.maxPointsPerSecond = (yymsp[-8].minor.yy0.n>0)?atoi(yymsp[-8].minor.yy0.z):-1; - yylhsminor.yy547.maxStorage = (yymsp[-6].minor.yy0.n>0)?strtoll(yymsp[-6].minor.yy0.z, NULL, 10):-1; - yylhsminor.yy547.maxQueryTime = (yymsp[-4].minor.yy0.n>0)?strtoll(yymsp[-4].minor.yy0.z, NULL, 10):-1; - yylhsminor.yy547.maxConnections = (yymsp[-1].minor.yy0.n>0)?atoi(yymsp[-1].minor.yy0.z):-1; - yylhsminor.yy547.stat = yymsp[0].minor.yy0; -} - yymsp[-8].minor.yy547 = yylhsminor.yy547; - break; - case 85: /* intitemlist ::= intitemlist COMMA intitem */ - case 154: /* tagitemlist ::= tagitemlist COMMA tagitem */ yytestcase(yyruleno==154); -{ yylhsminor.yy525 = tVariantListAppend(yymsp[-2].minor.yy525, &yymsp[0].minor.yy506, -1); } - yymsp[-2].minor.yy525 = yylhsminor.yy525; - break; - case 86: /* intitemlist ::= intitem */ - case 155: /* tagitemlist ::= tagitem */ yytestcase(yyruleno==155); -{ yylhsminor.yy525 = tVariantListAppend(NULL, &yymsp[0].minor.yy506, -1); } - yymsp[0].minor.yy525 = yylhsminor.yy525; - break; - case 87: /* intitem ::= INTEGER */ - case 156: /* tagitem ::= INTEGER */ yytestcase(yyruleno==156); - case 157: /* tagitem ::= FLOAT */ yytestcase(yyruleno==157); - case 158: /* tagitem ::= STRING */ yytestcase(yyruleno==158); - case 159: /* tagitem ::= BOOL */ yytestcase(yyruleno==159); -{ toTSDBType(yymsp[0].minor.yy0.type); tVariantCreate(&yylhsminor.yy506, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy506 = yylhsminor.yy506; - break; - case 88: /* keep ::= KEEP intitemlist */ -{ yymsp[-1].minor.yy525 = yymsp[0].minor.yy525; } - break; - case 89: /* cache ::= CACHE INTEGER */ - case 90: /* replica ::= REPLICA INTEGER */ yytestcase(yyruleno==90); - case 91: /* quorum ::= QUORUM INTEGER */ yytestcase(yyruleno==91); - case 92: /* days ::= DAYS INTEGER */ yytestcase(yyruleno==92); - case 93: /* minrows ::= MINROWS INTEGER */ yytestcase(yyruleno==93); - case 94: /* maxrows ::= MAXROWS INTEGER */ yytestcase(yyruleno==94); - case 95: /* blocks ::= BLOCKS INTEGER */ yytestcase(yyruleno==95); - case 96: /* ctime ::= CTIME INTEGER */ yytestcase(yyruleno==96); - case 97: /* wal ::= WAL INTEGER */ yytestcase(yyruleno==97); - case 98: /* fsync ::= FSYNC INTEGER */ yytestcase(yyruleno==98); - case 99: /* comp ::= COMP INTEGER */ yytestcase(yyruleno==99); - case 100: /* prec ::= PRECISION STRING */ yytestcase(yyruleno==100); - case 101: /* update ::= UPDATE INTEGER */ yytestcase(yyruleno==101); - case 102: /* cachelast ::= CACHELAST INTEGER */ yytestcase(yyruleno==102); - case 103: /* partitions ::= PARTITIONS INTEGER */ yytestcase(yyruleno==103); + case 85: /* acct_optr ::= pps tseries storage streams qtime dbs users conns state */ +{ + yylhsminor.yy171.maxUsers = (yymsp[-2].minor.yy0.n>0)?atoi(yymsp[-2].minor.yy0.z):-1; + yylhsminor.yy171.maxDbs = (yymsp[-3].minor.yy0.n>0)?atoi(yymsp[-3].minor.yy0.z):-1; + yylhsminor.yy171.maxTimeSeries = (yymsp[-7].minor.yy0.n>0)?atoi(yymsp[-7].minor.yy0.z):-1; + yylhsminor.yy171.maxStreams = (yymsp[-5].minor.yy0.n>0)?atoi(yymsp[-5].minor.yy0.z):-1; + yylhsminor.yy171.maxPointsPerSecond = (yymsp[-8].minor.yy0.n>0)?atoi(yymsp[-8].minor.yy0.z):-1; + yylhsminor.yy171.maxStorage = (yymsp[-6].minor.yy0.n>0)?strtoll(yymsp[-6].minor.yy0.z, NULL, 10):-1; + yylhsminor.yy171.maxQueryTime = (yymsp[-4].minor.yy0.n>0)?strtoll(yymsp[-4].minor.yy0.z, NULL, 10):-1; + yylhsminor.yy171.maxConnections = (yymsp[-1].minor.yy0.n>0)?atoi(yymsp[-1].minor.yy0.z):-1; + yylhsminor.yy171.stat = yymsp[0].minor.yy0; +} + yymsp[-8].minor.yy171 = yylhsminor.yy171; + break; + case 86: /* intitemlist ::= intitemlist COMMA intitem */ + case 155: /* tagitemlist ::= tagitemlist COMMA tagitem */ yytestcase(yyruleno==155); +{ yylhsminor.yy421 = tVariantListAppend(yymsp[-2].minor.yy421, &yymsp[0].minor.yy430, -1); } + yymsp[-2].minor.yy421 = yylhsminor.yy421; + break; + case 87: /* intitemlist ::= intitem */ + case 156: /* tagitemlist ::= tagitem */ yytestcase(yyruleno==156); +{ yylhsminor.yy421 = tVariantListAppend(NULL, &yymsp[0].minor.yy430, -1); } + yymsp[0].minor.yy421 = yylhsminor.yy421; + break; + case 88: /* intitem ::= INTEGER */ + case 157: /* tagitem ::= INTEGER */ yytestcase(yyruleno==157); + case 158: /* tagitem ::= FLOAT */ yytestcase(yyruleno==158); + case 159: /* tagitem ::= STRING */ yytestcase(yyruleno==159); + case 160: /* tagitem ::= BOOL */ yytestcase(yyruleno==160); +{ toTSDBType(yymsp[0].minor.yy0.type); tVariantCreate(&yylhsminor.yy430, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy430 = yylhsminor.yy430; + break; + case 89: /* keep ::= KEEP intitemlist */ +{ yymsp[-1].minor.yy421 = yymsp[0].minor.yy421; } + break; + case 90: /* cache ::= CACHE INTEGER */ + case 91: /* replica ::= REPLICA INTEGER */ yytestcase(yyruleno==91); + case 92: /* quorum ::= QUORUM INTEGER */ yytestcase(yyruleno==92); + case 93: /* days ::= DAYS INTEGER */ yytestcase(yyruleno==93); + case 94: /* minrows ::= MINROWS INTEGER */ yytestcase(yyruleno==94); + case 95: /* maxrows ::= MAXROWS INTEGER */ yytestcase(yyruleno==95); + case 96: /* blocks ::= BLOCKS INTEGER */ yytestcase(yyruleno==96); + case 97: /* ctime ::= CTIME INTEGER */ yytestcase(yyruleno==97); + case 98: /* wal ::= WAL INTEGER */ yytestcase(yyruleno==98); + case 99: /* fsync ::= FSYNC INTEGER */ yytestcase(yyruleno==99); + case 100: /* comp ::= COMP INTEGER */ yytestcase(yyruleno==100); + case 101: /* prec ::= PRECISION STRING */ yytestcase(yyruleno==101); + case 102: /* update ::= UPDATE INTEGER */ yytestcase(yyruleno==102); + case 103: /* cachelast ::= CACHELAST INTEGER */ yytestcase(yyruleno==103); + case 104: /* partitions ::= PARTITIONS INTEGER */ yytestcase(yyruleno==104); { yymsp[-1].minor.yy0 = yymsp[0].minor.yy0; } break; - case 104: /* db_optr ::= */ -{setDefaultCreateDbOption(&yymsp[1].minor.yy214); yymsp[1].minor.yy214.dbType = TSDB_DB_TYPE_DEFAULT;} - break; - case 105: /* db_optr ::= db_optr cache */ -{ yylhsminor.yy214 = yymsp[-1].minor.yy214; yylhsminor.yy214.cacheBlockSize = strtol(yymsp[0].minor.yy0.z, NULL, 10); } - yymsp[-1].minor.yy214 = yylhsminor.yy214; - break; - case 106: /* db_optr ::= db_optr replica */ - case 123: /* alter_db_optr ::= alter_db_optr replica */ yytestcase(yyruleno==123); -{ yylhsminor.yy214 = yymsp[-1].minor.yy214; yylhsminor.yy214.replica = strtol(yymsp[0].minor.yy0.z, NULL, 10); } - yymsp[-1].minor.yy214 = yylhsminor.yy214; - break; - case 107: /* db_optr ::= db_optr quorum */ - case 124: /* alter_db_optr ::= alter_db_optr quorum */ yytestcase(yyruleno==124); -{ yylhsminor.yy214 = yymsp[-1].minor.yy214; yylhsminor.yy214.quorum = strtol(yymsp[0].minor.yy0.z, NULL, 10); } - yymsp[-1].minor.yy214 = yylhsminor.yy214; - break; - case 108: /* db_optr ::= db_optr days */ -{ yylhsminor.yy214 = yymsp[-1].minor.yy214; yylhsminor.yy214.daysPerFile = strtol(yymsp[0].minor.yy0.z, NULL, 10); } - yymsp[-1].minor.yy214 = yylhsminor.yy214; - break; - case 109: /* db_optr ::= db_optr minrows */ -{ yylhsminor.yy214 = yymsp[-1].minor.yy214; yylhsminor.yy214.minRowsPerBlock = strtod(yymsp[0].minor.yy0.z, NULL); } - yymsp[-1].minor.yy214 = yylhsminor.yy214; - break; - case 110: /* db_optr ::= db_optr maxrows */ -{ yylhsminor.yy214 = yymsp[-1].minor.yy214; yylhsminor.yy214.maxRowsPerBlock = strtod(yymsp[0].minor.yy0.z, NULL); } - yymsp[-1].minor.yy214 = yylhsminor.yy214; - break; - case 111: /* db_optr ::= db_optr blocks */ - case 126: /* alter_db_optr ::= alter_db_optr blocks */ yytestcase(yyruleno==126); -{ yylhsminor.yy214 = yymsp[-1].minor.yy214; yylhsminor.yy214.numOfBlocks = strtol(yymsp[0].minor.yy0.z, NULL, 10); } - yymsp[-1].minor.yy214 = yylhsminor.yy214; - break; - case 112: /* db_optr ::= db_optr ctime */ -{ yylhsminor.yy214 = yymsp[-1].minor.yy214; yylhsminor.yy214.commitTime = strtol(yymsp[0].minor.yy0.z, NULL, 10); } - yymsp[-1].minor.yy214 = yylhsminor.yy214; - break; - case 113: /* db_optr ::= db_optr wal */ -{ yylhsminor.yy214 = yymsp[-1].minor.yy214; yylhsminor.yy214.walLevel = strtol(yymsp[0].minor.yy0.z, NULL, 10); } - yymsp[-1].minor.yy214 = yylhsminor.yy214; - break; - case 114: /* db_optr ::= db_optr fsync */ -{ yylhsminor.yy214 = yymsp[-1].minor.yy214; yylhsminor.yy214.fsyncPeriod = strtol(yymsp[0].minor.yy0.z, NULL, 10); } - yymsp[-1].minor.yy214 = yylhsminor.yy214; - break; - case 115: /* db_optr ::= db_optr comp */ - case 127: /* alter_db_optr ::= alter_db_optr comp */ yytestcase(yyruleno==127); -{ yylhsminor.yy214 = yymsp[-1].minor.yy214; yylhsminor.yy214.compressionLevel = strtol(yymsp[0].minor.yy0.z, NULL, 10); } - yymsp[-1].minor.yy214 = yylhsminor.yy214; - break; - case 116: /* db_optr ::= db_optr prec */ -{ yylhsminor.yy214 = yymsp[-1].minor.yy214; yylhsminor.yy214.precision = yymsp[0].minor.yy0; } - yymsp[-1].minor.yy214 = yylhsminor.yy214; - break; - case 117: /* db_optr ::= db_optr keep */ - case 125: /* alter_db_optr ::= alter_db_optr keep */ yytestcase(yyruleno==125); -{ yylhsminor.yy214 = yymsp[-1].minor.yy214; yylhsminor.yy214.keep = yymsp[0].minor.yy525; } - yymsp[-1].minor.yy214 = yylhsminor.yy214; - break; - case 118: /* db_optr ::= db_optr update */ - case 128: /* alter_db_optr ::= alter_db_optr update */ yytestcase(yyruleno==128); -{ yylhsminor.yy214 = yymsp[-1].minor.yy214; yylhsminor.yy214.update = strtol(yymsp[0].minor.yy0.z, NULL, 10); } - yymsp[-1].minor.yy214 = yylhsminor.yy214; - break; - case 119: /* db_optr ::= db_optr cachelast */ - case 129: /* alter_db_optr ::= alter_db_optr cachelast */ yytestcase(yyruleno==129); -{ yylhsminor.yy214 = yymsp[-1].minor.yy214; yylhsminor.yy214.cachelast = strtol(yymsp[0].minor.yy0.z, NULL, 10); } - yymsp[-1].minor.yy214 = yylhsminor.yy214; - break; - case 120: /* topic_optr ::= db_optr */ - case 130: /* alter_topic_optr ::= alter_db_optr */ yytestcase(yyruleno==130); -{ yylhsminor.yy214 = yymsp[0].minor.yy214; yylhsminor.yy214.dbType = TSDB_DB_TYPE_TOPIC; } - yymsp[0].minor.yy214 = yylhsminor.yy214; - break; - case 121: /* topic_optr ::= topic_optr partitions */ - case 131: /* alter_topic_optr ::= alter_topic_optr partitions */ yytestcase(yyruleno==131); -{ yylhsminor.yy214 = yymsp[-1].minor.yy214; yylhsminor.yy214.partitions = strtol(yymsp[0].minor.yy0.z, NULL, 10); } - yymsp[-1].minor.yy214 = yylhsminor.yy214; - break; - case 122: /* alter_db_optr ::= */ -{ setDefaultCreateDbOption(&yymsp[1].minor.yy214); yymsp[1].minor.yy214.dbType = TSDB_DB_TYPE_DEFAULT;} - break; - case 132: /* typename ::= ids */ -{ + case 105: /* db_optr ::= */ +{setDefaultCreateDbOption(&yymsp[1].minor.yy90); yymsp[1].minor.yy90.dbType = TSDB_DB_TYPE_DEFAULT;} + break; + case 106: /* db_optr ::= db_optr cache */ +{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.cacheBlockSize = strtol(yymsp[0].minor.yy0.z, NULL, 10); } + yymsp[-1].minor.yy90 = yylhsminor.yy90; + break; + case 107: /* db_optr ::= db_optr replica */ + case 124: /* alter_db_optr ::= alter_db_optr replica */ yytestcase(yyruleno==124); +{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.replica = strtol(yymsp[0].minor.yy0.z, NULL, 10); } + yymsp[-1].minor.yy90 = yylhsminor.yy90; + break; + case 108: /* db_optr ::= db_optr quorum */ + case 125: /* alter_db_optr ::= alter_db_optr quorum */ yytestcase(yyruleno==125); +{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.quorum = strtol(yymsp[0].minor.yy0.z, NULL, 10); } + yymsp[-1].minor.yy90 = yylhsminor.yy90; + break; + case 109: /* db_optr ::= db_optr days */ +{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.daysPerFile = strtol(yymsp[0].minor.yy0.z, NULL, 10); } + yymsp[-1].minor.yy90 = yylhsminor.yy90; + break; + case 110: /* db_optr ::= db_optr minrows */ +{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.minRowsPerBlock = strtod(yymsp[0].minor.yy0.z, NULL); } + yymsp[-1].minor.yy90 = yylhsminor.yy90; + break; + case 111: /* db_optr ::= db_optr maxrows */ +{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.maxRowsPerBlock = strtod(yymsp[0].minor.yy0.z, NULL); } + yymsp[-1].minor.yy90 = yylhsminor.yy90; + break; + case 112: /* db_optr ::= db_optr blocks */ + case 127: /* alter_db_optr ::= alter_db_optr blocks */ yytestcase(yyruleno==127); +{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.numOfBlocks = strtol(yymsp[0].minor.yy0.z, NULL, 10); } + yymsp[-1].minor.yy90 = yylhsminor.yy90; + break; + case 113: /* db_optr ::= db_optr ctime */ +{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.commitTime = strtol(yymsp[0].minor.yy0.z, NULL, 10); } + yymsp[-1].minor.yy90 = yylhsminor.yy90; + break; + case 114: /* db_optr ::= db_optr wal */ +{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.walLevel = strtol(yymsp[0].minor.yy0.z, NULL, 10); } + yymsp[-1].minor.yy90 = yylhsminor.yy90; + break; + case 115: /* db_optr ::= db_optr fsync */ +{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.fsyncPeriod = strtol(yymsp[0].minor.yy0.z, NULL, 10); } + yymsp[-1].minor.yy90 = yylhsminor.yy90; + break; + case 116: /* db_optr ::= db_optr comp */ + case 128: /* alter_db_optr ::= alter_db_optr comp */ yytestcase(yyruleno==128); +{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.compressionLevel = strtol(yymsp[0].minor.yy0.z, NULL, 10); } + yymsp[-1].minor.yy90 = yylhsminor.yy90; + break; + case 117: /* db_optr ::= db_optr prec */ +{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.precision = yymsp[0].minor.yy0; } + yymsp[-1].minor.yy90 = yylhsminor.yy90; + break; + case 118: /* db_optr ::= db_optr keep */ + case 126: /* alter_db_optr ::= alter_db_optr keep */ yytestcase(yyruleno==126); +{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.keep = yymsp[0].minor.yy421; } + yymsp[-1].minor.yy90 = yylhsminor.yy90; + break; + case 119: /* db_optr ::= db_optr update */ + case 129: /* alter_db_optr ::= alter_db_optr update */ yytestcase(yyruleno==129); +{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.update = strtol(yymsp[0].minor.yy0.z, NULL, 10); } + yymsp[-1].minor.yy90 = yylhsminor.yy90; + break; + case 120: /* db_optr ::= db_optr cachelast */ + case 130: /* alter_db_optr ::= alter_db_optr cachelast */ yytestcase(yyruleno==130); +{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.cachelast = strtol(yymsp[0].minor.yy0.z, NULL, 10); } + yymsp[-1].minor.yy90 = yylhsminor.yy90; + break; + case 121: /* topic_optr ::= db_optr */ + case 131: /* alter_topic_optr ::= alter_db_optr */ yytestcase(yyruleno==131); +{ yylhsminor.yy90 = yymsp[0].minor.yy90; yylhsminor.yy90.dbType = TSDB_DB_TYPE_TOPIC; } + yymsp[0].minor.yy90 = yylhsminor.yy90; + break; + case 122: /* topic_optr ::= topic_optr partitions */ + case 132: /* alter_topic_optr ::= alter_topic_optr partitions */ yytestcase(yyruleno==132); +{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.partitions = strtol(yymsp[0].minor.yy0.z, NULL, 10); } + yymsp[-1].minor.yy90 = yylhsminor.yy90; + break; + case 123: /* alter_db_optr ::= */ +{ setDefaultCreateDbOption(&yymsp[1].minor.yy90); yymsp[1].minor.yy90.dbType = TSDB_DB_TYPE_DEFAULT;} + break; + case 133: /* typename ::= ids */ +{ yymsp[0].minor.yy0.type = 0; - tSetColumnType (&yylhsminor.yy31, &yymsp[0].minor.yy0); + tSetColumnType (&yylhsminor.yy183, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy31 = yylhsminor.yy31; + yymsp[0].minor.yy183 = yylhsminor.yy183; break; - case 133: /* typename ::= ids LP signed RP */ + case 134: /* typename ::= ids LP signed RP */ { - if (yymsp[-1].minor.yy501 <= 0) { + if (yymsp[-1].minor.yy325 <= 0) { yymsp[-3].minor.yy0.type = 0; - tSetColumnType(&yylhsminor.yy31, &yymsp[-3].minor.yy0); + tSetColumnType(&yylhsminor.yy183, &yymsp[-3].minor.yy0); } else { - yymsp[-3].minor.yy0.type = -yymsp[-1].minor.yy501; // negative value of name length - tSetColumnType(&yylhsminor.yy31, &yymsp[-3].minor.yy0); + yymsp[-3].minor.yy0.type = -yymsp[-1].minor.yy325; // negative value of name length + tSetColumnType(&yylhsminor.yy183, &yymsp[-3].minor.yy0); } } - yymsp[-3].minor.yy31 = yylhsminor.yy31; + yymsp[-3].minor.yy183 = yylhsminor.yy183; break; - case 134: /* typename ::= ids UNSIGNED */ + case 135: /* typename ::= ids UNSIGNED */ { yymsp[-1].minor.yy0.type = 0; yymsp[-1].minor.yy0.n = ((yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z); - tSetColumnType (&yylhsminor.yy31, &yymsp[-1].minor.yy0); + tSetColumnType (&yylhsminor.yy183, &yymsp[-1].minor.yy0); } - yymsp[-1].minor.yy31 = yylhsminor.yy31; + yymsp[-1].minor.yy183 = yylhsminor.yy183; break; - case 135: /* signed ::= INTEGER */ -{ yylhsminor.yy501 = strtol(yymsp[0].minor.yy0.z, NULL, 10); } - yymsp[0].minor.yy501 = yylhsminor.yy501; + case 136: /* signed ::= INTEGER */ +{ yylhsminor.yy325 = strtol(yymsp[0].minor.yy0.z, NULL, 10); } + yymsp[0].minor.yy325 = yylhsminor.yy325; break; - case 136: /* signed ::= PLUS INTEGER */ -{ yymsp[-1].minor.yy501 = strtol(yymsp[0].minor.yy0.z, NULL, 10); } + case 137: /* signed ::= PLUS INTEGER */ +{ yymsp[-1].minor.yy325 = strtol(yymsp[0].minor.yy0.z, NULL, 10); } break; - case 137: /* signed ::= MINUS INTEGER */ -{ yymsp[-1].minor.yy501 = -strtol(yymsp[0].minor.yy0.z, NULL, 10);} + case 138: /* signed ::= MINUS INTEGER */ +{ yymsp[-1].minor.yy325 = -strtol(yymsp[0].minor.yy0.z, NULL, 10);} break; - case 141: /* cmd ::= CREATE TABLE create_table_list */ -{ pInfo->type = TSDB_SQL_CREATE_TABLE; pInfo->pCreateTableInfo = yymsp[0].minor.yy158;} + case 142: /* cmd ::= CREATE TABLE create_table_list */ +{ pInfo->type = TSDB_SQL_CREATE_TABLE; pInfo->pCreateTableInfo = yymsp[0].minor.yy438;} break; - case 142: /* create_table_list ::= create_from_stable */ + case 143: /* create_table_list ::= create_from_stable */ { SCreateTableSql* pCreateTable = calloc(1, sizeof(SCreateTableSql)); pCreateTable->childTableInfo = taosArrayInit(4, sizeof(SCreatedTableInfo)); - taosArrayPush(pCreateTable->childTableInfo, &yymsp[0].minor.yy432); + taosArrayPush(pCreateTable->childTableInfo, &yymsp[0].minor.yy152); pCreateTable->type = TSQL_CREATE_TABLE_FROM_STABLE; - yylhsminor.yy158 = pCreateTable; + yylhsminor.yy438 = pCreateTable; } - yymsp[0].minor.yy158 = yylhsminor.yy158; + yymsp[0].minor.yy438 = yylhsminor.yy438; break; - case 143: /* create_table_list ::= create_table_list create_from_stable */ + case 144: /* create_table_list ::= create_table_list create_from_stable */ { - taosArrayPush(yymsp[-1].minor.yy158->childTableInfo, &yymsp[0].minor.yy432); - yylhsminor.yy158 = yymsp[-1].minor.yy158; + taosArrayPush(yymsp[-1].minor.yy438->childTableInfo, &yymsp[0].minor.yy152); + yylhsminor.yy438 = yymsp[-1].minor.yy438; } - yymsp[-1].minor.yy158 = yylhsminor.yy158; + yymsp[-1].minor.yy438 = yylhsminor.yy438; break; - case 144: /* create_table_args ::= ifnotexists ids cpxName LP columnlist RP */ + case 145: /* create_table_args ::= ifnotexists ids cpxName LP columnlist RP */ { - yylhsminor.yy158 = tSetCreateTableInfo(yymsp[-1].minor.yy525, NULL, NULL, TSQL_CREATE_TABLE); - setSqlInfo(pInfo, yylhsminor.yy158, NULL, TSDB_SQL_CREATE_TABLE); + yylhsminor.yy438 = tSetCreateTableInfo(yymsp[-1].minor.yy421, NULL, NULL, TSQL_CREATE_TABLE); + setSqlInfo(pInfo, yylhsminor.yy438, NULL, TSDB_SQL_CREATE_TABLE); yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; setCreatedTableName(pInfo, &yymsp[-4].minor.yy0, &yymsp[-5].minor.yy0); } - yymsp[-5].minor.yy158 = yylhsminor.yy158; + yymsp[-5].minor.yy438 = yylhsminor.yy438; break; - case 145: /* create_stable_args ::= ifnotexists ids cpxName LP columnlist RP TAGS LP columnlist RP */ + case 146: /* create_stable_args ::= ifnotexists ids cpxName LP columnlist RP TAGS LP columnlist RP */ { - yylhsminor.yy158 = tSetCreateTableInfo(yymsp[-5].minor.yy525, yymsp[-1].minor.yy525, NULL, TSQL_CREATE_STABLE); - setSqlInfo(pInfo, yylhsminor.yy158, NULL, TSDB_SQL_CREATE_TABLE); + yylhsminor.yy438 = tSetCreateTableInfo(yymsp[-5].minor.yy421, yymsp[-1].minor.yy421, NULL, TSQL_CREATE_STABLE); + setSqlInfo(pInfo, yylhsminor.yy438, NULL, TSDB_SQL_CREATE_TABLE); yymsp[-8].minor.yy0.n += yymsp[-7].minor.yy0.n; setCreatedTableName(pInfo, &yymsp[-8].minor.yy0, &yymsp[-9].minor.yy0); } - yymsp[-9].minor.yy158 = yylhsminor.yy158; + yymsp[-9].minor.yy438 = yylhsminor.yy438; break; - case 146: /* create_from_stable ::= ifnotexists ids cpxName USING ids cpxName TAGS LP tagitemlist RP */ + case 147: /* create_from_stable ::= ifnotexists ids cpxName USING ids cpxName TAGS LP tagitemlist RP */ { yymsp[-5].minor.yy0.n += yymsp[-4].minor.yy0.n; yymsp[-8].minor.yy0.n += yymsp[-7].minor.yy0.n; - yylhsminor.yy432 = createNewChildTableInfo(&yymsp[-5].minor.yy0, NULL, yymsp[-1].minor.yy525, &yymsp[-8].minor.yy0, &yymsp[-9].minor.yy0); + yylhsminor.yy152 = createNewChildTableInfo(&yymsp[-5].minor.yy0, NULL, yymsp[-1].minor.yy421, &yymsp[-8].minor.yy0, &yymsp[-9].minor.yy0); } - yymsp[-9].minor.yy432 = yylhsminor.yy432; + yymsp[-9].minor.yy152 = yylhsminor.yy152; break; - case 147: /* create_from_stable ::= ifnotexists ids cpxName USING ids cpxName LP tagNamelist RP TAGS LP tagitemlist RP */ + case 148: /* create_from_stable ::= ifnotexists ids cpxName USING ids cpxName LP tagNamelist RP TAGS LP tagitemlist RP */ { yymsp[-8].minor.yy0.n += yymsp[-7].minor.yy0.n; yymsp[-11].minor.yy0.n += yymsp[-10].minor.yy0.n; - yylhsminor.yy432 = createNewChildTableInfo(&yymsp[-8].minor.yy0, yymsp[-5].minor.yy525, yymsp[-1].minor.yy525, &yymsp[-11].minor.yy0, &yymsp[-12].minor.yy0); + yylhsminor.yy152 = createNewChildTableInfo(&yymsp[-8].minor.yy0, yymsp[-5].minor.yy421, yymsp[-1].minor.yy421, &yymsp[-11].minor.yy0, &yymsp[-12].minor.yy0); } - yymsp[-12].minor.yy432 = yylhsminor.yy432; + yymsp[-12].minor.yy152 = yylhsminor.yy152; break; - case 148: /* tagNamelist ::= tagNamelist COMMA ids */ -{taosArrayPush(yymsp[-2].minor.yy525, &yymsp[0].minor.yy0); yylhsminor.yy525 = yymsp[-2].minor.yy525; } - yymsp[-2].minor.yy525 = yylhsminor.yy525; + case 149: /* tagNamelist ::= tagNamelist COMMA ids */ +{taosArrayPush(yymsp[-2].minor.yy421, &yymsp[0].minor.yy0); yylhsminor.yy421 = yymsp[-2].minor.yy421; } + yymsp[-2].minor.yy421 = yylhsminor.yy421; break; - case 149: /* tagNamelist ::= ids */ -{yylhsminor.yy525 = taosArrayInit(4, sizeof(SStrToken)); taosArrayPush(yylhsminor.yy525, &yymsp[0].minor.yy0);} - yymsp[0].minor.yy525 = yylhsminor.yy525; + case 150: /* tagNamelist ::= ids */ +{yylhsminor.yy421 = taosArrayInit(4, sizeof(SStrToken)); taosArrayPush(yylhsminor.yy421, &yymsp[0].minor.yy0);} + yymsp[0].minor.yy421 = yylhsminor.yy421; break; - case 150: /* create_table_args ::= ifnotexists ids cpxName AS select */ + case 151: /* create_table_args ::= ifnotexists ids cpxName AS select */ { - yylhsminor.yy158 = tSetCreateTableInfo(NULL, NULL, yymsp[0].minor.yy464, TSQL_CREATE_STREAM); - setSqlInfo(pInfo, yylhsminor.yy158, NULL, TSDB_SQL_CREATE_TABLE); + yylhsminor.yy438 = tSetCreateTableInfo(NULL, NULL, yymsp[0].minor.yy56, TSQL_CREATE_STREAM); + setSqlInfo(pInfo, yylhsminor.yy438, NULL, TSDB_SQL_CREATE_TABLE); yymsp[-3].minor.yy0.n += yymsp[-2].minor.yy0.n; setCreatedTableName(pInfo, &yymsp[-3].minor.yy0, &yymsp[-4].minor.yy0); } - yymsp[-4].minor.yy158 = yylhsminor.yy158; + yymsp[-4].minor.yy438 = yylhsminor.yy438; break; - case 151: /* columnlist ::= columnlist COMMA column */ -{taosArrayPush(yymsp[-2].minor.yy525, &yymsp[0].minor.yy31); yylhsminor.yy525 = yymsp[-2].minor.yy525; } - yymsp[-2].minor.yy525 = yylhsminor.yy525; + case 152: /* columnlist ::= columnlist COMMA column */ +{taosArrayPush(yymsp[-2].minor.yy421, &yymsp[0].minor.yy183); yylhsminor.yy421 = yymsp[-2].minor.yy421; } + yymsp[-2].minor.yy421 = yylhsminor.yy421; break; - case 152: /* columnlist ::= column */ -{yylhsminor.yy525 = taosArrayInit(4, sizeof(TAOS_FIELD)); taosArrayPush(yylhsminor.yy525, &yymsp[0].minor.yy31);} - yymsp[0].minor.yy525 = yylhsminor.yy525; + case 153: /* columnlist ::= column */ +{yylhsminor.yy421 = taosArrayInit(4, sizeof(TAOS_FIELD)); taosArrayPush(yylhsminor.yy421, &yymsp[0].minor.yy183);} + yymsp[0].minor.yy421 = yylhsminor.yy421; break; - case 153: /* column ::= ids typename */ + case 154: /* column ::= ids typename */ { - tSetColumnInfo(&yylhsminor.yy31, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy31); + tSetColumnInfo(&yylhsminor.yy183, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy183); } - yymsp[-1].minor.yy31 = yylhsminor.yy31; + yymsp[-1].minor.yy183 = yylhsminor.yy183; break; - case 160: /* tagitem ::= NULL */ -{ yymsp[0].minor.yy0.type = 0; tVariantCreate(&yylhsminor.yy506, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy506 = yylhsminor.yy506; + case 161: /* tagitem ::= NULL */ +{ yymsp[0].minor.yy0.type = 0; tVariantCreate(&yylhsminor.yy430, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy430 = yylhsminor.yy430; break; - case 161: /* tagitem ::= NOW */ -{ yymsp[0].minor.yy0.type = TSDB_DATA_TYPE_TIMESTAMP; tVariantCreate(&yylhsminor.yy506, &yymsp[0].minor.yy0);} - yymsp[0].minor.yy506 = yylhsminor.yy506; + case 162: /* tagitem ::= NOW */ +{ yymsp[0].minor.yy0.type = TSDB_DATA_TYPE_TIMESTAMP; tVariantCreate(&yylhsminor.yy430, &yymsp[0].minor.yy0);} + yymsp[0].minor.yy430 = yylhsminor.yy430; break; - case 162: /* tagitem ::= MINUS INTEGER */ - case 163: /* tagitem ::= MINUS FLOAT */ yytestcase(yyruleno==163); - case 164: /* tagitem ::= PLUS INTEGER */ yytestcase(yyruleno==164); - case 165: /* tagitem ::= PLUS FLOAT */ yytestcase(yyruleno==165); + case 163: /* tagitem ::= MINUS INTEGER */ + case 164: /* tagitem ::= MINUS FLOAT */ yytestcase(yyruleno==164); + case 165: /* tagitem ::= PLUS INTEGER */ yytestcase(yyruleno==165); + case 166: /* tagitem ::= PLUS FLOAT */ yytestcase(yyruleno==166); { yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yymsp[-1].minor.yy0.type = yymsp[0].minor.yy0.type; toTSDBType(yymsp[-1].minor.yy0.type); - tVariantCreate(&yylhsminor.yy506, &yymsp[-1].minor.yy0); + tVariantCreate(&yylhsminor.yy430, &yymsp[-1].minor.yy0); } - yymsp[-1].minor.yy506 = yylhsminor.yy506; + yymsp[-1].minor.yy430 = yylhsminor.yy430; break; - case 166: /* select ::= SELECT selcollist from where_opt interval_opt sliding_opt session_option windowstate_option fill_opt groupby_opt having_opt orderby_opt slimit_opt limit_opt */ + case 167: /* select ::= SELECT selcollist from where_opt interval_option sliding_opt session_option windowstate_option fill_opt groupby_opt having_opt orderby_opt slimit_opt limit_opt */ { - yylhsminor.yy464 = tSetQuerySqlNode(&yymsp[-13].minor.yy0, yymsp[-12].minor.yy525, yymsp[-11].minor.yy412, yymsp[-10].minor.yy370, yymsp[-4].minor.yy525, yymsp[-2].minor.yy525, &yymsp[-9].minor.yy520, &yymsp[-7].minor.yy259, &yymsp[-6].minor.yy144, &yymsp[-8].minor.yy0, yymsp[-5].minor.yy525, &yymsp[0].minor.yy126, &yymsp[-1].minor.yy126, yymsp[-3].minor.yy370); + yylhsminor.yy56 = tSetQuerySqlNode(&yymsp[-13].minor.yy0, yymsp[-12].minor.yy421, yymsp[-11].minor.yy8, yymsp[-10].minor.yy439, yymsp[-4].minor.yy421, yymsp[-2].minor.yy421, &yymsp[-9].minor.yy400, &yymsp[-7].minor.yy147, &yymsp[-6].minor.yy40, &yymsp[-8].minor.yy0, yymsp[-5].minor.yy421, &yymsp[0].minor.yy166, &yymsp[-1].minor.yy166, yymsp[-3].minor.yy439); } - yymsp[-13].minor.yy464 = yylhsminor.yy464; + yymsp[-13].minor.yy56 = yylhsminor.yy56; break; - case 167: /* select ::= LP select RP */ -{yymsp[-2].minor.yy464 = yymsp[-1].minor.yy464;} + case 168: /* select ::= LP select RP */ +{yymsp[-2].minor.yy56 = yymsp[-1].minor.yy56;} break; - case 168: /* union ::= select */ -{ yylhsminor.yy525 = setSubclause(NULL, yymsp[0].minor.yy464); } - yymsp[0].minor.yy525 = yylhsminor.yy525; + case 169: /* union ::= select */ +{ yylhsminor.yy421 = setSubclause(NULL, yymsp[0].minor.yy56); } + yymsp[0].minor.yy421 = yylhsminor.yy421; break; - case 169: /* union ::= union UNION ALL select */ -{ yylhsminor.yy525 = appendSelectClause(yymsp[-3].minor.yy525, yymsp[0].minor.yy464); } - yymsp[-3].minor.yy525 = yylhsminor.yy525; + case 170: /* union ::= union UNION ALL select */ +{ yylhsminor.yy421 = appendSelectClause(yymsp[-3].minor.yy421, yymsp[0].minor.yy56); } + yymsp[-3].minor.yy421 = yylhsminor.yy421; break; - case 170: /* cmd ::= union */ -{ setSqlInfo(pInfo, yymsp[0].minor.yy525, NULL, TSDB_SQL_SELECT); } + case 171: /* cmd ::= union */ +{ setSqlInfo(pInfo, yymsp[0].minor.yy421, NULL, TSDB_SQL_SELECT); } break; - case 171: /* select ::= SELECT selcollist */ + case 172: /* select ::= SELECT selcollist */ { - yylhsminor.yy464 = tSetQuerySqlNode(&yymsp[-1].minor.yy0, yymsp[0].minor.yy525, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); + yylhsminor.yy56 = tSetQuerySqlNode(&yymsp[-1].minor.yy0, yymsp[0].minor.yy421, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); } - yymsp[-1].minor.yy464 = yylhsminor.yy464; + yymsp[-1].minor.yy56 = yylhsminor.yy56; break; - case 172: /* sclp ::= selcollist COMMA */ -{yylhsminor.yy525 = yymsp[-1].minor.yy525;} - yymsp[-1].minor.yy525 = yylhsminor.yy525; + case 173: /* sclp ::= selcollist COMMA */ +{yylhsminor.yy421 = yymsp[-1].minor.yy421;} + yymsp[-1].minor.yy421 = yylhsminor.yy421; break; - case 173: /* sclp ::= */ - case 203: /* orderby_opt ::= */ yytestcase(yyruleno==203); -{yymsp[1].minor.yy525 = 0;} + case 174: /* sclp ::= */ + case 206: /* orderby_opt ::= */ yytestcase(yyruleno==206); +{yymsp[1].minor.yy421 = 0;} break; - case 174: /* selcollist ::= sclp distinct expr as */ + case 175: /* selcollist ::= sclp distinct expr as */ { - yylhsminor.yy525 = tSqlExprListAppend(yymsp[-3].minor.yy525, yymsp[-1].minor.yy370, yymsp[-2].minor.yy0.n? &yymsp[-2].minor.yy0:0, yymsp[0].minor.yy0.n?&yymsp[0].minor.yy0:0); + yylhsminor.yy421 = tSqlExprListAppend(yymsp[-3].minor.yy421, yymsp[-1].minor.yy439, yymsp[-2].minor.yy0.n? &yymsp[-2].minor.yy0:0, yymsp[0].minor.yy0.n?&yymsp[0].minor.yy0:0); } - yymsp[-3].minor.yy525 = yylhsminor.yy525; + yymsp[-3].minor.yy421 = yylhsminor.yy421; break; - case 175: /* selcollist ::= sclp STAR */ + case 176: /* selcollist ::= sclp STAR */ { tSqlExpr *pNode = tSqlExprCreateIdValue(NULL, TK_ALL); - yylhsminor.yy525 = tSqlExprListAppend(yymsp[-1].minor.yy525, pNode, 0, 0); + yylhsminor.yy421 = tSqlExprListAppend(yymsp[-1].minor.yy421, pNode, 0, 0); } - yymsp[-1].minor.yy525 = yylhsminor.yy525; + yymsp[-1].minor.yy421 = yylhsminor.yy421; break; - case 176: /* as ::= AS ids */ + case 177: /* as ::= AS ids */ { yymsp[-1].minor.yy0 = yymsp[0].minor.yy0; } break; - case 177: /* as ::= ids */ + case 178: /* as ::= ids */ { yylhsminor.yy0 = yymsp[0].minor.yy0; } yymsp[0].minor.yy0 = yylhsminor.yy0; break; - case 178: /* as ::= */ + case 179: /* as ::= */ { yymsp[1].minor.yy0.n = 0; } break; - case 179: /* distinct ::= DISTINCT */ + case 180: /* distinct ::= DISTINCT */ { yylhsminor.yy0 = yymsp[0].minor.yy0; } yymsp[0].minor.yy0 = yylhsminor.yy0; break; - case 181: /* from ::= FROM tablelist */ - case 182: /* from ::= FROM sub */ yytestcase(yyruleno==182); -{yymsp[-1].minor.yy412 = yymsp[0].minor.yy412;} + case 182: /* from ::= FROM tablelist */ + case 183: /* from ::= FROM sub */ yytestcase(yyruleno==183); +{yymsp[-1].minor.yy8 = yymsp[0].minor.yy8;} break; - case 183: /* sub ::= LP union RP */ -{yymsp[-2].minor.yy412 = addSubqueryElem(NULL, yymsp[-1].minor.yy525, NULL);} + case 184: /* sub ::= LP union RP */ +{yymsp[-2].minor.yy8 = addSubqueryElem(NULL, yymsp[-1].minor.yy421, NULL);} break; - case 184: /* sub ::= LP union RP ids */ -{yymsp[-3].minor.yy412 = addSubqueryElem(NULL, yymsp[-2].minor.yy525, &yymsp[0].minor.yy0);} + case 185: /* sub ::= LP union RP ids */ +{yymsp[-3].minor.yy8 = addSubqueryElem(NULL, yymsp[-2].minor.yy421, &yymsp[0].minor.yy0);} break; - case 185: /* sub ::= sub COMMA LP union RP ids */ -{yylhsminor.yy412 = addSubqueryElem(yymsp[-5].minor.yy412, yymsp[-2].minor.yy525, &yymsp[0].minor.yy0);} - yymsp[-5].minor.yy412 = yylhsminor.yy412; + case 186: /* sub ::= sub COMMA LP union RP ids */ +{yylhsminor.yy8 = addSubqueryElem(yymsp[-5].minor.yy8, yymsp[-2].minor.yy421, &yymsp[0].minor.yy0);} + yymsp[-5].minor.yy8 = yylhsminor.yy8; break; - case 186: /* tablelist ::= ids cpxName */ + case 187: /* tablelist ::= ids cpxName */ { yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; - yylhsminor.yy412 = setTableNameList(NULL, &yymsp[-1].minor.yy0, NULL); + yylhsminor.yy8 = setTableNameList(NULL, &yymsp[-1].minor.yy0, NULL); } - yymsp[-1].minor.yy412 = yylhsminor.yy412; + yymsp[-1].minor.yy8 = yylhsminor.yy8; break; - case 187: /* tablelist ::= ids cpxName ids */ + case 188: /* tablelist ::= ids cpxName ids */ { yymsp[-2].minor.yy0.n += yymsp[-1].minor.yy0.n; - yylhsminor.yy412 = setTableNameList(NULL, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); + yylhsminor.yy8 = setTableNameList(NULL, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy412 = yylhsminor.yy412; + yymsp[-2].minor.yy8 = yylhsminor.yy8; break; - case 188: /* tablelist ::= tablelist COMMA ids cpxName */ + case 189: /* tablelist ::= tablelist COMMA ids cpxName */ { yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; - yylhsminor.yy412 = setTableNameList(yymsp[-3].minor.yy412, &yymsp[-1].minor.yy0, NULL); + yylhsminor.yy8 = setTableNameList(yymsp[-3].minor.yy8, &yymsp[-1].minor.yy0, NULL); } - yymsp[-3].minor.yy412 = yylhsminor.yy412; + yymsp[-3].minor.yy8 = yylhsminor.yy8; break; - case 189: /* tablelist ::= tablelist COMMA ids cpxName ids */ + case 190: /* tablelist ::= tablelist COMMA ids cpxName ids */ { yymsp[-2].minor.yy0.n += yymsp[-1].minor.yy0.n; - yylhsminor.yy412 = setTableNameList(yymsp[-4].minor.yy412, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); + yylhsminor.yy8 = setTableNameList(yymsp[-4].minor.yy8, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } - yymsp[-4].minor.yy412 = yylhsminor.yy412; + yymsp[-4].minor.yy8 = yylhsminor.yy8; break; - case 190: /* tmvar ::= VARIABLE */ + case 191: /* tmvar ::= VARIABLE */ {yylhsminor.yy0 = yymsp[0].minor.yy0;} yymsp[0].minor.yy0 = yylhsminor.yy0; break; - case 191: /* interval_opt ::= INTERVAL LP tmvar RP */ -{yymsp[-3].minor.yy520.interval = yymsp[-1].minor.yy0; yymsp[-3].minor.yy520.offset.n = 0;} + case 192: /* interval_option ::= intervalKey LP tmvar RP */ +{yylhsminor.yy400.interval = yymsp[-1].minor.yy0; yylhsminor.yy400.offset.n = 0; yylhsminor.yy400.token = yymsp[-3].minor.yy104;} + yymsp[-3].minor.yy400 = yylhsminor.yy400; + break; + case 193: /* interval_option ::= intervalKey LP tmvar COMMA tmvar RP */ +{yylhsminor.yy400.interval = yymsp[-3].minor.yy0; yylhsminor.yy400.offset = yymsp[-1].minor.yy0; yylhsminor.yy400.token = yymsp[-5].minor.yy104;} + yymsp[-5].minor.yy400 = yylhsminor.yy400; + break; + case 194: /* interval_option ::= */ +{memset(&yymsp[1].minor.yy400, 0, sizeof(yymsp[1].minor.yy400));} break; - case 192: /* interval_opt ::= INTERVAL LP tmvar COMMA tmvar RP */ -{yymsp[-5].minor.yy520.interval = yymsp[-3].minor.yy0; yymsp[-5].minor.yy520.offset = yymsp[-1].minor.yy0;} + case 195: /* intervalKey ::= INTERVAL */ +{yymsp[0].minor.yy104 = TK_INTERVAL;} break; - case 193: /* interval_opt ::= */ -{memset(&yymsp[1].minor.yy520, 0, sizeof(yymsp[1].minor.yy520));} + case 196: /* intervalKey ::= EVERY */ +{yymsp[0].minor.yy104 = TK_EVERY; } break; - case 194: /* session_option ::= */ -{yymsp[1].minor.yy259.col.n = 0; yymsp[1].minor.yy259.gap.n = 0;} + case 197: /* session_option ::= */ +{yymsp[1].minor.yy147.col.n = 0; yymsp[1].minor.yy147.gap.n = 0;} break; - case 195: /* session_option ::= SESSION LP ids cpxName COMMA tmvar RP */ + case 198: /* session_option ::= SESSION LP ids cpxName COMMA tmvar RP */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; - yymsp[-6].minor.yy259.col = yymsp[-4].minor.yy0; - yymsp[-6].minor.yy259.gap = yymsp[-1].minor.yy0; + yymsp[-6].minor.yy147.col = yymsp[-4].minor.yy0; + yymsp[-6].minor.yy147.gap = yymsp[-1].minor.yy0; } break; - case 196: /* windowstate_option ::= */ -{ yymsp[1].minor.yy144.col.n = 0; yymsp[1].minor.yy144.col.z = NULL;} + case 199: /* windowstate_option ::= */ +{ yymsp[1].minor.yy40.col.n = 0; yymsp[1].minor.yy40.col.z = NULL;} break; - case 197: /* windowstate_option ::= STATE_WINDOW LP ids RP */ -{ yymsp[-3].minor.yy144.col = yymsp[-1].minor.yy0; } + case 200: /* windowstate_option ::= STATE_WINDOW LP ids RP */ +{ yymsp[-3].minor.yy40.col = yymsp[-1].minor.yy0; } break; - case 198: /* fill_opt ::= */ -{ yymsp[1].minor.yy525 = 0; } + case 201: /* fill_opt ::= */ +{ yymsp[1].minor.yy421 = 0; } break; - case 199: /* fill_opt ::= FILL LP ID COMMA tagitemlist RP */ + case 202: /* fill_opt ::= FILL LP ID COMMA tagitemlist RP */ { tVariant A = {0}; toTSDBType(yymsp[-3].minor.yy0.type); tVariantCreate(&A, &yymsp[-3].minor.yy0); - tVariantListInsert(yymsp[-1].minor.yy525, &A, -1, 0); - yymsp[-5].minor.yy525 = yymsp[-1].minor.yy525; + tVariantListInsert(yymsp[-1].minor.yy421, &A, -1, 0); + yymsp[-5].minor.yy421 = yymsp[-1].minor.yy421; } break; - case 200: /* fill_opt ::= FILL LP ID RP */ + case 203: /* fill_opt ::= FILL LP ID RP */ { toTSDBType(yymsp[-1].minor.yy0.type); - yymsp[-3].minor.yy525 = tVariantListAppendToken(NULL, &yymsp[-1].minor.yy0, -1); + yymsp[-3].minor.yy421 = tVariantListAppendToken(NULL, &yymsp[-1].minor.yy0, -1); } break; - case 201: /* sliding_opt ::= SLIDING LP tmvar RP */ + case 204: /* sliding_opt ::= SLIDING LP tmvar RP */ {yymsp[-3].minor.yy0 = yymsp[-1].minor.yy0; } break; - case 202: /* sliding_opt ::= */ + case 205: /* sliding_opt ::= */ {yymsp[1].minor.yy0.n = 0; yymsp[1].minor.yy0.z = NULL; yymsp[1].minor.yy0.type = 0; } break; - case 204: /* orderby_opt ::= ORDER BY sortlist */ -{yymsp[-2].minor.yy525 = yymsp[0].minor.yy525;} + case 207: /* orderby_opt ::= ORDER BY sortlist */ +{yymsp[-2].minor.yy421 = yymsp[0].minor.yy421;} break; - case 205: /* sortlist ::= sortlist COMMA item sortorder */ + case 208: /* sortlist ::= sortlist COMMA item sortorder */ { - yylhsminor.yy525 = tVariantListAppend(yymsp[-3].minor.yy525, &yymsp[-1].minor.yy506, yymsp[0].minor.yy52); + yylhsminor.yy421 = tVariantListAppend(yymsp[-3].minor.yy421, &yymsp[-1].minor.yy430, yymsp[0].minor.yy96); } - yymsp[-3].minor.yy525 = yylhsminor.yy525; + yymsp[-3].minor.yy421 = yylhsminor.yy421; break; - case 206: /* sortlist ::= item sortorder */ + case 209: /* sortlist ::= item sortorder */ { - yylhsminor.yy525 = tVariantListAppend(NULL, &yymsp[-1].minor.yy506, yymsp[0].minor.yy52); + yylhsminor.yy421 = tVariantListAppend(NULL, &yymsp[-1].minor.yy430, yymsp[0].minor.yy96); } - yymsp[-1].minor.yy525 = yylhsminor.yy525; + yymsp[-1].minor.yy421 = yylhsminor.yy421; break; - case 207: /* item ::= ids cpxName */ + case 210: /* item ::= ids cpxName */ { toTSDBType(yymsp[-1].minor.yy0.type); yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; - tVariantCreate(&yylhsminor.yy506, &yymsp[-1].minor.yy0); + tVariantCreate(&yylhsminor.yy430, &yymsp[-1].minor.yy0); } - yymsp[-1].minor.yy506 = yylhsminor.yy506; + yymsp[-1].minor.yy430 = yylhsminor.yy430; break; - case 208: /* sortorder ::= ASC */ -{ yymsp[0].minor.yy52 = TSDB_ORDER_ASC; } + case 211: /* sortorder ::= ASC */ +{ yymsp[0].minor.yy96 = TSDB_ORDER_ASC; } break; - case 209: /* sortorder ::= DESC */ -{ yymsp[0].minor.yy52 = TSDB_ORDER_DESC;} + case 212: /* sortorder ::= DESC */ +{ yymsp[0].minor.yy96 = TSDB_ORDER_DESC;} break; - case 210: /* sortorder ::= */ -{ yymsp[1].minor.yy52 = TSDB_ORDER_ASC; } + case 213: /* sortorder ::= */ +{ yymsp[1].minor.yy96 = TSDB_ORDER_ASC; } break; - case 211: /* groupby_opt ::= */ -{ yymsp[1].minor.yy525 = 0;} + case 214: /* groupby_opt ::= */ +{ yymsp[1].minor.yy421 = 0;} break; - case 212: /* groupby_opt ::= GROUP BY grouplist */ -{ yymsp[-2].minor.yy525 = yymsp[0].minor.yy525;} + case 215: /* groupby_opt ::= GROUP BY grouplist */ +{ yymsp[-2].minor.yy421 = yymsp[0].minor.yy421;} break; - case 213: /* grouplist ::= grouplist COMMA item */ + case 216: /* grouplist ::= grouplist COMMA item */ { - yylhsminor.yy525 = tVariantListAppend(yymsp[-2].minor.yy525, &yymsp[0].minor.yy506, -1); + yylhsminor.yy421 = tVariantListAppend(yymsp[-2].minor.yy421, &yymsp[0].minor.yy430, -1); } - yymsp[-2].minor.yy525 = yylhsminor.yy525; + yymsp[-2].minor.yy421 = yylhsminor.yy421; break; - case 214: /* grouplist ::= item */ + case 217: /* grouplist ::= item */ { - yylhsminor.yy525 = tVariantListAppend(NULL, &yymsp[0].minor.yy506, -1); + yylhsminor.yy421 = tVariantListAppend(NULL, &yymsp[0].minor.yy430, -1); } - yymsp[0].minor.yy525 = yylhsminor.yy525; + yymsp[0].minor.yy421 = yylhsminor.yy421; break; - case 215: /* having_opt ::= */ - case 225: /* where_opt ::= */ yytestcase(yyruleno==225); - case 267: /* expritem ::= */ yytestcase(yyruleno==267); -{yymsp[1].minor.yy370 = 0;} + case 218: /* having_opt ::= */ + case 228: /* where_opt ::= */ yytestcase(yyruleno==228); + case 270: /* expritem ::= */ yytestcase(yyruleno==270); +{yymsp[1].minor.yy439 = 0;} break; - case 216: /* having_opt ::= HAVING expr */ - case 226: /* where_opt ::= WHERE expr */ yytestcase(yyruleno==226); -{yymsp[-1].minor.yy370 = yymsp[0].minor.yy370;} + case 219: /* having_opt ::= HAVING expr */ + case 229: /* where_opt ::= WHERE expr */ yytestcase(yyruleno==229); +{yymsp[-1].minor.yy439 = yymsp[0].minor.yy439;} break; - case 217: /* limit_opt ::= */ - case 221: /* slimit_opt ::= */ yytestcase(yyruleno==221); -{yymsp[1].minor.yy126.limit = -1; yymsp[1].minor.yy126.offset = 0;} + case 220: /* limit_opt ::= */ + case 224: /* slimit_opt ::= */ yytestcase(yyruleno==224); +{yymsp[1].minor.yy166.limit = -1; yymsp[1].minor.yy166.offset = 0;} break; - case 218: /* limit_opt ::= LIMIT signed */ - case 222: /* slimit_opt ::= SLIMIT signed */ yytestcase(yyruleno==222); -{yymsp[-1].minor.yy126.limit = yymsp[0].minor.yy501; yymsp[-1].minor.yy126.offset = 0;} + case 221: /* limit_opt ::= LIMIT signed */ + case 225: /* slimit_opt ::= SLIMIT signed */ yytestcase(yyruleno==225); +{yymsp[-1].minor.yy166.limit = yymsp[0].minor.yy325; yymsp[-1].minor.yy166.offset = 0;} break; - case 219: /* limit_opt ::= LIMIT signed OFFSET signed */ -{ yymsp[-3].minor.yy126.limit = yymsp[-2].minor.yy501; yymsp[-3].minor.yy126.offset = yymsp[0].minor.yy501;} + case 222: /* limit_opt ::= LIMIT signed OFFSET signed */ +{ yymsp[-3].minor.yy166.limit = yymsp[-2].minor.yy325; yymsp[-3].minor.yy166.offset = yymsp[0].minor.yy325;} break; - case 220: /* limit_opt ::= LIMIT signed COMMA signed */ -{ yymsp[-3].minor.yy126.limit = yymsp[0].minor.yy501; yymsp[-3].minor.yy126.offset = yymsp[-2].minor.yy501;} + case 223: /* limit_opt ::= LIMIT signed COMMA signed */ +{ yymsp[-3].minor.yy166.limit = yymsp[0].minor.yy325; yymsp[-3].minor.yy166.offset = yymsp[-2].minor.yy325;} break; - case 223: /* slimit_opt ::= SLIMIT signed SOFFSET signed */ -{yymsp[-3].minor.yy126.limit = yymsp[-2].minor.yy501; yymsp[-3].minor.yy126.offset = yymsp[0].minor.yy501;} + case 226: /* slimit_opt ::= SLIMIT signed SOFFSET signed */ +{yymsp[-3].minor.yy166.limit = yymsp[-2].minor.yy325; yymsp[-3].minor.yy166.offset = yymsp[0].minor.yy325;} break; - case 224: /* slimit_opt ::= SLIMIT signed COMMA signed */ -{yymsp[-3].minor.yy126.limit = yymsp[0].minor.yy501; yymsp[-3].minor.yy126.offset = yymsp[-2].minor.yy501;} + case 227: /* slimit_opt ::= SLIMIT signed COMMA signed */ +{yymsp[-3].minor.yy166.limit = yymsp[0].minor.yy325; yymsp[-3].minor.yy166.offset = yymsp[-2].minor.yy325;} break; - case 227: /* expr ::= LP expr RP */ -{yylhsminor.yy370 = yymsp[-1].minor.yy370; yylhsminor.yy370->exprToken.z = yymsp[-2].minor.yy0.z; yylhsminor.yy370->exprToken.n = (yymsp[0].minor.yy0.z - yymsp[-2].minor.yy0.z + 1);} - yymsp[-2].minor.yy370 = yylhsminor.yy370; + case 230: /* expr ::= LP expr RP */ +{yylhsminor.yy439 = yymsp[-1].minor.yy439; yylhsminor.yy439->exprToken.z = yymsp[-2].minor.yy0.z; yylhsminor.yy439->exprToken.n = (yymsp[0].minor.yy0.z - yymsp[-2].minor.yy0.z + 1);} + yymsp[-2].minor.yy439 = yylhsminor.yy439; break; - case 228: /* expr ::= ID */ -{ yylhsminor.yy370 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_ID);} - yymsp[0].minor.yy370 = yylhsminor.yy370; + case 231: /* expr ::= ID */ +{ yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_ID);} + yymsp[0].minor.yy439 = yylhsminor.yy439; break; - case 229: /* expr ::= ID DOT ID */ -{ yymsp[-2].minor.yy0.n += (1+yymsp[0].minor.yy0.n); yylhsminor.yy370 = tSqlExprCreateIdValue(&yymsp[-2].minor.yy0, TK_ID);} - yymsp[-2].minor.yy370 = yylhsminor.yy370; + case 232: /* expr ::= ID DOT ID */ +{ yymsp[-2].minor.yy0.n += (1+yymsp[0].minor.yy0.n); yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[-2].minor.yy0, TK_ID);} + yymsp[-2].minor.yy439 = yylhsminor.yy439; break; - case 230: /* expr ::= ID DOT STAR */ -{ yymsp[-2].minor.yy0.n += (1+yymsp[0].minor.yy0.n); yylhsminor.yy370 = tSqlExprCreateIdValue(&yymsp[-2].minor.yy0, TK_ALL);} - yymsp[-2].minor.yy370 = yylhsminor.yy370; + case 233: /* expr ::= ID DOT STAR */ +{ yymsp[-2].minor.yy0.n += (1+yymsp[0].minor.yy0.n); yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[-2].minor.yy0, TK_ALL);} + yymsp[-2].minor.yy439 = yylhsminor.yy439; break; - case 231: /* expr ::= INTEGER */ -{ yylhsminor.yy370 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_INTEGER);} - yymsp[0].minor.yy370 = yylhsminor.yy370; + case 234: /* expr ::= INTEGER */ +{ yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_INTEGER);} + yymsp[0].minor.yy439 = yylhsminor.yy439; break; - case 232: /* expr ::= MINUS INTEGER */ - case 233: /* expr ::= PLUS INTEGER */ yytestcase(yyruleno==233); -{ yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yymsp[-1].minor.yy0.type = TK_INTEGER; yylhsminor.yy370 = tSqlExprCreateIdValue(&yymsp[-1].minor.yy0, TK_INTEGER);} - yymsp[-1].minor.yy370 = yylhsminor.yy370; + case 235: /* expr ::= MINUS INTEGER */ + case 236: /* expr ::= PLUS INTEGER */ yytestcase(yyruleno==236); +{ yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yymsp[-1].minor.yy0.type = TK_INTEGER; yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[-1].minor.yy0, TK_INTEGER);} + yymsp[-1].minor.yy439 = yylhsminor.yy439; break; - case 234: /* expr ::= FLOAT */ -{ yylhsminor.yy370 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_FLOAT);} - yymsp[0].minor.yy370 = yylhsminor.yy370; + case 237: /* expr ::= FLOAT */ +{ yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_FLOAT);} + yymsp[0].minor.yy439 = yylhsminor.yy439; break; - case 235: /* expr ::= MINUS FLOAT */ - case 236: /* expr ::= PLUS FLOAT */ yytestcase(yyruleno==236); -{ yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yymsp[-1].minor.yy0.type = TK_FLOAT; yylhsminor.yy370 = tSqlExprCreateIdValue(&yymsp[-1].minor.yy0, TK_FLOAT);} - yymsp[-1].minor.yy370 = yylhsminor.yy370; + case 238: /* expr ::= MINUS FLOAT */ + case 239: /* expr ::= PLUS FLOAT */ yytestcase(yyruleno==239); +{ yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yymsp[-1].minor.yy0.type = TK_FLOAT; yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[-1].minor.yy0, TK_FLOAT);} + yymsp[-1].minor.yy439 = yylhsminor.yy439; break; - case 237: /* expr ::= STRING */ -{ yylhsminor.yy370 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_STRING);} - yymsp[0].minor.yy370 = yylhsminor.yy370; + case 240: /* expr ::= STRING */ +{ yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_STRING);} + yymsp[0].minor.yy439 = yylhsminor.yy439; break; - case 238: /* expr ::= NOW */ -{ yylhsminor.yy370 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_NOW); } - yymsp[0].minor.yy370 = yylhsminor.yy370; + case 241: /* expr ::= NOW */ +{ yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_NOW); } + yymsp[0].minor.yy439 = yylhsminor.yy439; break; - case 239: /* expr ::= VARIABLE */ -{ yylhsminor.yy370 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_VARIABLE);} - yymsp[0].minor.yy370 = yylhsminor.yy370; + case 242: /* expr ::= VARIABLE */ +{ yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_VARIABLE);} + yymsp[0].minor.yy439 = yylhsminor.yy439; break; - case 240: /* expr ::= PLUS VARIABLE */ - case 241: /* expr ::= MINUS VARIABLE */ yytestcase(yyruleno==241); -{ yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yymsp[-1].minor.yy0.type = TK_VARIABLE; yylhsminor.yy370 = tSqlExprCreateIdValue(&yymsp[-1].minor.yy0, TK_VARIABLE);} - yymsp[-1].minor.yy370 = yylhsminor.yy370; + case 243: /* expr ::= PLUS VARIABLE */ + case 244: /* expr ::= MINUS VARIABLE */ yytestcase(yyruleno==244); +{ yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yymsp[-1].minor.yy0.type = TK_VARIABLE; yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[-1].minor.yy0, TK_VARIABLE);} + yymsp[-1].minor.yy439 = yylhsminor.yy439; break; - case 242: /* expr ::= BOOL */ -{ yylhsminor.yy370 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_BOOL);} - yymsp[0].minor.yy370 = yylhsminor.yy370; + case 245: /* expr ::= BOOL */ +{ yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_BOOL);} + yymsp[0].minor.yy439 = yylhsminor.yy439; break; - case 243: /* expr ::= NULL */ -{ yylhsminor.yy370 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_NULL);} - yymsp[0].minor.yy370 = yylhsminor.yy370; + case 246: /* expr ::= NULL */ +{ yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_NULL);} + yymsp[0].minor.yy439 = yylhsminor.yy439; break; - case 244: /* expr ::= ID LP exprlist RP */ -{ tStrTokenAppend(pInfo->funcs, &yymsp[-3].minor.yy0); yylhsminor.yy370 = tSqlExprCreateFunction(yymsp[-1].minor.yy525, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, yymsp[-3].minor.yy0.type); } - yymsp[-3].minor.yy370 = yylhsminor.yy370; + case 247: /* expr ::= ID LP exprlist RP */ +{ tStrTokenAppend(pInfo->funcs, &yymsp[-3].minor.yy0); yylhsminor.yy439 = tSqlExprCreateFunction(yymsp[-1].minor.yy421, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, yymsp[-3].minor.yy0.type); } + yymsp[-3].minor.yy439 = yylhsminor.yy439; break; - case 245: /* expr ::= ID LP STAR RP */ -{ tStrTokenAppend(pInfo->funcs, &yymsp[-3].minor.yy0); yylhsminor.yy370 = tSqlExprCreateFunction(NULL, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, yymsp[-3].minor.yy0.type); } - yymsp[-3].minor.yy370 = yylhsminor.yy370; + case 248: /* expr ::= ID LP STAR RP */ +{ tStrTokenAppend(pInfo->funcs, &yymsp[-3].minor.yy0); yylhsminor.yy439 = tSqlExprCreateFunction(NULL, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, yymsp[-3].minor.yy0.type); } + yymsp[-3].minor.yy439 = yylhsminor.yy439; break; - case 246: /* expr ::= expr IS NULL */ -{yylhsminor.yy370 = tSqlExprCreate(yymsp[-2].minor.yy370, NULL, TK_ISNULL);} - yymsp[-2].minor.yy370 = yylhsminor.yy370; + case 249: /* expr ::= expr IS NULL */ +{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, NULL, TK_ISNULL);} + yymsp[-2].minor.yy439 = yylhsminor.yy439; break; - case 247: /* expr ::= expr IS NOT NULL */ -{yylhsminor.yy370 = tSqlExprCreate(yymsp[-3].minor.yy370, NULL, TK_NOTNULL);} - yymsp[-3].minor.yy370 = yylhsminor.yy370; + case 250: /* expr ::= expr IS NOT NULL */ +{yylhsminor.yy439 = tSqlExprCreate(yymsp[-3].minor.yy439, NULL, TK_NOTNULL);} + yymsp[-3].minor.yy439 = yylhsminor.yy439; break; - case 248: /* expr ::= expr LT expr */ -{yylhsminor.yy370 = tSqlExprCreate(yymsp[-2].minor.yy370, yymsp[0].minor.yy370, TK_LT);} - yymsp[-2].minor.yy370 = yylhsminor.yy370; + case 251: /* expr ::= expr LT expr */ +{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_LT);} + yymsp[-2].minor.yy439 = yylhsminor.yy439; break; - case 249: /* expr ::= expr GT expr */ -{yylhsminor.yy370 = tSqlExprCreate(yymsp[-2].minor.yy370, yymsp[0].minor.yy370, TK_GT);} - yymsp[-2].minor.yy370 = yylhsminor.yy370; + case 252: /* expr ::= expr GT expr */ +{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_GT);} + yymsp[-2].minor.yy439 = yylhsminor.yy439; break; - case 250: /* expr ::= expr LE expr */ -{yylhsminor.yy370 = tSqlExprCreate(yymsp[-2].minor.yy370, yymsp[0].minor.yy370, TK_LE);} - yymsp[-2].minor.yy370 = yylhsminor.yy370; + case 253: /* expr ::= expr LE expr */ +{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_LE);} + yymsp[-2].minor.yy439 = yylhsminor.yy439; break; - case 251: /* expr ::= expr GE expr */ -{yylhsminor.yy370 = tSqlExprCreate(yymsp[-2].minor.yy370, yymsp[0].minor.yy370, TK_GE);} - yymsp[-2].minor.yy370 = yylhsminor.yy370; + case 254: /* expr ::= expr GE expr */ +{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_GE);} + yymsp[-2].minor.yy439 = yylhsminor.yy439; break; - case 252: /* expr ::= expr NE expr */ -{yylhsminor.yy370 = tSqlExprCreate(yymsp[-2].minor.yy370, yymsp[0].minor.yy370, TK_NE);} - yymsp[-2].minor.yy370 = yylhsminor.yy370; + case 255: /* expr ::= expr NE expr */ +{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_NE);} + yymsp[-2].minor.yy439 = yylhsminor.yy439; break; - case 253: /* expr ::= expr EQ expr */ -{yylhsminor.yy370 = tSqlExprCreate(yymsp[-2].minor.yy370, yymsp[0].minor.yy370, TK_EQ);} - yymsp[-2].minor.yy370 = yylhsminor.yy370; + case 256: /* expr ::= expr EQ expr */ +{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_EQ);} + yymsp[-2].minor.yy439 = yylhsminor.yy439; break; - case 254: /* expr ::= expr BETWEEN expr AND expr */ -{ tSqlExpr* X2 = tSqlExprClone(yymsp[-4].minor.yy370); yylhsminor.yy370 = tSqlExprCreate(tSqlExprCreate(yymsp[-4].minor.yy370, yymsp[-2].minor.yy370, TK_GE), tSqlExprCreate(X2, yymsp[0].minor.yy370, TK_LE), TK_AND);} - yymsp[-4].minor.yy370 = yylhsminor.yy370; + case 257: /* expr ::= expr BETWEEN expr AND expr */ +{ tSqlExpr* X2 = tSqlExprClone(yymsp[-4].minor.yy439); yylhsminor.yy439 = tSqlExprCreate(tSqlExprCreate(yymsp[-4].minor.yy439, yymsp[-2].minor.yy439, TK_GE), tSqlExprCreate(X2, yymsp[0].minor.yy439, TK_LE), TK_AND);} + yymsp[-4].minor.yy439 = yylhsminor.yy439; break; - case 255: /* expr ::= expr AND expr */ -{yylhsminor.yy370 = tSqlExprCreate(yymsp[-2].minor.yy370, yymsp[0].minor.yy370, TK_AND);} - yymsp[-2].minor.yy370 = yylhsminor.yy370; + case 258: /* expr ::= expr AND expr */ +{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_AND);} + yymsp[-2].minor.yy439 = yylhsminor.yy439; break; - case 256: /* expr ::= expr OR expr */ -{yylhsminor.yy370 = tSqlExprCreate(yymsp[-2].minor.yy370, yymsp[0].minor.yy370, TK_OR); } - yymsp[-2].minor.yy370 = yylhsminor.yy370; + case 259: /* expr ::= expr OR expr */ +{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_OR); } + yymsp[-2].minor.yy439 = yylhsminor.yy439; break; - case 257: /* expr ::= expr PLUS expr */ -{yylhsminor.yy370 = tSqlExprCreate(yymsp[-2].minor.yy370, yymsp[0].minor.yy370, TK_PLUS); } - yymsp[-2].minor.yy370 = yylhsminor.yy370; + case 260: /* expr ::= expr PLUS expr */ +{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_PLUS); } + yymsp[-2].minor.yy439 = yylhsminor.yy439; break; - case 258: /* expr ::= expr MINUS expr */ -{yylhsminor.yy370 = tSqlExprCreate(yymsp[-2].minor.yy370, yymsp[0].minor.yy370, TK_MINUS); } - yymsp[-2].minor.yy370 = yylhsminor.yy370; + case 261: /* expr ::= expr MINUS expr */ +{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_MINUS); } + yymsp[-2].minor.yy439 = yylhsminor.yy439; break; - case 259: /* expr ::= expr STAR expr */ -{yylhsminor.yy370 = tSqlExprCreate(yymsp[-2].minor.yy370, yymsp[0].minor.yy370, TK_STAR); } - yymsp[-2].minor.yy370 = yylhsminor.yy370; + case 262: /* expr ::= expr STAR expr */ +{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_STAR); } + yymsp[-2].minor.yy439 = yylhsminor.yy439; break; - case 260: /* expr ::= expr SLASH expr */ -{yylhsminor.yy370 = tSqlExprCreate(yymsp[-2].minor.yy370, yymsp[0].minor.yy370, TK_DIVIDE);} - yymsp[-2].minor.yy370 = yylhsminor.yy370; + case 263: /* expr ::= expr SLASH expr */ +{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_DIVIDE);} + yymsp[-2].minor.yy439 = yylhsminor.yy439; break; - case 261: /* expr ::= expr REM expr */ -{yylhsminor.yy370 = tSqlExprCreate(yymsp[-2].minor.yy370, yymsp[0].minor.yy370, TK_REM); } - yymsp[-2].minor.yy370 = yylhsminor.yy370; + case 264: /* expr ::= expr REM expr */ +{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_REM); } + yymsp[-2].minor.yy439 = yylhsminor.yy439; break; - case 262: /* expr ::= expr LIKE expr */ -{yylhsminor.yy370 = tSqlExprCreate(yymsp[-2].minor.yy370, yymsp[0].minor.yy370, TK_LIKE); } - yymsp[-2].minor.yy370 = yylhsminor.yy370; + case 265: /* expr ::= expr LIKE expr */ +{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_LIKE); } + yymsp[-2].minor.yy439 = yylhsminor.yy439; break; - case 263: /* expr ::= expr IN LP exprlist RP */ -{yylhsminor.yy370 = tSqlExprCreate(yymsp[-4].minor.yy370, (tSqlExpr*)yymsp[-1].minor.yy525, TK_IN); } - yymsp[-4].minor.yy370 = yylhsminor.yy370; + case 266: /* expr ::= expr IN LP exprlist RP */ +{yylhsminor.yy439 = tSqlExprCreate(yymsp[-4].minor.yy439, (tSqlExpr*)yymsp[-1].minor.yy421, TK_IN); } + yymsp[-4].minor.yy439 = yylhsminor.yy439; break; - case 264: /* exprlist ::= exprlist COMMA expritem */ -{yylhsminor.yy525 = tSqlExprListAppend(yymsp[-2].minor.yy525,yymsp[0].minor.yy370,0, 0);} - yymsp[-2].minor.yy525 = yylhsminor.yy525; + case 267: /* exprlist ::= exprlist COMMA expritem */ +{yylhsminor.yy421 = tSqlExprListAppend(yymsp[-2].minor.yy421,yymsp[0].minor.yy439,0, 0);} + yymsp[-2].minor.yy421 = yylhsminor.yy421; break; - case 265: /* exprlist ::= expritem */ -{yylhsminor.yy525 = tSqlExprListAppend(0,yymsp[0].minor.yy370,0, 0);} - yymsp[0].minor.yy525 = yylhsminor.yy525; + case 268: /* exprlist ::= expritem */ +{yylhsminor.yy421 = tSqlExprListAppend(0,yymsp[0].minor.yy439,0, 0);} + yymsp[0].minor.yy421 = yylhsminor.yy421; break; - case 266: /* expritem ::= expr */ -{yylhsminor.yy370 = yymsp[0].minor.yy370;} - yymsp[0].minor.yy370 = yylhsminor.yy370; + case 269: /* expritem ::= expr */ +{yylhsminor.yy439 = yymsp[0].minor.yy439;} + yymsp[0].minor.yy439 = yylhsminor.yy439; break; - case 268: /* cmd ::= RESET QUERY CACHE */ + case 271: /* cmd ::= RESET QUERY CACHE */ { setDCLSqlElems(pInfo, TSDB_SQL_RESET_CACHE, 0);} break; - case 269: /* cmd ::= SYNCDB ids REPLICA */ + case 272: /* cmd ::= SYNCDB ids REPLICA */ { setDCLSqlElems(pInfo, TSDB_SQL_SYNC_DB_REPLICA, 1, &yymsp[-1].minor.yy0);} break; - case 270: /* cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */ + case 273: /* cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; - SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy525, NULL, TSDB_ALTER_TABLE_ADD_COLUMN, -1); + SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy421, NULL, TSDB_ALTER_TABLE_ADD_COLUMN, -1); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 271: /* cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */ + case 274: /* cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; @@ -3135,21 +3155,21 @@ static void yy_reduce( setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 272: /* cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */ + case 275: /* cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; - SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy525, NULL, TSDB_ALTER_TABLE_CHANGE_COLUMN, -1); + SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy421, NULL, TSDB_ALTER_TABLE_CHANGE_COLUMN, -1); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 273: /* cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */ + case 276: /* cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; - SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy525, NULL, TSDB_ALTER_TABLE_ADD_TAG_COLUMN, -1); + SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy421, NULL, TSDB_ALTER_TABLE_ADD_TAG_COLUMN, -1); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 274: /* cmd ::= ALTER TABLE ids cpxName DROP TAG ids */ + case 277: /* cmd ::= ALTER TABLE ids cpxName DROP TAG ids */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; @@ -3160,7 +3180,7 @@ static void yy_reduce( setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 275: /* cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */ + case 278: /* cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */ { yymsp[-5].minor.yy0.n += yymsp[-4].minor.yy0.n; @@ -3174,33 +3194,33 @@ static void yy_reduce( setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 276: /* cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */ + case 279: /* cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */ { yymsp[-6].minor.yy0.n += yymsp[-5].minor.yy0.n; toTSDBType(yymsp[-2].minor.yy0.type); SArray* A = tVariantListAppendToken(NULL, &yymsp[-2].minor.yy0, -1); - A = tVariantListAppend(A, &yymsp[0].minor.yy506, -1); + A = tVariantListAppend(A, &yymsp[0].minor.yy430, -1); SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-6].minor.yy0, NULL, A, TSDB_ALTER_TABLE_UPDATE_TAG_VAL, -1); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 277: /* cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */ + case 280: /* cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; - SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy525, NULL, TSDB_ALTER_TABLE_MODIFY_TAG_COLUMN, -1); + SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy421, NULL, TSDB_ALTER_TABLE_MODIFY_TAG_COLUMN, -1); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 278: /* cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */ + case 281: /* cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; - SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy525, NULL, TSDB_ALTER_TABLE_ADD_COLUMN, TSDB_SUPER_TABLE); + SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy421, NULL, TSDB_ALTER_TABLE_ADD_COLUMN, TSDB_SUPER_TABLE); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 279: /* cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */ + case 282: /* cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; @@ -3211,21 +3231,21 @@ static void yy_reduce( setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 280: /* cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */ + case 283: /* cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; - SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy525, NULL, TSDB_ALTER_TABLE_CHANGE_COLUMN, TSDB_SUPER_TABLE); + SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy421, NULL, TSDB_ALTER_TABLE_CHANGE_COLUMN, TSDB_SUPER_TABLE); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 281: /* cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */ + case 284: /* cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; - SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy525, NULL, TSDB_ALTER_TABLE_ADD_TAG_COLUMN, TSDB_SUPER_TABLE); + SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy421, NULL, TSDB_ALTER_TABLE_ADD_TAG_COLUMN, TSDB_SUPER_TABLE); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 282: /* cmd ::= ALTER STABLE ids cpxName DROP TAG ids */ + case 285: /* cmd ::= ALTER STABLE ids cpxName DROP TAG ids */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; @@ -3236,7 +3256,7 @@ static void yy_reduce( setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 283: /* cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */ + case 286: /* cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */ { yymsp[-5].minor.yy0.n += yymsp[-4].minor.yy0.n; @@ -3250,32 +3270,32 @@ static void yy_reduce( setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 284: /* cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem */ + case 287: /* cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem */ { yymsp[-6].minor.yy0.n += yymsp[-5].minor.yy0.n; toTSDBType(yymsp[-2].minor.yy0.type); SArray* A = tVariantListAppendToken(NULL, &yymsp[-2].minor.yy0, -1); - A = tVariantListAppend(A, &yymsp[0].minor.yy506, -1); + A = tVariantListAppend(A, &yymsp[0].minor.yy430, -1); SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-6].minor.yy0, NULL, A, TSDB_ALTER_TABLE_UPDATE_TAG_VAL, TSDB_SUPER_TABLE); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 285: /* cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */ + case 288: /* cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; - SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy525, NULL, TSDB_ALTER_TABLE_MODIFY_TAG_COLUMN, TSDB_SUPER_TABLE); + SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy421, NULL, TSDB_ALTER_TABLE_MODIFY_TAG_COLUMN, TSDB_SUPER_TABLE); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 286: /* cmd ::= KILL CONNECTION INTEGER */ + case 289: /* cmd ::= KILL CONNECTION INTEGER */ {setKillSql(pInfo, TSDB_SQL_KILL_CONNECTION, &yymsp[0].minor.yy0);} break; - case 287: /* cmd ::= KILL STREAM INTEGER COLON INTEGER */ + case 290: /* cmd ::= KILL STREAM INTEGER COLON INTEGER */ {yymsp[-2].minor.yy0.n += (yymsp[-1].minor.yy0.n + yymsp[0].minor.yy0.n); setKillSql(pInfo, TSDB_SQL_KILL_STREAM, &yymsp[-2].minor.yy0);} break; - case 288: /* cmd ::= KILL QUERY INTEGER COLON INTEGER */ + case 291: /* cmd ::= KILL QUERY INTEGER COLON INTEGER */ {yymsp[-2].minor.yy0.n += (yymsp[-1].minor.yy0.n + yymsp[0].minor.yy0.n); setKillSql(pInfo, TSDB_SQL_KILL_QUERY, &yymsp[-2].minor.yy0);} break; default: diff --git a/src/util/src/ttokenizer.c b/src/util/src/ttokenizer.c index 1efab138ef5b5f8e3831c76f8b47fafb3f6b5527..9bc336d9e8bb41e76268641af7ca8c979ebb1c94 100644 --- a/src/util/src/ttokenizer.c +++ b/src/util/src/ttokenizer.c @@ -140,6 +140,7 @@ static SKeyword keywordTable[] = { {"FROM", TK_FROM}, {"VARIABLE", TK_VARIABLE}, {"INTERVAL", TK_INTERVAL}, + {"EVERY", TK_EVERY}, {"SESSION", TK_SESSION}, {"STATE_WINDOW", TK_STATE_WINDOW}, {"FILL", TK_FILL}, diff --git a/tests/pytest/functions/function_interp.py b/tests/pytest/functions/function_interp.py index 41215f15ebea082c96ec54d86ad77db93b99461e..87d001d9e586fdfccb28e6fe9c8a04510d6f3fb1 100644 --- a/tests/pytest/functions/function_interp.py +++ b/tests/pytest/functions/function_interp.py @@ -57,15 +57,15 @@ class TDTestCase: tdSql.checkRows(0) tdSql.query("select interp(pav) from ap1 where ts = '2021-07-25 02:19:54' FILL (LINEAR)") tdSql.checkRows(0) - tdSql.query("select interp(pav) from ap1 where ts> '2021-07-25 02:19:54' and ts<'2021-07-25 02:20:00' INTERVAL(1000a) FILL (LINEAR)") + tdSql.query("select interp(pav) from ap1 where ts> '2021-07-25 02:19:54' and ts<'2021-07-25 02:20:00' every(1000a) FILL (LINEAR)") tdSql.checkRows(6) - tdSql.query("select interp(pav) from ap1 where ts>= '2021-07-25 02:19:54' and ts<'2021-07-25 02:20:00' INTERVAL(1000a) FILL (NEXT)") + tdSql.query("select interp(pav) from ap1 where ts>= '2021-07-25 02:19:54' and ts<'2021-07-25 02:20:00' every(1000a) FILL (NEXT)") tdSql.checkRows(6) tdSql.checkData(0,1,2.90799) - tdSql.query("select interp(pav) from ap1 where ts> '2021-07-25 02:19:54' and ts <= '2021-07-25 02:20:00' INTERVAL(1000a) FILL (PREV)") + tdSql.query("select interp(pav) from ap1 where ts> '2021-07-25 02:19:54' and ts <= '2021-07-25 02:20:00' every(1000a) FILL (PREV)") tdSql.checkRows(7) tdSql.checkData(1,1,1.47885) - tdSql.query("select interp(pav) from ap1 where ts>= '2021-07-25 02:19:54' and ts <= '2021-07-25 02:20:00' INTERVAL(1000a) FILL (LINEAR)") + tdSql.query("select interp(pav) from ap1 where ts>= '2021-07-25 02:19:54' and ts <= '2021-07-25 02:20:00' every(1000a) FILL (LINEAR)") tdSql.checkRows(7) # check desc order @@ -74,13 +74,13 @@ class TDTestCase: tdSql.checkRows(0) tdSql.query("select interp(pav) from ap1 where ts = '2021-07-25 02:19:54' FILL (LINEAR) order by ts desc") tdSql.checkRows(0) - tdSql.query("select interp(pav) from ap1 where ts> '2021-07-25 02:19:54' and ts<'2021-07-25 02:20:00' INTERVAL(1000a) FILL (LINEAR) order by ts desc") + tdSql.query("select interp(pav) from ap1 where ts> '2021-07-25 02:19:54' and ts<'2021-07-25 02:20:00' every(1000a) FILL (LINEAR) order by ts desc") tdSql.checkRows(6) - tdSql.query("select interp(pav) from ap1 where ts>= '2021-07-25 02:19:54' and ts<'2021-07-25 02:20:00' INTERVAL(1000a) FILL (NEXT) order by ts desc") + tdSql.query("select interp(pav) from ap1 where ts>= '2021-07-25 02:19:54' and ts<'2021-07-25 02:20:00' every(1000a) FILL (NEXT) order by ts desc") tdSql.checkRows(6) tdSql.checkData(0,1,4.60900) - tdSql.error("select interp(pav) from ap1 where ts> '2021-07-25 02:19:54' and ts <= '2021-07-25 02:20:00' INTERVAL(1000a) FILL (PREV) order by ts desc") - tdSql.query("select interp(pav) from ap1 where ts>= '2021-07-25 02:19:54' and ts <= '2021-07-25 02:20:00' INTERVAL(1000a) FILL (LINEAR) order by ts desc") + tdSql.error("select interp(pav) from ap1 where ts> '2021-07-25 02:19:54' and ts <= '2021-07-25 02:20:00' every(1000a) FILL (PREV) order by ts desc") + tdSql.query("select interp(pav) from ap1 where ts>= '2021-07-25 02:19:54' and ts <= '2021-07-25 02:20:00' every(1000a) FILL (LINEAR) order by ts desc") tdSql.checkRows(7) # check exception @@ -88,7 +88,7 @@ class TDTestCase: tdSql.error("select interp(*) from ap1 FILL(NEXT)") tdSql.error("select interp(*) from ap1 ts >= '2021-07-25 02:19:54' FILL(NEXT)") tdSql.error("select interp(*) from ap1 ts <= '2021-07-25 02:19:54' FILL(NEXT)") - tdSql.error("select interp(*) from ap1 where ts >'2021-07-25 02:19:59.938' and ts < now interval(1s) fill(next)") + tdSql.error("select interp(*) from ap1 where ts >'2021-07-25 02:19:59.938' and ts < now every(1s) fill(next)") def stop(self): tdSql.close() diff --git a/tests/script/general/parser/interp_test.sim b/tests/script/general/parser/interp_test.sim index 5a2021dcfc0d961abfcdc4768545091092786e3c..8eac8a41d391508737232a3f068c477922bf77aa 100644 --- a/tests/script/general/parser/interp_test.sim +++ b/tests/script/general/parser/interp_test.sim @@ -23,562 +23,563 @@ sql use $db ##### select interp from table print ====== select intp from table $tb = $tbPrefix . 0 - ## interp(*) from tb - sql select interp(*) from $tb where ts = $ts0 - if $rows != 1 then - return -1 - endi - if $data00 != @18-09-17 09:00:00.000@ then - return -1 - endi - if $data01 != 0 then - return -1 - endi - if $data02 != 0 then - return -1 - endi - - ## interp + limit offset - sql select interp(*) from $tb where ts = $ts0 limit 5 offset 1 - if $rows != 0 then - return -1 - endi - - sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from $tb where ts = $ts0 - if $rows != 1 then - return -1 - endi - if $data00 != @18-09-17 09:00:00.000@ then - return -1 - endi - if $data01 != 0 then - return -1 - endi - if $data02 != 0 then - return -1 - endi - if $data03 != 0.00000 then - return -1 - endi - if $data04 != 0.000000000 then - return -1 - endi - if $data05 != 0 then - return -1 - endi - if $data06 != 0 then - return -1 - endi - if $data07 != 1 then - return -1 - endi - if $data08 != binary0 then - return -1 - endi - if $data09 != nchar0 then - return -1 - endi - - ## intp + aggregation functions - #$t = $ts0 + $delta - #$t = $t + $delta - #sql_error select interp(ts), max(c1), min(c2), count(c3), sum(c4), avg(c5), stddev(c6), first(c7), last(c8), interp(c9) from $tb where ts = $t - - ### illegal queries on a table - sql_error select interp(ts), c1 from $tb where ts = $ts0 - sql_error select interp(ts) from $tb where ts >= $ts0 - sql_error select interp(ts), max(c1), min(c2), count(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from $tb where ts = $t fill(NULL) - - ### interp from tb + fill - $t = $ts0 + 1000 - sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from $tb where ts = $t - if $rows != 0 then - return -1 - endi - - ## fill(none) - sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from $tb where ts = $t fill(none) - if $rows != 0 then - return -1 - endi - $t = $tsu + 1000 - sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from $tb where ts = $t fill(none) - if $rows != 0 then - return -1 - endi - - ## fill(NULL) - $t = $tsu - 1000 - sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from $tb where ts = $t fill(value, NULL) order by ts asc - if $rows != 1 then - return -1 - endi - if $data00 != @18-11-25 19:29:59.000@ then - return -1 - endi - if $data01 != NULL then - print expect NULL, actual $data01 - return -1 - endi - if $data02 != NULL then - return -1 - endi - if $data03 != NULL then - return -1 - endi - if $data04 != NULL then - return -1 - endi - if $data05 != NULL then - return -1 - endi - if $data06 != NULL then - return -1 - endi - if $data07 != NULL then - return -1 - endi - if $data08 != NULL then - return -1 - endi - if $data09 != NULL then - return -1 - endi - - $t = $tsu + 1000 - sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from $tb where ts = $t fill(none) - if $rows != 0 then - return -1 - endi - - ## fill(prev) - $t = $ts0 + 1000 - sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from $tb where ts = $t fill(prev) - if $rows != 1 then - return -1 - endi - - sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from $tb where ts = $ts0 fill(prev) - if $rows != 1 then - return -1 - endi - if $data00 != @18-09-17 09:00:00.000@ then - return -1 - endi - if $data01 != 0 then - return -1 - endi - if $data02 != 0 then - return -1 - endi - if $data03 != 0.00000 then - return -1 - endi - if $data04 != 0.000000000 then - return -1 - endi - if $data05 != 0 then - return -1 - endi - if $data06 != 0 then - return -1 - endi - if $data07 != 1 then - return -1 - endi - if $data08 != binary0 then - return -1 - endi - if $data09 != nchar0 then - return -1 - endi - - $t = $ts0 - 1000 - sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from $tb where ts = $t fill(prev) - if $rows != 0 then - return -1 - endi - - $t = $ts0 + 1000 - sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from intp_tb3 where ts = $t fill(prev) - if $rows != 1 then - return -1 - endi - if $data00 != @18-09-17 09:00:01.000@ then - return -1 - endi - if $data01 != 0 then - return -1 - endi - if $data02 != NULL then - return -1 - endi - if $data03 != 0.00000 then - print expect 0.00000, actual:$data03 - return -1 - endi +## interp(*) from tb +sql select interp(*) from $tb where ts = $ts0 +if $rows != 1 then + return -1 +endi +if $data00 != @18-09-17 09:00:00.000@ then + return -1 +endi +if $data01 != 0 then + return -1 +endi +if $data02 != 0 then + return -1 +endi + +## interp + limit offset +sql select interp(*) from $tb where ts = $ts0 limit 5 offset 1 +if $rows != 0 then + return -1 +endi + +sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from $tb where ts = $ts0 +if $rows != 1 then + return -1 +endi +if $data00 != @18-09-17 09:00:00.000@ then + return -1 +endi +if $data01 != 0 then + return -1 +endi +if $data02 != 0 then + return -1 +endi +if $data03 != 0.00000 then + return -1 +endi +if $data04 != 0.000000000 then + return -1 +endi +if $data05 != 0 then + return -1 +endi +if $data06 != 0 then + return -1 +endi +if $data07 != 1 then + return -1 +endi +if $data08 != binary0 then + return -1 +endi +if $data09 != nchar0 then + return -1 +endi + +## intp + aggregation functions +$t = $ts0 + $delta +$t = $t + $delta +sql_error select interp(ts), max(c1), min(c2), count(c3), sum(c4), avg(c5), stddev(c6), first(c7), last(c8), interp(c9) from $tb where ts = $t +sql_error select interp(ts) from $tb where ts=$ts0 interval(1s) + +### illegal queries on a table +sql_error select interp(ts), c1 from $tb where ts = $ts0 +sql_error select interp(ts) from $tb where ts >= $ts0 +sql_error select interp(ts), max(c1), min(c2), count(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from $tb where ts = $t fill(NULL) + +### interp from tb + fill +$t = $ts0 + 1000 +sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from $tb where ts = $t +if $rows != 0 then + return -1 +endi + +## fill(none) +sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from $tb where ts = $t fill(none) +if $rows != 0 then + return -1 +endi +$t = $tsu + 1000 +sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from $tb where ts = $t fill(none) +if $rows != 0 then + return -1 +endi + +## fill(NULL) +$t = $tsu - 1000 +sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from $tb where ts = $t fill(value, NULL) order by ts asc +if $rows != 1 then + return -1 +endi +if $data00 != @18-11-25 19:29:59.000@ then + return -1 +endi +if $data01 != NULL then + print expect NULL, actual $data01 + return -1 +endi +if $data02 != NULL then + return -1 +endi +if $data03 != NULL then + return -1 +endi +if $data04 != NULL then + return -1 +endi +if $data05 != NULL then + return -1 +endi +if $data06 != NULL then + return -1 +endi +if $data07 != NULL then + return -1 +endi +if $data08 != NULL then + return -1 +endi +if $data09 != NULL then + return -1 +endi + +$t = $tsu + 1000 +sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from $tb where ts = $t fill(none) +if $rows != 0 then + return -1 +endi + +## fill(prev) +$t = $ts0 + 1000 +sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from $tb where ts = $t fill(prev) +if $rows != 1 then + return -1 +endi + +sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from $tb where ts = $ts0 fill(prev) +if $rows != 1 then + return -1 +endi +if $data00 != @18-09-17 09:00:00.000@ then + return -1 +endi +if $data01 != 0 then + return -1 +endi +if $data02 != 0 then + return -1 +endi +if $data03 != 0.00000 then + return -1 +endi +if $data04 != 0.000000000 then + return -1 +endi +if $data05 != 0 then + return -1 +endi +if $data06 != 0 then + return -1 +endi +if $data07 != 1 then + return -1 +endi +if $data08 != binary0 then + return -1 +endi +if $data09 != nchar0 then + return -1 +endi + +$t = $ts0 - 1000 +sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from $tb where ts = $t fill(prev) +if $rows != 0 then + return -1 +endi + +$t = $ts0 + 1000 +sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from intp_tb3 where ts = $t fill(prev) +if $rows != 1 then + return -1 +endi +if $data00 != @18-09-17 09:00:01.000@ then + return -1 +endi +if $data01 != 0 then + return -1 +endi +if $data02 != NULL then + return -1 +endi +if $data03 != 0.00000 then + print expect 0.00000, actual:$data03 + return -1 +endi # if $data04 != NULL then # return -1 # endi - $t = $tsu + 1000 - sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from $tb where ts = $t fill(prev) - if $rows != 0 then - return -1 - endi - - ## fill(linear) - $t = $ts0 + 1000 - sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from $tb where ts = $t fill(linear) - print ====== 0:$data00, 1:$data01, 2:$data02, 3:$data03, 4:$data04, 5:$data05, 6:$data06, 7:$data07, 8:$data08, 9:$data09 - if $rows != 1 then - return -1 - endi - if $data00 != @18-09-17 09:00:01.000@ then - return -1 - endi - if $data01 != 0 then - return -1 - endi - if $data02 != 0 then - return -1 - endi - print $data03 - if $data03 != 0.00167 then - return -1 - endi - if $data04 != 0.001666667 then - return -1 - endi - if $data05 != 0 then - return -1 - endi - if $data06 != 0 then - return -1 - endi - if $data07 != NULL then - return -1 - endi - if $data08 != NULL then - return -1 - endi - if $data09 != NULL then - return -1 - endi - # columns contain NULL values - $t = $ts0 + 1000 - sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from intp_tb3 where ts = $t fill(linear) - print ====== 0:$data00, 1:$data01, 2:$data02, 3:$data03, 4:$data04, 5:$data05, 6:$data06, 7:$data07, 8:$data08, 9:$data09 - if $rows != 1 then - return -1 - endi - if $data00 != @18-09-17 09:00:01.000@ then - return -1 - endi - if $data01 != 0 then - return -1 - endi - if $data02 != NULL then - return -1 - endi - if $data03 != 0.00167 then - return -1 - endi - if $data04 != NULL then - return -1 - endi - if $data05 != 0 then - return -1 - endi - if $data06 != 0 then - return -1 - endi - if $data07 != NULL then - return -1 - endi - if $data08 != NULL then - return -1 - endi - if $data09 != NULL then - return -1 - endi - - print select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from $tb where ts = $ts0 fill(linear) - - sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from $tb where ts = $ts0 fill(linear) - if $rows != 1 then - return -1 - endi - if $data00 != @18-09-17 09:00:00.000@ then - return -1 - endi - if $data01 != 0 then - return -1 - endi - if $data02 != 0 then - return -1 - endi - if $data03 != 0.00000 then - return -1 - endi - if $data04 != 0.000000000 then - return -1 - endi - if $data05 != 0 then - return -1 - endi - if $data06 != 0 then - return -1 - endi - if $data07 != 1 then - return -1 - endi - if $data08 != binary0 then - return -1 - endi - if $data09 != nchar0 then - return -1 - endi - # columns contain NULL values - - print select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from intp_tb3 where ts = $ts0 fill(linear) - sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from intp_tb3 where ts = $ts0 fill(linear) - if $rows != 1 then - return -1 - endi - if $data00 != @18-09-17 09:00:00.000@ then - return -1 - endi - if $data01 != 0 then - return -1 - endi - if $data02 != NULL then - return -1 - endi - if $data03 != 0.00000 then - return -1 - endi - if $data04 != NULL then - return -1 - endi - if $data05 != 0 then - return -1 - endi - if $data06 != 0 then - return -1 - endi - if $data07 != 1 then - return -1 - endi - if $data08 != binary0 then - return -1 - endi - if $data09 != nchar0 then - return -1 - endi - - $t = $ts0 - 1000 - sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from $tb where ts = $t fill(linear) - if $rows != 0 then - return -1 - endi - - $t = $tsu + 1000 - print select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from $tb where ts = $t fill(linear) - sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from $tb where ts = $t fill(linear) - if $rows != 0 then - return -1 - endi +$t = $tsu + 1000 +sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from $tb where ts = $t fill(prev) +if $rows != 0 then + return -1 +endi + +## fill(linear) +$t = $ts0 + 1000 +sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from $tb where ts = $t fill(linear) +print ====== 0:$data00, 1:$data01, 2:$data02, 3:$data03, 4:$data04, 5:$data05, 6:$data06, 7:$data07, 8:$data08, 9:$data09 +if $rows != 1 then + return -1 +endi +if $data00 != @18-09-17 09:00:01.000@ then + return -1 +endi +if $data01 != 0 then + return -1 +endi +if $data02 != 0 then + return -1 +endi +print $data03 +if $data03 != 0.00167 then + return -1 +endi +if $data04 != 0.001666667 then + return -1 +endi +if $data05 != 0 then + return -1 +endi +if $data06 != 0 then + return -1 +endi +if $data07 != NULL then + return -1 +endi +if $data08 != NULL then + return -1 +endi +if $data09 != NULL then + return -1 +endi +# columns contain NULL values +$t = $ts0 + 1000 +sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from intp_tb3 where ts = $t fill(linear) +print ====== 0:$data00, 1:$data01, 2:$data02, 3:$data03, 4:$data04, 5:$data05, 6:$data06, 7:$data07, 8:$data08, 9:$data09 +if $rows != 1 then + return -1 +endi +if $data00 != @18-09-17 09:00:01.000@ then + return -1 +endi +if $data01 != 0 then + return -1 +endi +if $data02 != NULL then + return -1 +endi +if $data03 != 0.00167 then + return -1 +endi +if $data04 != NULL then + return -1 +endi +if $data05 != 0 then + return -1 +endi +if $data06 != 0 then + return -1 +endi +if $data07 != NULL then + return -1 +endi +if $data08 != NULL then + return -1 +endi +if $data09 != NULL then + return -1 +endi + +print select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from $tb where ts = $ts0 fill(linear) + +sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from $tb where ts = $ts0 fill(linear) +if $rows != 1 then + return -1 +endi +if $data00 != @18-09-17 09:00:00.000@ then + return -1 +endi +if $data01 != 0 then + return -1 +endi +if $data02 != 0 then + return -1 +endi +if $data03 != 0.00000 then + return -1 +endi +if $data04 != 0.000000000 then + return -1 +endi +if $data05 != 0 then + return -1 +endi +if $data06 != 0 then + return -1 +endi +if $data07 != 1 then + return -1 +endi +if $data08 != binary0 then + return -1 +endi +if $data09 != nchar0 then + return -1 +endi +# columns contain NULL values + +print select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from intp_tb3 where ts = $ts0 fill(linear) +sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from intp_tb3 where ts = $ts0 fill(linear) +if $rows != 1 then + return -1 +endi +if $data00 != @18-09-17 09:00:00.000@ then + return -1 +endi +if $data01 != 0 then + return -1 +endi +if $data02 != NULL then + return -1 +endi +if $data03 != 0.00000 then + return -1 +endi +if $data04 != NULL then + return -1 +endi +if $data05 != 0 then + return -1 +endi +if $data06 != 0 then + return -1 +endi +if $data07 != 1 then + return -1 +endi +if $data08 != binary0 then + return -1 +endi +if $data09 != nchar0 then + return -1 +endi + +$t = $ts0 - 1000 +sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from $tb where ts = $t fill(linear) +if $rows != 0 then + return -1 +endi + +$t = $tsu + 1000 +print select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from $tb where ts = $t fill(linear) +sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from $tb where ts = $t fill(linear) +if $rows != 0 then + return -1 +endi ## fill(value) - $t = $ts0 + 1000 - print 91 - sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from $tb where ts = $t fill(value, -1, -2) - if $rows != 1 then - return -1 - endi - if $data00 != @18-09-17 09:00:01.000@ then - return -1 - endi - if $data01 != -2 then - return -1 - endi - if $data02 != -2 then - return -1 - endi - if $data03 != -2.00000 then - return -1 - endi - if $data04 != -2.000000000 then - return -1 - endi - if $data05 != -2 then - return -1 - endi - if $data06 != -2 then - return -1 - endi - if $data07 != 1 then - return -1 - endi - if $data08 != NULL then - return -1 - endi - if $data09 != NULL then - return -1 - endi - - sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from $tb where ts = $ts0 fill(value, -1, -2, -3) - if $rows != 1 then - return -1 - endi - if $data00 != @18-09-17 09:00:00.000@ then - return -1 - endi - if $data01 != 0 then - return -1 - endi - if $data02 != 0 then - return -1 - endi - if $data03 != 0.00000 then - return -1 - endi - if $data04 != 0.000000000 then - return -1 - endi - if $data05 != 0 then - return -1 - endi - if $data06 != 0 then - return -1 - endi - if $data07 != 1 then - return -1 - endi - if $data08 != binary0 then - return -1 - endi - if $data09 != nchar0 then - return -1 - endi - - # table has NULL columns - sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from intp_tb3 where ts = $ts0 fill(value, -1, -2, -3) - if $rows != 1 then - return -1 - endi - if $data00 != @18-09-17 09:00:00.000@ then - return -1 - endi - if $data01 != 0 then - return -1 - endi - if $data02 != NULL then - return -1 - endi - if $data03 != 0.00000 then - return -1 - endi - if $data04 != NULL then - return -1 - endi - - $t = $ts0 - 1000 - sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from $tb where ts = $t fill(value, -1, -2) - if $rows != 0 then - return -1 - endi - - $t = $tsu + 1000 - sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from $tb where ts = $t fill(value, -1, -2) - if $rows != 0 then - return -1 - endi - -##### select interp from stable - ## interp(*) from stb - print select interp(*) from $stb where ts = $ts0 - sql select interp(*) from $stb where ts = $ts0 - if $rows != 1 then - return -1 - endi - $t = $ts0 + 1000 - print 92 - - sql select interp(*) from $stb where ts = $t - if $rows != 0 then - return -1 - endi - ## interp(*) from stb + group by - sql select interp(ts, c1, c2, c3, c4, c5, c7, c9) from $stb where ts = $ts0 group by tbname order by tbname asc - print ====== select interp(ts, c1, c2, c3, c4, c5, c7, c9) from $stb where ts = $ts0 group by tbname order by tbname asc - print ====== 0:$data00, 1:$data01, 2:$data02, 3:$data03, 4:$data04, 5:$data05, 6:$data06, 7:$data07, 8:$data08, 9:$data09 - print ====== 0:$data20, 1:$data21, 2:$data22, 3:$data23, 4:$data24, 5:$data25, 6:$data26, 7:$data27, 8:$data28, 9:$data29 - if $rows != $tbNum then - return -1 - endi - if $data00 != @18-09-17 09:00:00.000@ then - return -1 - endi - if $data01 != 0 then - return -1 - endi - if $data02 != 0 then - return -1 - endi - if $data04 != 0.000000000 then - return -1 - endi - if $data08 != intp_tb0 then - return -1 - endi - if $data22 != NULL then - return -1 - endi - if $data24 != NULL then - return -1 - endi - if $data28 != intp_tb2 then - return -1 - endi - - ## interp(*) from stb + group by + limit offset - sql select interp(*) from $stb where ts = $ts0 group by tbname limit 0 - if $rows != 0 then - return -1 - endi - sql select interp(*) from $stb where ts = $ts0 group by tbname limit 0 offset 1 - - ## interp(*) from stb + group by + fill(none) - $t = $ts0 + 1000 - sql select interp(*) from $stb where ts = $t fill(none) group by tbname - if $rows != 0 then - return -1 - endi - - sql select interp(*) from $stb where ts = $ts0 fill(none) group by tbname - if $rows != 4 then - return -1 - endi - if $data01 != 0 then - return -1 - endi - if $data02 != 0 then - return -1 - endi - if $data21 != 0 then - return -1 - endi - if $data22 != NULL then - return -1 - endi - if $data24 != NULL then - return -1 - endi - - ## interp(*) from stb + group by + fill(none) - $t = $ts0 + 1000 +$t = $ts0 + 1000 +print 91 +sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from $tb where ts = $t fill(value, -1, -2) +if $rows != 1 then + return -1 +endi +if $data00 != @18-09-17 09:00:01.000@ then + return -1 +endi +if $data01 != -2 then + return -1 +endi +if $data02 != -2 then + return -1 +endi +if $data03 != -2.00000 then + return -1 +endi +if $data04 != -2.000000000 then + return -1 +endi +if $data05 != -2 then + return -1 +endi +if $data06 != -2 then + return -1 +endi +if $data07 != 1 then + return -1 +endi +if $data08 != NULL then + return -1 +endi +if $data09 != NULL then + return -1 +endi + +sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from $tb where ts = $ts0 fill(value, -1, -2, -3) +if $rows != 1 then + return -1 +endi +if $data00 != @18-09-17 09:00:00.000@ then + return -1 +endi +if $data01 != 0 then + return -1 +endi +if $data02 != 0 then + return -1 +endi +if $data03 != 0.00000 then + return -1 +endi +if $data04 != 0.000000000 then + return -1 +endi +if $data05 != 0 then + return -1 +endi +if $data06 != 0 then + return -1 +endi +if $data07 != 1 then + return -1 +endi +if $data08 != binary0 then + return -1 +endi +if $data09 != nchar0 then + return -1 +endi + +# table has NULL columns +sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from intp_tb3 where ts = $ts0 fill(value, -1, -2, -3) +if $rows != 1 then + return -1 +endi +if $data00 != @18-09-17 09:00:00.000@ then + return -1 +endi +if $data01 != 0 then + return -1 +endi +if $data02 != NULL then + return -1 +endi +if $data03 != 0.00000 then + return -1 +endi +if $data04 != NULL then + return -1 +endi + +$t = $ts0 - 1000 +sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from $tb where ts = $t fill(value, -1, -2) +if $rows != 0 then + return -1 +endi + +$t = $tsu + 1000 +sql select interp(ts), interp(c1), interp(c2), interp(c3), interp(c4), interp(c5), interp(c6), interp(c7), interp(c8), interp(c9) from $tb where ts = $t fill(value, -1, -2) +if $rows != 0 then + return -1 +endi + +### select interp from stable +## interp(*) from stb +print select interp(*) from $stb where ts = $ts0 +sql select interp(*) from $stb where ts = $ts0 +if $rows != 1 then + return -1 +endi +$t = $ts0 + 1000 +print 92 + +sql select interp(*) from $stb where ts = $t +if $rows != 0 then + return -1 +endi +## interp(*) from stb + group by +sql select interp(ts, c1, c2, c3, c4, c5, c7, c9) from $stb where ts = $ts0 group by tbname order by tbname asc +print ====== select interp(ts, c1, c2, c3, c4, c5, c7, c9) from $stb where ts = $ts0 group by tbname order by tbname asc +print ====== 0:$data00, 1:$data01, 2:$data02, 3:$data03, 4:$data04, 5:$data05, 6:$data06, 7:$data07, 8:$data08, 9:$data09 +print ====== 0:$data20, 1:$data21, 2:$data22, 3:$data23, 4:$data24, 5:$data25, 6:$data26, 7:$data27, 8:$data28, 9:$data29 +if $rows != $tbNum then + return -1 +endi +if $data00 != @18-09-17 09:00:00.000@ then + return -1 +endi +if $data01 != 0 then + return -1 +endi +if $data02 != 0 then + return -1 +endi +if $data04 != 0.000000000 then + return -1 +endi +if $data08 != intp_tb0 then + return -1 +endi +if $data22 != NULL then + return -1 +endi +if $data24 != NULL then + return -1 +endi +if $data28 != intp_tb2 then + return -1 +endi + +## interp(*) from stb + group by + limit offset +sql select interp(*) from $stb where ts = $ts0 group by tbname limit 0 +if $rows != 0 then + return -1 +endi +sql select interp(*) from $stb where ts = $ts0 group by tbname limit 0 offset 1 + +## interp(*) from stb + group by + fill(none) +$t = $ts0 + 1000 +sql select interp(*) from $stb where ts = $t fill(none) group by tbname +if $rows != 0 then + return -1 +endi + +sql select interp(*) from $stb where ts = $ts0 fill(none) group by tbname +if $rows != 4 then + return -1 +endi +if $data01 != 0 then + return -1 +endi +if $data02 != 0 then + return -1 +endi +if $data21 != 0 then + return -1 +endi +if $data22 != NULL then + return -1 +endi +if $data24 != NULL then + return -1 +endi + +## interp(*) from stb + group by + fill(none) +$t = $ts0 + 1000 sql select interp(*) from $stb where ts = $t fill(NULL) group by tbname if $rows != $tbNum then return -1 @@ -846,12 +847,12 @@ if $data29 != NULL then endi sql_error select interp(ts,c1) from intp_tb0 where ts>'2018-11-25 19:19:00' and ts<'2018-11-25 19:19:12'; -sql select interp(ts,c1) from intp_tb0 where ts>'2018-11-25 19:19:00' and ts<'2018-11-25 19:19:12' interval(1s) fill(linear); +sql select interp(ts,c1) from intp_tb0 where ts>'2018-11-25 19:19:00' and ts<'2018-11-25 19:19:12' every(1s) fill(linear); if $rows != 0 then return -1 endi -sql select interp(c1) from intp_tb0 where ts>'2018-11-25 18:09:00' and ts<'2018-11-25 19:20:12' interval(18m); +sql select interp(c1) from intp_tb0 where ts>'2018-11-25 18:09:00' and ts<'2018-11-25 19:20:12' every(18m); if $rows != 1 then return -1 endi @@ -864,7 +865,7 @@ if $data01 != 3 then return -1 endi -sql select interp(c1,c3,c4,ts) from intp_tb0 where ts>'2018-11-25 18:09:00' and ts<'2018-11-25 19:20:12' interval(18m) fill(linear) +sql select interp(c1,c3,c4,ts) from intp_tb0 where ts>'2018-11-25 18:09:00' and ts<'2018-11-25 19:20:12' every(18m) fill(linear) if $rows != 5 then return -1 endi @@ -930,7 +931,7 @@ if $data44 != @18-11-25 19:06:00.000@ then endi -sql select interp(c1) from intp_stb0 where ts >= '2018-09-17 20:35:00.000' and ts <= '2018-09-17 20:42:00.000' interval(1m) fill(linear); +sql select interp(c1) from intp_stb0 where ts >= '2018-09-17 20:35:00.000' and ts <= '2018-09-17 20:42:00.000' every(1m) fill(linear); if $rows != 8 then return -1 endi @@ -984,7 +985,7 @@ if $data71 != NULL then endi -sql select interp(c1) from intp_stb0 where ts >= '2018-09-17 20:35:00.000' and ts <= '2018-09-17 20:42:00.000' interval(1m) fill(linear) order by ts desc; +sql select interp(c1) from intp_stb0 where ts >= '2018-09-17 20:35:00.000' and ts <= '2018-09-17 20:42:00.000' every(1m) fill(linear) order by ts desc; if $rows != 8 then return -1 endi @@ -1037,7 +1038,7 @@ if $data71 != NULL then return -1 endi -sql select interp(c3) from intp_stb0 where ts >= '2018-09-17 20:35:00.000' and ts <= '2018-09-17 20:50:00.000' interval(2m) fill(linear) order by ts; +sql select interp(c3) from intp_stb0 where ts >= '2018-09-17 20:35:00.000' and ts <= '2018-09-17 20:50:00.000' every(2m) fill(linear) order by ts; if $rows != 9 then return -1 endi @@ -1097,7 +1098,7 @@ if $data81 != 1.00000 then endi -sql select interp(c3) from intp_stb0 where ts >= '2018-09-17 20:35:00.000' and ts <= '2018-09-17 20:50:00.000' interval(3m) fill(linear) order by ts; +sql select interp(c3) from intp_stb0 where ts >= '2018-09-17 20:35:00.000' and ts <= '2018-09-17 20:50:00.000' every(3m) fill(linear) order by ts; if $rows != 6 then return -1 endi @@ -1138,7 +1139,7 @@ if $data51 != 0.80000 then return -1 endi -sql select interp(c3) from intp_stb0 where ts >= '2018-09-17 20:35:00.000' and ts <= '2018-09-17 20:50:00.000' interval(3m) fill(linear) order by ts desc; +sql select interp(c3) from intp_stb0 where ts >= '2018-09-17 20:35:00.000' and ts <= '2018-09-17 20:50:00.000' every(3m) fill(linear) order by ts desc; if $rows != 6 then return -1 endi @@ -1181,7 +1182,7 @@ endi -sql select interp(pav) from ap1 where ts> '2021-07-25 02:19:54' and ts<'2021-07-25 02:20:00' interval(1s) fill(linear); +sql select interp(pav) from ap1 where ts> '2021-07-25 02:19:54' and ts<'2021-07-25 02:20:00' every(1s) fill(linear); if $rows != 6 then return -1 endi @@ -1222,7 +1223,7 @@ if $data51 != 9.87500 then return -1 endi -sql select interp(pav) from ap1 where ts> '2021-07-25 02:19:54' and ts<'2021-07-25 02:20:00' interval(1s) fill(value, 1); +sql select interp(pav) from ap1 where ts> '2021-07-25 02:19:54' and ts<'2021-07-25 02:20:00' every(1s) fill(value, 1); if $rows != 6 then return -1 endi @@ -1263,7 +1264,7 @@ if $data51 != 1.00000 then return -1 endi -sql select interp(pav) from ap1 where ts> '2021-07-25 02:19:54' and ts<'2021-07-25 02:20:00' interval(1s) fill(NULL); +sql select interp(pav) from ap1 where ts> '2021-07-25 02:19:54' and ts<'2021-07-25 02:20:00' every(1s) fill(NULL); if $rows != 6 then return -1 endi @@ -1304,7 +1305,7 @@ if $data51 != NULL then return -1 endi -sql select interp(pav) from ap1 where ts> '2021-07-25 02:19:54' and ts<'2021-07-25 02:20:00' interval(1s) fill(prev); +sql select interp(pav) from ap1 where ts> '2021-07-25 02:19:54' and ts<'2021-07-25 02:20:00' every(1s) fill(prev); if $rows != 6 then return -1 endi @@ -1345,7 +1346,7 @@ if $data51 != 9.00000 then return -1 endi -sql select interp(pav) from ap1 where ts> '2021-07-25 02:19:54' and ts<'2021-07-25 02:20:00' interval(1s) fill(next); +sql select interp(pav) from ap1 where ts> '2021-07-25 02:19:54' and ts<'2021-07-25 02:20:00' every(1s) fill(next); if $rows != 6 then return -1 endi @@ -1387,11 +1388,11 @@ if $data51 != 10.00000 then endi -sql select interp(pav) from ap1 where ts> '2021-07-25 02:19:54' and ts<'2021-07-25 02:19:56' interval(1s) fill(linear); +sql select interp(pav) from ap1 where ts> '2021-07-25 02:19:54' and ts<'2021-07-25 02:19:56' every(1s) fill(linear); if $rows != 0 then return -1 endi -sql select interp(pav) from ap1 where ts> '2021-07-25 02:19:54' and ts<'2021-07-25 02:19:56' interval(1s) fill(prev); +sql select interp(pav) from ap1 where ts> '2021-07-25 02:19:54' and ts<'2021-07-25 02:19:56' every(1s) fill(prev); if $rows != 2 then return -1 endi @@ -1408,7 +1409,7 @@ if $data11 != 3.00000 then return -1 endi -sql select interp(pav) from ap1 where ts> '2021-07-25 02:19:54' and ts<'2021-07-25 02:19:56' interval(1s) fill(next); +sql select interp(pav) from ap1 where ts> '2021-07-25 02:19:54' and ts<'2021-07-25 02:19:56' every(1s) fill(next); if $rows != 2 then return -1 endi @@ -1425,7 +1426,7 @@ if $data11 != NULL then return -1 endi -sql select interp(pav) from ap1 where ts> '2021-07-25 02:19:54' and ts<'2021-07-25 02:19:57' interval(1s) fill(linear); +sql select interp(pav) from ap1 where ts> '2021-07-25 02:19:54' and ts<'2021-07-25 02:19:57' every(1s) fill(linear); if $rows != 3 then return -1 endi @@ -1448,7 +1449,7 @@ if $data21 != 3.77273 then return -1 endi -sql select interp(pav) from ap1 where ts> '2021-07-25 02:19:54' and ts<'2021-07-25 02:19:57' interval(1s) fill(prev); +sql select interp(pav) from ap1 where ts> '2021-07-25 02:19:54' and ts<'2021-07-25 02:19:57' every(1s) fill(prev); if $rows != 3 then return -1 endi @@ -1471,7 +1472,7 @@ if $data21 != 3.00000 then return -1 endi -sql select interp(pav) from ap1 where ts> '2021-07-25 02:19:54' and ts<'2021-07-25 02:19:57' interval(1s) fill(next); +sql select interp(pav) from ap1 where ts> '2021-07-25 02:19:54' and ts<'2021-07-25 02:19:57' every(1s) fill(next); if $rows != 3 then return -1 endi @@ -1494,7 +1495,7 @@ if $data21 != 4.00000 then return -1 endi -sql select interp(pav) from ap1 where ts> '2021-07-25 02:19:54' and ts<='2021-07-25 02:20:03' interval(1s) fill(linear); +sql select interp(pav) from ap1 where ts> '2021-07-25 02:19:54' and ts<='2021-07-25 02:20:03' every(1s) fill(linear); if $rows != 10 then return -1 endi @@ -1559,7 +1560,7 @@ if $data91 != NULL then return -1 endi -sql select interp(pav) from ap1 where ts> '2021-07-25 02:19:54' and ts<='2021-07-25 02:20:03' interval(1s) fill(prev); +sql select interp(pav) from ap1 where ts> '2021-07-25 02:19:54' and ts<='2021-07-25 02:20:03' every(1s) fill(prev); if $rows != 10 then return -1 endi @@ -1624,7 +1625,7 @@ if $data91 != 14.00000 then return -1 endi -sql select interp(pav) from ap1 where ts> '2021-07-25 02:19:54' and ts<='2021-07-25 02:20:03' interval(1s) fill(next); +sql select interp(pav) from ap1 where ts> '2021-07-25 02:19:54' and ts<='2021-07-25 02:20:03' every(1s) fill(next); if $rows != 10 then return -1 endi @@ -1689,7 +1690,7 @@ if $data91 != NULL then return -1 endi -sql select interp(pav) from ap1 where ts> '2021-07-25 02:19:54' and ts<='2021-07-25 02:20:05' interval(1s) fill(linear); +sql select interp(pav) from ap1 where ts> '2021-07-25 02:19:54' and ts<='2021-07-25 02:20:05' every(1s) fill(linear); if $rows != 12 then return -1 endi @@ -1742,7 +1743,7 @@ if $data71 != 15.29412 then return -1 endi -sql select interp(pav) from ap1 where ts> '2021-07-25 02:19:54' and ts<='2021-07-25 02:20:05' interval(1s) fill(prev); +sql select interp(pav) from ap1 where ts> '2021-07-25 02:19:54' and ts<='2021-07-25 02:20:05' every(1s) fill(prev); if $rows != 12 then return -1 endi @@ -1807,7 +1808,7 @@ if $data91 != 14.00000 then return -1 endi -sql select interp(pav) from ap1 where ts> '2021-07-25 02:19:54' and ts<='2021-07-25 02:20:05' interval(1s) fill(next); +sql select interp(pav) from ap1 where ts> '2021-07-25 02:19:54' and ts<='2021-07-25 02:20:05' every(1s) fill(next); if $rows != 12 then return -1 endi @@ -1872,7 +1873,7 @@ if $data91 != 20.00000 then return -1 endi -sql select interp(pav) from ap1 where ts> '2021-07-25 02:20:02' and ts<='2021-07-25 02:20:05' interval(1s) fill(value, 1); +sql select interp(pav) from ap1 where ts> '2021-07-25 02:20:02' and ts<='2021-07-25 02:20:05' every(1s) fill(value, 1); if $rows != 4 then return -1 endi @@ -1901,7 +1902,7 @@ if $data31 != 20.00000 then return -1 endi -sql select interp(pav) from ap1 where ts> '2021-07-25 02:20:02' and ts<='2021-07-25 02:20:05' interval(1s) fill(null); +sql select interp(pav) from ap1 where ts> '2021-07-25 02:20:02' and ts<='2021-07-25 02:20:05' every(1s) fill(null); if $rows != 4 then return -1 endi @@ -1931,7 +1932,7 @@ if $data31 != 20.00000 then endi -sql select interp(pav) from ap1 where ts> '2021-07-25 02:19:54' and ts<='2021-07-25 02:20:25' interval(1s) fill(linear); +sql select interp(pav) from ap1 where ts> '2021-07-25 02:19:54' and ts<='2021-07-25 02:20:25' every(1s) fill(linear); if $rows != 32 then return -1 endi @@ -1984,7 +1985,7 @@ if $data71 != 15.29412 then return -1 endi -sql select interp(pav) from ap1 where ts> '2021-07-25 02:19:54' and ts<='2021-07-25 02:20:25' interval(1s) fill(prev); +sql select interp(pav) from ap1 where ts> '2021-07-25 02:19:54' and ts<='2021-07-25 02:20:25' every(1s) fill(prev); if $rows != 32 then return -1 endi @@ -2049,7 +2050,7 @@ if $data91 != 14.00000 then return -1 endi -sql select interp(pav) from ap1 where ts> '2021-07-25 02:19:54' and ts<='2021-07-25 02:20:25' interval(1s) fill(next); +sql select interp(pav) from ap1 where ts> '2021-07-25 02:19:54' and ts<='2021-07-25 02:20:25' every(1s) fill(next); if $rows != 32 then return -1 endi @@ -2115,7 +2116,7 @@ if $data91 != 20.00000 then endi -sql select interp(pav) from ap1 where ts> '2021-07-25 02:19:54' and ts<='2021-07-25 02:25:00' interval(1s) fill(linear); +sql select interp(pav) from ap1 where ts> '2021-07-25 02:19:54' and ts<='2021-07-25 02:25:00' every(1s) fill(linear); if $rows != 307 then return -1 endi @@ -2168,7 +2169,7 @@ if $data71 != 15.29412 then return -1 endi -sql select interp(pav) from ap1 where ts> '2021-07-25 02:19:54' and ts<='2021-07-25 02:25:00' interval(1s) fill(prev); +sql select interp(pav) from ap1 where ts> '2021-07-25 02:19:54' and ts<='2021-07-25 02:25:00' every(1s) fill(prev); if $rows != 307 then return -1 endi @@ -2233,7 +2234,7 @@ if $data91 != 14.00000 then return -1 endi -sql select interp(pav) from ap1 where ts> '2021-07-25 02:19:54' and ts<='2021-07-25 02:25:00' interval(1s) fill(next); +sql select interp(pav) from ap1 where ts> '2021-07-25 02:19:54' and ts<='2021-07-25 02:25:00' every(1s) fill(next); if $rows != 307 then return -1 endi @@ -2298,7 +2299,7 @@ if $data91 != 20.00000 then return -1 endi -sql select interp(pav) from ap1 where ts> '2021-07-25 02:19:54' and ts<='2021-07-25 03:25:00' interval(1s) fill(linear); +sql select interp(pav) from ap1 where ts> '2021-07-25 02:19:54' and ts<='2021-07-25 03:25:00' every(1s) fill(linear); if $rows != 3907 then return -1 endi @@ -2352,7 +2353,7 @@ if $data71 != 15.29412 then endi -sql select interp(pav) from ap1 where ts> '2021-07-25 02:19:54' and ts<='2021-07-25 03:25:00' interval(1s) fill(prev); +sql select interp(pav) from ap1 where ts> '2021-07-25 02:19:54' and ts<='2021-07-25 03:25:00' every(1s) fill(prev); if $rows != 3907 then return -1 endi @@ -2417,7 +2418,7 @@ if $data91 != 14.00000 then return -1 endi -sql select interp(pav) from ap1 where ts> '2021-07-25 02:19:54' and ts<='2021-07-25 03:25:00' interval(1s) fill(next); +sql select interp(pav) from ap1 where ts> '2021-07-25 02:19:54' and ts<='2021-07-25 03:25:00' every(1s) fill(next); if $rows != 3907 then return -1 endi @@ -2482,7 +2483,7 @@ if $data91 != 20.00000 then return -1 endi -sql select interp(pav) from ap1 where ts> '2021-07-25 02:19:54' and ts<'2021-07-25 02:20:07' interval(1s); +sql select interp(pav) from ap1 where ts> '2021-07-25 02:19:54' and ts<'2021-07-25 02:20:07' every(1s); if $rows != 1 then return -1 endi