diff --git a/src/inc/ttokendef.h b/src/inc/ttokendef.h index a97de15e93f6059d912d6200680a066155b7169c..dc921eed1fcd6baf25b5ffd4632b88a80a90615e 100644 --- a/src/inc/ttokendef.h +++ b/src/inc/ttokendef.h @@ -91,63 +91,63 @@ #define TK_ACCOUNT 73 #define TK_USE 74 #define TK_DESCRIBE 75 -#define TK_ALTER 76 -#define TK_PASS 77 -#define TK_PRIVILEGE 78 -#define TK_LOCAL 79 -#define TK_COMPACT 80 -#define TK_LP 81 -#define TK_RP 82 -#define TK_IF 83 -#define TK_EXISTS 84 -#define TK_AS 85 -#define TK_OUTPUTTYPE 86 -#define TK_AGGREGATE 87 -#define TK_BUFSIZE 88 -#define TK_PPS 89 -#define TK_TSERIES 90 -#define TK_DBS 91 -#define TK_STORAGE 92 -#define TK_QTIME 93 -#define TK_CONNS 94 -#define TK_STATE 95 -#define TK_COMMA 96 -#define TK_KEEP 97 -#define TK_CACHE 98 -#define TK_REPLICA 99 -#define TK_QUORUM 100 -#define TK_DAYS 101 -#define TK_MINROWS 102 -#define TK_MAXROWS 103 -#define TK_BLOCKS 104 -#define TK_CTIME 105 -#define TK_WAL 106 -#define TK_FSYNC 107 -#define TK_COMP 108 -#define TK_PRECISION 109 -#define TK_UPDATE 110 -#define TK_CACHELAST 111 -#define TK_PARTITIONS 112 -#define TK_UNSIGNED 113 -#define TK_TAGS 114 -#define TK_USING 115 -#define TK_NULL 116 -#define TK_NOW 117 -#define TK_SELECT 118 -#define TK_UNION 119 -#define TK_ALL 120 -#define TK_DISTINCT 121 -#define TK_FROM 122 -#define TK_VARIABLE 123 -#define TK_INTERVAL 124 -#define TK_SESSION 125 -#define TK_STATE_WINDOW 126 -#define TK_FILL 127 -#define TK_SLIDING 128 -#define TK_ORDER 129 -#define TK_BY 130 -#define TK_ASC 131 -#define TK_DESC 132 +#define TK_DESC 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_GROUP 133 #define TK_HAVING 134 #define TK_LIMIT 135 diff --git a/src/query/inc/sql.y b/src/query/inc/sql.y index 8b43e55693c53fffb19e73b5b9ef7ccada4383a2..c3312dc5dc18f0b4e238de314ea5258233b2fce4 100644 --- a/src/query/inc/sql.y +++ b/src/query/inc/sql.y @@ -162,7 +162,10 @@ cmd ::= DESCRIBE ids(X) cpxName(Y). { X.n += Y.n; 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);} diff --git a/src/query/src/sql.c b/src/query/src/sql.c index 09be4c0cf09df7560b52fc0704a856369946cf38..598d3fcf3cb24f0b3a6e18178a6c74df1675624c 100644 --- a/src/query/src/sql.c +++ b/src/query/src/sql.c @@ -1,3 +1,5 @@ +/* This file is automatically generated by Lemon from input grammar +** source file "src/query/inc/sql.y". */ /* ** 2000-05-29 ** @@ -22,10 +24,8 @@ ** The following is the concatenation of all %include directives from the ** input grammar file: */ -#include -#include /************ Begin %include sections from the grammar ************************/ -#line 23 "sql.y" +#line 23 "src/query/inc/sql.y" #include #include @@ -38,13 +38,207 @@ #include "ttokendef.h" #include "tutil.h" #include "tvariant.h" -#line 42 "sql.c" +#line 42 "src/query/inc/sql.c" /**************** End of %include directives **********************************/ -/* These constants specify the various numeric values for terminal symbols -** in a format understandable to "makeheaders". This section is blank unless -** "lemon" is run with the "-m" command-line option. -***************** Begin makeheaders token definitions *************************/ -/**************** End makeheaders token definitions ***************************/ +/* These constants specify the various numeric values for terminal symbols. +***************** Begin token definitions *************************************/ +#ifndef TK_ID +#define TK_ID 1 +#define TK_BOOL 2 +#define TK_TINYINT 3 +#define TK_SMALLINT 4 +#define TK_INTEGER 5 +#define TK_BIGINT 6 +#define TK_FLOAT 7 +#define TK_DOUBLE 8 +#define TK_STRING 9 +#define TK_TIMESTAMP 10 +#define TK_BINARY 11 +#define TK_NCHAR 12 +#define TK_OR 13 +#define TK_AND 14 +#define TK_NOT 15 +#define TK_EQ 16 +#define TK_NE 17 +#define TK_ISNULL 18 +#define TK_NOTNULL 19 +#define TK_IS 20 +#define TK_LIKE 21 +#define TK_GLOB 22 +#define TK_BETWEEN 23 +#define TK_IN 24 +#define TK_GT 25 +#define TK_GE 26 +#define TK_LT 27 +#define TK_LE 28 +#define TK_BITAND 29 +#define TK_BITOR 30 +#define TK_LSHIFT 31 +#define TK_RSHIFT 32 +#define TK_PLUS 33 +#define TK_MINUS 34 +#define TK_DIVIDE 35 +#define TK_TIMES 36 +#define TK_STAR 37 +#define TK_SLASH 38 +#define TK_REM 39 +#define TK_CONCAT 40 +#define TK_UMINUS 41 +#define TK_UPLUS 42 +#define TK_BITNOT 43 +#define TK_SHOW 44 +#define TK_DATABASES 45 +#define TK_TOPICS 46 +#define TK_FUNCTIONS 47 +#define TK_MNODES 48 +#define TK_DNODES 49 +#define TK_ACCOUNTS 50 +#define TK_USERS 51 +#define TK_MODULES 52 +#define TK_QUERIES 53 +#define TK_CONNECTIONS 54 +#define TK_STREAMS 55 +#define TK_VARIABLES 56 +#define TK_SCORES 57 +#define TK_GRANTS 58 +#define TK_VNODES 59 +#define TK_DOT 60 +#define TK_CREATE 61 +#define TK_TABLE 62 +#define TK_STABLE 63 +#define TK_DATABASE 64 +#define TK_TABLES 65 +#define TK_STABLES 66 +#define TK_VGROUPS 67 +#define TK_DROP 68 +#define TK_TOPIC 69 +#define TK_FUNCTION 70 +#define TK_DNODE 71 +#define TK_USER 72 +#define TK_ACCOUNT 73 +#define TK_USE 74 +#define TK_DESCRIBE 75 +#define TK_DESC 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_GROUP 133 +#define TK_HAVING 134 +#define TK_LIMIT 135 +#define TK_OFFSET 136 +#define TK_SLIMIT 137 +#define TK_SOFFSET 138 +#define TK_WHERE 139 +#define TK_RESET 140 +#define TK_QUERY 141 +#define TK_SYNCDB 142 +#define TK_ADD 143 +#define TK_COLUMN 144 +#define TK_MODIFY 145 +#define TK_TAG 146 +#define TK_CHANGE 147 +#define TK_SET 148 +#define TK_KILL 149 +#define TK_CONNECTION 150 +#define TK_STREAM 151 +#define TK_COLON 152 +#define TK_ABORT 153 +#define TK_AFTER 154 +#define TK_ATTACH 155 +#define TK_BEFORE 156 +#define TK_BEGIN 157 +#define TK_CASCADE 158 +#define TK_CLUSTER 159 +#define TK_CONFLICT 160 +#define TK_COPY 161 +#define TK_DEFERRED 162 +#define TK_DELIMITERS 163 +#define TK_DETACH 164 +#define TK_EACH 165 +#define TK_END 166 +#define TK_EXPLAIN 167 +#define TK_FAIL 168 +#define TK_FOR 169 +#define TK_IGNORE 170 +#define TK_IMMEDIATE 171 +#define TK_INITIALLY 172 +#define TK_INSTEAD 173 +#define TK_MATCH 174 +#define TK_KEY 175 +#define TK_OF 176 +#define TK_RAISE 177 +#define TK_REPLACE 178 +#define TK_RESTRICT 179 +#define TK_ROW 180 +#define TK_STATEMENT 181 +#define TK_TRIGGER 182 +#define TK_VIEW 183 +#define TK_IPTOKEN 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 +#endif +/**************** End token definitions ***************************************/ /* The next sections is a series of control #defines. ** various aspects of the generated parser. @@ -139,18 +333,18 @@ typedef union { #define ParseCTX_FETCH #define ParseCTX_STORE #define YYFALLBACK 1 -#define YYNSTATE 362 -#define YYNRULE 289 -#define YYNRULE_WITH_ACTION 289 +#define YYNSTATE 364 +#define YYNRULE 290 +#define YYNRULE_WITH_ACTION 290 #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 YY_MAX_SHIFT 363 +#define YY_MIN_SHIFTREDUCE 570 +#define YY_MAX_SHIFTREDUCE 859 +#define YY_ERROR_ACTION 860 +#define YY_ACCEPT_ACTION 861 +#define YY_NO_ACTION 862 +#define YY_MIN_REDUCE 863 +#define YY_MAX_REDUCE 1152 /************* End control #defines *******************************************/ #define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0]))) @@ -217,162 +411,162 @@ typedef union { ** yy_default[] Default action for each state. ** *********** Begin parsing tables **********************************************/ -#define YY_ACTTAB_COUNT (754) +#define YY_ACTTAB_COUNT (757) static const YYACTIONTYPE yy_action[] = { - /* 0 */ 207, 618, 246, 618, 618, 245, 360, 229, 160, 619, - /* 10 */ 1123, 619, 619, 56, 57, 1036, 60, 61, 857, 361, - /* 20 */ 249, 50, 618, 59, 318, 64, 62, 65, 63, 984, - /* 30 */ 619, 982, 983, 55, 54, 160, 985, 53, 52, 51, - /* 40 */ 986, 153, 987, 988, 356, 945, 654, 568, 569, 570, - /* 50 */ 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, - /* 60 */ 581, 151, 207, 230, 907, 207, 56, 57, 1027, 60, - /* 70 */ 61, 189, 1124, 249, 50, 1124, 59, 318, 64, 62, - /* 80 */ 65, 63, 1072, 1033, 271, 79, 55, 54, 3, 190, - /* 90 */ 53, 52, 51, 56, 57, 250, 60, 61, 702, 1027, - /* 100 */ 249, 50, 29, 59, 318, 64, 62, 65, 63, 91, - /* 110 */ 278, 277, 37, 55, 54, 232, 94, 53, 52, 51, - /* 120 */ 235, 120, 114, 125, 1014, 241, 338, 337, 124, 1014, - /* 130 */ 130, 133, 123, 56, 58, 794, 60, 61, 127, 85, - /* 140 */ 249, 50, 92, 59, 318, 64, 62, 65, 63, 997, - /* 150 */ 998, 34, 1001, 55, 54, 207, 80, 53, 52, 51, - /* 160 */ 57, 1010, 60, 61, 316, 1124, 249, 50, 263, 59, - /* 170 */ 318, 64, 62, 65, 63, 37, 44, 267, 266, 55, - /* 180 */ 54, 348, 243, 53, 52, 51, 1014, 160, 43, 314, - /* 190 */ 355, 354, 313, 312, 311, 353, 310, 309, 308, 352, - /* 200 */ 307, 351, 350, 976, 964, 965, 966, 967, 968, 969, - /* 210 */ 970, 971, 972, 973, 974, 975, 977, 978, 60, 61, - /* 220 */ 231, 160, 249, 50, 1011, 59, 318, 64, 62, 65, - /* 230 */ 63, 1008, 1027, 24, 258, 55, 54, 1000, 97, 53, - /* 240 */ 52, 51, 252, 248, 809, 175, 1013, 798, 233, 801, - /* 250 */ 210, 804, 248, 809, 1143, 917, 798, 216, 801, 292, - /* 260 */ 804, 90, 189, 135, 134, 215, 258, 55, 54, 323, - /* 270 */ 85, 53, 52, 51, 1002, 227, 228, 176, 242, 319, - /* 280 */ 5, 40, 179, 258, 227, 228, 23, 178, 103, 108, - /* 290 */ 99, 107, 204, 726, 1012, 1073, 723, 290, 724, 908, - /* 300 */ 725, 64, 62, 65, 63, 303, 189, 44, 257, 55, - /* 310 */ 54, 37, 37, 53, 52, 51, 800, 253, 803, 251, - /* 320 */ 316, 326, 325, 66, 254, 255, 198, 196, 194, 270, - /* 330 */ 37, 77, 66, 193, 139, 138, 137, 136, 223, 742, - /* 340 */ 799, 43, 802, 355, 354, 37, 37, 37, 353, 53, - /* 350 */ 52, 51, 352, 37, 351, 350, 239, 240, 810, 805, - /* 360 */ 1011, 1011, 272, 78, 37, 806, 122, 810, 805, 37, - /* 370 */ 37, 359, 358, 144, 806, 327, 38, 14, 348, 1011, - /* 380 */ 82, 93, 70, 259, 739, 256, 320, 333, 332, 83, - /* 390 */ 328, 329, 330, 73, 1011, 1011, 1011, 999, 334, 150, - /* 400 */ 148, 147, 1011, 1, 177, 775, 776, 727, 728, 335, - /* 410 */ 9, 96, 796, 1011, 336, 340, 758, 274, 1011, 1011, - /* 420 */ 1083, 766, 767, 746, 71, 712, 274, 295, 714, 297, - /* 430 */ 155, 713, 33, 74, 807, 67, 26, 830, 811, 38, - /* 440 */ 247, 38, 67, 95, 76, 67, 617, 16, 797, 15, - /* 450 */ 205, 25, 25, 113, 18, 112, 17, 731, 808, 732, - /* 460 */ 25, 6, 729, 211, 730, 298, 20, 119, 19, 118, - /* 470 */ 22, 1120, 21, 132, 131, 1119, 701, 1118, 225, 226, - /* 480 */ 208, 209, 1135, 212, 206, 213, 214, 813, 218, 219, - /* 490 */ 220, 217, 203, 1082, 237, 1079, 1078, 238, 339, 47, - /* 500 */ 1028, 268, 152, 1065, 1064, 1035, 149, 275, 1009, 279, - /* 510 */ 1046, 1043, 1044, 1048, 154, 159, 286, 171, 172, 273, - /* 520 */ 234, 1007, 173, 162, 174, 922, 300, 301, 302, 305, - /* 530 */ 306, 757, 1025, 45, 281, 201, 161, 283, 41, 317, - /* 540 */ 75, 916, 293, 72, 49, 324, 164, 1142, 291, 110, - /* 550 */ 1141, 1138, 163, 289, 180, 331, 1134, 116, 1133, 1130, - /* 560 */ 287, 285, 181, 942, 42, 39, 46, 202, 282, 904, - /* 570 */ 126, 902, 128, 129, 900, 899, 260, 280, 192, 897, - /* 580 */ 896, 895, 894, 893, 892, 891, 195, 197, 888, 886, - /* 590 */ 884, 882, 199, 48, 879, 200, 875, 304, 349, 81, - /* 600 */ 86, 284, 1066, 121, 341, 342, 343, 344, 345, 346, - /* 610 */ 347, 357, 855, 262, 261, 854, 224, 244, 299, 264, - /* 620 */ 265, 853, 836, 221, 222, 835, 269, 294, 104, 921, - /* 630 */ 920, 274, 105, 10, 276, 87, 84, 898, 734, 140, - /* 640 */ 30, 156, 141, 184, 890, 183, 943, 182, 185, 187, - /* 650 */ 186, 142, 188, 2, 889, 759, 143, 881, 980, 165, - /* 660 */ 880, 166, 167, 944, 168, 169, 170, 4, 990, 768, - /* 670 */ 157, 158, 762, 88, 236, 764, 89, 288, 31, 11, - /* 680 */ 32, 12, 13, 27, 296, 28, 96, 101, 98, 35, - /* 690 */ 100, 632, 36, 667, 102, 665, 664, 663, 661, 660, - /* 700 */ 659, 656, 622, 315, 106, 7, 321, 812, 322, 8, - /* 710 */ 814, 109, 111, 68, 69, 38, 704, 703, 115, 700, - /* 720 */ 117, 648, 646, 638, 644, 640, 642, 636, 634, 670, - /* 730 */ 669, 668, 666, 662, 658, 657, 191, 620, 585, 859, - /* 740 */ 858, 858, 858, 858, 858, 858, 858, 858, 858, 858, - /* 750 */ 858, 858, 145, 146, + /* 0 */ 912, 622, 237, 622, 362, 231, 1019, 190, 209, 623, + /* 10 */ 248, 623, 154, 56, 57, 1041, 60, 61, 1128, 161, + /* 20 */ 251, 50, 622, 59, 320, 64, 62, 65, 63, 989, + /* 30 */ 623, 987, 988, 55, 54, 161, 990, 53, 52, 51, + /* 40 */ 991, 243, 992, 993, 658, 1019, 161, 571, 572, 573, + /* 50 */ 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, + /* 60 */ 584, 152, 245, 232, 56, 57, 1019, 60, 61, 1005, + /* 70 */ 209, 251, 50, 23, 59, 320, 64, 62, 65, 63, + /* 80 */ 1129, 280, 279, 1038, 55, 54, 79, 85, 53, 52, + /* 90 */ 51, 56, 57, 1077, 60, 61, 318, 1032, 251, 50, + /* 100 */ 37, 59, 320, 64, 62, 65, 63, 294, 706, 90, + /* 110 */ 97, 55, 54, 234, 800, 53, 52, 51, 56, 58, + /* 120 */ 91, 60, 61, 350, 44, 251, 50, 94, 59, 320, + /* 130 */ 64, 62, 65, 63, 798, 206, 340, 339, 55, 54, + /* 140 */ 358, 950, 53, 52, 51, 57, 1007, 60, 61, 1015, + /* 150 */ 801, 251, 50, 318, 59, 320, 64, 62, 65, 63, + /* 160 */ 1002, 1003, 34, 1006, 55, 54, 861, 363, 53, 52, + /* 170 */ 51, 43, 316, 357, 356, 315, 314, 313, 355, 312, + /* 180 */ 311, 310, 354, 309, 353, 352, 981, 969, 970, 971, + /* 190 */ 972, 973, 974, 975, 976, 977, 978, 979, 980, 982, + /* 200 */ 983, 60, 61, 24, 33, 251, 50, 622, 59, 320, + /* 210 */ 64, 62, 65, 63, 92, 623, 1032, 14, 55, 54, + /* 220 */ 212, 93, 53, 52, 51, 55, 54, 218, 80, 53, + /* 230 */ 52, 51, 273, 136, 135, 134, 217, 300, 250, 813, + /* 240 */ 325, 85, 802, 922, 805, 37, 808, 207, 250, 813, + /* 250 */ 190, 96, 802, 247, 805, 213, 808, 5, 40, 180, + /* 260 */ 252, 37, 260, 161, 179, 103, 108, 99, 107, 37, + /* 270 */ 229, 230, 254, 176, 321, 361, 360, 145, 44, 1032, + /* 280 */ 229, 230, 1125, 305, 64, 62, 65, 63, 29, 804, + /* 290 */ 233, 807, 55, 54, 1016, 235, 53, 52, 51, 272, + /* 300 */ 730, 77, 259, 727, 78, 728, 241, 729, 225, 803, + /* 310 */ 1016, 806, 1088, 209, 242, 120, 114, 125, 1016, 66, + /* 320 */ 209, 913, 124, 1129, 130, 133, 123, 37, 190, 66, + /* 330 */ 1129, 256, 257, 127, 200, 198, 196, 1078, 1004, 292, + /* 340 */ 37, 195, 140, 139, 138, 137, 37, 255, 746, 253, + /* 350 */ 1013, 328, 327, 37, 814, 809, 43, 73, 357, 356, + /* 360 */ 37, 810, 37, 355, 814, 809, 122, 354, 37, 353, + /* 370 */ 352, 810, 329, 37, 265, 780, 1016, 261, 350, 258, + /* 380 */ 322, 335, 334, 269, 268, 330, 151, 149, 148, 1016, + /* 390 */ 260, 331, 53, 52, 51, 1016, 74, 244, 332, 260, + /* 400 */ 743, 177, 1016, 1, 178, 336, 82, 337, 811, 1016, + /* 410 */ 1017, 1016, 83, 338, 70, 731, 732, 1016, 342, 3, + /* 420 */ 191, 274, 1016, 762, 770, 771, 9, 716, 812, 249, + /* 430 */ 297, 779, 718, 750, 299, 38, 717, 156, 67, 26, + /* 440 */ 834, 38, 815, 276, 38, 621, 67, 1124, 95, 276, + /* 450 */ 67, 6, 76, 1123, 25, 71, 25, 1087, 16, 25, + /* 460 */ 15, 1018, 113, 18, 112, 17, 735, 227, 736, 733, + /* 470 */ 20, 734, 19, 228, 119, 22, 118, 21, 132, 131, + /* 480 */ 210, 211, 817, 214, 705, 208, 215, 216, 220, 221, + /* 490 */ 222, 219, 205, 1148, 239, 1140, 1033, 270, 1084, 1083, + /* 500 */ 240, 341, 153, 1040, 47, 1051, 1048, 1049, 1070, 1053, + /* 510 */ 277, 1069, 155, 160, 1014, 172, 150, 288, 173, 1012, + /* 520 */ 281, 306, 174, 236, 175, 927, 163, 1030, 166, 302, + /* 530 */ 303, 304, 307, 308, 45, 761, 203, 162, 283, 285, + /* 540 */ 41, 293, 319, 921, 75, 326, 295, 1147, 49, 110, + /* 550 */ 72, 1146, 164, 1143, 291, 181, 289, 333, 1139, 287, + /* 560 */ 116, 1138, 48, 1135, 182, 947, 284, 167, 42, 39, + /* 570 */ 46, 204, 909, 126, 907, 128, 129, 905, 904, 262, + /* 580 */ 193, 194, 901, 900, 899, 898, 897, 896, 895, 197, + /* 590 */ 199, 892, 890, 888, 886, 201, 883, 282, 202, 879, + /* 600 */ 351, 121, 275, 81, 86, 286, 1071, 343, 344, 345, + /* 610 */ 346, 347, 348, 349, 359, 859, 264, 226, 263, 246, + /* 620 */ 301, 858, 267, 857, 840, 839, 266, 223, 276, 271, + /* 630 */ 224, 926, 104, 925, 10, 105, 296, 738, 278, 84, + /* 640 */ 903, 30, 87, 763, 157, 902, 772, 141, 142, 894, + /* 650 */ 185, 184, 948, 183, 186, 187, 189, 188, 143, 893, + /* 660 */ 2, 985, 144, 158, 949, 168, 165, 169, 170, 171, + /* 670 */ 885, 4, 884, 766, 159, 88, 995, 768, 89, 238, + /* 680 */ 290, 31, 11, 32, 12, 13, 27, 298, 28, 96, + /* 690 */ 98, 101, 35, 100, 636, 36, 671, 669, 668, 102, + /* 700 */ 667, 665, 664, 663, 660, 626, 317, 106, 7, 818, + /* 710 */ 816, 324, 8, 109, 323, 111, 68, 69, 708, 38, + /* 720 */ 115, 117, 707, 704, 652, 650, 642, 648, 644, 646, + /* 730 */ 640, 638, 674, 673, 672, 670, 666, 662, 661, 192, + /* 740 */ 624, 588, 863, 862, 862, 862, 862, 862, 862, 862, + /* 750 */ 862, 862, 862, 862, 862, 146, 147, }; static const YYCODETYPE yy_lookahead[] = { - /* 0 */ 264, 1, 204, 1, 1, 204, 197, 198, 197, 9, - /* 10 */ 274, 9, 9, 13, 14, 197, 16, 17, 195, 196, + /* 0 */ 203, 1, 243, 1, 197, 198, 247, 210, 264, 9, + /* 10 */ 204, 9, 197, 13, 14, 197, 16, 17, 274, 197, /* 20 */ 20, 21, 1, 23, 24, 25, 26, 27, 28, 221, /* 30 */ 9, 223, 224, 33, 34, 197, 228, 37, 38, 39, - /* 40 */ 232, 197, 234, 235, 219, 220, 5, 45, 46, 47, + /* 40 */ 232, 243, 234, 235, 5, 247, 197, 45, 46, 47, /* 50 */ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, - /* 60 */ 58, 59, 264, 61, 203, 264, 13, 14, 245, 16, - /* 70 */ 17, 210, 274, 20, 21, 274, 23, 24, 25, 26, - /* 80 */ 27, 28, 271, 265, 261, 85, 33, 34, 201, 202, - /* 90 */ 37, 38, 39, 13, 14, 204, 16, 17, 5, 245, - /* 100 */ 20, 21, 81, 23, 24, 25, 26, 27, 28, 271, - /* 110 */ 266, 267, 197, 33, 34, 261, 205, 37, 38, 39, - /* 120 */ 243, 62, 63, 64, 247, 243, 33, 34, 69, 247, - /* 130 */ 71, 72, 73, 13, 14, 82, 16, 17, 79, 81, - /* 140 */ 20, 21, 248, 23, 24, 25, 26, 27, 28, 238, - /* 150 */ 239, 240, 241, 33, 34, 264, 262, 37, 38, 39, - /* 160 */ 14, 246, 16, 17, 83, 274, 20, 21, 141, 23, - /* 170 */ 24, 25, 26, 27, 28, 197, 118, 150, 151, 33, - /* 180 */ 34, 89, 243, 37, 38, 39, 247, 197, 97, 98, - /* 190 */ 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, - /* 200 */ 109, 110, 111, 221, 222, 223, 224, 225, 226, 227, - /* 210 */ 228, 229, 230, 231, 232, 233, 234, 235, 16, 17, - /* 220 */ 242, 197, 20, 21, 246, 23, 24, 25, 26, 27, - /* 230 */ 28, 197, 245, 44, 197, 33, 34, 0, 205, 37, - /* 240 */ 38, 39, 68, 1, 2, 208, 247, 5, 261, 7, - /* 250 */ 61, 9, 1, 2, 247, 203, 5, 68, 7, 269, - /* 260 */ 9, 271, 210, 74, 75, 76, 197, 33, 34, 80, - /* 270 */ 81, 37, 38, 39, 241, 33, 34, 208, 244, 37, - /* 280 */ 62, 63, 64, 197, 33, 34, 264, 69, 70, 71, - /* 290 */ 72, 73, 264, 2, 208, 271, 5, 273, 7, 203, - /* 300 */ 9, 25, 26, 27, 28, 87, 210, 118, 68, 33, - /* 310 */ 34, 197, 197, 37, 38, 39, 5, 143, 7, 145, - /* 320 */ 83, 147, 148, 81, 33, 34, 62, 63, 64, 140, - /* 330 */ 197, 142, 81, 69, 70, 71, 72, 73, 149, 37, - /* 340 */ 5, 97, 7, 99, 100, 197, 197, 197, 104, 37, - /* 350 */ 38, 39, 108, 197, 110, 111, 242, 242, 116, 117, - /* 360 */ 246, 246, 82, 205, 197, 123, 77, 116, 117, 197, - /* 370 */ 197, 65, 66, 67, 123, 242, 96, 81, 89, 246, - /* 380 */ 82, 85, 96, 143, 96, 145, 15, 147, 148, 82, - /* 390 */ 242, 242, 242, 96, 246, 246, 246, 239, 242, 62, - /* 400 */ 63, 64, 246, 206, 207, 131, 132, 116, 117, 242, - /* 410 */ 122, 115, 1, 246, 242, 242, 82, 119, 246, 246, - /* 420 */ 237, 82, 82, 121, 138, 82, 119, 82, 82, 82, - /* 430 */ 96, 82, 81, 136, 123, 96, 96, 82, 82, 96, - /* 440 */ 60, 96, 96, 96, 81, 96, 82, 144, 37, 146, - /* 450 */ 264, 96, 96, 144, 144, 146, 146, 5, 123, 7, - /* 460 */ 96, 81, 5, 264, 7, 114, 144, 144, 146, 146, - /* 470 */ 144, 264, 146, 77, 78, 264, 113, 264, 264, 264, - /* 480 */ 264, 264, 247, 264, 264, 264, 264, 116, 264, 264, - /* 490 */ 264, 264, 264, 237, 237, 237, 237, 237, 237, 263, - /* 500 */ 245, 197, 197, 272, 272, 197, 60, 245, 245, 268, - /* 510 */ 197, 197, 197, 197, 197, 197, 197, 249, 197, 199, - /* 520 */ 268, 197, 197, 258, 197, 197, 197, 197, 197, 197, - /* 530 */ 197, 123, 260, 197, 268, 197, 259, 268, 197, 197, - /* 540 */ 135, 197, 129, 137, 134, 197, 256, 197, 133, 197, - /* 550 */ 197, 197, 257, 127, 197, 197, 197, 197, 197, 197, - /* 560 */ 126, 125, 197, 197, 197, 197, 197, 197, 128, 197, - /* 570 */ 197, 197, 197, 197, 197, 197, 197, 124, 197, 197, + /* 60 */ 58, 59, 243, 61, 13, 14, 247, 16, 17, 0, + /* 70 */ 264, 20, 21, 264, 23, 24, 25, 26, 27, 28, + /* 80 */ 274, 266, 267, 265, 33, 34, 86, 82, 37, 38, + /* 90 */ 39, 13, 14, 271, 16, 17, 84, 245, 20, 21, + /* 100 */ 197, 23, 24, 25, 26, 27, 28, 269, 5, 271, + /* 110 */ 205, 33, 34, 261, 1, 37, 38, 39, 13, 14, + /* 120 */ 271, 16, 17, 90, 119, 20, 21, 205, 23, 24, + /* 130 */ 25, 26, 27, 28, 83, 264, 33, 34, 33, 34, + /* 140 */ 219, 220, 37, 38, 39, 14, 241, 16, 17, 246, + /* 150 */ 37, 20, 21, 84, 23, 24, 25, 26, 27, 28, + /* 160 */ 238, 239, 240, 241, 33, 34, 195, 196, 37, 38, + /* 170 */ 39, 98, 99, 100, 101, 102, 103, 104, 105, 106, + /* 180 */ 107, 108, 109, 110, 111, 112, 221, 222, 223, 224, + /* 190 */ 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, + /* 200 */ 235, 16, 17, 44, 82, 20, 21, 1, 23, 24, + /* 210 */ 25, 26, 27, 28, 248, 9, 245, 82, 33, 34, + /* 220 */ 61, 86, 37, 38, 39, 33, 34, 68, 262, 37, + /* 230 */ 38, 39, 261, 74, 75, 76, 77, 115, 1, 2, + /* 240 */ 81, 82, 5, 203, 7, 197, 9, 264, 1, 2, + /* 250 */ 210, 116, 5, 204, 7, 264, 9, 62, 63, 64, + /* 260 */ 204, 197, 197, 197, 69, 70, 71, 72, 73, 197, + /* 270 */ 33, 34, 68, 208, 37, 65, 66, 67, 119, 245, + /* 280 */ 33, 34, 264, 88, 25, 26, 27, 28, 82, 5, + /* 290 */ 242, 7, 33, 34, 246, 261, 37, 38, 39, 140, + /* 300 */ 2, 142, 68, 5, 205, 7, 242, 9, 149, 5, + /* 310 */ 246, 7, 237, 264, 242, 62, 63, 64, 246, 82, + /* 320 */ 264, 203, 69, 274, 71, 72, 73, 197, 210, 82, + /* 330 */ 274, 33, 34, 80, 62, 63, 64, 271, 239, 273, + /* 340 */ 197, 69, 70, 71, 72, 73, 197, 143, 37, 145, + /* 350 */ 197, 147, 148, 197, 117, 118, 98, 97, 100, 101, + /* 360 */ 197, 124, 197, 105, 117, 118, 78, 109, 197, 111, + /* 370 */ 112, 124, 242, 197, 141, 76, 246, 143, 90, 145, + /* 380 */ 15, 147, 148, 150, 151, 242, 62, 63, 64, 246, + /* 390 */ 197, 242, 37, 38, 39, 246, 136, 244, 242, 197, + /* 400 */ 97, 208, 246, 206, 207, 242, 83, 242, 124, 246, + /* 410 */ 208, 246, 83, 242, 97, 117, 118, 246, 242, 201, + /* 420 */ 202, 83, 246, 83, 83, 83, 123, 83, 124, 60, + /* 430 */ 83, 132, 83, 122, 83, 97, 83, 97, 97, 97, + /* 440 */ 83, 97, 83, 120, 97, 83, 97, 264, 97, 120, + /* 450 */ 97, 82, 82, 264, 97, 138, 97, 237, 144, 97, + /* 460 */ 146, 247, 144, 144, 146, 146, 5, 264, 7, 5, + /* 470 */ 144, 7, 146, 264, 144, 144, 146, 146, 78, 79, + /* 480 */ 264, 264, 117, 264, 114, 264, 264, 264, 264, 264, + /* 490 */ 264, 264, 264, 247, 237, 247, 245, 197, 237, 237, + /* 500 */ 237, 237, 197, 197, 263, 197, 197, 197, 272, 197, + /* 510 */ 245, 272, 197, 197, 245, 249, 60, 197, 197, 197, + /* 520 */ 268, 89, 197, 268, 197, 197, 258, 260, 255, 197, + /* 530 */ 197, 197, 197, 197, 197, 124, 197, 259, 268, 268, + /* 540 */ 197, 133, 197, 197, 135, 197, 130, 197, 134, 197, + /* 550 */ 137, 197, 257, 197, 128, 197, 127, 197, 197, 126, + /* 560 */ 197, 197, 139, 197, 197, 197, 129, 254, 197, 197, + /* 570 */ 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, /* 580 */ 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, - /* 590 */ 197, 197, 197, 139, 197, 197, 197, 88, 112, 199, - /* 600 */ 199, 199, 199, 95, 94, 51, 91, 93, 55, 92, - /* 610 */ 90, 83, 5, 5, 152, 5, 199, 199, 199, 152, - /* 620 */ 5, 5, 99, 199, 199, 98, 141, 114, 205, 209, - /* 630 */ 209, 119, 205, 81, 96, 96, 120, 199, 82, 200, - /* 640 */ 81, 81, 200, 212, 199, 216, 218, 217, 215, 214, - /* 650 */ 213, 200, 211, 206, 199, 82, 200, 199, 236, 255, - /* 660 */ 199, 254, 253, 220, 252, 251, 250, 201, 236, 82, - /* 670 */ 81, 96, 82, 81, 1, 82, 81, 81, 96, 130, - /* 680 */ 96, 130, 81, 81, 114, 81, 115, 70, 77, 86, - /* 690 */ 85, 5, 86, 9, 85, 5, 5, 5, 5, 5, - /* 700 */ 5, 5, 84, 15, 77, 81, 24, 82, 59, 81, - /* 710 */ 116, 146, 146, 16, 16, 96, 5, 5, 146, 82, - /* 720 */ 146, 5, 5, 5, 5, 5, 5, 5, 5, 5, - /* 730 */ 5, 5, 5, 5, 5, 5, 96, 84, 60, 0, - /* 740 */ 275, 275, 275, 275, 275, 275, 275, 275, 275, 275, - /* 750 */ 275, 275, 21, 21, 275, 275, 275, 275, 275, 275, + /* 590 */ 197, 197, 197, 197, 197, 197, 197, 125, 197, 197, + /* 600 */ 113, 96, 199, 199, 199, 199, 199, 95, 51, 92, + /* 610 */ 94, 55, 93, 91, 84, 5, 5, 199, 152, 199, + /* 620 */ 199, 5, 5, 5, 100, 99, 152, 199, 120, 141, + /* 630 */ 199, 209, 205, 209, 82, 205, 115, 83, 97, 121, + /* 640 */ 199, 82, 97, 83, 82, 199, 83, 200, 200, 199, + /* 650 */ 212, 216, 218, 217, 215, 213, 211, 214, 200, 199, + /* 660 */ 206, 236, 200, 82, 220, 253, 256, 252, 251, 250, + /* 670 */ 199, 201, 199, 83, 97, 82, 236, 83, 82, 1, + /* 680 */ 82, 97, 131, 97, 131, 82, 82, 115, 82, 116, + /* 690 */ 78, 70, 87, 86, 5, 87, 9, 5, 5, 86, + /* 700 */ 5, 5, 5, 5, 5, 85, 15, 78, 82, 117, + /* 710 */ 83, 59, 82, 146, 24, 146, 16, 16, 5, 97, + /* 720 */ 146, 146, 5, 83, 5, 5, 5, 5, 5, 5, + /* 730 */ 5, 5, 5, 5, 5, 5, 5, 5, 5, 97, + /* 740 */ 85, 60, 0, 275, 275, 275, 275, 275, 275, 275, + /* 750 */ 275, 275, 275, 275, 275, 21, 21, 275, 275, 275, /* 760 */ 275, 275, 275, 275, 275, 275, 275, 275, 275, 275, /* 770 */ 275, 275, 275, 275, 275, 275, 275, 275, 275, 275, /* 780 */ 275, 275, 275, 275, 275, 275, 275, 275, 275, 275, @@ -391,114 +585,115 @@ static const YYCODETYPE yy_lookahead[] = { /* 910 */ 275, 275, 275, 275, 275, 275, 275, 275, 275, 275, /* 920 */ 275, 275, 275, 275, 275, 275, 275, 275, 275, 275, /* 930 */ 275, 275, 275, 275, 275, 275, 275, 275, 275, 275, - /* 940 */ 275, 275, 275, 275, 275, 275, 275, 275, 275, + /* 940 */ 275, 275, 275, 275, 275, 275, 275, 275, 275, 275, + /* 950 */ 275, 275, }; -#define YY_SHIFT_COUNT (361) +#define YY_SHIFT_COUNT (363) #define YY_SHIFT_MIN (0) -#define YY_SHIFT_MAX (739) +#define YY_SHIFT_MAX (742) static const unsigned short int yy_shift_ofst[] = { - /* 0 */ 189, 91, 91, 244, 244, 81, 242, 251, 251, 21, - /* 10 */ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - /* 20 */ 3, 3, 3, 0, 2, 251, 291, 291, 291, 58, - /* 30 */ 58, 3, 3, 3, 237, 3, 3, 3, 3, 289, - /* 40 */ 81, 92, 92, 41, 754, 754, 754, 251, 251, 251, - /* 50 */ 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, - /* 60 */ 251, 251, 251, 251, 251, 251, 251, 291, 291, 291, - /* 70 */ 93, 93, 93, 93, 93, 93, 93, 3, 3, 3, - /* 80 */ 302, 3, 3, 3, 58, 58, 3, 3, 3, 3, - /* 90 */ 274, 274, 288, 58, 3, 3, 3, 3, 3, 3, - /* 100 */ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - /* 110 */ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - /* 120 */ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - /* 130 */ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - /* 140 */ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - /* 150 */ 3, 3, 446, 446, 446, 408, 408, 408, 408, 446, - /* 160 */ 446, 405, 406, 413, 410, 415, 426, 434, 436, 440, - /* 170 */ 453, 454, 446, 446, 446, 509, 509, 486, 81, 81, - /* 180 */ 446, 446, 508, 510, 554, 515, 514, 553, 517, 520, - /* 190 */ 486, 41, 446, 528, 528, 446, 528, 446, 528, 446, - /* 200 */ 446, 754, 754, 53, 80, 80, 120, 80, 146, 202, - /* 210 */ 218, 276, 276, 276, 276, 59, 264, 234, 234, 234, - /* 220 */ 234, 174, 240, 27, 296, 312, 312, 311, 335, 306, - /* 230 */ 337, 280, 298, 307, 334, 339, 340, 286, 297, 343, - /* 240 */ 345, 346, 347, 349, 351, 355, 356, 411, 380, 371, - /* 250 */ 364, 303, 309, 310, 452, 457, 322, 323, 363, 326, - /* 260 */ 396, 607, 462, 608, 610, 467, 615, 616, 523, 527, - /* 270 */ 485, 512, 513, 552, 516, 556, 559, 538, 539, 573, - /* 280 */ 560, 587, 589, 590, 575, 592, 593, 595, 673, 596, - /* 290 */ 582, 549, 584, 551, 601, 513, 602, 570, 604, 571, - /* 300 */ 611, 603, 605, 617, 686, 606, 609, 684, 690, 691, - /* 310 */ 692, 693, 694, 695, 696, 618, 688, 627, 624, 625, - /* 320 */ 594, 628, 682, 649, 697, 565, 566, 619, 619, 619, - /* 330 */ 619, 698, 572, 574, 619, 619, 619, 711, 712, 637, - /* 340 */ 619, 716, 717, 718, 719, 720, 721, 722, 723, 724, - /* 350 */ 725, 726, 727, 728, 729, 730, 640, 653, 731, 732, - /* 360 */ 678, 739, + /* 0 */ 159, 73, 73, 258, 258, 12, 237, 247, 247, 206, + /* 10 */ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + /* 20 */ 21, 21, 21, 0, 2, 247, 298, 298, 298, 5, + /* 30 */ 5, 21, 21, 21, 69, 21, 21, 21, 21, 288, + /* 40 */ 12, 33, 33, 39, 757, 757, 757, 247, 247, 247, + /* 50 */ 247, 247, 247, 247, 247, 247, 247, 247, 247, 247, + /* 60 */ 247, 247, 247, 247, 247, 247, 247, 298, 298, 298, + /* 70 */ 103, 103, 103, 103, 103, 103, 103, 21, 21, 21, + /* 80 */ 311, 21, 21, 21, 5, 5, 21, 21, 21, 21, + /* 90 */ 299, 299, 303, 5, 21, 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, 456, 456, 456, 411, 411, 411, 411, + /* 160 */ 456, 456, 409, 413, 416, 414, 408, 426, 429, 433, + /* 170 */ 437, 472, 423, 456, 456, 456, 432, 432, 487, 12, + /* 180 */ 12, 456, 456, 505, 512, 557, 517, 516, 556, 519, + /* 190 */ 522, 487, 39, 456, 456, 530, 530, 456, 530, 456, + /* 200 */ 530, 456, 456, 757, 757, 51, 78, 78, 105, 78, + /* 210 */ 131, 185, 195, 259, 259, 259, 259, 253, 272, 192, + /* 220 */ 192, 192, 192, 204, 234, 233, 135, 355, 355, 284, + /* 230 */ 304, 210, 324, 338, 323, 329, 340, 341, 342, 317, + /* 240 */ 260, 344, 347, 349, 351, 353, 122, 357, 359, 113, + /* 250 */ 369, 365, 362, 314, 318, 319, 461, 464, 326, 330, + /* 260 */ 370, 331, 400, 610, 466, 611, 616, 474, 617, 618, + /* 270 */ 524, 526, 488, 508, 521, 552, 518, 554, 559, 541, + /* 280 */ 545, 560, 562, 563, 581, 590, 577, 593, 594, 596, + /* 290 */ 678, 598, 584, 551, 586, 553, 603, 521, 604, 572, + /* 300 */ 606, 573, 612, 605, 607, 621, 689, 608, 613, 687, + /* 310 */ 692, 693, 695, 696, 697, 698, 699, 620, 691, 629, + /* 320 */ 626, 627, 592, 630, 690, 652, 700, 567, 569, 622, + /* 330 */ 622, 622, 622, 701, 574, 575, 622, 622, 622, 713, + /* 340 */ 717, 640, 622, 719, 720, 721, 722, 723, 724, 725, + /* 350 */ 726, 727, 728, 729, 730, 731, 732, 733, 642, 655, + /* 360 */ 734, 735, 681, 742, }; -#define YY_REDUCE_COUNT (202) -#define YY_REDUCE_MIN (-264) -#define YY_REDUCE_MAX (466) +#define YY_REDUCE_COUNT (204) +#define YY_REDUCE_MIN (-256) +#define YY_REDUCE_MAX (473) static const short yy_reduce_ofst[] = { - /* 0 */ -177, -18, -18, -192, -192, -89, -202, -199, -109, -156, - /* 10 */ -22, 24, -10, 114, 115, 133, 148, 149, 150, 156, - /* 20 */ 167, 172, 173, -182, -191, -264, -123, -118, -61, -146, - /* 30 */ -13, -189, -162, 34, 33, 37, 69, 86, -85, -139, - /* 40 */ 158, 52, 96, -175, -106, 197, -113, 22, 28, 186, - /* 50 */ 199, 207, 211, 213, 214, 215, 216, 217, 219, 220, - /* 60 */ 221, 222, 224, 225, 226, 227, 228, -1, 7, 235, - /* 70 */ 183, 256, 257, 258, 259, 260, 261, 304, 305, 308, - /* 80 */ 236, 313, 314, 315, 255, 262, 316, 317, 318, 319, - /* 90 */ 231, 232, 268, 263, 321, 324, 325, 327, 328, 329, - /* 100 */ 330, 331, 332, 333, 336, 338, 341, 342, 344, 348, - /* 110 */ 350, 352, 353, 354, 357, 358, 359, 360, 361, 362, - /* 120 */ 365, 366, 367, 368, 369, 370, 372, 373, 374, 375, - /* 130 */ 376, 377, 378, 379, 381, 382, 383, 384, 385, 386, - /* 140 */ 387, 388, 389, 390, 391, 392, 393, 394, 395, 397, - /* 150 */ 398, 399, 320, 400, 401, 241, 252, 266, 269, 402, - /* 160 */ 403, 272, 277, 265, 295, 290, 404, 407, 409, 412, - /* 170 */ 414, 416, 417, 418, 419, 420, 421, 422, 423, 427, - /* 180 */ 424, 425, 428, 430, 429, 431, 433, 437, 435, 441, - /* 190 */ 432, 443, 438, 439, 442, 445, 451, 455, 456, 458, - /* 200 */ 461, 447, 466, + /* 0 */ -29, -35, -35, -192, -192, -78, -194, 49, 56, -185, + /* 10 */ 48, 66, -162, 64, 72, 130, 143, 149, 156, 163, + /* 20 */ 165, 171, 176, -182, -193, -256, -241, -202, -181, -148, + /* 30 */ 34, -178, -151, 153, -95, 65, 193, 202, -97, -203, + /* 40 */ 99, 40, 118, -79, -34, 197, 218, -191, -129, -17, + /* 50 */ -9, 18, 183, 189, 203, 209, 216, 217, 219, 221, + /* 60 */ 222, 223, 224, 225, 226, 227, 228, 214, 246, 248, + /* 70 */ 75, 220, 257, 261, 262, 263, 264, 300, 305, 306, + /* 80 */ 241, 308, 309, 310, 251, 265, 312, 315, 316, 320, + /* 90 */ 236, 239, 266, 269, 321, 322, 325, 327, 328, 332, + /* 100 */ 333, 334, 335, 336, 337, 339, 343, 345, 346, 348, + /* 110 */ 350, 352, 354, 356, 358, 360, 361, 363, 364, 366, + /* 120 */ 367, 368, 371, 372, 373, 374, 375, 376, 377, 378, + /* 130 */ 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, + /* 140 */ 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, + /* 150 */ 399, 401, 402, 403, 404, 405, 252, 255, 270, 271, + /* 160 */ 406, 407, 267, 278, 268, 295, 410, 273, 313, 412, + /* 170 */ 415, 417, 419, 418, 420, 421, 422, 424, 425, 427, + /* 180 */ 430, 428, 431, 434, 436, 435, 438, 439, 442, 443, + /* 190 */ 445, 440, 444, 441, 446, 447, 448, 450, 458, 460, + /* 200 */ 462, 471, 473, 454, 470, }; 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, 874, 878, 878, 878, 856, 856, 856, 856, 878, - /* 160 */ 878, 1076, 1080, 1062, 1074, 1070, 1057, 1055, 1053, 1061, - /* 170 */ 1052, 1084, 878, 878, 878, 923, 923, 919, 915, 915, - /* 180 */ 878, 878, 941, 939, 937, 929, 935, 931, 933, 927, - /* 190 */ 906, 856, 878, 913, 913, 878, 913, 878, 913, 878, - /* 200 */ 878, 963, 981, 856, 1085, 1075, 856, 1125, 1115, 1114, - /* 210 */ 856, 1121, 1113, 1112, 1111, 856, 856, 1107, 1110, 1109, - /* 220 */ 1108, 856, 856, 856, 856, 1117, 1116, 856, 856, 856, - /* 230 */ 856, 856, 856, 856, 856, 856, 856, 1081, 1077, 856, - /* 240 */ 856, 856, 856, 856, 856, 856, 856, 856, 1087, 856, - /* 250 */ 856, 856, 856, 856, 856, 856, 856, 856, 991, 856, - /* 260 */ 856, 856, 856, 856, 856, 856, 856, 856, 856, 856, - /* 270 */ 856, 1029, 856, 856, 856, 856, 856, 1041, 1040, 856, - /* 280 */ 856, 856, 856, 856, 856, 856, 856, 856, 856, 856, - /* 290 */ 1071, 856, 1063, 856, 856, 1003, 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, 856, 1144, 1139, 1140, - /* 330 */ 1137, 856, 856, 856, 1136, 1131, 1132, 856, 856, 856, - /* 340 */ 1129, 856, 856, 856, 856, 856, 856, 856, 856, 856, - /* 350 */ 856, 856, 856, 856, 856, 856, 947, 856, 885, 883, - /* 360 */ 856, 856, + /* 0 */ 860, 984, 923, 994, 910, 920, 1131, 1131, 1131, 860, + /* 10 */ 860, 860, 860, 860, 860, 860, 860, 860, 860, 860, + /* 20 */ 860, 860, 860, 1042, 880, 1131, 860, 860, 860, 860, + /* 30 */ 860, 860, 860, 860, 920, 860, 860, 860, 860, 930, + /* 40 */ 920, 930, 930, 860, 1037, 968, 986, 860, 860, 860, + /* 50 */ 860, 860, 860, 860, 860, 860, 860, 860, 860, 860, + /* 60 */ 860, 860, 860, 860, 860, 860, 860, 860, 860, 860, + /* 70 */ 860, 860, 860, 860, 860, 860, 860, 860, 860, 860, + /* 80 */ 1044, 1050, 1047, 860, 860, 860, 1052, 860, 860, 860, + /* 90 */ 1074, 1074, 1035, 860, 860, 860, 860, 860, 860, 860, + /* 100 */ 860, 860, 860, 860, 860, 860, 860, 860, 860, 860, + /* 110 */ 860, 860, 860, 860, 860, 860, 860, 860, 860, 860, + /* 120 */ 860, 860, 860, 860, 860, 860, 908, 860, 906, 860, + /* 130 */ 860, 860, 860, 860, 860, 860, 860, 860, 860, 860, + /* 140 */ 860, 860, 860, 860, 860, 891, 860, 860, 860, 860, + /* 150 */ 860, 860, 878, 882, 882, 882, 860, 860, 860, 860, + /* 160 */ 882, 882, 1081, 1085, 1067, 1079, 1075, 1062, 1060, 1058, + /* 170 */ 1066, 1057, 1089, 882, 882, 882, 928, 928, 924, 920, + /* 180 */ 920, 882, 882, 946, 944, 942, 934, 940, 936, 938, + /* 190 */ 932, 911, 860, 882, 882, 918, 918, 882, 918, 882, + /* 200 */ 918, 882, 882, 968, 986, 860, 1090, 1080, 860, 1130, + /* 210 */ 1120, 1119, 860, 1126, 1118, 1117, 1116, 860, 860, 1112, + /* 220 */ 1115, 1114, 1113, 860, 860, 860, 860, 1122, 1121, 860, + /* 230 */ 860, 860, 860, 860, 860, 860, 860, 860, 860, 1086, + /* 240 */ 1082, 860, 860, 860, 860, 860, 860, 860, 860, 860, + /* 250 */ 1092, 860, 860, 860, 860, 860, 860, 860, 860, 860, + /* 260 */ 996, 860, 860, 860, 860, 860, 860, 860, 860, 860, + /* 270 */ 860, 860, 860, 1034, 860, 860, 860, 860, 860, 1046, + /* 280 */ 1045, 860, 860, 860, 860, 860, 860, 860, 860, 860, + /* 290 */ 860, 860, 1076, 860, 1068, 860, 860, 1008, 860, 860, + /* 300 */ 860, 860, 860, 860, 860, 860, 860, 860, 860, 860, + /* 310 */ 860, 860, 860, 860, 860, 860, 860, 860, 860, 860, + /* 320 */ 860, 860, 860, 860, 860, 860, 860, 860, 860, 1149, + /* 330 */ 1144, 1145, 1142, 860, 860, 860, 1141, 1136, 1137, 860, + /* 340 */ 860, 860, 1134, 860, 860, 860, 860, 860, 860, 860, + /* 350 */ 860, 860, 860, 860, 860, 860, 860, 860, 952, 860, + /* 360 */ 889, 887, 860, 860, }; /********** End of lemon-generated parsing tables *****************************/ @@ -594,6 +789,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 */ @@ -650,7 +846,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 */ @@ -766,6 +961,7 @@ typedef struct yyParser yyParser; #ifndef NDEBUG #include +#include static FILE *yyTraceFILE = 0; static char *yyTracePrompt = 0; #endif /* NDEBUG */ @@ -876,63 +1072,63 @@ static const char *const yyTokenName[] = { /* 73 */ "ACCOUNT", /* 74 */ "USE", /* 75 */ "DESCRIBE", - /* 76 */ "ALTER", - /* 77 */ "PASS", - /* 78 */ "PRIVILEGE", - /* 79 */ "LOCAL", - /* 80 */ "COMPACT", - /* 81 */ "LP", - /* 82 */ "RP", - /* 83 */ "IF", - /* 84 */ "EXISTS", - /* 85 */ "AS", - /* 86 */ "OUTPUTTYPE", - /* 87 */ "AGGREGATE", - /* 88 */ "BUFSIZE", - /* 89 */ "PPS", - /* 90 */ "TSERIES", - /* 91 */ "DBS", - /* 92 */ "STORAGE", - /* 93 */ "QTIME", - /* 94 */ "CONNS", - /* 95 */ "STATE", - /* 96 */ "COMMA", - /* 97 */ "KEEP", - /* 98 */ "CACHE", - /* 99 */ "REPLICA", - /* 100 */ "QUORUM", - /* 101 */ "DAYS", - /* 102 */ "MINROWS", - /* 103 */ "MAXROWS", - /* 104 */ "BLOCKS", - /* 105 */ "CTIME", - /* 106 */ "WAL", - /* 107 */ "FSYNC", - /* 108 */ "COMP", - /* 109 */ "PRECISION", - /* 110 */ "UPDATE", - /* 111 */ "CACHELAST", - /* 112 */ "PARTITIONS", - /* 113 */ "UNSIGNED", - /* 114 */ "TAGS", - /* 115 */ "USING", - /* 116 */ "NULL", - /* 117 */ "NOW", - /* 118 */ "SELECT", - /* 119 */ "UNION", - /* 120 */ "ALL", - /* 121 */ "DISTINCT", - /* 122 */ "FROM", - /* 123 */ "VARIABLE", - /* 124 */ "INTERVAL", - /* 125 */ "SESSION", - /* 126 */ "STATE_WINDOW", - /* 127 */ "FILL", - /* 128 */ "SLIDING", - /* 129 */ "ORDER", - /* 130 */ "BY", - /* 131 */ "ASC", - /* 132 */ "DESC", + /* 76 */ "DESC", + /* 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 */ "GROUP", /* 134 */ "HAVING", /* 135 */ "LIMIT", @@ -1122,255 +1318,256 @@ 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_opt 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_opt ::= INTERVAL LP tmvar RP", + /* 193 */ "interval_opt ::= INTERVAL LP tmvar COMMA tmvar RP", + /* 194 */ "interval_opt ::=", + /* 195 */ "session_option ::=", + /* 196 */ "session_option ::= SESSION LP ids cpxName COMMA tmvar RP", + /* 197 */ "windowstate_option ::=", + /* 198 */ "windowstate_option ::= STATE_WINDOW LP ids RP", + /* 199 */ "fill_opt ::=", + /* 200 */ "fill_opt ::= FILL LP ID COMMA tagitemlist RP", + /* 201 */ "fill_opt ::= FILL LP ID RP", + /* 202 */ "sliding_opt ::= SLIDING LP tmvar RP", + /* 203 */ "sliding_opt ::=", + /* 204 */ "orderby_opt ::=", + /* 205 */ "orderby_opt ::= ORDER BY sortlist", + /* 206 */ "sortlist ::= sortlist COMMA item sortorder", + /* 207 */ "sortlist ::= item sortorder", + /* 208 */ "item ::= ids cpxName", + /* 209 */ "sortorder ::= ASC", + /* 210 */ "sortorder ::= DESC", + /* 211 */ "sortorder ::=", + /* 212 */ "groupby_opt ::=", + /* 213 */ "groupby_opt ::= GROUP BY grouplist", + /* 214 */ "grouplist ::= grouplist COMMA item", + /* 215 */ "grouplist ::= item", + /* 216 */ "having_opt ::=", + /* 217 */ "having_opt ::= HAVING expr", + /* 218 */ "limit_opt ::=", + /* 219 */ "limit_opt ::= LIMIT signed", + /* 220 */ "limit_opt ::= LIMIT signed OFFSET signed", + /* 221 */ "limit_opt ::= LIMIT signed COMMA signed", + /* 222 */ "slimit_opt ::=", + /* 223 */ "slimit_opt ::= SLIMIT signed", + /* 224 */ "slimit_opt ::= SLIMIT signed SOFFSET signed", + /* 225 */ "slimit_opt ::= SLIMIT signed COMMA signed", + /* 226 */ "where_opt ::=", + /* 227 */ "where_opt ::= WHERE expr", + /* 228 */ "expr ::= LP expr RP", + /* 229 */ "expr ::= ID", + /* 230 */ "expr ::= ID DOT ID", + /* 231 */ "expr ::= ID DOT STAR", + /* 232 */ "expr ::= INTEGER", + /* 233 */ "expr ::= MINUS INTEGER", + /* 234 */ "expr ::= PLUS INTEGER", + /* 235 */ "expr ::= FLOAT", + /* 236 */ "expr ::= MINUS FLOAT", + /* 237 */ "expr ::= PLUS FLOAT", + /* 238 */ "expr ::= STRING", + /* 239 */ "expr ::= NOW", + /* 240 */ "expr ::= VARIABLE", + /* 241 */ "expr ::= PLUS VARIABLE", + /* 242 */ "expr ::= MINUS VARIABLE", + /* 243 */ "expr ::= BOOL", + /* 244 */ "expr ::= NULL", + /* 245 */ "expr ::= ID LP exprlist RP", + /* 246 */ "expr ::= ID LP STAR RP", + /* 247 */ "expr ::= expr IS NULL", + /* 248 */ "expr ::= expr IS NOT NULL", + /* 249 */ "expr ::= expr LT expr", + /* 250 */ "expr ::= expr GT expr", + /* 251 */ "expr ::= expr LE expr", + /* 252 */ "expr ::= expr GE expr", + /* 253 */ "expr ::= expr NE expr", + /* 254 */ "expr ::= expr EQ expr", + /* 255 */ "expr ::= expr BETWEEN expr AND expr", + /* 256 */ "expr ::= expr AND expr", + /* 257 */ "expr ::= expr OR expr", + /* 258 */ "expr ::= expr PLUS expr", + /* 259 */ "expr ::= expr MINUS expr", + /* 260 */ "expr ::= expr STAR expr", + /* 261 */ "expr ::= expr SLASH expr", + /* 262 */ "expr ::= expr REM expr", + /* 263 */ "expr ::= expr LIKE expr", + /* 264 */ "expr ::= expr IN LP exprlist RP", + /* 265 */ "exprlist ::= exprlist COMMA expritem", + /* 266 */ "exprlist ::= expritem", + /* 267 */ "expritem ::= expr", + /* 268 */ "expritem ::=", + /* 269 */ "cmd ::= RESET QUERY CACHE", + /* 270 */ "cmd ::= SYNCDB ids REPLICA", + /* 271 */ "cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist", + /* 272 */ "cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids", + /* 273 */ "cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist", + /* 274 */ "cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist", + /* 275 */ "cmd ::= ALTER TABLE ids cpxName DROP TAG ids", + /* 276 */ "cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids", + /* 277 */ "cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem", + /* 278 */ "cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist", + /* 279 */ "cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist", + /* 280 */ "cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids", + /* 281 */ "cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist", + /* 282 */ "cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist", + /* 283 */ "cmd ::= ALTER STABLE ids cpxName DROP TAG ids", + /* 284 */ "cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids", + /* 285 */ "cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem", + /* 286 */ "cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist", + /* 287 */ "cmd ::= KILL CONNECTION INTEGER", + /* 288 */ "cmd ::= KILL STREAM INTEGER COLON INTEGER", + /* 289 */ "cmd ::= KILL QUERY INTEGER COLON INTEGER", }; #endif /* NDEBUG */ @@ -1500,9 +1697,9 @@ static void yy_destructor( case 248: /* selcollist */ case 262: /* sclp */ { -#line 750 "sql.y" +#line 753 "src/query/inc/sql.y" tSqlExprListDestroy((yypminor->yy131)); -#line 1506 "sql.c" +#line 1702 "src/query/inc/sql.c" } break; case 219: /* intitemlist */ @@ -1516,32 +1713,32 @@ tSqlExprListDestroy((yypminor->yy131)); case 269: /* sortlist */ case 273: /* grouplist */ { -#line 253 "sql.y" +#line 256 "src/query/inc/sql.y" taosArrayDestroy((yypminor->yy131)); -#line 1522 "sql.c" +#line 1718 "src/query/inc/sql.c" } break; case 240: /* create_table_list */ { -#line 361 "sql.y" +#line 364 "src/query/inc/sql.y" destroyCreateTableSql((yypminor->yy272)); -#line 1529 "sql.c" +#line 1725 "src/query/inc/sql.c" } break; case 245: /* select */ { -#line 481 "sql.y" +#line 484 "src/query/inc/sql.y" destroySqlNode((yypminor->yy256)); -#line 1536 "sql.c" +#line 1732 "src/query/inc/sql.c" } break; case 249: /* from */ case 266: /* tablelist */ case 267: /* sub */ { -#line 536 "sql.y" +#line 539 "src/query/inc/sql.y" destroyRelationInfo((yypminor->yy544)); -#line 1545 "sql.c" +#line 1741 "src/query/inc/sql.c" } break; case 250: /* where_opt */ @@ -1549,23 +1746,23 @@ destroyRelationInfo((yypminor->yy544)); case 264: /* expr */ case 274: /* expritem */ { -#line 683 "sql.y" +#line 686 "src/query/inc/sql.y" tSqlExprDestroy((yypminor->yy46)); -#line 1555 "sql.c" +#line 1751 "src/query/inc/sql.c" } break; case 261: /* union */ { -#line 489 "sql.y" +#line 492 "src/query/inc/sql.y" destroyAllSqlNode((yypminor->yy131)); -#line 1562 "sql.c" +#line 1758 "src/query/inc/sql.c" } break; case 270: /* sortitem */ { -#line 616 "sql.y" +#line 619 "src/query/inc/sql.y" tVariantDestroy(&(yypminor->yy516)); -#line 1569 "sql.c" +#line 1765 "src/query/inc/sql.c" } break; /********* End destructor definitions *****************************************/ @@ -1732,7 +1929,7 @@ static YYACTIONTYPE yy_find_shift_action( #endif /* YYWILDCARD */ return yy_default[stateno]; }else{ - assert( i>=0 && i=0 && i<(int)(sizeof(yy_action)/sizeof(yy_action[0])) ); return yy_action[i]; } }while(1); @@ -1894,255 +2091,256 @@ static const YYCODETYPE yyRuleInfoLhs[] = { 196, /* (37) cmd ::= DROP ACCOUNT ids */ 196, /* (38) cmd ::= USE ids */ 196, /* (39) cmd ::= DESCRIBE ids cpxName */ - 196, /* (40) cmd ::= ALTER USER ids PASS ids */ - 196, /* (41) cmd ::= ALTER USER ids PRIVILEGE ids */ - 196, /* (42) cmd ::= ALTER DNODE ids ids */ - 196, /* (43) cmd ::= ALTER DNODE ids ids ids */ - 196, /* (44) cmd ::= ALTER LOCAL ids */ - 196, /* (45) cmd ::= ALTER LOCAL ids ids */ - 196, /* (46) cmd ::= ALTER DATABASE ids alter_db_optr */ - 196, /* (47) cmd ::= ALTER TOPIC ids alter_topic_optr */ - 196, /* (48) cmd ::= ALTER ACCOUNT ids acct_optr */ - 196, /* (49) cmd ::= ALTER ACCOUNT ids PASS ids acct_optr */ - 196, /* (50) cmd ::= COMPACT VNODES IN LP exprlist RP */ - 197, /* (51) ids ::= ID */ - 197, /* (52) ids ::= STRING */ - 200, /* (53) ifexists ::= IF EXISTS */ - 200, /* (54) ifexists ::= */ - 205, /* (55) ifnotexists ::= IF NOT EXISTS */ - 205, /* (56) ifnotexists ::= */ - 196, /* (57) cmd ::= CREATE DNODE ids */ - 196, /* (58) cmd ::= CREATE ACCOUNT ids PASS ids acct_optr */ - 196, /* (59) cmd ::= CREATE DATABASE ifnotexists ids db_optr */ - 196, /* (60) cmd ::= CREATE TOPIC ifnotexists ids topic_optr */ - 196, /* (61) cmd ::= CREATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */ - 196, /* (62) cmd ::= CREATE AGGREGATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */ - 196, /* (63) cmd ::= CREATE USER ids PASS ids */ - 209, /* (64) bufsize ::= */ - 209, /* (65) bufsize ::= BUFSIZE INTEGER */ - 210, /* (66) pps ::= */ - 210, /* (67) pps ::= PPS INTEGER */ - 211, /* (68) tseries ::= */ - 211, /* (69) tseries ::= TSERIES INTEGER */ - 212, /* (70) dbs ::= */ - 212, /* (71) dbs ::= DBS INTEGER */ - 213, /* (72) streams ::= */ - 213, /* (73) streams ::= STREAMS INTEGER */ - 214, /* (74) storage ::= */ - 214, /* (75) storage ::= STORAGE INTEGER */ - 215, /* (76) qtime ::= */ - 215, /* (77) qtime ::= QTIME INTEGER */ - 216, /* (78) users ::= */ - 216, /* (79) users ::= USERS INTEGER */ - 217, /* (80) conns ::= */ - 217, /* (81) conns ::= CONNS INTEGER */ - 218, /* (82) state ::= */ - 218, /* (83) state ::= STATE ids */ - 203, /* (84) acct_optr ::= pps tseries storage streams qtime dbs users conns state */ - 219, /* (85) intitemlist ::= intitemlist COMMA intitem */ - 219, /* (86) intitemlist ::= intitem */ - 220, /* (87) intitem ::= INTEGER */ - 221, /* (88) keep ::= KEEP intitemlist */ - 222, /* (89) cache ::= CACHE INTEGER */ - 223, /* (90) replica ::= REPLICA INTEGER */ - 224, /* (91) quorum ::= QUORUM INTEGER */ - 225, /* (92) days ::= DAYS INTEGER */ - 226, /* (93) minrows ::= MINROWS INTEGER */ - 227, /* (94) maxrows ::= MAXROWS INTEGER */ - 228, /* (95) blocks ::= BLOCKS INTEGER */ - 229, /* (96) ctime ::= CTIME INTEGER */ - 230, /* (97) wal ::= WAL INTEGER */ - 231, /* (98) fsync ::= FSYNC INTEGER */ - 232, /* (99) comp ::= COMP INTEGER */ - 233, /* (100) prec ::= PRECISION STRING */ - 234, /* (101) update ::= UPDATE INTEGER */ - 235, /* (102) cachelast ::= CACHELAST INTEGER */ - 236, /* (103) partitions ::= PARTITIONS INTEGER */ - 206, /* (104) db_optr ::= */ - 206, /* (105) db_optr ::= db_optr cache */ - 206, /* (106) db_optr ::= db_optr replica */ - 206, /* (107) db_optr ::= db_optr quorum */ - 206, /* (108) db_optr ::= db_optr days */ - 206, /* (109) db_optr ::= db_optr minrows */ - 206, /* (110) db_optr ::= db_optr maxrows */ - 206, /* (111) db_optr ::= db_optr blocks */ - 206, /* (112) db_optr ::= db_optr ctime */ - 206, /* (113) db_optr ::= db_optr wal */ - 206, /* (114) db_optr ::= db_optr fsync */ - 206, /* (115) db_optr ::= db_optr comp */ - 206, /* (116) db_optr ::= db_optr prec */ - 206, /* (117) db_optr ::= db_optr keep */ - 206, /* (118) db_optr ::= db_optr update */ - 206, /* (119) db_optr ::= db_optr cachelast */ - 207, /* (120) topic_optr ::= db_optr */ - 207, /* (121) topic_optr ::= topic_optr partitions */ - 201, /* (122) alter_db_optr ::= */ - 201, /* (123) alter_db_optr ::= alter_db_optr replica */ - 201, /* (124) alter_db_optr ::= alter_db_optr quorum */ - 201, /* (125) alter_db_optr ::= alter_db_optr keep */ - 201, /* (126) alter_db_optr ::= alter_db_optr blocks */ - 201, /* (127) alter_db_optr ::= alter_db_optr comp */ - 201, /* (128) alter_db_optr ::= alter_db_optr update */ - 201, /* (129) alter_db_optr ::= alter_db_optr cachelast */ - 202, /* (130) alter_topic_optr ::= alter_db_optr */ - 202, /* (131) alter_topic_optr ::= alter_topic_optr partitions */ - 208, /* (132) typename ::= ids */ - 208, /* (133) typename ::= ids LP signed RP */ - 208, /* (134) typename ::= ids UNSIGNED */ - 237, /* (135) signed ::= INTEGER */ - 237, /* (136) signed ::= PLUS INTEGER */ - 237, /* (137) signed ::= MINUS INTEGER */ - 196, /* (138) cmd ::= CREATE TABLE create_table_args */ - 196, /* (139) cmd ::= CREATE TABLE create_stable_args */ - 196, /* (140) cmd ::= CREATE STABLE create_stable_args */ - 196, /* (141) cmd ::= CREATE TABLE create_table_list */ - 240, /* (142) create_table_list ::= create_from_stable */ - 240, /* (143) create_table_list ::= create_table_list create_from_stable */ - 238, /* (144) create_table_args ::= ifnotexists ids cpxName LP columnlist RP */ - 239, /* (145) create_stable_args ::= ifnotexists ids cpxName LP columnlist RP TAGS LP columnlist RP */ - 241, /* (146) create_from_stable ::= ifnotexists ids cpxName USING ids cpxName TAGS LP tagitemlist RP */ - 241, /* (147) create_from_stable ::= ifnotexists ids cpxName USING ids cpxName LP tagNamelist RP TAGS LP tagitemlist RP */ - 244, /* (148) tagNamelist ::= tagNamelist COMMA ids */ - 244, /* (149) tagNamelist ::= ids */ - 238, /* (150) create_table_args ::= ifnotexists ids cpxName AS select */ - 242, /* (151) columnlist ::= columnlist COMMA column */ - 242, /* (152) columnlist ::= column */ - 246, /* (153) column ::= ids typename */ - 243, /* (154) tagitemlist ::= tagitemlist COMMA tagitem */ - 243, /* (155) tagitemlist ::= tagitem */ - 247, /* (156) tagitem ::= INTEGER */ - 247, /* (157) tagitem ::= FLOAT */ - 247, /* (158) tagitem ::= STRING */ - 247, /* (159) tagitem ::= BOOL */ - 247, /* (160) tagitem ::= NULL */ - 247, /* (161) tagitem ::= NOW */ - 247, /* (162) tagitem ::= MINUS INTEGER */ - 247, /* (163) tagitem ::= MINUS FLOAT */ - 247, /* (164) tagitem ::= PLUS INTEGER */ - 247, /* (165) tagitem ::= PLUS FLOAT */ - 245, /* (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 */ - 245, /* (167) select ::= LP select RP */ - 261, /* (168) union ::= select */ - 261, /* (169) union ::= union UNION ALL select */ - 196, /* (170) cmd ::= union */ - 245, /* (171) select ::= SELECT selcollist */ - 262, /* (172) sclp ::= selcollist COMMA */ - 262, /* (173) sclp ::= */ - 248, /* (174) selcollist ::= sclp distinct expr as */ - 248, /* (175) selcollist ::= sclp STAR */ - 265, /* (176) as ::= AS ids */ - 265, /* (177) as ::= ids */ - 265, /* (178) as ::= */ - 263, /* (179) distinct ::= DISTINCT */ - 263, /* (180) distinct ::= */ - 249, /* (181) from ::= FROM tablelist */ - 249, /* (182) from ::= FROM sub */ - 267, /* (183) sub ::= LP union RP */ - 267, /* (184) sub ::= LP union RP ids */ - 267, /* (185) sub ::= sub COMMA LP union RP ids */ - 266, /* (186) tablelist ::= ids cpxName */ - 266, /* (187) tablelist ::= ids cpxName ids */ - 266, /* (188) tablelist ::= tablelist COMMA ids cpxName */ - 266, /* (189) tablelist ::= tablelist COMMA ids cpxName ids */ - 268, /* (190) tmvar ::= VARIABLE */ - 251, /* (191) interval_opt ::= INTERVAL LP tmvar RP */ - 251, /* (192) interval_opt ::= INTERVAL LP tmvar COMMA tmvar RP */ - 251, /* (193) interval_opt ::= */ - 253, /* (194) session_option ::= */ - 253, /* (195) session_option ::= SESSION LP ids cpxName COMMA tmvar RP */ - 254, /* (196) windowstate_option ::= */ - 254, /* (197) windowstate_option ::= STATE_WINDOW LP ids RP */ - 255, /* (198) fill_opt ::= */ - 255, /* (199) fill_opt ::= FILL LP ID COMMA tagitemlist RP */ - 255, /* (200) fill_opt ::= FILL LP ID RP */ - 252, /* (201) sliding_opt ::= SLIDING LP tmvar RP */ - 252, /* (202) sliding_opt ::= */ - 258, /* (203) orderby_opt ::= */ - 258, /* (204) orderby_opt ::= ORDER BY sortlist */ - 269, /* (205) sortlist ::= sortlist COMMA item sortorder */ - 269, /* (206) sortlist ::= item sortorder */ - 271, /* (207) item ::= ids cpxName */ - 272, /* (208) sortorder ::= ASC */ - 272, /* (209) sortorder ::= DESC */ - 272, /* (210) sortorder ::= */ - 256, /* (211) groupby_opt ::= */ - 256, /* (212) groupby_opt ::= GROUP BY grouplist */ - 273, /* (213) grouplist ::= grouplist COMMA item */ - 273, /* (214) grouplist ::= item */ - 257, /* (215) having_opt ::= */ - 257, /* (216) having_opt ::= HAVING expr */ - 260, /* (217) limit_opt ::= */ - 260, /* (218) limit_opt ::= LIMIT signed */ - 260, /* (219) limit_opt ::= LIMIT signed OFFSET signed */ - 260, /* (220) limit_opt ::= LIMIT signed COMMA signed */ - 259, /* (221) slimit_opt ::= */ - 259, /* (222) slimit_opt ::= SLIMIT signed */ - 259, /* (223) slimit_opt ::= SLIMIT signed SOFFSET signed */ - 259, /* (224) slimit_opt ::= SLIMIT signed COMMA signed */ - 250, /* (225) where_opt ::= */ - 250, /* (226) where_opt ::= WHERE expr */ - 264, /* (227) expr ::= LP expr RP */ - 264, /* (228) expr ::= ID */ - 264, /* (229) expr ::= ID DOT ID */ - 264, /* (230) expr ::= ID DOT STAR */ - 264, /* (231) expr ::= INTEGER */ - 264, /* (232) expr ::= MINUS INTEGER */ - 264, /* (233) expr ::= PLUS INTEGER */ - 264, /* (234) expr ::= FLOAT */ - 264, /* (235) expr ::= MINUS FLOAT */ - 264, /* (236) expr ::= PLUS FLOAT */ - 264, /* (237) expr ::= STRING */ - 264, /* (238) expr ::= NOW */ - 264, /* (239) expr ::= VARIABLE */ - 264, /* (240) expr ::= PLUS VARIABLE */ - 264, /* (241) expr ::= MINUS VARIABLE */ - 264, /* (242) expr ::= BOOL */ - 264, /* (243) expr ::= NULL */ - 264, /* (244) expr ::= ID LP exprlist RP */ - 264, /* (245) expr ::= ID LP STAR RP */ - 264, /* (246) expr ::= expr IS NULL */ - 264, /* (247) expr ::= expr IS NOT NULL */ - 264, /* (248) expr ::= expr LT expr */ - 264, /* (249) expr ::= expr GT expr */ - 264, /* (250) expr ::= expr LE expr */ - 264, /* (251) expr ::= expr GE expr */ - 264, /* (252) expr ::= expr NE expr */ - 264, /* (253) expr ::= expr EQ expr */ - 264, /* (254) expr ::= expr BETWEEN expr AND expr */ - 264, /* (255) expr ::= expr AND expr */ - 264, /* (256) expr ::= expr OR expr */ - 264, /* (257) expr ::= expr PLUS expr */ - 264, /* (258) expr ::= expr MINUS expr */ - 264, /* (259) expr ::= expr STAR expr */ - 264, /* (260) expr ::= expr SLASH expr */ - 264, /* (261) expr ::= expr REM expr */ - 264, /* (262) expr ::= expr LIKE expr */ - 264, /* (263) expr ::= expr IN LP exprlist RP */ - 204, /* (264) exprlist ::= exprlist COMMA expritem */ - 204, /* (265) exprlist ::= expritem */ - 274, /* (266) expritem ::= expr */ - 274, /* (267) expritem ::= */ - 196, /* (268) cmd ::= RESET QUERY CACHE */ - 196, /* (269) cmd ::= SYNCDB ids REPLICA */ - 196, /* (270) cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */ - 196, /* (271) cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */ - 196, /* (272) cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */ - 196, /* (273) cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */ - 196, /* (274) cmd ::= ALTER TABLE ids cpxName DROP TAG ids */ - 196, /* (275) cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */ - 196, /* (276) cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */ - 196, /* (277) cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */ - 196, /* (278) cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */ - 196, /* (279) cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */ - 196, /* (280) cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */ - 196, /* (281) cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */ - 196, /* (282) cmd ::= ALTER STABLE ids cpxName DROP TAG ids */ - 196, /* (283) cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */ - 196, /* (284) cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem */ - 196, /* (285) cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */ - 196, /* (286) cmd ::= KILL CONNECTION INTEGER */ - 196, /* (287) cmd ::= KILL STREAM INTEGER COLON INTEGER */ - 196, /* (288) cmd ::= KILL QUERY INTEGER COLON INTEGER */ + 196, /* (40) cmd ::= DESC ids cpxName */ + 196, /* (41) cmd ::= ALTER USER ids PASS ids */ + 196, /* (42) cmd ::= ALTER USER ids PRIVILEGE ids */ + 196, /* (43) cmd ::= ALTER DNODE ids ids */ + 196, /* (44) cmd ::= ALTER DNODE ids ids ids */ + 196, /* (45) cmd ::= ALTER LOCAL ids */ + 196, /* (46) cmd ::= ALTER LOCAL ids ids */ + 196, /* (47) cmd ::= ALTER DATABASE ids alter_db_optr */ + 196, /* (48) cmd ::= ALTER TOPIC ids alter_topic_optr */ + 196, /* (49) cmd ::= ALTER ACCOUNT ids acct_optr */ + 196, /* (50) cmd ::= ALTER ACCOUNT ids PASS ids acct_optr */ + 196, /* (51) cmd ::= COMPACT VNODES IN LP exprlist RP */ + 197, /* (52) ids ::= ID */ + 197, /* (53) ids ::= STRING */ + 200, /* (54) ifexists ::= IF EXISTS */ + 200, /* (55) ifexists ::= */ + 205, /* (56) ifnotexists ::= IF NOT EXISTS */ + 205, /* (57) ifnotexists ::= */ + 196, /* (58) cmd ::= CREATE DNODE ids */ + 196, /* (59) cmd ::= CREATE ACCOUNT ids PASS ids acct_optr */ + 196, /* (60) cmd ::= CREATE DATABASE ifnotexists ids db_optr */ + 196, /* (61) cmd ::= CREATE TOPIC ifnotexists ids topic_optr */ + 196, /* (62) cmd ::= CREATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */ + 196, /* (63) cmd ::= CREATE AGGREGATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */ + 196, /* (64) cmd ::= CREATE USER ids PASS ids */ + 209, /* (65) bufsize ::= */ + 209, /* (66) bufsize ::= BUFSIZE INTEGER */ + 210, /* (67) pps ::= */ + 210, /* (68) pps ::= PPS INTEGER */ + 211, /* (69) tseries ::= */ + 211, /* (70) tseries ::= TSERIES INTEGER */ + 212, /* (71) dbs ::= */ + 212, /* (72) dbs ::= DBS INTEGER */ + 213, /* (73) streams ::= */ + 213, /* (74) streams ::= STREAMS INTEGER */ + 214, /* (75) storage ::= */ + 214, /* (76) storage ::= STORAGE INTEGER */ + 215, /* (77) qtime ::= */ + 215, /* (78) qtime ::= QTIME INTEGER */ + 216, /* (79) users ::= */ + 216, /* (80) users ::= USERS INTEGER */ + 217, /* (81) conns ::= */ + 217, /* (82) conns ::= CONNS INTEGER */ + 218, /* (83) state ::= */ + 218, /* (84) state ::= STATE ids */ + 203, /* (85) acct_optr ::= pps tseries storage streams qtime dbs users conns state */ + 219, /* (86) intitemlist ::= intitemlist COMMA intitem */ + 219, /* (87) intitemlist ::= intitem */ + 220, /* (88) intitem ::= INTEGER */ + 221, /* (89) keep ::= KEEP intitemlist */ + 222, /* (90) cache ::= CACHE INTEGER */ + 223, /* (91) replica ::= REPLICA INTEGER */ + 224, /* (92) quorum ::= QUORUM INTEGER */ + 225, /* (93) days ::= DAYS INTEGER */ + 226, /* (94) minrows ::= MINROWS INTEGER */ + 227, /* (95) maxrows ::= MAXROWS INTEGER */ + 228, /* (96) blocks ::= BLOCKS INTEGER */ + 229, /* (97) ctime ::= CTIME INTEGER */ + 230, /* (98) wal ::= WAL INTEGER */ + 231, /* (99) fsync ::= FSYNC INTEGER */ + 232, /* (100) comp ::= COMP INTEGER */ + 233, /* (101) prec ::= PRECISION STRING */ + 234, /* (102) update ::= UPDATE INTEGER */ + 235, /* (103) cachelast ::= CACHELAST INTEGER */ + 236, /* (104) partitions ::= PARTITIONS INTEGER */ + 206, /* (105) db_optr ::= */ + 206, /* (106) db_optr ::= db_optr cache */ + 206, /* (107) db_optr ::= db_optr replica */ + 206, /* (108) db_optr ::= db_optr quorum */ + 206, /* (109) db_optr ::= db_optr days */ + 206, /* (110) db_optr ::= db_optr minrows */ + 206, /* (111) db_optr ::= db_optr maxrows */ + 206, /* (112) db_optr ::= db_optr blocks */ + 206, /* (113) db_optr ::= db_optr ctime */ + 206, /* (114) db_optr ::= db_optr wal */ + 206, /* (115) db_optr ::= db_optr fsync */ + 206, /* (116) db_optr ::= db_optr comp */ + 206, /* (117) db_optr ::= db_optr prec */ + 206, /* (118) db_optr ::= db_optr keep */ + 206, /* (119) db_optr ::= db_optr update */ + 206, /* (120) db_optr ::= db_optr cachelast */ + 207, /* (121) topic_optr ::= db_optr */ + 207, /* (122) topic_optr ::= topic_optr partitions */ + 201, /* (123) alter_db_optr ::= */ + 201, /* (124) alter_db_optr ::= alter_db_optr replica */ + 201, /* (125) alter_db_optr ::= alter_db_optr quorum */ + 201, /* (126) alter_db_optr ::= alter_db_optr keep */ + 201, /* (127) alter_db_optr ::= alter_db_optr blocks */ + 201, /* (128) alter_db_optr ::= alter_db_optr comp */ + 201, /* (129) alter_db_optr ::= alter_db_optr update */ + 201, /* (130) alter_db_optr ::= alter_db_optr cachelast */ + 202, /* (131) alter_topic_optr ::= alter_db_optr */ + 202, /* (132) alter_topic_optr ::= alter_topic_optr partitions */ + 208, /* (133) typename ::= ids */ + 208, /* (134) typename ::= ids LP signed RP */ + 208, /* (135) typename ::= ids UNSIGNED */ + 237, /* (136) signed ::= INTEGER */ + 237, /* (137) signed ::= PLUS INTEGER */ + 237, /* (138) signed ::= MINUS INTEGER */ + 196, /* (139) cmd ::= CREATE TABLE create_table_args */ + 196, /* (140) cmd ::= CREATE TABLE create_stable_args */ + 196, /* (141) cmd ::= CREATE STABLE create_stable_args */ + 196, /* (142) cmd ::= CREATE TABLE create_table_list */ + 240, /* (143) create_table_list ::= create_from_stable */ + 240, /* (144) create_table_list ::= create_table_list create_from_stable */ + 238, /* (145) create_table_args ::= ifnotexists ids cpxName LP columnlist RP */ + 239, /* (146) create_stable_args ::= ifnotexists ids cpxName LP columnlist RP TAGS LP columnlist RP */ + 241, /* (147) create_from_stable ::= ifnotexists ids cpxName USING ids cpxName TAGS LP tagitemlist RP */ + 241, /* (148) create_from_stable ::= ifnotexists ids cpxName USING ids cpxName LP tagNamelist RP TAGS LP tagitemlist RP */ + 244, /* (149) tagNamelist ::= tagNamelist COMMA ids */ + 244, /* (150) tagNamelist ::= ids */ + 238, /* (151) create_table_args ::= ifnotexists ids cpxName AS select */ + 242, /* (152) columnlist ::= columnlist COMMA column */ + 242, /* (153) columnlist ::= column */ + 246, /* (154) column ::= ids typename */ + 243, /* (155) tagitemlist ::= tagitemlist COMMA tagitem */ + 243, /* (156) tagitemlist ::= tagitem */ + 247, /* (157) tagitem ::= INTEGER */ + 247, /* (158) tagitem ::= FLOAT */ + 247, /* (159) tagitem ::= STRING */ + 247, /* (160) tagitem ::= BOOL */ + 247, /* (161) tagitem ::= NULL */ + 247, /* (162) tagitem ::= NOW */ + 247, /* (163) tagitem ::= MINUS INTEGER */ + 247, /* (164) tagitem ::= MINUS FLOAT */ + 247, /* (165) tagitem ::= PLUS INTEGER */ + 247, /* (166) tagitem ::= PLUS FLOAT */ + 245, /* (167) 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 */ + 245, /* (168) select ::= LP select RP */ + 261, /* (169) union ::= select */ + 261, /* (170) union ::= union UNION ALL select */ + 196, /* (171) cmd ::= union */ + 245, /* (172) select ::= SELECT selcollist */ + 262, /* (173) sclp ::= selcollist COMMA */ + 262, /* (174) sclp ::= */ + 248, /* (175) selcollist ::= sclp distinct expr as */ + 248, /* (176) selcollist ::= sclp STAR */ + 265, /* (177) as ::= AS ids */ + 265, /* (178) as ::= ids */ + 265, /* (179) as ::= */ + 263, /* (180) distinct ::= DISTINCT */ + 263, /* (181) distinct ::= */ + 249, /* (182) from ::= FROM tablelist */ + 249, /* (183) from ::= FROM sub */ + 267, /* (184) sub ::= LP union RP */ + 267, /* (185) sub ::= LP union RP ids */ + 267, /* (186) sub ::= sub COMMA LP union RP ids */ + 266, /* (187) tablelist ::= ids cpxName */ + 266, /* (188) tablelist ::= ids cpxName ids */ + 266, /* (189) tablelist ::= tablelist COMMA ids cpxName */ + 266, /* (190) tablelist ::= tablelist COMMA ids cpxName ids */ + 268, /* (191) tmvar ::= VARIABLE */ + 251, /* (192) interval_opt ::= INTERVAL LP tmvar RP */ + 251, /* (193) interval_opt ::= INTERVAL LP tmvar COMMA tmvar RP */ + 251, /* (194) interval_opt ::= */ + 253, /* (195) session_option ::= */ + 253, /* (196) session_option ::= SESSION LP ids cpxName COMMA tmvar RP */ + 254, /* (197) windowstate_option ::= */ + 254, /* (198) windowstate_option ::= STATE_WINDOW LP ids RP */ + 255, /* (199) fill_opt ::= */ + 255, /* (200) fill_opt ::= FILL LP ID COMMA tagitemlist RP */ + 255, /* (201) fill_opt ::= FILL LP ID RP */ + 252, /* (202) sliding_opt ::= SLIDING LP tmvar RP */ + 252, /* (203) sliding_opt ::= */ + 258, /* (204) orderby_opt ::= */ + 258, /* (205) orderby_opt ::= ORDER BY sortlist */ + 269, /* (206) sortlist ::= sortlist COMMA item sortorder */ + 269, /* (207) sortlist ::= item sortorder */ + 271, /* (208) item ::= ids cpxName */ + 272, /* (209) sortorder ::= ASC */ + 272, /* (210) sortorder ::= DESC */ + 272, /* (211) sortorder ::= */ + 256, /* (212) groupby_opt ::= */ + 256, /* (213) groupby_opt ::= GROUP BY grouplist */ + 273, /* (214) grouplist ::= grouplist COMMA item */ + 273, /* (215) grouplist ::= item */ + 257, /* (216) having_opt ::= */ + 257, /* (217) having_opt ::= HAVING expr */ + 260, /* (218) limit_opt ::= */ + 260, /* (219) limit_opt ::= LIMIT signed */ + 260, /* (220) limit_opt ::= LIMIT signed OFFSET signed */ + 260, /* (221) limit_opt ::= LIMIT signed COMMA signed */ + 259, /* (222) slimit_opt ::= */ + 259, /* (223) slimit_opt ::= SLIMIT signed */ + 259, /* (224) slimit_opt ::= SLIMIT signed SOFFSET signed */ + 259, /* (225) slimit_opt ::= SLIMIT signed COMMA signed */ + 250, /* (226) where_opt ::= */ + 250, /* (227) where_opt ::= WHERE expr */ + 264, /* (228) expr ::= LP expr RP */ + 264, /* (229) expr ::= ID */ + 264, /* (230) expr ::= ID DOT ID */ + 264, /* (231) expr ::= ID DOT STAR */ + 264, /* (232) expr ::= INTEGER */ + 264, /* (233) expr ::= MINUS INTEGER */ + 264, /* (234) expr ::= PLUS INTEGER */ + 264, /* (235) expr ::= FLOAT */ + 264, /* (236) expr ::= MINUS FLOAT */ + 264, /* (237) expr ::= PLUS FLOAT */ + 264, /* (238) expr ::= STRING */ + 264, /* (239) expr ::= NOW */ + 264, /* (240) expr ::= VARIABLE */ + 264, /* (241) expr ::= PLUS VARIABLE */ + 264, /* (242) expr ::= MINUS VARIABLE */ + 264, /* (243) expr ::= BOOL */ + 264, /* (244) expr ::= NULL */ + 264, /* (245) expr ::= ID LP exprlist RP */ + 264, /* (246) expr ::= ID LP STAR RP */ + 264, /* (247) expr ::= expr IS NULL */ + 264, /* (248) expr ::= expr IS NOT NULL */ + 264, /* (249) expr ::= expr LT expr */ + 264, /* (250) expr ::= expr GT expr */ + 264, /* (251) expr ::= expr LE expr */ + 264, /* (252) expr ::= expr GE expr */ + 264, /* (253) expr ::= expr NE expr */ + 264, /* (254) expr ::= expr EQ expr */ + 264, /* (255) expr ::= expr BETWEEN expr AND expr */ + 264, /* (256) expr ::= expr AND expr */ + 264, /* (257) expr ::= expr OR expr */ + 264, /* (258) expr ::= expr PLUS expr */ + 264, /* (259) expr ::= expr MINUS expr */ + 264, /* (260) expr ::= expr STAR expr */ + 264, /* (261) expr ::= expr SLASH expr */ + 264, /* (262) expr ::= expr REM expr */ + 264, /* (263) expr ::= expr LIKE expr */ + 264, /* (264) expr ::= expr IN LP exprlist RP */ + 204, /* (265) exprlist ::= exprlist COMMA expritem */ + 204, /* (266) exprlist ::= expritem */ + 274, /* (267) expritem ::= expr */ + 274, /* (268) expritem ::= */ + 196, /* (269) cmd ::= RESET QUERY CACHE */ + 196, /* (270) cmd ::= SYNCDB ids REPLICA */ + 196, /* (271) cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */ + 196, /* (272) cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */ + 196, /* (273) cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */ + 196, /* (274) cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */ + 196, /* (275) cmd ::= ALTER TABLE ids cpxName DROP TAG ids */ + 196, /* (276) cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */ + 196, /* (277) cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */ + 196, /* (278) cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */ + 196, /* (279) cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */ + 196, /* (280) cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */ + 196, /* (281) cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */ + 196, /* (282) cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */ + 196, /* (283) cmd ::= ALTER STABLE ids cpxName DROP TAG ids */ + 196, /* (284) cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */ + 196, /* (285) cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem */ + 196, /* (286) cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */ + 196, /* (287) cmd ::= KILL CONNECTION INTEGER */ + 196, /* (288) cmd ::= KILL STREAM INTEGER COLON INTEGER */ + 196, /* (289) cmd ::= KILL QUERY INTEGER COLON INTEGER */ }; /* For rule J, yyRuleInfoNRhs[J] contains the negative of the number @@ -2188,255 +2386,256 @@ static const signed char yyRuleInfoNRhs[] = { -3, /* (37) cmd ::= DROP ACCOUNT ids */ -2, /* (38) cmd ::= USE ids */ -3, /* (39) cmd ::= DESCRIBE ids cpxName */ - -5, /* (40) cmd ::= ALTER USER ids PASS ids */ - -5, /* (41) cmd ::= ALTER USER ids PRIVILEGE ids */ - -4, /* (42) cmd ::= ALTER DNODE ids ids */ - -5, /* (43) cmd ::= ALTER DNODE ids ids ids */ - -3, /* (44) cmd ::= ALTER LOCAL ids */ - -4, /* (45) cmd ::= ALTER LOCAL ids ids */ - -4, /* (46) cmd ::= ALTER DATABASE ids alter_db_optr */ - -4, /* (47) cmd ::= ALTER TOPIC ids alter_topic_optr */ - -4, /* (48) cmd ::= ALTER ACCOUNT ids acct_optr */ - -6, /* (49) cmd ::= ALTER ACCOUNT ids PASS ids acct_optr */ - -6, /* (50) cmd ::= COMPACT VNODES IN LP exprlist RP */ - -1, /* (51) ids ::= ID */ - -1, /* (52) ids ::= STRING */ - -2, /* (53) ifexists ::= IF EXISTS */ - 0, /* (54) ifexists ::= */ - -3, /* (55) ifnotexists ::= IF NOT EXISTS */ - 0, /* (56) ifnotexists ::= */ - -3, /* (57) cmd ::= CREATE DNODE ids */ - -6, /* (58) cmd ::= CREATE ACCOUNT ids PASS ids acct_optr */ - -5, /* (59) cmd ::= CREATE DATABASE ifnotexists ids db_optr */ - -5, /* (60) cmd ::= CREATE TOPIC ifnotexists ids topic_optr */ - -8, /* (61) cmd ::= CREATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */ - -9, /* (62) cmd ::= CREATE AGGREGATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */ - -5, /* (63) cmd ::= CREATE USER ids PASS ids */ - 0, /* (64) bufsize ::= */ - -2, /* (65) bufsize ::= BUFSIZE INTEGER */ - 0, /* (66) pps ::= */ - -2, /* (67) pps ::= PPS INTEGER */ - 0, /* (68) tseries ::= */ - -2, /* (69) tseries ::= TSERIES INTEGER */ - 0, /* (70) dbs ::= */ - -2, /* (71) dbs ::= DBS INTEGER */ - 0, /* (72) streams ::= */ - -2, /* (73) streams ::= STREAMS INTEGER */ - 0, /* (74) storage ::= */ - -2, /* (75) storage ::= STORAGE INTEGER */ - 0, /* (76) qtime ::= */ - -2, /* (77) qtime ::= QTIME INTEGER */ - 0, /* (78) users ::= */ - -2, /* (79) users ::= USERS INTEGER */ - 0, /* (80) conns ::= */ - -2, /* (81) conns ::= CONNS INTEGER */ - 0, /* (82) state ::= */ - -2, /* (83) state ::= STATE ids */ - -9, /* (84) acct_optr ::= pps tseries storage streams qtime dbs users conns state */ - -3, /* (85) intitemlist ::= intitemlist COMMA intitem */ - -1, /* (86) intitemlist ::= intitem */ - -1, /* (87) intitem ::= INTEGER */ - -2, /* (88) keep ::= KEEP intitemlist */ - -2, /* (89) cache ::= CACHE INTEGER */ - -2, /* (90) replica ::= REPLICA INTEGER */ - -2, /* (91) quorum ::= QUORUM INTEGER */ - -2, /* (92) days ::= DAYS INTEGER */ - -2, /* (93) minrows ::= MINROWS INTEGER */ - -2, /* (94) maxrows ::= MAXROWS INTEGER */ - -2, /* (95) blocks ::= BLOCKS INTEGER */ - -2, /* (96) ctime ::= CTIME INTEGER */ - -2, /* (97) wal ::= WAL INTEGER */ - -2, /* (98) fsync ::= FSYNC INTEGER */ - -2, /* (99) comp ::= COMP INTEGER */ - -2, /* (100) prec ::= PRECISION STRING */ - -2, /* (101) update ::= UPDATE INTEGER */ - -2, /* (102) cachelast ::= CACHELAST INTEGER */ - -2, /* (103) partitions ::= PARTITIONS INTEGER */ - 0, /* (104) db_optr ::= */ - -2, /* (105) db_optr ::= db_optr cache */ - -2, /* (106) db_optr ::= db_optr replica */ - -2, /* (107) db_optr ::= db_optr quorum */ - -2, /* (108) db_optr ::= db_optr days */ - -2, /* (109) db_optr ::= db_optr minrows */ - -2, /* (110) db_optr ::= db_optr maxrows */ - -2, /* (111) db_optr ::= db_optr blocks */ - -2, /* (112) db_optr ::= db_optr ctime */ - -2, /* (113) db_optr ::= db_optr wal */ - -2, /* (114) db_optr ::= db_optr fsync */ - -2, /* (115) db_optr ::= db_optr comp */ - -2, /* (116) db_optr ::= db_optr prec */ - -2, /* (117) db_optr ::= db_optr keep */ - -2, /* (118) db_optr ::= db_optr update */ - -2, /* (119) db_optr ::= db_optr cachelast */ - -1, /* (120) topic_optr ::= db_optr */ - -2, /* (121) topic_optr ::= topic_optr partitions */ - 0, /* (122) alter_db_optr ::= */ - -2, /* (123) alter_db_optr ::= alter_db_optr replica */ - -2, /* (124) alter_db_optr ::= alter_db_optr quorum */ - -2, /* (125) alter_db_optr ::= alter_db_optr keep */ - -2, /* (126) alter_db_optr ::= alter_db_optr blocks */ - -2, /* (127) alter_db_optr ::= alter_db_optr comp */ - -2, /* (128) alter_db_optr ::= alter_db_optr update */ - -2, /* (129) alter_db_optr ::= alter_db_optr cachelast */ - -1, /* (130) alter_topic_optr ::= alter_db_optr */ - -2, /* (131) alter_topic_optr ::= alter_topic_optr partitions */ - -1, /* (132) typename ::= ids */ - -4, /* (133) typename ::= ids LP signed RP */ - -2, /* (134) typename ::= ids UNSIGNED */ - -1, /* (135) signed ::= INTEGER */ - -2, /* (136) signed ::= PLUS INTEGER */ - -2, /* (137) signed ::= MINUS INTEGER */ - -3, /* (138) cmd ::= CREATE TABLE create_table_args */ - -3, /* (139) cmd ::= CREATE TABLE create_stable_args */ - -3, /* (140) cmd ::= CREATE STABLE create_stable_args */ - -3, /* (141) cmd ::= CREATE TABLE create_table_list */ - -1, /* (142) create_table_list ::= create_from_stable */ - -2, /* (143) create_table_list ::= create_table_list create_from_stable */ - -6, /* (144) create_table_args ::= ifnotexists ids cpxName LP columnlist RP */ - -10, /* (145) create_stable_args ::= ifnotexists ids cpxName LP columnlist RP TAGS LP columnlist RP */ - -10, /* (146) create_from_stable ::= ifnotexists ids cpxName USING ids cpxName TAGS LP tagitemlist RP */ - -13, /* (147) create_from_stable ::= ifnotexists ids cpxName USING ids cpxName LP tagNamelist RP TAGS LP tagitemlist RP */ - -3, /* (148) tagNamelist ::= tagNamelist COMMA ids */ - -1, /* (149) tagNamelist ::= ids */ - -5, /* (150) create_table_args ::= ifnotexists ids cpxName AS select */ - -3, /* (151) columnlist ::= columnlist COMMA column */ - -1, /* (152) columnlist ::= column */ - -2, /* (153) column ::= ids typename */ - -3, /* (154) tagitemlist ::= tagitemlist COMMA tagitem */ - -1, /* (155) tagitemlist ::= tagitem */ - -1, /* (156) tagitem ::= INTEGER */ - -1, /* (157) tagitem ::= FLOAT */ - -1, /* (158) tagitem ::= STRING */ - -1, /* (159) tagitem ::= BOOL */ - -1, /* (160) tagitem ::= NULL */ - -1, /* (161) tagitem ::= NOW */ - -2, /* (162) tagitem ::= MINUS INTEGER */ - -2, /* (163) tagitem ::= MINUS FLOAT */ - -2, /* (164) tagitem ::= PLUS INTEGER */ - -2, /* (165) tagitem ::= PLUS FLOAT */ - -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 */ - -3, /* (167) select ::= LP select RP */ - -1, /* (168) union ::= select */ - -4, /* (169) union ::= union UNION ALL select */ - -1, /* (170) cmd ::= union */ - -2, /* (171) select ::= SELECT selcollist */ - -2, /* (172) sclp ::= selcollist COMMA */ - 0, /* (173) sclp ::= */ - -4, /* (174) selcollist ::= sclp distinct expr as */ - -2, /* (175) selcollist ::= sclp STAR */ - -2, /* (176) as ::= AS ids */ - -1, /* (177) as ::= ids */ - 0, /* (178) as ::= */ - -1, /* (179) distinct ::= DISTINCT */ - 0, /* (180) distinct ::= */ - -2, /* (181) from ::= FROM tablelist */ - -2, /* (182) from ::= FROM sub */ - -3, /* (183) sub ::= LP union RP */ - -4, /* (184) sub ::= LP union RP ids */ - -6, /* (185) sub ::= sub COMMA LP union RP ids */ - -2, /* (186) tablelist ::= ids cpxName */ - -3, /* (187) tablelist ::= ids cpxName ids */ - -4, /* (188) tablelist ::= tablelist COMMA ids cpxName */ - -5, /* (189) tablelist ::= tablelist COMMA ids cpxName ids */ - -1, /* (190) tmvar ::= VARIABLE */ - -4, /* (191) interval_opt ::= INTERVAL LP tmvar RP */ - -6, /* (192) interval_opt ::= INTERVAL LP tmvar COMMA tmvar RP */ - 0, /* (193) interval_opt ::= */ - 0, /* (194) session_option ::= */ - -7, /* (195) session_option ::= SESSION LP ids cpxName COMMA tmvar RP */ - 0, /* (196) windowstate_option ::= */ - -4, /* (197) windowstate_option ::= STATE_WINDOW LP ids RP */ - 0, /* (198) fill_opt ::= */ - -6, /* (199) fill_opt ::= FILL LP ID COMMA tagitemlist RP */ - -4, /* (200) fill_opt ::= FILL LP ID RP */ - -4, /* (201) sliding_opt ::= SLIDING LP tmvar RP */ - 0, /* (202) sliding_opt ::= */ - 0, /* (203) orderby_opt ::= */ - -3, /* (204) orderby_opt ::= ORDER BY sortlist */ - -4, /* (205) sortlist ::= sortlist COMMA item sortorder */ - -2, /* (206) sortlist ::= item sortorder */ - -2, /* (207) item ::= ids cpxName */ - -1, /* (208) sortorder ::= ASC */ - -1, /* (209) sortorder ::= DESC */ - 0, /* (210) sortorder ::= */ - 0, /* (211) groupby_opt ::= */ - -3, /* (212) groupby_opt ::= GROUP BY grouplist */ - -3, /* (213) grouplist ::= grouplist COMMA item */ - -1, /* (214) grouplist ::= item */ - 0, /* (215) having_opt ::= */ - -2, /* (216) having_opt ::= HAVING expr */ - 0, /* (217) limit_opt ::= */ - -2, /* (218) limit_opt ::= LIMIT signed */ - -4, /* (219) limit_opt ::= LIMIT signed OFFSET signed */ - -4, /* (220) limit_opt ::= LIMIT signed COMMA signed */ - 0, /* (221) slimit_opt ::= */ - -2, /* (222) slimit_opt ::= SLIMIT signed */ - -4, /* (223) slimit_opt ::= SLIMIT signed SOFFSET signed */ - -4, /* (224) slimit_opt ::= SLIMIT signed COMMA signed */ - 0, /* (225) where_opt ::= */ - -2, /* (226) where_opt ::= WHERE expr */ - -3, /* (227) expr ::= LP expr RP */ - -1, /* (228) expr ::= ID */ - -3, /* (229) expr ::= ID DOT ID */ - -3, /* (230) expr ::= ID DOT STAR */ - -1, /* (231) expr ::= INTEGER */ - -2, /* (232) expr ::= MINUS INTEGER */ - -2, /* (233) expr ::= PLUS INTEGER */ - -1, /* (234) expr ::= FLOAT */ - -2, /* (235) expr ::= MINUS FLOAT */ - -2, /* (236) expr ::= PLUS FLOAT */ - -1, /* (237) expr ::= STRING */ - -1, /* (238) expr ::= NOW */ - -1, /* (239) expr ::= VARIABLE */ - -2, /* (240) expr ::= PLUS VARIABLE */ - -2, /* (241) expr ::= MINUS VARIABLE */ - -1, /* (242) expr ::= BOOL */ - -1, /* (243) expr ::= NULL */ - -4, /* (244) expr ::= ID LP exprlist RP */ - -4, /* (245) expr ::= ID LP STAR RP */ - -3, /* (246) expr ::= expr IS NULL */ - -4, /* (247) expr ::= expr IS NOT NULL */ - -3, /* (248) expr ::= expr LT expr */ - -3, /* (249) expr ::= expr GT expr */ - -3, /* (250) expr ::= expr LE expr */ - -3, /* (251) expr ::= expr GE expr */ - -3, /* (252) expr ::= expr NE expr */ - -3, /* (253) expr ::= expr EQ expr */ - -5, /* (254) expr ::= expr BETWEEN expr AND expr */ - -3, /* (255) expr ::= expr AND expr */ - -3, /* (256) expr ::= expr OR expr */ - -3, /* (257) expr ::= expr PLUS expr */ - -3, /* (258) expr ::= expr MINUS expr */ - -3, /* (259) expr ::= expr STAR expr */ - -3, /* (260) expr ::= expr SLASH expr */ - -3, /* (261) expr ::= expr REM expr */ - -3, /* (262) expr ::= expr LIKE expr */ - -5, /* (263) expr ::= expr IN LP exprlist RP */ - -3, /* (264) exprlist ::= exprlist COMMA expritem */ - -1, /* (265) exprlist ::= expritem */ - -1, /* (266) expritem ::= expr */ - 0, /* (267) expritem ::= */ - -3, /* (268) cmd ::= RESET QUERY CACHE */ - -3, /* (269) cmd ::= SYNCDB ids REPLICA */ - -7, /* (270) cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */ - -7, /* (271) cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */ - -7, /* (272) cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */ - -7, /* (273) cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */ - -7, /* (274) cmd ::= ALTER TABLE ids cpxName DROP TAG ids */ - -8, /* (275) cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */ - -9, /* (276) cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */ - -7, /* (277) cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */ - -7, /* (278) cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */ - -7, /* (279) cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */ - -7, /* (280) cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */ - -7, /* (281) cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */ - -7, /* (282) cmd ::= ALTER STABLE ids cpxName DROP TAG ids */ - -8, /* (283) cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */ - -9, /* (284) cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem */ - -7, /* (285) cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */ - -3, /* (286) cmd ::= KILL CONNECTION INTEGER */ - -5, /* (287) cmd ::= KILL STREAM INTEGER COLON INTEGER */ - -5, /* (288) cmd ::= KILL QUERY INTEGER COLON INTEGER */ + -3, /* (40) cmd ::= DESC ids cpxName */ + -5, /* (41) cmd ::= ALTER USER ids PASS ids */ + -5, /* (42) cmd ::= ALTER USER ids PRIVILEGE ids */ + -4, /* (43) cmd ::= ALTER DNODE ids ids */ + -5, /* (44) cmd ::= ALTER DNODE ids ids ids */ + -3, /* (45) cmd ::= ALTER LOCAL ids */ + -4, /* (46) cmd ::= ALTER LOCAL ids ids */ + -4, /* (47) cmd ::= ALTER DATABASE ids alter_db_optr */ + -4, /* (48) cmd ::= ALTER TOPIC ids alter_topic_optr */ + -4, /* (49) cmd ::= ALTER ACCOUNT ids acct_optr */ + -6, /* (50) cmd ::= ALTER ACCOUNT ids PASS ids acct_optr */ + -6, /* (51) cmd ::= COMPACT VNODES IN LP exprlist RP */ + -1, /* (52) ids ::= ID */ + -1, /* (53) ids ::= STRING */ + -2, /* (54) ifexists ::= IF EXISTS */ + 0, /* (55) ifexists ::= */ + -3, /* (56) ifnotexists ::= IF NOT EXISTS */ + 0, /* (57) ifnotexists ::= */ + -3, /* (58) cmd ::= CREATE DNODE ids */ + -6, /* (59) cmd ::= CREATE ACCOUNT ids PASS ids acct_optr */ + -5, /* (60) cmd ::= CREATE DATABASE ifnotexists ids db_optr */ + -5, /* (61) cmd ::= CREATE TOPIC ifnotexists ids topic_optr */ + -8, /* (62) cmd ::= CREATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */ + -9, /* (63) cmd ::= CREATE AGGREGATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */ + -5, /* (64) cmd ::= CREATE USER ids PASS ids */ + 0, /* (65) bufsize ::= */ + -2, /* (66) bufsize ::= BUFSIZE INTEGER */ + 0, /* (67) pps ::= */ + -2, /* (68) pps ::= PPS INTEGER */ + 0, /* (69) tseries ::= */ + -2, /* (70) tseries ::= TSERIES INTEGER */ + 0, /* (71) dbs ::= */ + -2, /* (72) dbs ::= DBS INTEGER */ + 0, /* (73) streams ::= */ + -2, /* (74) streams ::= STREAMS INTEGER */ + 0, /* (75) storage ::= */ + -2, /* (76) storage ::= STORAGE INTEGER */ + 0, /* (77) qtime ::= */ + -2, /* (78) qtime ::= QTIME INTEGER */ + 0, /* (79) users ::= */ + -2, /* (80) users ::= USERS INTEGER */ + 0, /* (81) conns ::= */ + -2, /* (82) conns ::= CONNS INTEGER */ + 0, /* (83) state ::= */ + -2, /* (84) state ::= STATE ids */ + -9, /* (85) acct_optr ::= pps tseries storage streams qtime dbs users conns state */ + -3, /* (86) intitemlist ::= intitemlist COMMA intitem */ + -1, /* (87) intitemlist ::= intitem */ + -1, /* (88) intitem ::= INTEGER */ + -2, /* (89) keep ::= KEEP intitemlist */ + -2, /* (90) cache ::= CACHE INTEGER */ + -2, /* (91) replica ::= REPLICA INTEGER */ + -2, /* (92) quorum ::= QUORUM INTEGER */ + -2, /* (93) days ::= DAYS INTEGER */ + -2, /* (94) minrows ::= MINROWS INTEGER */ + -2, /* (95) maxrows ::= MAXROWS INTEGER */ + -2, /* (96) blocks ::= BLOCKS INTEGER */ + -2, /* (97) ctime ::= CTIME INTEGER */ + -2, /* (98) wal ::= WAL INTEGER */ + -2, /* (99) fsync ::= FSYNC INTEGER */ + -2, /* (100) comp ::= COMP INTEGER */ + -2, /* (101) prec ::= PRECISION STRING */ + -2, /* (102) update ::= UPDATE INTEGER */ + -2, /* (103) cachelast ::= CACHELAST INTEGER */ + -2, /* (104) partitions ::= PARTITIONS INTEGER */ + 0, /* (105) db_optr ::= */ + -2, /* (106) db_optr ::= db_optr cache */ + -2, /* (107) db_optr ::= db_optr replica */ + -2, /* (108) db_optr ::= db_optr quorum */ + -2, /* (109) db_optr ::= db_optr days */ + -2, /* (110) db_optr ::= db_optr minrows */ + -2, /* (111) db_optr ::= db_optr maxrows */ + -2, /* (112) db_optr ::= db_optr blocks */ + -2, /* (113) db_optr ::= db_optr ctime */ + -2, /* (114) db_optr ::= db_optr wal */ + -2, /* (115) db_optr ::= db_optr fsync */ + -2, /* (116) db_optr ::= db_optr comp */ + -2, /* (117) db_optr ::= db_optr prec */ + -2, /* (118) db_optr ::= db_optr keep */ + -2, /* (119) db_optr ::= db_optr update */ + -2, /* (120) db_optr ::= db_optr cachelast */ + -1, /* (121) topic_optr ::= db_optr */ + -2, /* (122) topic_optr ::= topic_optr partitions */ + 0, /* (123) alter_db_optr ::= */ + -2, /* (124) alter_db_optr ::= alter_db_optr replica */ + -2, /* (125) alter_db_optr ::= alter_db_optr quorum */ + -2, /* (126) alter_db_optr ::= alter_db_optr keep */ + -2, /* (127) alter_db_optr ::= alter_db_optr blocks */ + -2, /* (128) alter_db_optr ::= alter_db_optr comp */ + -2, /* (129) alter_db_optr ::= alter_db_optr update */ + -2, /* (130) alter_db_optr ::= alter_db_optr cachelast */ + -1, /* (131) alter_topic_optr ::= alter_db_optr */ + -2, /* (132) alter_topic_optr ::= alter_topic_optr partitions */ + -1, /* (133) typename ::= ids */ + -4, /* (134) typename ::= ids LP signed RP */ + -2, /* (135) typename ::= ids UNSIGNED */ + -1, /* (136) signed ::= INTEGER */ + -2, /* (137) signed ::= PLUS INTEGER */ + -2, /* (138) signed ::= MINUS INTEGER */ + -3, /* (139) cmd ::= CREATE TABLE create_table_args */ + -3, /* (140) cmd ::= CREATE TABLE create_stable_args */ + -3, /* (141) cmd ::= CREATE STABLE create_stable_args */ + -3, /* (142) cmd ::= CREATE TABLE create_table_list */ + -1, /* (143) create_table_list ::= create_from_stable */ + -2, /* (144) create_table_list ::= create_table_list create_from_stable */ + -6, /* (145) create_table_args ::= ifnotexists ids cpxName LP columnlist RP */ + -10, /* (146) create_stable_args ::= ifnotexists ids cpxName LP columnlist RP TAGS LP columnlist RP */ + -10, /* (147) create_from_stable ::= ifnotexists ids cpxName USING ids cpxName TAGS LP tagitemlist RP */ + -13, /* (148) create_from_stable ::= ifnotexists ids cpxName USING ids cpxName LP tagNamelist RP TAGS LP tagitemlist RP */ + -3, /* (149) tagNamelist ::= tagNamelist COMMA ids */ + -1, /* (150) tagNamelist ::= ids */ + -5, /* (151) create_table_args ::= ifnotexists ids cpxName AS select */ + -3, /* (152) columnlist ::= columnlist COMMA column */ + -1, /* (153) columnlist ::= column */ + -2, /* (154) column ::= ids typename */ + -3, /* (155) tagitemlist ::= tagitemlist COMMA tagitem */ + -1, /* (156) tagitemlist ::= tagitem */ + -1, /* (157) tagitem ::= INTEGER */ + -1, /* (158) tagitem ::= FLOAT */ + -1, /* (159) tagitem ::= STRING */ + -1, /* (160) tagitem ::= BOOL */ + -1, /* (161) tagitem ::= NULL */ + -1, /* (162) tagitem ::= NOW */ + -2, /* (163) tagitem ::= MINUS INTEGER */ + -2, /* (164) tagitem ::= MINUS FLOAT */ + -2, /* (165) tagitem ::= PLUS INTEGER */ + -2, /* (166) tagitem ::= PLUS FLOAT */ + -14, /* (167) 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 */ + -3, /* (168) select ::= LP select RP */ + -1, /* (169) union ::= select */ + -4, /* (170) union ::= union UNION ALL select */ + -1, /* (171) cmd ::= union */ + -2, /* (172) select ::= SELECT selcollist */ + -2, /* (173) sclp ::= selcollist COMMA */ + 0, /* (174) sclp ::= */ + -4, /* (175) selcollist ::= sclp distinct expr as */ + -2, /* (176) selcollist ::= sclp STAR */ + -2, /* (177) as ::= AS ids */ + -1, /* (178) as ::= ids */ + 0, /* (179) as ::= */ + -1, /* (180) distinct ::= DISTINCT */ + 0, /* (181) distinct ::= */ + -2, /* (182) from ::= FROM tablelist */ + -2, /* (183) from ::= FROM sub */ + -3, /* (184) sub ::= LP union RP */ + -4, /* (185) sub ::= LP union RP ids */ + -6, /* (186) sub ::= sub COMMA LP union RP ids */ + -2, /* (187) tablelist ::= ids cpxName */ + -3, /* (188) tablelist ::= ids cpxName ids */ + -4, /* (189) tablelist ::= tablelist COMMA ids cpxName */ + -5, /* (190) tablelist ::= tablelist COMMA ids cpxName ids */ + -1, /* (191) tmvar ::= VARIABLE */ + -4, /* (192) interval_opt ::= INTERVAL LP tmvar RP */ + -6, /* (193) interval_opt ::= INTERVAL LP tmvar COMMA tmvar RP */ + 0, /* (194) interval_opt ::= */ + 0, /* (195) session_option ::= */ + -7, /* (196) session_option ::= SESSION LP ids cpxName COMMA tmvar RP */ + 0, /* (197) windowstate_option ::= */ + -4, /* (198) windowstate_option ::= STATE_WINDOW LP ids RP */ + 0, /* (199) fill_opt ::= */ + -6, /* (200) fill_opt ::= FILL LP ID COMMA tagitemlist RP */ + -4, /* (201) fill_opt ::= FILL LP ID RP */ + -4, /* (202) sliding_opt ::= SLIDING LP tmvar RP */ + 0, /* (203) sliding_opt ::= */ + 0, /* (204) orderby_opt ::= */ + -3, /* (205) orderby_opt ::= ORDER BY sortlist */ + -4, /* (206) sortlist ::= sortlist COMMA item sortorder */ + -2, /* (207) sortlist ::= item sortorder */ + -2, /* (208) item ::= ids cpxName */ + -1, /* (209) sortorder ::= ASC */ + -1, /* (210) sortorder ::= DESC */ + 0, /* (211) sortorder ::= */ + 0, /* (212) groupby_opt ::= */ + -3, /* (213) groupby_opt ::= GROUP BY grouplist */ + -3, /* (214) grouplist ::= grouplist COMMA item */ + -1, /* (215) grouplist ::= item */ + 0, /* (216) having_opt ::= */ + -2, /* (217) having_opt ::= HAVING expr */ + 0, /* (218) limit_opt ::= */ + -2, /* (219) limit_opt ::= LIMIT signed */ + -4, /* (220) limit_opt ::= LIMIT signed OFFSET signed */ + -4, /* (221) limit_opt ::= LIMIT signed COMMA signed */ + 0, /* (222) slimit_opt ::= */ + -2, /* (223) slimit_opt ::= SLIMIT signed */ + -4, /* (224) slimit_opt ::= SLIMIT signed SOFFSET signed */ + -4, /* (225) slimit_opt ::= SLIMIT signed COMMA signed */ + 0, /* (226) where_opt ::= */ + -2, /* (227) where_opt ::= WHERE expr */ + -3, /* (228) expr ::= LP expr RP */ + -1, /* (229) expr ::= ID */ + -3, /* (230) expr ::= ID DOT ID */ + -3, /* (231) expr ::= ID DOT STAR */ + -1, /* (232) expr ::= INTEGER */ + -2, /* (233) expr ::= MINUS INTEGER */ + -2, /* (234) expr ::= PLUS INTEGER */ + -1, /* (235) expr ::= FLOAT */ + -2, /* (236) expr ::= MINUS FLOAT */ + -2, /* (237) expr ::= PLUS FLOAT */ + -1, /* (238) expr ::= STRING */ + -1, /* (239) expr ::= NOW */ + -1, /* (240) expr ::= VARIABLE */ + -2, /* (241) expr ::= PLUS VARIABLE */ + -2, /* (242) expr ::= MINUS VARIABLE */ + -1, /* (243) expr ::= BOOL */ + -1, /* (244) expr ::= NULL */ + -4, /* (245) expr ::= ID LP exprlist RP */ + -4, /* (246) expr ::= ID LP STAR RP */ + -3, /* (247) expr ::= expr IS NULL */ + -4, /* (248) expr ::= expr IS NOT NULL */ + -3, /* (249) expr ::= expr LT expr */ + -3, /* (250) expr ::= expr GT expr */ + -3, /* (251) expr ::= expr LE expr */ + -3, /* (252) expr ::= expr GE expr */ + -3, /* (253) expr ::= expr NE expr */ + -3, /* (254) expr ::= expr EQ expr */ + -5, /* (255) expr ::= expr BETWEEN expr AND expr */ + -3, /* (256) expr ::= expr AND expr */ + -3, /* (257) expr ::= expr OR expr */ + -3, /* (258) expr ::= expr PLUS expr */ + -3, /* (259) expr ::= expr MINUS expr */ + -3, /* (260) expr ::= expr STAR expr */ + -3, /* (261) expr ::= expr SLASH expr */ + -3, /* (262) expr ::= expr REM expr */ + -3, /* (263) expr ::= expr LIKE expr */ + -5, /* (264) expr ::= expr IN LP exprlist RP */ + -3, /* (265) exprlist ::= exprlist COMMA expritem */ + -1, /* (266) exprlist ::= expritem */ + -1, /* (267) expritem ::= expr */ + 0, /* (268) expritem ::= */ + -3, /* (269) cmd ::= RESET QUERY CACHE */ + -3, /* (270) cmd ::= SYNCDB ids REPLICA */ + -7, /* (271) cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */ + -7, /* (272) cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */ + -7, /* (273) cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */ + -7, /* (274) cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */ + -7, /* (275) cmd ::= ALTER TABLE ids cpxName DROP TAG ids */ + -8, /* (276) cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */ + -9, /* (277) cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */ + -7, /* (278) cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */ + -7, /* (279) cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */ + -7, /* (280) cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */ + -7, /* (281) cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */ + -7, /* (282) cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */ + -7, /* (283) cmd ::= ALTER STABLE ids cpxName DROP TAG ids */ + -8, /* (284) cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */ + -9, /* (285) cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem */ + -7, /* (286) cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */ + -3, /* (287) cmd ::= KILL CONNECTION INTEGER */ + -5, /* (288) cmd ::= KILL STREAM INTEGER COLON INTEGER */ + -5, /* (289) cmd ::= KILL QUERY INTEGER COLON INTEGER */ }; static void yy_accept(yyParser*); /* Forward Declaration */ @@ -2466,54 +2665,6 @@ static YYACTIONTYPE yy_reduce( (void)yyLookahead; (void)yyLookaheadToken; yymsp = yypParser->yytos; -#ifndef NDEBUG - if( yyTraceFILE && yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) ){ - yysize = yyRuleInfoNRhs[yyruleno]; - if( yysize ){ - fprintf(yyTraceFILE, "%sReduce %d [%s]%s, pop back to state %d.\n", - yyTracePrompt, - yyruleno, yyRuleName[yyruleno], - yyrulenoyytos - yypParser->yystack)>yypParser->yyhwm ){ - yypParser->yyhwm++; - assert( yypParser->yyhwm == (int)(yypParser->yytos - yypParser->yystack)); - } -#endif -#if YYSTACKDEPTH>0 - if( yypParser->yytos>=yypParser->yystackEnd ){ - yyStackOverflow(yypParser); - /* The call to yyStackOverflow() above pops the stack until it is - ** empty, causing the main parser loop to exit. So the return value - ** is never used and does not matter. */ - return 0; - } -#else - if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz-1] ){ - if( yyGrowStack(yypParser) ){ - yyStackOverflow(yypParser); - /* The call to yyStackOverflow() above pops the stack until it is - ** empty, causing the main parser loop to exit. So the return value - ** is never used and does not matter. */ - return 0; - } - yymsp = yypParser->yytos; - } -#endif - } switch( yyruleno ){ /* Beginning here are the reduction cases. A typical example @@ -2527,380 +2678,381 @@ static YYACTIONTYPE 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); -#line 63 "sql.y" + 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); +#line 63 "src/query/inc/sql.y" {} -#line 2536 "sql.c" +#line 2686 "src/query/inc/sql.c" break; case 1: /* cmd ::= SHOW DATABASES */ -#line 66 "sql.y" +#line 66 "src/query/inc/sql.y" { setShowOptions(pInfo, TSDB_MGMT_TABLE_DB, 0, 0);} -#line 2541 "sql.c" +#line 2691 "src/query/inc/sql.c" break; case 2: /* cmd ::= SHOW TOPICS */ -#line 67 "sql.y" +#line 67 "src/query/inc/sql.y" { setShowOptions(pInfo, TSDB_MGMT_TABLE_TP, 0, 0);} -#line 2546 "sql.c" +#line 2696 "src/query/inc/sql.c" break; case 3: /* cmd ::= SHOW FUNCTIONS */ -#line 68 "sql.y" +#line 68 "src/query/inc/sql.y" { setShowOptions(pInfo, TSDB_MGMT_TABLE_FUNCTION, 0, 0);} -#line 2551 "sql.c" +#line 2701 "src/query/inc/sql.c" break; case 4: /* cmd ::= SHOW MNODES */ -#line 69 "sql.y" +#line 69 "src/query/inc/sql.y" { setShowOptions(pInfo, TSDB_MGMT_TABLE_MNODE, 0, 0);} -#line 2556 "sql.c" +#line 2706 "src/query/inc/sql.c" break; case 5: /* cmd ::= SHOW DNODES */ -#line 70 "sql.y" +#line 70 "src/query/inc/sql.y" { setShowOptions(pInfo, TSDB_MGMT_TABLE_DNODE, 0, 0);} -#line 2561 "sql.c" +#line 2711 "src/query/inc/sql.c" break; case 6: /* cmd ::= SHOW ACCOUNTS */ -#line 71 "sql.y" +#line 71 "src/query/inc/sql.y" { setShowOptions(pInfo, TSDB_MGMT_TABLE_ACCT, 0, 0);} -#line 2566 "sql.c" +#line 2716 "src/query/inc/sql.c" break; case 7: /* cmd ::= SHOW USERS */ -#line 72 "sql.y" +#line 72 "src/query/inc/sql.y" { setShowOptions(pInfo, TSDB_MGMT_TABLE_USER, 0, 0);} -#line 2571 "sql.c" +#line 2721 "src/query/inc/sql.c" break; case 8: /* cmd ::= SHOW MODULES */ -#line 74 "sql.y" +#line 74 "src/query/inc/sql.y" { setShowOptions(pInfo, TSDB_MGMT_TABLE_MODULE, 0, 0); } -#line 2576 "sql.c" +#line 2726 "src/query/inc/sql.c" break; case 9: /* cmd ::= SHOW QUERIES */ -#line 75 "sql.y" +#line 75 "src/query/inc/sql.y" { setShowOptions(pInfo, TSDB_MGMT_TABLE_QUERIES, 0, 0); } -#line 2581 "sql.c" +#line 2731 "src/query/inc/sql.c" break; case 10: /* cmd ::= SHOW CONNECTIONS */ -#line 76 "sql.y" +#line 76 "src/query/inc/sql.y" { setShowOptions(pInfo, TSDB_MGMT_TABLE_CONNS, 0, 0);} -#line 2586 "sql.c" +#line 2736 "src/query/inc/sql.c" break; case 11: /* cmd ::= SHOW STREAMS */ -#line 77 "sql.y" +#line 77 "src/query/inc/sql.y" { setShowOptions(pInfo, TSDB_MGMT_TABLE_STREAMS, 0, 0); } -#line 2591 "sql.c" +#line 2741 "src/query/inc/sql.c" break; case 12: /* cmd ::= SHOW VARIABLES */ -#line 78 "sql.y" +#line 78 "src/query/inc/sql.y" { setShowOptions(pInfo, TSDB_MGMT_TABLE_VARIABLES, 0, 0); } -#line 2596 "sql.c" +#line 2746 "src/query/inc/sql.c" break; case 13: /* cmd ::= SHOW SCORES */ -#line 79 "sql.y" +#line 79 "src/query/inc/sql.y" { setShowOptions(pInfo, TSDB_MGMT_TABLE_SCORES, 0, 0); } -#line 2601 "sql.c" +#line 2751 "src/query/inc/sql.c" break; case 14: /* cmd ::= SHOW GRANTS */ -#line 80 "sql.y" +#line 80 "src/query/inc/sql.y" { setShowOptions(pInfo, TSDB_MGMT_TABLE_GRANTS, 0, 0); } -#line 2606 "sql.c" +#line 2756 "src/query/inc/sql.c" break; case 15: /* cmd ::= SHOW VNODES */ -#line 82 "sql.y" +#line 82 "src/query/inc/sql.y" { setShowOptions(pInfo, TSDB_MGMT_TABLE_VNODES, 0, 0); } -#line 2611 "sql.c" +#line 2761 "src/query/inc/sql.c" break; case 16: /* cmd ::= SHOW VNODES ids */ -#line 83 "sql.y" +#line 83 "src/query/inc/sql.y" { setShowOptions(pInfo, TSDB_MGMT_TABLE_VNODES, &yymsp[0].minor.yy0, 0); } -#line 2616 "sql.c" +#line 2766 "src/query/inc/sql.c" break; case 17: /* dbPrefix ::= */ -#line 87 "sql.y" +#line 87 "src/query/inc/sql.y" {yymsp[1].minor.yy0.n = 0; yymsp[1].minor.yy0.type = 0;} -#line 2621 "sql.c" +#line 2771 "src/query/inc/sql.c" break; case 18: /* dbPrefix ::= ids DOT */ -#line 88 "sql.y" +#line 88 "src/query/inc/sql.y" {yylhsminor.yy0 = yymsp[-1].minor.yy0; } -#line 2626 "sql.c" +#line 2776 "src/query/inc/sql.c" yymsp[-1].minor.yy0 = yylhsminor.yy0; break; case 19: /* cpxName ::= */ -#line 91 "sql.y" +#line 91 "src/query/inc/sql.y" {yymsp[1].minor.yy0.n = 0; } -#line 2632 "sql.c" +#line 2782 "src/query/inc/sql.c" break; case 20: /* cpxName ::= DOT ids */ -#line 92 "sql.y" +#line 92 "src/query/inc/sql.y" {yymsp[-1].minor.yy0 = yymsp[0].minor.yy0; yymsp[-1].minor.yy0.n += 1; } -#line 2637 "sql.c" +#line 2787 "src/query/inc/sql.c" break; case 21: /* cmd ::= SHOW CREATE TABLE ids cpxName */ -#line 94 "sql.y" +#line 94 "src/query/inc/sql.y" { yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; setDCLSqlElems(pInfo, TSDB_SQL_SHOW_CREATE_TABLE, 1, &yymsp[-1].minor.yy0); } -#line 2645 "sql.c" +#line 2795 "src/query/inc/sql.c" break; case 22: /* cmd ::= SHOW CREATE STABLE ids cpxName */ -#line 98 "sql.y" +#line 98 "src/query/inc/sql.y" { yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; setDCLSqlElems(pInfo, TSDB_SQL_SHOW_CREATE_STABLE, 1, &yymsp[-1].minor.yy0); } -#line 2653 "sql.c" +#line 2803 "src/query/inc/sql.c" break; case 23: /* cmd ::= SHOW CREATE DATABASE ids */ -#line 103 "sql.y" +#line 103 "src/query/inc/sql.y" { setDCLSqlElems(pInfo, TSDB_SQL_SHOW_CREATE_DATABASE, 1, &yymsp[0].minor.yy0); } -#line 2660 "sql.c" +#line 2810 "src/query/inc/sql.c" break; case 24: /* cmd ::= SHOW dbPrefix TABLES */ -#line 107 "sql.y" +#line 107 "src/query/inc/sql.y" { setShowOptions(pInfo, TSDB_MGMT_TABLE_TABLE, &yymsp[-1].minor.yy0, 0); } -#line 2667 "sql.c" +#line 2817 "src/query/inc/sql.c" break; case 25: /* cmd ::= SHOW dbPrefix TABLES LIKE ids */ -#line 111 "sql.y" +#line 111 "src/query/inc/sql.y" { setShowOptions(pInfo, TSDB_MGMT_TABLE_TABLE, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0); } -#line 2674 "sql.c" +#line 2824 "src/query/inc/sql.c" break; case 26: /* cmd ::= SHOW dbPrefix STABLES */ -#line 115 "sql.y" +#line 115 "src/query/inc/sql.y" { setShowOptions(pInfo, TSDB_MGMT_TABLE_METRIC, &yymsp[-1].minor.yy0, 0); } -#line 2681 "sql.c" +#line 2831 "src/query/inc/sql.c" break; case 27: /* cmd ::= SHOW dbPrefix STABLES LIKE ids */ -#line 119 "sql.y" +#line 119 "src/query/inc/sql.y" { SStrToken token; tSetDbName(&token, &yymsp[-3].minor.yy0); setShowOptions(pInfo, TSDB_MGMT_TABLE_METRIC, &token, &yymsp[0].minor.yy0); } -#line 2690 "sql.c" +#line 2840 "src/query/inc/sql.c" break; case 28: /* cmd ::= SHOW dbPrefix VGROUPS */ -#line 125 "sql.y" +#line 125 "src/query/inc/sql.y" { SStrToken token; tSetDbName(&token, &yymsp[-1].minor.yy0); setShowOptions(pInfo, TSDB_MGMT_TABLE_VGROUP, &token, 0); } -#line 2699 "sql.c" +#line 2849 "src/query/inc/sql.c" break; case 29: /* cmd ::= SHOW dbPrefix VGROUPS ids */ -#line 131 "sql.y" +#line 131 "src/query/inc/sql.y" { SStrToken token; tSetDbName(&token, &yymsp[-2].minor.yy0); setShowOptions(pInfo, TSDB_MGMT_TABLE_VGROUP, &token, &yymsp[0].minor.yy0); } -#line 2708 "sql.c" +#line 2858 "src/query/inc/sql.c" break; case 30: /* cmd ::= DROP TABLE ifexists ids cpxName */ -#line 138 "sql.y" +#line 138 "src/query/inc/sql.y" { yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; setDropDbTableInfo(pInfo, TSDB_SQL_DROP_TABLE, &yymsp[-1].minor.yy0, &yymsp[-2].minor.yy0, -1, -1); } -#line 2716 "sql.c" +#line 2866 "src/query/inc/sql.c" break; case 31: /* cmd ::= DROP STABLE ifexists ids cpxName */ -#line 144 "sql.y" +#line 144 "src/query/inc/sql.y" { yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; setDropDbTableInfo(pInfo, TSDB_SQL_DROP_TABLE, &yymsp[-1].minor.yy0, &yymsp[-2].minor.yy0, -1, TSDB_SUPER_TABLE); } -#line 2724 "sql.c" +#line 2874 "src/query/inc/sql.c" break; case 32: /* cmd ::= DROP DATABASE ifexists ids */ -#line 149 "sql.y" +#line 149 "src/query/inc/sql.y" { setDropDbTableInfo(pInfo, TSDB_SQL_DROP_DB, &yymsp[0].minor.yy0, &yymsp[-1].minor.yy0, TSDB_DB_TYPE_DEFAULT, -1); } -#line 2729 "sql.c" +#line 2879 "src/query/inc/sql.c" break; case 33: /* cmd ::= DROP TOPIC ifexists ids */ -#line 150 "sql.y" +#line 150 "src/query/inc/sql.y" { setDropDbTableInfo(pInfo, TSDB_SQL_DROP_DB, &yymsp[0].minor.yy0, &yymsp[-1].minor.yy0, TSDB_DB_TYPE_TOPIC, -1); } -#line 2734 "sql.c" +#line 2884 "src/query/inc/sql.c" break; case 34: /* cmd ::= DROP FUNCTION ids */ -#line 151 "sql.y" +#line 151 "src/query/inc/sql.y" { setDropFuncInfo(pInfo, TSDB_SQL_DROP_FUNCTION, &yymsp[0].minor.yy0); } -#line 2739 "sql.c" +#line 2889 "src/query/inc/sql.c" break; case 35: /* cmd ::= DROP DNODE ids */ -#line 153 "sql.y" +#line 153 "src/query/inc/sql.y" { setDCLSqlElems(pInfo, TSDB_SQL_DROP_DNODE, 1, &yymsp[0].minor.yy0); } -#line 2744 "sql.c" +#line 2894 "src/query/inc/sql.c" break; case 36: /* cmd ::= DROP USER ids */ -#line 154 "sql.y" +#line 154 "src/query/inc/sql.y" { setDCLSqlElems(pInfo, TSDB_SQL_DROP_USER, 1, &yymsp[0].minor.yy0); } -#line 2749 "sql.c" +#line 2899 "src/query/inc/sql.c" break; case 37: /* cmd ::= DROP ACCOUNT ids */ -#line 155 "sql.y" +#line 155 "src/query/inc/sql.y" { setDCLSqlElems(pInfo, TSDB_SQL_DROP_ACCT, 1, &yymsp[0].minor.yy0); } -#line 2754 "sql.c" +#line 2904 "src/query/inc/sql.c" break; case 38: /* cmd ::= USE ids */ -#line 158 "sql.y" +#line 158 "src/query/inc/sql.y" { setDCLSqlElems(pInfo, TSDB_SQL_USE_DB, 1, &yymsp[0].minor.yy0);} -#line 2759 "sql.c" +#line 2909 "src/query/inc/sql.c" break; case 39: /* cmd ::= DESCRIBE ids cpxName */ -#line 161 "sql.y" + case 40: /* cmd ::= DESC ids cpxName */ yytestcase(yyruleno==40); +#line 161 "src/query/inc/sql.y" { yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; setDCLSqlElems(pInfo, TSDB_SQL_DESCRIBE_TABLE, 1, &yymsp[-1].minor.yy0); } -#line 2767 "sql.c" +#line 2918 "src/query/inc/sql.c" break; - case 40: /* cmd ::= ALTER USER ids PASS ids */ -#line 167 "sql.y" + case 41: /* cmd ::= ALTER USER ids PASS ids */ +#line 170 "src/query/inc/sql.y" { setAlterUserSql(pInfo, TSDB_ALTER_USER_PASSWD, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, NULL); } -#line 2772 "sql.c" +#line 2923 "src/query/inc/sql.c" break; - case 41: /* cmd ::= ALTER USER ids PRIVILEGE ids */ -#line 168 "sql.y" + case 42: /* cmd ::= ALTER USER ids PRIVILEGE ids */ +#line 171 "src/query/inc/sql.y" { setAlterUserSql(pInfo, TSDB_ALTER_USER_PRIVILEGES, &yymsp[-2].minor.yy0, NULL, &yymsp[0].minor.yy0);} -#line 2777 "sql.c" +#line 2928 "src/query/inc/sql.c" break; - case 42: /* cmd ::= ALTER DNODE ids ids */ -#line 169 "sql.y" + case 43: /* cmd ::= ALTER DNODE ids ids */ +#line 172 "src/query/inc/sql.y" { setDCLSqlElems(pInfo, TSDB_SQL_CFG_DNODE, 2, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } -#line 2782 "sql.c" +#line 2933 "src/query/inc/sql.c" break; - case 43: /* cmd ::= ALTER DNODE ids ids ids */ -#line 170 "sql.y" + case 44: /* cmd ::= ALTER DNODE ids ids ids */ +#line 173 "src/query/inc/sql.y" { setDCLSqlElems(pInfo, TSDB_SQL_CFG_DNODE, 3, &yymsp[-2].minor.yy0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } -#line 2787 "sql.c" +#line 2938 "src/query/inc/sql.c" break; - case 44: /* cmd ::= ALTER LOCAL ids */ -#line 171 "sql.y" + case 45: /* cmd ::= ALTER LOCAL ids */ +#line 174 "src/query/inc/sql.y" { setDCLSqlElems(pInfo, TSDB_SQL_CFG_LOCAL, 1, &yymsp[0].minor.yy0); } -#line 2792 "sql.c" +#line 2943 "src/query/inc/sql.c" break; - case 45: /* cmd ::= ALTER LOCAL ids ids */ -#line 172 "sql.y" + case 46: /* cmd ::= ALTER LOCAL ids ids */ +#line 175 "src/query/inc/sql.y" { setDCLSqlElems(pInfo, TSDB_SQL_CFG_LOCAL, 2, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } -#line 2797 "sql.c" +#line 2948 "src/query/inc/sql.c" break; - case 46: /* cmd ::= ALTER DATABASE ids alter_db_optr */ - case 47: /* cmd ::= ALTER TOPIC ids alter_topic_optr */ yytestcase(yyruleno==47); -#line 173 "sql.y" + case 47: /* cmd ::= ALTER DATABASE ids alter_db_optr */ + case 48: /* cmd ::= ALTER TOPIC ids alter_topic_optr */ yytestcase(yyruleno==48); +#line 176 "src/query/inc/sql.y" { SStrToken t = {0}; setCreateDbInfo(pInfo, TSDB_SQL_ALTER_DB, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy42, &t);} -#line 2803 "sql.c" +#line 2954 "src/query/inc/sql.c" break; - case 48: /* cmd ::= ALTER ACCOUNT ids acct_optr */ -#line 176 "sql.y" + case 49: /* cmd ::= ALTER ACCOUNT ids acct_optr */ +#line 179 "src/query/inc/sql.y" { setCreateAcctSql(pInfo, TSDB_SQL_ALTER_ACCT, &yymsp[-1].minor.yy0, NULL, &yymsp[0].minor.yy341);} -#line 2808 "sql.c" +#line 2959 "src/query/inc/sql.c" break; - case 49: /* cmd ::= ALTER ACCOUNT ids PASS ids acct_optr */ -#line 177 "sql.y" + case 50: /* cmd ::= ALTER ACCOUNT ids PASS ids acct_optr */ +#line 180 "src/query/inc/sql.y" { setCreateAcctSql(pInfo, TSDB_SQL_ALTER_ACCT, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy341);} -#line 2813 "sql.c" +#line 2964 "src/query/inc/sql.c" break; - case 50: /* cmd ::= COMPACT VNODES IN LP exprlist RP */ -#line 181 "sql.y" + case 51: /* cmd ::= COMPACT VNODES IN LP exprlist RP */ +#line 184 "src/query/inc/sql.y" { setCompactVnodeSql(pInfo, TSDB_SQL_COMPACT_VNODE, yymsp[-1].minor.yy131);} -#line 2818 "sql.c" +#line 2969 "src/query/inc/sql.c" break; - case 51: /* ids ::= ID */ - case 52: /* ids ::= STRING */ yytestcase(yyruleno==52); -#line 187 "sql.y" + case 52: /* ids ::= ID */ + case 53: /* ids ::= STRING */ yytestcase(yyruleno==53); +#line 190 "src/query/inc/sql.y" {yylhsminor.yy0 = yymsp[0].minor.yy0; } -#line 2824 "sql.c" +#line 2975 "src/query/inc/sql.c" yymsp[0].minor.yy0 = yylhsminor.yy0; break; - case 53: /* ifexists ::= IF EXISTS */ -#line 191 "sql.y" + case 54: /* ifexists ::= IF EXISTS */ +#line 194 "src/query/inc/sql.y" { yymsp[-1].minor.yy0.n = 1;} -#line 2830 "sql.c" +#line 2981 "src/query/inc/sql.c" break; - case 54: /* ifexists ::= */ - case 56: /* ifnotexists ::= */ yytestcase(yyruleno==56); - case 180: /* distinct ::= */ yytestcase(yyruleno==180); -#line 192 "sql.y" + case 55: /* ifexists ::= */ + case 57: /* ifnotexists ::= */ yytestcase(yyruleno==57); + case 181: /* distinct ::= */ yytestcase(yyruleno==181); +#line 195 "src/query/inc/sql.y" { yymsp[1].minor.yy0.n = 0;} -#line 2837 "sql.c" +#line 2988 "src/query/inc/sql.c" break; - case 55: /* ifnotexists ::= IF NOT EXISTS */ -#line 195 "sql.y" + case 56: /* ifnotexists ::= IF NOT EXISTS */ +#line 198 "src/query/inc/sql.y" { yymsp[-2].minor.yy0.n = 1;} -#line 2842 "sql.c" +#line 2993 "src/query/inc/sql.c" break; - case 57: /* cmd ::= CREATE DNODE ids */ -#line 200 "sql.y" + case 58: /* cmd ::= CREATE DNODE ids */ +#line 203 "src/query/inc/sql.y" { setDCLSqlElems(pInfo, TSDB_SQL_CREATE_DNODE, 1, &yymsp[0].minor.yy0);} -#line 2847 "sql.c" +#line 2998 "src/query/inc/sql.c" break; - case 58: /* cmd ::= CREATE ACCOUNT ids PASS ids acct_optr */ -#line 202 "sql.y" + case 59: /* cmd ::= CREATE ACCOUNT ids PASS ids acct_optr */ +#line 205 "src/query/inc/sql.y" { setCreateAcctSql(pInfo, TSDB_SQL_CREATE_ACCT, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy341);} -#line 2852 "sql.c" +#line 3003 "src/query/inc/sql.c" break; - case 59: /* cmd ::= CREATE DATABASE ifnotexists ids db_optr */ - case 60: /* cmd ::= CREATE TOPIC ifnotexists ids topic_optr */ yytestcase(yyruleno==60); -#line 203 "sql.y" + case 60: /* cmd ::= CREATE DATABASE ifnotexists ids db_optr */ + case 61: /* cmd ::= CREATE TOPIC ifnotexists ids topic_optr */ yytestcase(yyruleno==61); +#line 206 "src/query/inc/sql.y" { setCreateDbInfo(pInfo, TSDB_SQL_CREATE_DB, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy42, &yymsp[-2].minor.yy0);} -#line 2858 "sql.c" +#line 3009 "src/query/inc/sql.c" break; - case 61: /* cmd ::= CREATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */ -#line 205 "sql.y" + case 62: /* cmd ::= CREATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */ +#line 208 "src/query/inc/sql.y" { setCreateFuncInfo(pInfo, TSDB_SQL_CREATE_FUNCTION, &yymsp[-5].minor.yy0, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy163, &yymsp[0].minor.yy0, 1);} -#line 2863 "sql.c" +#line 3014 "src/query/inc/sql.c" break; - case 62: /* cmd ::= CREATE AGGREGATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */ -#line 206 "sql.y" + case 63: /* cmd ::= CREATE AGGREGATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */ +#line 209 "src/query/inc/sql.y" { setCreateFuncInfo(pInfo, TSDB_SQL_CREATE_FUNCTION, &yymsp[-5].minor.yy0, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy163, &yymsp[0].minor.yy0, 2);} -#line 2868 "sql.c" +#line 3019 "src/query/inc/sql.c" break; - case 63: /* cmd ::= CREATE USER ids PASS ids */ -#line 207 "sql.y" + case 64: /* cmd ::= CREATE USER ids PASS ids */ +#line 210 "src/query/inc/sql.y" { setCreateUserSql(pInfo, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0);} -#line 2873 "sql.c" - 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); -#line 209 "sql.y" +#line 3024 "src/query/inc/sql.c" + break; + 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); +#line 212 "src/query/inc/sql.y" { yymsp[1].minor.yy0.n = 0; } -#line 2887 "sql.c" - 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); -#line 210 "sql.y" +#line 3038 "src/query/inc/sql.c" + break; + 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); +#line 213 "src/query/inc/sql.y" { yymsp[-1].minor.yy0 = yymsp[0].minor.yy0; } -#line 2901 "sql.c" +#line 3052 "src/query/inc/sql.c" break; - case 84: /* acct_optr ::= pps tseries storage streams qtime dbs users conns state */ -#line 240 "sql.y" + case 85: /* acct_optr ::= pps tseries storage streams qtime dbs users conns state */ +#line 243 "src/query/inc/sql.y" { yylhsminor.yy341.maxUsers = (yymsp[-2].minor.yy0.n>0)?atoi(yymsp[-2].minor.yy0.z):-1; yylhsminor.yy341.maxDbs = (yymsp[-3].minor.yy0.n>0)?atoi(yymsp[-3].minor.yy0.z):-1; @@ -2912,189 +3064,189 @@ static YYACTIONTYPE yy_reduce( yylhsminor.yy341.maxConnections = (yymsp[-1].minor.yy0.n>0)?atoi(yymsp[-1].minor.yy0.z):-1; yylhsminor.yy341.stat = yymsp[0].minor.yy0; } -#line 2916 "sql.c" +#line 3067 "src/query/inc/sql.c" yymsp[-8].minor.yy341 = yylhsminor.yy341; break; - case 85: /* intitemlist ::= intitemlist COMMA intitem */ - case 154: /* tagitemlist ::= tagitemlist COMMA tagitem */ yytestcase(yyruleno==154); -#line 256 "sql.y" + case 86: /* intitemlist ::= intitemlist COMMA intitem */ + case 155: /* tagitemlist ::= tagitemlist COMMA tagitem */ yytestcase(yyruleno==155); +#line 259 "src/query/inc/sql.y" { yylhsminor.yy131 = tVariantListAppend(yymsp[-2].minor.yy131, &yymsp[0].minor.yy516, -1); } -#line 2923 "sql.c" +#line 3074 "src/query/inc/sql.c" yymsp[-2].minor.yy131 = yylhsminor.yy131; break; - case 86: /* intitemlist ::= intitem */ - case 155: /* tagitemlist ::= tagitem */ yytestcase(yyruleno==155); -#line 257 "sql.y" + case 87: /* intitemlist ::= intitem */ + case 156: /* tagitemlist ::= tagitem */ yytestcase(yyruleno==156); +#line 260 "src/query/inc/sql.y" { yylhsminor.yy131 = tVariantListAppend(NULL, &yymsp[0].minor.yy516, -1); } -#line 2930 "sql.c" +#line 3081 "src/query/inc/sql.c" yymsp[0].minor.yy131 = yylhsminor.yy131; 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); -#line 259 "sql.y" + 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); +#line 262 "src/query/inc/sql.y" { toTSDBType(yymsp[0].minor.yy0.type); tVariantCreate(&yylhsminor.yy516, &yymsp[0].minor.yy0); } -#line 2940 "sql.c" +#line 3091 "src/query/inc/sql.c" yymsp[0].minor.yy516 = yylhsminor.yy516; break; - case 88: /* keep ::= KEEP intitemlist */ -#line 263 "sql.y" + case 89: /* keep ::= KEEP intitemlist */ +#line 266 "src/query/inc/sql.y" { yymsp[-1].minor.yy131 = yymsp[0].minor.yy131; } -#line 2946 "sql.c" - 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); -#line 265 "sql.y" +#line 3097 "src/query/inc/sql.c" + 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); +#line 268 "src/query/inc/sql.y" { yymsp[-1].minor.yy0 = yymsp[0].minor.yy0; } -#line 2965 "sql.c" +#line 3116 "src/query/inc/sql.c" break; - case 104: /* db_optr ::= */ -#line 282 "sql.y" + case 105: /* db_optr ::= */ +#line 285 "src/query/inc/sql.y" {setDefaultCreateDbOption(&yymsp[1].minor.yy42); yymsp[1].minor.yy42.dbType = TSDB_DB_TYPE_DEFAULT;} -#line 2970 "sql.c" +#line 3121 "src/query/inc/sql.c" break; - case 105: /* db_optr ::= db_optr cache */ -#line 284 "sql.y" + case 106: /* db_optr ::= db_optr cache */ +#line 287 "src/query/inc/sql.y" { yylhsminor.yy42 = yymsp[-1].minor.yy42; yylhsminor.yy42.cacheBlockSize = strtol(yymsp[0].minor.yy0.z, NULL, 10); } -#line 2975 "sql.c" +#line 3126 "src/query/inc/sql.c" yymsp[-1].minor.yy42 = yylhsminor.yy42; break; - case 106: /* db_optr ::= db_optr replica */ - case 123: /* alter_db_optr ::= alter_db_optr replica */ yytestcase(yyruleno==123); -#line 285 "sql.y" + case 107: /* db_optr ::= db_optr replica */ + case 124: /* alter_db_optr ::= alter_db_optr replica */ yytestcase(yyruleno==124); +#line 288 "src/query/inc/sql.y" { yylhsminor.yy42 = yymsp[-1].minor.yy42; yylhsminor.yy42.replica = strtol(yymsp[0].minor.yy0.z, NULL, 10); } -#line 2982 "sql.c" +#line 3133 "src/query/inc/sql.c" yymsp[-1].minor.yy42 = yylhsminor.yy42; break; - case 107: /* db_optr ::= db_optr quorum */ - case 124: /* alter_db_optr ::= alter_db_optr quorum */ yytestcase(yyruleno==124); -#line 286 "sql.y" + case 108: /* db_optr ::= db_optr quorum */ + case 125: /* alter_db_optr ::= alter_db_optr quorum */ yytestcase(yyruleno==125); +#line 289 "src/query/inc/sql.y" { yylhsminor.yy42 = yymsp[-1].minor.yy42; yylhsminor.yy42.quorum = strtol(yymsp[0].minor.yy0.z, NULL, 10); } -#line 2989 "sql.c" +#line 3140 "src/query/inc/sql.c" yymsp[-1].minor.yy42 = yylhsminor.yy42; break; - case 108: /* db_optr ::= db_optr days */ -#line 287 "sql.y" + case 109: /* db_optr ::= db_optr days */ +#line 290 "src/query/inc/sql.y" { yylhsminor.yy42 = yymsp[-1].minor.yy42; yylhsminor.yy42.daysPerFile = strtol(yymsp[0].minor.yy0.z, NULL, 10); } -#line 2995 "sql.c" +#line 3146 "src/query/inc/sql.c" yymsp[-1].minor.yy42 = yylhsminor.yy42; break; - case 109: /* db_optr ::= db_optr minrows */ -#line 288 "sql.y" + case 110: /* db_optr ::= db_optr minrows */ +#line 291 "src/query/inc/sql.y" { yylhsminor.yy42 = yymsp[-1].minor.yy42; yylhsminor.yy42.minRowsPerBlock = strtod(yymsp[0].minor.yy0.z, NULL); } -#line 3001 "sql.c" +#line 3152 "src/query/inc/sql.c" yymsp[-1].minor.yy42 = yylhsminor.yy42; break; - case 110: /* db_optr ::= db_optr maxrows */ -#line 289 "sql.y" + case 111: /* db_optr ::= db_optr maxrows */ +#line 292 "src/query/inc/sql.y" { yylhsminor.yy42 = yymsp[-1].minor.yy42; yylhsminor.yy42.maxRowsPerBlock = strtod(yymsp[0].minor.yy0.z, NULL); } -#line 3007 "sql.c" +#line 3158 "src/query/inc/sql.c" yymsp[-1].minor.yy42 = yylhsminor.yy42; break; - case 111: /* db_optr ::= db_optr blocks */ - case 126: /* alter_db_optr ::= alter_db_optr blocks */ yytestcase(yyruleno==126); -#line 290 "sql.y" + case 112: /* db_optr ::= db_optr blocks */ + case 127: /* alter_db_optr ::= alter_db_optr blocks */ yytestcase(yyruleno==127); +#line 293 "src/query/inc/sql.y" { yylhsminor.yy42 = yymsp[-1].minor.yy42; yylhsminor.yy42.numOfBlocks = strtol(yymsp[0].minor.yy0.z, NULL, 10); } -#line 3014 "sql.c" +#line 3165 "src/query/inc/sql.c" yymsp[-1].minor.yy42 = yylhsminor.yy42; break; - case 112: /* db_optr ::= db_optr ctime */ -#line 291 "sql.y" + case 113: /* db_optr ::= db_optr ctime */ +#line 294 "src/query/inc/sql.y" { yylhsminor.yy42 = yymsp[-1].minor.yy42; yylhsminor.yy42.commitTime = strtol(yymsp[0].minor.yy0.z, NULL, 10); } -#line 3020 "sql.c" +#line 3171 "src/query/inc/sql.c" yymsp[-1].minor.yy42 = yylhsminor.yy42; break; - case 113: /* db_optr ::= db_optr wal */ -#line 292 "sql.y" + case 114: /* db_optr ::= db_optr wal */ +#line 295 "src/query/inc/sql.y" { yylhsminor.yy42 = yymsp[-1].minor.yy42; yylhsminor.yy42.walLevel = strtol(yymsp[0].minor.yy0.z, NULL, 10); } -#line 3026 "sql.c" +#line 3177 "src/query/inc/sql.c" yymsp[-1].minor.yy42 = yylhsminor.yy42; break; - case 114: /* db_optr ::= db_optr fsync */ -#line 293 "sql.y" + case 115: /* db_optr ::= db_optr fsync */ +#line 296 "src/query/inc/sql.y" { yylhsminor.yy42 = yymsp[-1].minor.yy42; yylhsminor.yy42.fsyncPeriod = strtol(yymsp[0].minor.yy0.z, NULL, 10); } -#line 3032 "sql.c" +#line 3183 "src/query/inc/sql.c" yymsp[-1].minor.yy42 = yylhsminor.yy42; break; - case 115: /* db_optr ::= db_optr comp */ - case 127: /* alter_db_optr ::= alter_db_optr comp */ yytestcase(yyruleno==127); -#line 294 "sql.y" + case 116: /* db_optr ::= db_optr comp */ + case 128: /* alter_db_optr ::= alter_db_optr comp */ yytestcase(yyruleno==128); +#line 297 "src/query/inc/sql.y" { yylhsminor.yy42 = yymsp[-1].minor.yy42; yylhsminor.yy42.compressionLevel = strtol(yymsp[0].minor.yy0.z, NULL, 10); } -#line 3039 "sql.c" +#line 3190 "src/query/inc/sql.c" yymsp[-1].minor.yy42 = yylhsminor.yy42; break; - case 116: /* db_optr ::= db_optr prec */ -#line 295 "sql.y" + case 117: /* db_optr ::= db_optr prec */ +#line 298 "src/query/inc/sql.y" { yylhsminor.yy42 = yymsp[-1].minor.yy42; yylhsminor.yy42.precision = yymsp[0].minor.yy0; } -#line 3045 "sql.c" +#line 3196 "src/query/inc/sql.c" yymsp[-1].minor.yy42 = yylhsminor.yy42; break; - case 117: /* db_optr ::= db_optr keep */ - case 125: /* alter_db_optr ::= alter_db_optr keep */ yytestcase(yyruleno==125); -#line 296 "sql.y" + case 118: /* db_optr ::= db_optr keep */ + case 126: /* alter_db_optr ::= alter_db_optr keep */ yytestcase(yyruleno==126); +#line 299 "src/query/inc/sql.y" { yylhsminor.yy42 = yymsp[-1].minor.yy42; yylhsminor.yy42.keep = yymsp[0].minor.yy131; } -#line 3052 "sql.c" +#line 3203 "src/query/inc/sql.c" yymsp[-1].minor.yy42 = yylhsminor.yy42; break; - case 118: /* db_optr ::= db_optr update */ - case 128: /* alter_db_optr ::= alter_db_optr update */ yytestcase(yyruleno==128); -#line 297 "sql.y" + case 119: /* db_optr ::= db_optr update */ + case 129: /* alter_db_optr ::= alter_db_optr update */ yytestcase(yyruleno==129); +#line 300 "src/query/inc/sql.y" { yylhsminor.yy42 = yymsp[-1].minor.yy42; yylhsminor.yy42.update = strtol(yymsp[0].minor.yy0.z, NULL, 10); } -#line 3059 "sql.c" +#line 3210 "src/query/inc/sql.c" yymsp[-1].minor.yy42 = yylhsminor.yy42; break; - case 119: /* db_optr ::= db_optr cachelast */ - case 129: /* alter_db_optr ::= alter_db_optr cachelast */ yytestcase(yyruleno==129); -#line 298 "sql.y" + case 120: /* db_optr ::= db_optr cachelast */ + case 130: /* alter_db_optr ::= alter_db_optr cachelast */ yytestcase(yyruleno==130); +#line 301 "src/query/inc/sql.y" { yylhsminor.yy42 = yymsp[-1].minor.yy42; yylhsminor.yy42.cachelast = strtol(yymsp[0].minor.yy0.z, NULL, 10); } -#line 3066 "sql.c" +#line 3217 "src/query/inc/sql.c" yymsp[-1].minor.yy42 = yylhsminor.yy42; break; - case 120: /* topic_optr ::= db_optr */ - case 130: /* alter_topic_optr ::= alter_db_optr */ yytestcase(yyruleno==130); -#line 302 "sql.y" + case 121: /* topic_optr ::= db_optr */ + case 131: /* alter_topic_optr ::= alter_db_optr */ yytestcase(yyruleno==131); +#line 305 "src/query/inc/sql.y" { yylhsminor.yy42 = yymsp[0].minor.yy42; yylhsminor.yy42.dbType = TSDB_DB_TYPE_TOPIC; } -#line 3073 "sql.c" +#line 3224 "src/query/inc/sql.c" yymsp[0].minor.yy42 = yylhsminor.yy42; break; - case 121: /* topic_optr ::= topic_optr partitions */ - case 131: /* alter_topic_optr ::= alter_topic_optr partitions */ yytestcase(yyruleno==131); -#line 303 "sql.y" + case 122: /* topic_optr ::= topic_optr partitions */ + case 132: /* alter_topic_optr ::= alter_topic_optr partitions */ yytestcase(yyruleno==132); +#line 306 "src/query/inc/sql.y" { yylhsminor.yy42 = yymsp[-1].minor.yy42; yylhsminor.yy42.partitions = strtol(yymsp[0].minor.yy0.z, NULL, 10); } -#line 3080 "sql.c" +#line 3231 "src/query/inc/sql.c" yymsp[-1].minor.yy42 = yylhsminor.yy42; break; - case 122: /* alter_db_optr ::= */ -#line 306 "sql.y" + case 123: /* alter_db_optr ::= */ +#line 309 "src/query/inc/sql.y" { setDefaultCreateDbOption(&yymsp[1].minor.yy42); yymsp[1].minor.yy42.dbType = TSDB_DB_TYPE_DEFAULT;} -#line 3086 "sql.c" +#line 3237 "src/query/inc/sql.c" break; - case 132: /* typename ::= ids */ -#line 326 "sql.y" + case 133: /* typename ::= ids */ +#line 329 "src/query/inc/sql.y" { yymsp[0].minor.yy0.type = 0; tSetColumnType (&yylhsminor.yy163, &yymsp[0].minor.yy0); } -#line 3094 "sql.c" +#line 3245 "src/query/inc/sql.c" yymsp[0].minor.yy163 = yylhsminor.yy163; break; - case 133: /* typename ::= ids LP signed RP */ -#line 332 "sql.y" + case 134: /* typename ::= ids LP signed RP */ +#line 335 "src/query/inc/sql.y" { if (yymsp[-1].minor.yy459 <= 0) { yymsp[-3].minor.yy0.type = 0; @@ -3104,42 +3256,42 @@ static YYACTIONTYPE yy_reduce( tSetColumnType(&yylhsminor.yy163, &yymsp[-3].minor.yy0); } } -#line 3108 "sql.c" +#line 3259 "src/query/inc/sql.c" yymsp[-3].minor.yy163 = yylhsminor.yy163; break; - case 134: /* typename ::= ids UNSIGNED */ -#line 343 "sql.y" + case 135: /* typename ::= ids UNSIGNED */ +#line 346 "src/query/inc/sql.y" { 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.yy163, &yymsp[-1].minor.yy0); } -#line 3118 "sql.c" +#line 3269 "src/query/inc/sql.c" yymsp[-1].minor.yy163 = yylhsminor.yy163; break; - case 135: /* signed ::= INTEGER */ -#line 350 "sql.y" + case 136: /* signed ::= INTEGER */ +#line 353 "src/query/inc/sql.y" { yylhsminor.yy459 = strtol(yymsp[0].minor.yy0.z, NULL, 10); } -#line 3124 "sql.c" +#line 3275 "src/query/inc/sql.c" yymsp[0].minor.yy459 = yylhsminor.yy459; break; - case 136: /* signed ::= PLUS INTEGER */ -#line 351 "sql.y" + case 137: /* signed ::= PLUS INTEGER */ +#line 354 "src/query/inc/sql.y" { yymsp[-1].minor.yy459 = strtol(yymsp[0].minor.yy0.z, NULL, 10); } -#line 3130 "sql.c" +#line 3281 "src/query/inc/sql.c" break; - case 137: /* signed ::= MINUS INTEGER */ -#line 352 "sql.y" + case 138: /* signed ::= MINUS INTEGER */ +#line 355 "src/query/inc/sql.y" { yymsp[-1].minor.yy459 = -strtol(yymsp[0].minor.yy0.z, NULL, 10);} -#line 3135 "sql.c" +#line 3286 "src/query/inc/sql.c" break; - case 141: /* cmd ::= CREATE TABLE create_table_list */ -#line 358 "sql.y" + case 142: /* cmd ::= CREATE TABLE create_table_list */ +#line 361 "src/query/inc/sql.y" { pInfo->type = TSDB_SQL_CREATE_TABLE; pInfo->pCreateTableInfo = yymsp[0].minor.yy272;} -#line 3140 "sql.c" +#line 3291 "src/query/inc/sql.c" break; - case 142: /* create_table_list ::= create_from_stable */ -#line 362 "sql.y" + case 143: /* create_table_list ::= create_from_stable */ +#line 365 "src/query/inc/sql.y" { SCreateTableSql* pCreateTable = calloc(1, sizeof(SCreateTableSql)); pCreateTable->childTableInfo = taosArrayInit(4, sizeof(SCreatedTableInfo)); @@ -3148,20 +3300,20 @@ static YYACTIONTYPE yy_reduce( pCreateTable->type = TSQL_CREATE_TABLE_FROM_STABLE; yylhsminor.yy272 = pCreateTable; } -#line 3152 "sql.c" +#line 3303 "src/query/inc/sql.c" yymsp[0].minor.yy272 = yylhsminor.yy272; break; - case 143: /* create_table_list ::= create_table_list create_from_stable */ -#line 371 "sql.y" + case 144: /* create_table_list ::= create_table_list create_from_stable */ +#line 374 "src/query/inc/sql.y" { taosArrayPush(yymsp[-1].minor.yy272->childTableInfo, &yymsp[0].minor.yy96); yylhsminor.yy272 = yymsp[-1].minor.yy272; } -#line 3161 "sql.c" +#line 3312 "src/query/inc/sql.c" yymsp[-1].minor.yy272 = yylhsminor.yy272; break; - case 144: /* create_table_args ::= ifnotexists ids cpxName LP columnlist RP */ -#line 377 "sql.y" + case 145: /* create_table_args ::= ifnotexists ids cpxName LP columnlist RP */ +#line 380 "src/query/inc/sql.y" { yylhsminor.yy272 = tSetCreateTableInfo(yymsp[-1].minor.yy131, NULL, NULL, TSQL_CREATE_TABLE); setSqlInfo(pInfo, yylhsminor.yy272, NULL, TSDB_SQL_CREATE_TABLE); @@ -3169,11 +3321,11 @@ static YYACTIONTYPE yy_reduce( yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; setCreatedTableName(pInfo, &yymsp[-4].minor.yy0, &yymsp[-5].minor.yy0); } -#line 3173 "sql.c" +#line 3324 "src/query/inc/sql.c" yymsp[-5].minor.yy272 = yylhsminor.yy272; break; - case 145: /* create_stable_args ::= ifnotexists ids cpxName LP columnlist RP TAGS LP columnlist RP */ -#line 387 "sql.y" + case 146: /* create_stable_args ::= ifnotexists ids cpxName LP columnlist RP TAGS LP columnlist RP */ +#line 390 "src/query/inc/sql.y" { yylhsminor.yy272 = tSetCreateTableInfo(yymsp[-5].minor.yy131, yymsp[-1].minor.yy131, NULL, TSQL_CREATE_STABLE); setSqlInfo(pInfo, yylhsminor.yy272, NULL, TSDB_SQL_CREATE_TABLE); @@ -3181,43 +3333,43 @@ static YYACTIONTYPE yy_reduce( yymsp[-8].minor.yy0.n += yymsp[-7].minor.yy0.n; setCreatedTableName(pInfo, &yymsp[-8].minor.yy0, &yymsp[-9].minor.yy0); } -#line 3185 "sql.c" +#line 3336 "src/query/inc/sql.c" yymsp[-9].minor.yy272 = yylhsminor.yy272; break; - case 146: /* create_from_stable ::= ifnotexists ids cpxName USING ids cpxName TAGS LP tagitemlist RP */ -#line 398 "sql.y" + case 147: /* create_from_stable ::= ifnotexists ids cpxName USING ids cpxName TAGS LP tagitemlist RP */ +#line 401 "src/query/inc/sql.y" { yymsp[-5].minor.yy0.n += yymsp[-4].minor.yy0.n; yymsp[-8].minor.yy0.n += yymsp[-7].minor.yy0.n; yylhsminor.yy96 = createNewChildTableInfo(&yymsp[-5].minor.yy0, NULL, yymsp[-1].minor.yy131, &yymsp[-8].minor.yy0, &yymsp[-9].minor.yy0); } -#line 3195 "sql.c" +#line 3346 "src/query/inc/sql.c" yymsp[-9].minor.yy96 = yylhsminor.yy96; break; - case 147: /* create_from_stable ::= ifnotexists ids cpxName USING ids cpxName LP tagNamelist RP TAGS LP tagitemlist RP */ -#line 404 "sql.y" + case 148: /* create_from_stable ::= ifnotexists ids cpxName USING ids cpxName LP tagNamelist RP TAGS LP tagitemlist RP */ +#line 407 "src/query/inc/sql.y" { yymsp[-8].minor.yy0.n += yymsp[-7].minor.yy0.n; yymsp[-11].minor.yy0.n += yymsp[-10].minor.yy0.n; yylhsminor.yy96 = createNewChildTableInfo(&yymsp[-8].minor.yy0, yymsp[-5].minor.yy131, yymsp[-1].minor.yy131, &yymsp[-11].minor.yy0, &yymsp[-12].minor.yy0); } -#line 3205 "sql.c" +#line 3356 "src/query/inc/sql.c" yymsp[-12].minor.yy96 = yylhsminor.yy96; break; - case 148: /* tagNamelist ::= tagNamelist COMMA ids */ -#line 412 "sql.y" + case 149: /* tagNamelist ::= tagNamelist COMMA ids */ +#line 415 "src/query/inc/sql.y" {taosArrayPush(yymsp[-2].minor.yy131, &yymsp[0].minor.yy0); yylhsminor.yy131 = yymsp[-2].minor.yy131; } -#line 3211 "sql.c" +#line 3362 "src/query/inc/sql.c" yymsp[-2].minor.yy131 = yylhsminor.yy131; break; - case 149: /* tagNamelist ::= ids */ -#line 413 "sql.y" + case 150: /* tagNamelist ::= ids */ +#line 416 "src/query/inc/sql.y" {yylhsminor.yy131 = taosArrayInit(4, sizeof(SStrToken)); taosArrayPush(yylhsminor.yy131, &yymsp[0].minor.yy0);} -#line 3217 "sql.c" +#line 3368 "src/query/inc/sql.c" yymsp[0].minor.yy131 = yylhsminor.yy131; break; - case 150: /* create_table_args ::= ifnotexists ids cpxName AS select */ -#line 417 "sql.y" + case 151: /* create_table_args ::= ifnotexists ids cpxName AS select */ +#line 420 "src/query/inc/sql.y" { yylhsminor.yy272 = tSetCreateTableInfo(NULL, NULL, yymsp[0].minor.yy256, TSQL_CREATE_STREAM); setSqlInfo(pInfo, yylhsminor.yy272, NULL, TSDB_SQL_CREATE_TABLE); @@ -3225,254 +3377,254 @@ static YYACTIONTYPE yy_reduce( yymsp[-3].minor.yy0.n += yymsp[-2].minor.yy0.n; setCreatedTableName(pInfo, &yymsp[-3].minor.yy0, &yymsp[-4].minor.yy0); } -#line 3229 "sql.c" +#line 3380 "src/query/inc/sql.c" yymsp[-4].minor.yy272 = yylhsminor.yy272; break; - case 151: /* columnlist ::= columnlist COMMA column */ -#line 428 "sql.y" + case 152: /* columnlist ::= columnlist COMMA column */ +#line 431 "src/query/inc/sql.y" {taosArrayPush(yymsp[-2].minor.yy131, &yymsp[0].minor.yy163); yylhsminor.yy131 = yymsp[-2].minor.yy131; } -#line 3235 "sql.c" +#line 3386 "src/query/inc/sql.c" yymsp[-2].minor.yy131 = yylhsminor.yy131; break; - case 152: /* columnlist ::= column */ -#line 429 "sql.y" + case 153: /* columnlist ::= column */ +#line 432 "src/query/inc/sql.y" {yylhsminor.yy131 = taosArrayInit(4, sizeof(TAOS_FIELD)); taosArrayPush(yylhsminor.yy131, &yymsp[0].minor.yy163);} -#line 3241 "sql.c" +#line 3392 "src/query/inc/sql.c" yymsp[0].minor.yy131 = yylhsminor.yy131; break; - case 153: /* column ::= ids typename */ -#line 433 "sql.y" + case 154: /* column ::= ids typename */ +#line 436 "src/query/inc/sql.y" { tSetColumnInfo(&yylhsminor.yy163, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy163); } -#line 3249 "sql.c" +#line 3400 "src/query/inc/sql.c" yymsp[-1].minor.yy163 = yylhsminor.yy163; break; - case 160: /* tagitem ::= NULL */ -#line 448 "sql.y" + case 161: /* tagitem ::= NULL */ +#line 451 "src/query/inc/sql.y" { yymsp[0].minor.yy0.type = 0; tVariantCreate(&yylhsminor.yy516, &yymsp[0].minor.yy0); } -#line 3255 "sql.c" +#line 3406 "src/query/inc/sql.c" yymsp[0].minor.yy516 = yylhsminor.yy516; break; - case 161: /* tagitem ::= NOW */ -#line 449 "sql.y" + case 162: /* tagitem ::= NOW */ +#line 452 "src/query/inc/sql.y" { yymsp[0].minor.yy0.type = TSDB_DATA_TYPE_TIMESTAMP; tVariantCreate(&yylhsminor.yy516, &yymsp[0].minor.yy0);} -#line 3261 "sql.c" +#line 3412 "src/query/inc/sql.c" yymsp[0].minor.yy516 = yylhsminor.yy516; 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); -#line 451 "sql.y" + 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); +#line 454 "src/query/inc/sql.y" { 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.yy516, &yymsp[-1].minor.yy0); } -#line 3275 "sql.c" +#line 3426 "src/query/inc/sql.c" yymsp[-1].minor.yy516 = yylhsminor.yy516; 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 */ -#line 482 "sql.y" + case 167: /* 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 */ +#line 485 "src/query/inc/sql.y" { yylhsminor.yy256 = tSetQuerySqlNode(&yymsp[-13].minor.yy0, yymsp[-12].minor.yy131, yymsp[-11].minor.yy544, yymsp[-10].minor.yy46, yymsp[-4].minor.yy131, yymsp[-2].minor.yy131, &yymsp[-9].minor.yy530, &yymsp[-7].minor.yy39, &yymsp[-6].minor.yy538, &yymsp[-8].minor.yy0, yymsp[-5].minor.yy131, &yymsp[0].minor.yy284, &yymsp[-1].minor.yy284, yymsp[-3].minor.yy46); } -#line 3283 "sql.c" +#line 3434 "src/query/inc/sql.c" yymsp[-13].minor.yy256 = yylhsminor.yy256; break; - case 167: /* select ::= LP select RP */ -#line 486 "sql.y" + case 168: /* select ::= LP select RP */ +#line 489 "src/query/inc/sql.y" {yymsp[-2].minor.yy256 = yymsp[-1].minor.yy256;} -#line 3289 "sql.c" +#line 3440 "src/query/inc/sql.c" break; - case 168: /* union ::= select */ -#line 490 "sql.y" + case 169: /* union ::= select */ +#line 493 "src/query/inc/sql.y" { yylhsminor.yy131 = setSubclause(NULL, yymsp[0].minor.yy256); } -#line 3294 "sql.c" +#line 3445 "src/query/inc/sql.c" yymsp[0].minor.yy131 = yylhsminor.yy131; break; - case 169: /* union ::= union UNION ALL select */ -#line 491 "sql.y" + case 170: /* union ::= union UNION ALL select */ +#line 494 "src/query/inc/sql.y" { yylhsminor.yy131 = appendSelectClause(yymsp[-3].minor.yy131, yymsp[0].minor.yy256); } -#line 3300 "sql.c" +#line 3451 "src/query/inc/sql.c" yymsp[-3].minor.yy131 = yylhsminor.yy131; break; - case 170: /* cmd ::= union */ -#line 493 "sql.y" + case 171: /* cmd ::= union */ +#line 496 "src/query/inc/sql.y" { setSqlInfo(pInfo, yymsp[0].minor.yy131, NULL, TSDB_SQL_SELECT); } -#line 3306 "sql.c" +#line 3457 "src/query/inc/sql.c" break; - case 171: /* select ::= SELECT selcollist */ -#line 500 "sql.y" + case 172: /* select ::= SELECT selcollist */ +#line 503 "src/query/inc/sql.y" { yylhsminor.yy256 = tSetQuerySqlNode(&yymsp[-1].minor.yy0, yymsp[0].minor.yy131, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); } -#line 3313 "sql.c" +#line 3464 "src/query/inc/sql.c" yymsp[-1].minor.yy256 = yylhsminor.yy256; break; - case 172: /* sclp ::= selcollist COMMA */ -#line 512 "sql.y" + case 173: /* sclp ::= selcollist COMMA */ +#line 515 "src/query/inc/sql.y" {yylhsminor.yy131 = yymsp[-1].minor.yy131;} -#line 3319 "sql.c" +#line 3470 "src/query/inc/sql.c" yymsp[-1].minor.yy131 = yylhsminor.yy131; break; - case 173: /* sclp ::= */ - case 203: /* orderby_opt ::= */ yytestcase(yyruleno==203); -#line 513 "sql.y" + case 174: /* sclp ::= */ + case 204: /* orderby_opt ::= */ yytestcase(yyruleno==204); +#line 516 "src/query/inc/sql.y" {yymsp[1].minor.yy131 = 0;} -#line 3326 "sql.c" +#line 3477 "src/query/inc/sql.c" break; - case 174: /* selcollist ::= sclp distinct expr as */ -#line 514 "sql.y" + case 175: /* selcollist ::= sclp distinct expr as */ +#line 517 "src/query/inc/sql.y" { yylhsminor.yy131 = tSqlExprListAppend(yymsp[-3].minor.yy131, yymsp[-1].minor.yy46, yymsp[-2].minor.yy0.n? &yymsp[-2].minor.yy0:0, yymsp[0].minor.yy0.n?&yymsp[0].minor.yy0:0); } -#line 3333 "sql.c" +#line 3484 "src/query/inc/sql.c" yymsp[-3].minor.yy131 = yylhsminor.yy131; break; - case 175: /* selcollist ::= sclp STAR */ -#line 518 "sql.y" + case 176: /* selcollist ::= sclp STAR */ +#line 521 "src/query/inc/sql.y" { tSqlExpr *pNode = tSqlExprCreateIdValue(NULL, TK_ALL); yylhsminor.yy131 = tSqlExprListAppend(yymsp[-1].minor.yy131, pNode, 0, 0); } -#line 3342 "sql.c" +#line 3493 "src/query/inc/sql.c" yymsp[-1].minor.yy131 = yylhsminor.yy131; break; - case 176: /* as ::= AS ids */ -#line 526 "sql.y" + case 177: /* as ::= AS ids */ +#line 529 "src/query/inc/sql.y" { yymsp[-1].minor.yy0 = yymsp[0].minor.yy0; } -#line 3348 "sql.c" +#line 3499 "src/query/inc/sql.c" break; - case 177: /* as ::= ids */ -#line 527 "sql.y" + case 178: /* as ::= ids */ +#line 530 "src/query/inc/sql.y" { yylhsminor.yy0 = yymsp[0].minor.yy0; } -#line 3353 "sql.c" +#line 3504 "src/query/inc/sql.c" yymsp[0].minor.yy0 = yylhsminor.yy0; break; - case 178: /* as ::= */ -#line 528 "sql.y" + case 179: /* as ::= */ +#line 531 "src/query/inc/sql.y" { yymsp[1].minor.yy0.n = 0; } -#line 3359 "sql.c" +#line 3510 "src/query/inc/sql.c" break; - case 179: /* distinct ::= DISTINCT */ -#line 531 "sql.y" + case 180: /* distinct ::= DISTINCT */ +#line 534 "src/query/inc/sql.y" { yylhsminor.yy0 = yymsp[0].minor.yy0; } -#line 3364 "sql.c" +#line 3515 "src/query/inc/sql.c" yymsp[0].minor.yy0 = yylhsminor.yy0; break; - case 181: /* from ::= FROM tablelist */ - case 182: /* from ::= FROM sub */ yytestcase(yyruleno==182); -#line 537 "sql.y" + case 182: /* from ::= FROM tablelist */ + case 183: /* from ::= FROM sub */ yytestcase(yyruleno==183); +#line 540 "src/query/inc/sql.y" {yymsp[-1].minor.yy544 = yymsp[0].minor.yy544;} -#line 3371 "sql.c" +#line 3522 "src/query/inc/sql.c" break; - case 183: /* sub ::= LP union RP */ -#line 542 "sql.y" + case 184: /* sub ::= LP union RP */ +#line 545 "src/query/inc/sql.y" {yymsp[-2].minor.yy544 = addSubqueryElem(NULL, yymsp[-1].minor.yy131, NULL);} -#line 3376 "sql.c" +#line 3527 "src/query/inc/sql.c" break; - case 184: /* sub ::= LP union RP ids */ -#line 543 "sql.y" + case 185: /* sub ::= LP union RP ids */ +#line 546 "src/query/inc/sql.y" {yymsp[-3].minor.yy544 = addSubqueryElem(NULL, yymsp[-2].minor.yy131, &yymsp[0].minor.yy0);} -#line 3381 "sql.c" +#line 3532 "src/query/inc/sql.c" break; - case 185: /* sub ::= sub COMMA LP union RP ids */ -#line 544 "sql.y" + case 186: /* sub ::= sub COMMA LP union RP ids */ +#line 547 "src/query/inc/sql.y" {yylhsminor.yy544 = addSubqueryElem(yymsp[-5].minor.yy544, yymsp[-2].minor.yy131, &yymsp[0].minor.yy0);} -#line 3386 "sql.c" +#line 3537 "src/query/inc/sql.c" yymsp[-5].minor.yy544 = yylhsminor.yy544; break; - case 186: /* tablelist ::= ids cpxName */ -#line 548 "sql.y" + case 187: /* tablelist ::= ids cpxName */ +#line 551 "src/query/inc/sql.y" { yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yylhsminor.yy544 = setTableNameList(NULL, &yymsp[-1].minor.yy0, NULL); } -#line 3395 "sql.c" +#line 3546 "src/query/inc/sql.c" yymsp[-1].minor.yy544 = yylhsminor.yy544; break; - case 187: /* tablelist ::= ids cpxName ids */ -#line 553 "sql.y" + case 188: /* tablelist ::= ids cpxName ids */ +#line 556 "src/query/inc/sql.y" { yymsp[-2].minor.yy0.n += yymsp[-1].minor.yy0.n; yylhsminor.yy544 = setTableNameList(NULL, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } -#line 3404 "sql.c" +#line 3555 "src/query/inc/sql.c" yymsp[-2].minor.yy544 = yylhsminor.yy544; break; - case 188: /* tablelist ::= tablelist COMMA ids cpxName */ -#line 558 "sql.y" + case 189: /* tablelist ::= tablelist COMMA ids cpxName */ +#line 561 "src/query/inc/sql.y" { yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yylhsminor.yy544 = setTableNameList(yymsp[-3].minor.yy544, &yymsp[-1].minor.yy0, NULL); } -#line 3413 "sql.c" +#line 3564 "src/query/inc/sql.c" yymsp[-3].minor.yy544 = yylhsminor.yy544; break; - case 189: /* tablelist ::= tablelist COMMA ids cpxName ids */ -#line 563 "sql.y" + case 190: /* tablelist ::= tablelist COMMA ids cpxName ids */ +#line 566 "src/query/inc/sql.y" { yymsp[-2].minor.yy0.n += yymsp[-1].minor.yy0.n; yylhsminor.yy544 = setTableNameList(yymsp[-4].minor.yy544, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } -#line 3422 "sql.c" +#line 3573 "src/query/inc/sql.c" yymsp[-4].minor.yy544 = yylhsminor.yy544; break; - case 190: /* tmvar ::= VARIABLE */ -#line 570 "sql.y" + case 191: /* tmvar ::= VARIABLE */ +#line 573 "src/query/inc/sql.y" {yylhsminor.yy0 = yymsp[0].minor.yy0;} -#line 3428 "sql.c" +#line 3579 "src/query/inc/sql.c" yymsp[0].minor.yy0 = yylhsminor.yy0; break; - case 191: /* interval_opt ::= INTERVAL LP tmvar RP */ -#line 573 "sql.y" + case 192: /* interval_opt ::= INTERVAL LP tmvar RP */ +#line 576 "src/query/inc/sql.y" {yymsp[-3].minor.yy530.interval = yymsp[-1].minor.yy0; yymsp[-3].minor.yy530.offset.n = 0;} -#line 3434 "sql.c" +#line 3585 "src/query/inc/sql.c" break; - case 192: /* interval_opt ::= INTERVAL LP tmvar COMMA tmvar RP */ -#line 574 "sql.y" + case 193: /* interval_opt ::= INTERVAL LP tmvar COMMA tmvar RP */ +#line 577 "src/query/inc/sql.y" {yymsp[-5].minor.yy530.interval = yymsp[-3].minor.yy0; yymsp[-5].minor.yy530.offset = yymsp[-1].minor.yy0;} -#line 3439 "sql.c" +#line 3590 "src/query/inc/sql.c" break; - case 193: /* interval_opt ::= */ -#line 575 "sql.y" + case 194: /* interval_opt ::= */ +#line 578 "src/query/inc/sql.y" {memset(&yymsp[1].minor.yy530, 0, sizeof(yymsp[1].minor.yy530));} -#line 3444 "sql.c" +#line 3595 "src/query/inc/sql.c" break; - case 194: /* session_option ::= */ -#line 578 "sql.y" + case 195: /* session_option ::= */ +#line 581 "src/query/inc/sql.y" {yymsp[1].minor.yy39.col.n = 0; yymsp[1].minor.yy39.gap.n = 0;} -#line 3449 "sql.c" +#line 3600 "src/query/inc/sql.c" break; - case 195: /* session_option ::= SESSION LP ids cpxName COMMA tmvar RP */ -#line 579 "sql.y" + case 196: /* session_option ::= SESSION LP ids cpxName COMMA tmvar RP */ +#line 582 "src/query/inc/sql.y" { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; yymsp[-6].minor.yy39.col = yymsp[-4].minor.yy0; yymsp[-6].minor.yy39.gap = yymsp[-1].minor.yy0; } -#line 3458 "sql.c" +#line 3609 "src/query/inc/sql.c" break; - case 196: /* windowstate_option ::= */ -#line 585 "sql.y" + case 197: /* windowstate_option ::= */ +#line 588 "src/query/inc/sql.y" { yymsp[1].minor.yy538.col.n = 0; yymsp[1].minor.yy538.col.z = NULL;} -#line 3463 "sql.c" +#line 3614 "src/query/inc/sql.c" break; - case 197: /* windowstate_option ::= STATE_WINDOW LP ids RP */ -#line 586 "sql.y" + case 198: /* windowstate_option ::= STATE_WINDOW LP ids RP */ +#line 589 "src/query/inc/sql.y" { yymsp[-3].minor.yy538.col = yymsp[-1].minor.yy0; } -#line 3468 "sql.c" +#line 3619 "src/query/inc/sql.c" break; - case 198: /* fill_opt ::= */ -#line 590 "sql.y" + case 199: /* fill_opt ::= */ +#line 593 "src/query/inc/sql.y" { yymsp[1].minor.yy131 = 0; } -#line 3473 "sql.c" +#line 3624 "src/query/inc/sql.c" break; - case 199: /* fill_opt ::= FILL LP ID COMMA tagitemlist RP */ -#line 591 "sql.y" + case 200: /* fill_opt ::= FILL LP ID COMMA tagitemlist RP */ +#line 594 "src/query/inc/sql.y" { tVariant A = {0}; toTSDBType(yymsp[-3].minor.yy0.type); @@ -3481,390 +3633,390 @@ static YYACTIONTYPE yy_reduce( tVariantListInsert(yymsp[-1].minor.yy131, &A, -1, 0); yymsp[-5].minor.yy131 = yymsp[-1].minor.yy131; } -#line 3485 "sql.c" +#line 3636 "src/query/inc/sql.c" break; - case 200: /* fill_opt ::= FILL LP ID RP */ -#line 600 "sql.y" + case 201: /* fill_opt ::= FILL LP ID RP */ +#line 603 "src/query/inc/sql.y" { toTSDBType(yymsp[-1].minor.yy0.type); yymsp[-3].minor.yy131 = tVariantListAppendToken(NULL, &yymsp[-1].minor.yy0, -1); } -#line 3493 "sql.c" +#line 3644 "src/query/inc/sql.c" break; - case 201: /* sliding_opt ::= SLIDING LP tmvar RP */ -#line 606 "sql.y" + case 202: /* sliding_opt ::= SLIDING LP tmvar RP */ +#line 609 "src/query/inc/sql.y" {yymsp[-3].minor.yy0 = yymsp[-1].minor.yy0; } -#line 3498 "sql.c" +#line 3649 "src/query/inc/sql.c" break; - case 202: /* sliding_opt ::= */ -#line 607 "sql.y" + case 203: /* sliding_opt ::= */ +#line 610 "src/query/inc/sql.y" {yymsp[1].minor.yy0.n = 0; yymsp[1].minor.yy0.z = NULL; yymsp[1].minor.yy0.type = 0; } -#line 3503 "sql.c" +#line 3654 "src/query/inc/sql.c" break; - case 204: /* orderby_opt ::= ORDER BY sortlist */ -#line 619 "sql.y" + case 205: /* orderby_opt ::= ORDER BY sortlist */ +#line 622 "src/query/inc/sql.y" {yymsp[-2].minor.yy131 = yymsp[0].minor.yy131;} -#line 3508 "sql.c" +#line 3659 "src/query/inc/sql.c" break; - case 205: /* sortlist ::= sortlist COMMA item sortorder */ -#line 621 "sql.y" + case 206: /* sortlist ::= sortlist COMMA item sortorder */ +#line 624 "src/query/inc/sql.y" { yylhsminor.yy131 = tVariantListAppend(yymsp[-3].minor.yy131, &yymsp[-1].minor.yy516, yymsp[0].minor.yy43); } -#line 3515 "sql.c" +#line 3666 "src/query/inc/sql.c" yymsp[-3].minor.yy131 = yylhsminor.yy131; break; - case 206: /* sortlist ::= item sortorder */ -#line 625 "sql.y" + case 207: /* sortlist ::= item sortorder */ +#line 628 "src/query/inc/sql.y" { yylhsminor.yy131 = tVariantListAppend(NULL, &yymsp[-1].minor.yy516, yymsp[0].minor.yy43); } -#line 3523 "sql.c" +#line 3674 "src/query/inc/sql.c" yymsp[-1].minor.yy131 = yylhsminor.yy131; break; - case 207: /* item ::= ids cpxName */ -#line 630 "sql.y" + case 208: /* item ::= ids cpxName */ +#line 633 "src/query/inc/sql.y" { toTSDBType(yymsp[-1].minor.yy0.type); yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; tVariantCreate(&yylhsminor.yy516, &yymsp[-1].minor.yy0); } -#line 3534 "sql.c" +#line 3685 "src/query/inc/sql.c" yymsp[-1].minor.yy516 = yylhsminor.yy516; break; - case 208: /* sortorder ::= ASC */ -#line 638 "sql.y" + case 209: /* sortorder ::= ASC */ +#line 641 "src/query/inc/sql.y" { yymsp[0].minor.yy43 = TSDB_ORDER_ASC; } -#line 3540 "sql.c" +#line 3691 "src/query/inc/sql.c" break; - case 209: /* sortorder ::= DESC */ -#line 639 "sql.y" + case 210: /* sortorder ::= DESC */ +#line 642 "src/query/inc/sql.y" { yymsp[0].minor.yy43 = TSDB_ORDER_DESC;} -#line 3545 "sql.c" +#line 3696 "src/query/inc/sql.c" break; - case 210: /* sortorder ::= */ -#line 640 "sql.y" + case 211: /* sortorder ::= */ +#line 643 "src/query/inc/sql.y" { yymsp[1].minor.yy43 = TSDB_ORDER_ASC; } -#line 3550 "sql.c" +#line 3701 "src/query/inc/sql.c" break; - case 211: /* groupby_opt ::= */ -#line 648 "sql.y" + case 212: /* groupby_opt ::= */ +#line 651 "src/query/inc/sql.y" { yymsp[1].minor.yy131 = 0;} -#line 3555 "sql.c" +#line 3706 "src/query/inc/sql.c" break; - case 212: /* groupby_opt ::= GROUP BY grouplist */ -#line 649 "sql.y" + case 213: /* groupby_opt ::= GROUP BY grouplist */ +#line 652 "src/query/inc/sql.y" { yymsp[-2].minor.yy131 = yymsp[0].minor.yy131;} -#line 3560 "sql.c" +#line 3711 "src/query/inc/sql.c" break; - case 213: /* grouplist ::= grouplist COMMA item */ -#line 651 "sql.y" + case 214: /* grouplist ::= grouplist COMMA item */ +#line 654 "src/query/inc/sql.y" { yylhsminor.yy131 = tVariantListAppend(yymsp[-2].minor.yy131, &yymsp[0].minor.yy516, -1); } -#line 3567 "sql.c" +#line 3718 "src/query/inc/sql.c" yymsp[-2].minor.yy131 = yylhsminor.yy131; break; - case 214: /* grouplist ::= item */ -#line 655 "sql.y" + case 215: /* grouplist ::= item */ +#line 658 "src/query/inc/sql.y" { yylhsminor.yy131 = tVariantListAppend(NULL, &yymsp[0].minor.yy516, -1); } -#line 3575 "sql.c" +#line 3726 "src/query/inc/sql.c" yymsp[0].minor.yy131 = yylhsminor.yy131; break; - case 215: /* having_opt ::= */ - case 225: /* where_opt ::= */ yytestcase(yyruleno==225); - case 267: /* expritem ::= */ yytestcase(yyruleno==267); -#line 662 "sql.y" + case 216: /* having_opt ::= */ + case 226: /* where_opt ::= */ yytestcase(yyruleno==226); + case 268: /* expritem ::= */ yytestcase(yyruleno==268); +#line 665 "src/query/inc/sql.y" {yymsp[1].minor.yy46 = 0;} -#line 3583 "sql.c" +#line 3734 "src/query/inc/sql.c" break; - case 216: /* having_opt ::= HAVING expr */ - case 226: /* where_opt ::= WHERE expr */ yytestcase(yyruleno==226); -#line 663 "sql.y" + case 217: /* having_opt ::= HAVING expr */ + case 227: /* where_opt ::= WHERE expr */ yytestcase(yyruleno==227); +#line 666 "src/query/inc/sql.y" {yymsp[-1].minor.yy46 = yymsp[0].minor.yy46;} -#line 3589 "sql.c" +#line 3740 "src/query/inc/sql.c" break; - case 217: /* limit_opt ::= */ - case 221: /* slimit_opt ::= */ yytestcase(yyruleno==221); -#line 667 "sql.y" + case 218: /* limit_opt ::= */ + case 222: /* slimit_opt ::= */ yytestcase(yyruleno==222); +#line 670 "src/query/inc/sql.y" {yymsp[1].minor.yy284.limit = -1; yymsp[1].minor.yy284.offset = 0;} -#line 3595 "sql.c" +#line 3746 "src/query/inc/sql.c" break; - case 218: /* limit_opt ::= LIMIT signed */ - case 222: /* slimit_opt ::= SLIMIT signed */ yytestcase(yyruleno==222); -#line 668 "sql.y" + case 219: /* limit_opt ::= LIMIT signed */ + case 223: /* slimit_opt ::= SLIMIT signed */ yytestcase(yyruleno==223); +#line 671 "src/query/inc/sql.y" {yymsp[-1].minor.yy284.limit = yymsp[0].minor.yy459; yymsp[-1].minor.yy284.offset = 0;} -#line 3601 "sql.c" +#line 3752 "src/query/inc/sql.c" break; - case 219: /* limit_opt ::= LIMIT signed OFFSET signed */ -#line 670 "sql.y" + case 220: /* limit_opt ::= LIMIT signed OFFSET signed */ +#line 673 "src/query/inc/sql.y" { yymsp[-3].minor.yy284.limit = yymsp[-2].minor.yy459; yymsp[-3].minor.yy284.offset = yymsp[0].minor.yy459;} -#line 3606 "sql.c" +#line 3757 "src/query/inc/sql.c" break; - case 220: /* limit_opt ::= LIMIT signed COMMA signed */ -#line 672 "sql.y" + case 221: /* limit_opt ::= LIMIT signed COMMA signed */ +#line 675 "src/query/inc/sql.y" { yymsp[-3].minor.yy284.limit = yymsp[0].minor.yy459; yymsp[-3].minor.yy284.offset = yymsp[-2].minor.yy459;} -#line 3611 "sql.c" +#line 3762 "src/query/inc/sql.c" break; - case 223: /* slimit_opt ::= SLIMIT signed SOFFSET signed */ -#line 678 "sql.y" + case 224: /* slimit_opt ::= SLIMIT signed SOFFSET signed */ +#line 681 "src/query/inc/sql.y" {yymsp[-3].minor.yy284.limit = yymsp[-2].minor.yy459; yymsp[-3].minor.yy284.offset = yymsp[0].minor.yy459;} -#line 3616 "sql.c" +#line 3767 "src/query/inc/sql.c" break; - case 224: /* slimit_opt ::= SLIMIT signed COMMA signed */ -#line 680 "sql.y" + case 225: /* slimit_opt ::= SLIMIT signed COMMA signed */ +#line 683 "src/query/inc/sql.y" {yymsp[-3].minor.yy284.limit = yymsp[0].minor.yy459; yymsp[-3].minor.yy284.offset = yymsp[-2].minor.yy459;} -#line 3621 "sql.c" +#line 3772 "src/query/inc/sql.c" break; - case 227: /* expr ::= LP expr RP */ -#line 693 "sql.y" + case 228: /* expr ::= LP expr RP */ +#line 696 "src/query/inc/sql.y" {yylhsminor.yy46 = yymsp[-1].minor.yy46; yylhsminor.yy46->exprToken.z = yymsp[-2].minor.yy0.z; yylhsminor.yy46->exprToken.n = (yymsp[0].minor.yy0.z - yymsp[-2].minor.yy0.z + 1);} -#line 3626 "sql.c" +#line 3777 "src/query/inc/sql.c" yymsp[-2].minor.yy46 = yylhsminor.yy46; break; - case 228: /* expr ::= ID */ -#line 695 "sql.y" + case 229: /* expr ::= ID */ +#line 698 "src/query/inc/sql.y" { yylhsminor.yy46 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_ID);} -#line 3632 "sql.c" +#line 3783 "src/query/inc/sql.c" yymsp[0].minor.yy46 = yylhsminor.yy46; break; - case 229: /* expr ::= ID DOT ID */ -#line 696 "sql.y" + case 230: /* expr ::= ID DOT ID */ +#line 699 "src/query/inc/sql.y" { yymsp[-2].minor.yy0.n += (1+yymsp[0].minor.yy0.n); yylhsminor.yy46 = tSqlExprCreateIdValue(&yymsp[-2].minor.yy0, TK_ID);} -#line 3638 "sql.c" +#line 3789 "src/query/inc/sql.c" yymsp[-2].minor.yy46 = yylhsminor.yy46; break; - case 230: /* expr ::= ID DOT STAR */ -#line 697 "sql.y" + case 231: /* expr ::= ID DOT STAR */ +#line 700 "src/query/inc/sql.y" { yymsp[-2].minor.yy0.n += (1+yymsp[0].minor.yy0.n); yylhsminor.yy46 = tSqlExprCreateIdValue(&yymsp[-2].minor.yy0, TK_ALL);} -#line 3644 "sql.c" +#line 3795 "src/query/inc/sql.c" yymsp[-2].minor.yy46 = yylhsminor.yy46; break; - case 231: /* expr ::= INTEGER */ -#line 699 "sql.y" + case 232: /* expr ::= INTEGER */ +#line 702 "src/query/inc/sql.y" { yylhsminor.yy46 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_INTEGER);} -#line 3650 "sql.c" +#line 3801 "src/query/inc/sql.c" yymsp[0].minor.yy46 = yylhsminor.yy46; break; - case 232: /* expr ::= MINUS INTEGER */ - case 233: /* expr ::= PLUS INTEGER */ yytestcase(yyruleno==233); -#line 700 "sql.y" + case 233: /* expr ::= MINUS INTEGER */ + case 234: /* expr ::= PLUS INTEGER */ yytestcase(yyruleno==234); +#line 703 "src/query/inc/sql.y" { yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yymsp[-1].minor.yy0.type = TK_INTEGER; yylhsminor.yy46 = tSqlExprCreateIdValue(&yymsp[-1].minor.yy0, TK_INTEGER);} -#line 3657 "sql.c" +#line 3808 "src/query/inc/sql.c" yymsp[-1].minor.yy46 = yylhsminor.yy46; break; - case 234: /* expr ::= FLOAT */ -#line 702 "sql.y" + case 235: /* expr ::= FLOAT */ +#line 705 "src/query/inc/sql.y" { yylhsminor.yy46 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_FLOAT);} -#line 3663 "sql.c" +#line 3814 "src/query/inc/sql.c" yymsp[0].minor.yy46 = yylhsminor.yy46; break; - case 235: /* expr ::= MINUS FLOAT */ - case 236: /* expr ::= PLUS FLOAT */ yytestcase(yyruleno==236); -#line 703 "sql.y" + case 236: /* expr ::= MINUS FLOAT */ + case 237: /* expr ::= PLUS FLOAT */ yytestcase(yyruleno==237); +#line 706 "src/query/inc/sql.y" { yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yymsp[-1].minor.yy0.type = TK_FLOAT; yylhsminor.yy46 = tSqlExprCreateIdValue(&yymsp[-1].minor.yy0, TK_FLOAT);} -#line 3670 "sql.c" +#line 3821 "src/query/inc/sql.c" yymsp[-1].minor.yy46 = yylhsminor.yy46; break; - case 237: /* expr ::= STRING */ -#line 705 "sql.y" + case 238: /* expr ::= STRING */ +#line 708 "src/query/inc/sql.y" { yylhsminor.yy46 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_STRING);} -#line 3676 "sql.c" +#line 3827 "src/query/inc/sql.c" yymsp[0].minor.yy46 = yylhsminor.yy46; break; - case 238: /* expr ::= NOW */ -#line 706 "sql.y" + case 239: /* expr ::= NOW */ +#line 709 "src/query/inc/sql.y" { yylhsminor.yy46 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_NOW); } -#line 3682 "sql.c" +#line 3833 "src/query/inc/sql.c" yymsp[0].minor.yy46 = yylhsminor.yy46; break; - case 239: /* expr ::= VARIABLE */ -#line 707 "sql.y" + case 240: /* expr ::= VARIABLE */ +#line 710 "src/query/inc/sql.y" { yylhsminor.yy46 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_VARIABLE);} -#line 3688 "sql.c" +#line 3839 "src/query/inc/sql.c" yymsp[0].minor.yy46 = yylhsminor.yy46; break; - case 240: /* expr ::= PLUS VARIABLE */ - case 241: /* expr ::= MINUS VARIABLE */ yytestcase(yyruleno==241); -#line 708 "sql.y" + case 241: /* expr ::= PLUS VARIABLE */ + case 242: /* expr ::= MINUS VARIABLE */ yytestcase(yyruleno==242); +#line 711 "src/query/inc/sql.y" { yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yymsp[-1].minor.yy0.type = TK_VARIABLE; yylhsminor.yy46 = tSqlExprCreateIdValue(&yymsp[-1].minor.yy0, TK_VARIABLE);} -#line 3695 "sql.c" +#line 3846 "src/query/inc/sql.c" yymsp[-1].minor.yy46 = yylhsminor.yy46; break; - case 242: /* expr ::= BOOL */ -#line 710 "sql.y" + case 243: /* expr ::= BOOL */ +#line 713 "src/query/inc/sql.y" { yylhsminor.yy46 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_BOOL);} -#line 3701 "sql.c" +#line 3852 "src/query/inc/sql.c" yymsp[0].minor.yy46 = yylhsminor.yy46; break; - case 243: /* expr ::= NULL */ -#line 711 "sql.y" + case 244: /* expr ::= NULL */ +#line 714 "src/query/inc/sql.y" { yylhsminor.yy46 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_NULL);} -#line 3707 "sql.c" +#line 3858 "src/query/inc/sql.c" yymsp[0].minor.yy46 = yylhsminor.yy46; break; - case 244: /* expr ::= ID LP exprlist RP */ -#line 714 "sql.y" + case 245: /* expr ::= ID LP exprlist RP */ +#line 717 "src/query/inc/sql.y" { tStrTokenAppend(pInfo->funcs, &yymsp[-3].minor.yy0); yylhsminor.yy46 = tSqlExprCreateFunction(yymsp[-1].minor.yy131, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, yymsp[-3].minor.yy0.type); } -#line 3713 "sql.c" +#line 3864 "src/query/inc/sql.c" yymsp[-3].minor.yy46 = yylhsminor.yy46; break; - case 245: /* expr ::= ID LP STAR RP */ -#line 717 "sql.y" + case 246: /* expr ::= ID LP STAR RP */ +#line 720 "src/query/inc/sql.y" { tStrTokenAppend(pInfo->funcs, &yymsp[-3].minor.yy0); yylhsminor.yy46 = tSqlExprCreateFunction(NULL, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, yymsp[-3].minor.yy0.type); } -#line 3719 "sql.c" +#line 3870 "src/query/inc/sql.c" yymsp[-3].minor.yy46 = yylhsminor.yy46; break; - case 246: /* expr ::= expr IS NULL */ -#line 720 "sql.y" + case 247: /* expr ::= expr IS NULL */ +#line 723 "src/query/inc/sql.y" {yylhsminor.yy46 = tSqlExprCreate(yymsp[-2].minor.yy46, NULL, TK_ISNULL);} -#line 3725 "sql.c" +#line 3876 "src/query/inc/sql.c" yymsp[-2].minor.yy46 = yylhsminor.yy46; break; - case 247: /* expr ::= expr IS NOT NULL */ -#line 721 "sql.y" + case 248: /* expr ::= expr IS NOT NULL */ +#line 724 "src/query/inc/sql.y" {yylhsminor.yy46 = tSqlExprCreate(yymsp[-3].minor.yy46, NULL, TK_NOTNULL);} -#line 3731 "sql.c" +#line 3882 "src/query/inc/sql.c" yymsp[-3].minor.yy46 = yylhsminor.yy46; break; - case 248: /* expr ::= expr LT expr */ -#line 724 "sql.y" + case 249: /* expr ::= expr LT expr */ +#line 727 "src/query/inc/sql.y" {yylhsminor.yy46 = tSqlExprCreate(yymsp[-2].minor.yy46, yymsp[0].minor.yy46, TK_LT);} -#line 3737 "sql.c" +#line 3888 "src/query/inc/sql.c" yymsp[-2].minor.yy46 = yylhsminor.yy46; break; - case 249: /* expr ::= expr GT expr */ -#line 725 "sql.y" + case 250: /* expr ::= expr GT expr */ +#line 728 "src/query/inc/sql.y" {yylhsminor.yy46 = tSqlExprCreate(yymsp[-2].minor.yy46, yymsp[0].minor.yy46, TK_GT);} -#line 3743 "sql.c" +#line 3894 "src/query/inc/sql.c" yymsp[-2].minor.yy46 = yylhsminor.yy46; break; - case 250: /* expr ::= expr LE expr */ -#line 726 "sql.y" + case 251: /* expr ::= expr LE expr */ +#line 729 "src/query/inc/sql.y" {yylhsminor.yy46 = tSqlExprCreate(yymsp[-2].minor.yy46, yymsp[0].minor.yy46, TK_LE);} -#line 3749 "sql.c" +#line 3900 "src/query/inc/sql.c" yymsp[-2].minor.yy46 = yylhsminor.yy46; break; - case 251: /* expr ::= expr GE expr */ -#line 727 "sql.y" + case 252: /* expr ::= expr GE expr */ +#line 730 "src/query/inc/sql.y" {yylhsminor.yy46 = tSqlExprCreate(yymsp[-2].minor.yy46, yymsp[0].minor.yy46, TK_GE);} -#line 3755 "sql.c" +#line 3906 "src/query/inc/sql.c" yymsp[-2].minor.yy46 = yylhsminor.yy46; break; - case 252: /* expr ::= expr NE expr */ -#line 728 "sql.y" + case 253: /* expr ::= expr NE expr */ +#line 731 "src/query/inc/sql.y" {yylhsminor.yy46 = tSqlExprCreate(yymsp[-2].minor.yy46, yymsp[0].minor.yy46, TK_NE);} -#line 3761 "sql.c" +#line 3912 "src/query/inc/sql.c" yymsp[-2].minor.yy46 = yylhsminor.yy46; break; - case 253: /* expr ::= expr EQ expr */ -#line 729 "sql.y" + case 254: /* expr ::= expr EQ expr */ +#line 732 "src/query/inc/sql.y" {yylhsminor.yy46 = tSqlExprCreate(yymsp[-2].minor.yy46, yymsp[0].minor.yy46, TK_EQ);} -#line 3767 "sql.c" +#line 3918 "src/query/inc/sql.c" yymsp[-2].minor.yy46 = yylhsminor.yy46; break; - case 254: /* expr ::= expr BETWEEN expr AND expr */ -#line 731 "sql.y" + case 255: /* expr ::= expr BETWEEN expr AND expr */ +#line 734 "src/query/inc/sql.y" { tSqlExpr* X2 = tSqlExprClone(yymsp[-4].minor.yy46); yylhsminor.yy46 = tSqlExprCreate(tSqlExprCreate(yymsp[-4].minor.yy46, yymsp[-2].minor.yy46, TK_GE), tSqlExprCreate(X2, yymsp[0].minor.yy46, TK_LE), TK_AND);} -#line 3773 "sql.c" +#line 3924 "src/query/inc/sql.c" yymsp[-4].minor.yy46 = yylhsminor.yy46; break; - case 255: /* expr ::= expr AND expr */ -#line 733 "sql.y" + case 256: /* expr ::= expr AND expr */ +#line 736 "src/query/inc/sql.y" {yylhsminor.yy46 = tSqlExprCreate(yymsp[-2].minor.yy46, yymsp[0].minor.yy46, TK_AND);} -#line 3779 "sql.c" +#line 3930 "src/query/inc/sql.c" yymsp[-2].minor.yy46 = yylhsminor.yy46; break; - case 256: /* expr ::= expr OR expr */ -#line 734 "sql.y" + case 257: /* expr ::= expr OR expr */ +#line 737 "src/query/inc/sql.y" {yylhsminor.yy46 = tSqlExprCreate(yymsp[-2].minor.yy46, yymsp[0].minor.yy46, TK_OR); } -#line 3785 "sql.c" +#line 3936 "src/query/inc/sql.c" yymsp[-2].minor.yy46 = yylhsminor.yy46; break; - case 257: /* expr ::= expr PLUS expr */ -#line 737 "sql.y" + case 258: /* expr ::= expr PLUS expr */ +#line 740 "src/query/inc/sql.y" {yylhsminor.yy46 = tSqlExprCreate(yymsp[-2].minor.yy46, yymsp[0].minor.yy46, TK_PLUS); } -#line 3791 "sql.c" +#line 3942 "src/query/inc/sql.c" yymsp[-2].minor.yy46 = yylhsminor.yy46; break; - case 258: /* expr ::= expr MINUS expr */ -#line 738 "sql.y" + case 259: /* expr ::= expr MINUS expr */ +#line 741 "src/query/inc/sql.y" {yylhsminor.yy46 = tSqlExprCreate(yymsp[-2].minor.yy46, yymsp[0].minor.yy46, TK_MINUS); } -#line 3797 "sql.c" +#line 3948 "src/query/inc/sql.c" yymsp[-2].minor.yy46 = yylhsminor.yy46; break; - case 259: /* expr ::= expr STAR expr */ -#line 739 "sql.y" + case 260: /* expr ::= expr STAR expr */ +#line 742 "src/query/inc/sql.y" {yylhsminor.yy46 = tSqlExprCreate(yymsp[-2].minor.yy46, yymsp[0].minor.yy46, TK_STAR); } -#line 3803 "sql.c" +#line 3954 "src/query/inc/sql.c" yymsp[-2].minor.yy46 = yylhsminor.yy46; break; - case 260: /* expr ::= expr SLASH expr */ -#line 740 "sql.y" + case 261: /* expr ::= expr SLASH expr */ +#line 743 "src/query/inc/sql.y" {yylhsminor.yy46 = tSqlExprCreate(yymsp[-2].minor.yy46, yymsp[0].minor.yy46, TK_DIVIDE);} -#line 3809 "sql.c" +#line 3960 "src/query/inc/sql.c" yymsp[-2].minor.yy46 = yylhsminor.yy46; break; - case 261: /* expr ::= expr REM expr */ -#line 741 "sql.y" + case 262: /* expr ::= expr REM expr */ +#line 744 "src/query/inc/sql.y" {yylhsminor.yy46 = tSqlExprCreate(yymsp[-2].minor.yy46, yymsp[0].minor.yy46, TK_REM); } -#line 3815 "sql.c" +#line 3966 "src/query/inc/sql.c" yymsp[-2].minor.yy46 = yylhsminor.yy46; break; - case 262: /* expr ::= expr LIKE expr */ -#line 744 "sql.y" + case 263: /* expr ::= expr LIKE expr */ +#line 747 "src/query/inc/sql.y" {yylhsminor.yy46 = tSqlExprCreate(yymsp[-2].minor.yy46, yymsp[0].minor.yy46, TK_LIKE); } -#line 3821 "sql.c" +#line 3972 "src/query/inc/sql.c" yymsp[-2].minor.yy46 = yylhsminor.yy46; break; - case 263: /* expr ::= expr IN LP exprlist RP */ -#line 747 "sql.y" + case 264: /* expr ::= expr IN LP exprlist RP */ +#line 750 "src/query/inc/sql.y" {yylhsminor.yy46 = tSqlExprCreate(yymsp[-4].minor.yy46, (tSqlExpr*)yymsp[-1].minor.yy131, TK_IN); } -#line 3827 "sql.c" +#line 3978 "src/query/inc/sql.c" yymsp[-4].minor.yy46 = yylhsminor.yy46; break; - case 264: /* exprlist ::= exprlist COMMA expritem */ -#line 755 "sql.y" + case 265: /* exprlist ::= exprlist COMMA expritem */ +#line 758 "src/query/inc/sql.y" {yylhsminor.yy131 = tSqlExprListAppend(yymsp[-2].minor.yy131,yymsp[0].minor.yy46,0, 0);} -#line 3833 "sql.c" +#line 3984 "src/query/inc/sql.c" yymsp[-2].minor.yy131 = yylhsminor.yy131; break; - case 265: /* exprlist ::= expritem */ -#line 756 "sql.y" + case 266: /* exprlist ::= expritem */ +#line 759 "src/query/inc/sql.y" {yylhsminor.yy131 = tSqlExprListAppend(0,yymsp[0].minor.yy46,0, 0);} -#line 3839 "sql.c" +#line 3990 "src/query/inc/sql.c" yymsp[0].minor.yy131 = yylhsminor.yy131; break; - case 266: /* expritem ::= expr */ -#line 757 "sql.y" + case 267: /* expritem ::= expr */ +#line 760 "src/query/inc/sql.y" {yylhsminor.yy46 = yymsp[0].minor.yy46;} -#line 3845 "sql.c" +#line 3996 "src/query/inc/sql.c" yymsp[0].minor.yy46 = yylhsminor.yy46; break; - case 268: /* cmd ::= RESET QUERY CACHE */ -#line 761 "sql.y" + case 269: /* cmd ::= RESET QUERY CACHE */ +#line 764 "src/query/inc/sql.y" { setDCLSqlElems(pInfo, TSDB_SQL_RESET_CACHE, 0);} -#line 3851 "sql.c" +#line 4002 "src/query/inc/sql.c" break; - case 269: /* cmd ::= SYNCDB ids REPLICA */ -#line 764 "sql.y" + case 270: /* cmd ::= SYNCDB ids REPLICA */ +#line 767 "src/query/inc/sql.y" { setDCLSqlElems(pInfo, TSDB_SQL_SYNC_DB_REPLICA, 1, &yymsp[-1].minor.yy0);} -#line 3856 "sql.c" +#line 4007 "src/query/inc/sql.c" break; - case 270: /* cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */ -#line 767 "sql.y" + case 271: /* cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */ +#line 770 "src/query/inc/sql.y" { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy131, NULL, TSDB_ALTER_TABLE_ADD_COLUMN, -1); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -#line 3865 "sql.c" +#line 4016 "src/query/inc/sql.c" break; - case 271: /* cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */ -#line 773 "sql.y" + case 272: /* cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */ +#line 776 "src/query/inc/sql.y" { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; @@ -3874,28 +4026,28 @@ static YYACTIONTYPE yy_reduce( SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, NULL, K, TSDB_ALTER_TABLE_DROP_COLUMN, -1); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -#line 3878 "sql.c" +#line 4029 "src/query/inc/sql.c" break; - case 272: /* cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */ -#line 783 "sql.y" + case 273: /* cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */ +#line 786 "src/query/inc/sql.y" { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy131, NULL, TSDB_ALTER_TABLE_CHANGE_COLUMN, -1); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -#line 3887 "sql.c" +#line 4038 "src/query/inc/sql.c" break; - case 273: /* cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */ -#line 790 "sql.y" + case 274: /* cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */ +#line 793 "src/query/inc/sql.y" { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy131, NULL, TSDB_ALTER_TABLE_ADD_TAG_COLUMN, -1); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -#line 3896 "sql.c" +#line 4047 "src/query/inc/sql.c" break; - case 274: /* cmd ::= ALTER TABLE ids cpxName DROP TAG ids */ -#line 795 "sql.y" + case 275: /* cmd ::= ALTER TABLE ids cpxName DROP TAG ids */ +#line 798 "src/query/inc/sql.y" { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; @@ -3905,10 +4057,10 @@ static YYACTIONTYPE yy_reduce( SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, NULL, A, TSDB_ALTER_TABLE_DROP_TAG_COLUMN, -1); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -#line 3909 "sql.c" +#line 4060 "src/query/inc/sql.c" break; - case 275: /* cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */ -#line 805 "sql.y" + case 276: /* cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */ +#line 808 "src/query/inc/sql.y" { yymsp[-5].minor.yy0.n += yymsp[-4].minor.yy0.n; @@ -3921,10 +4073,10 @@ static YYACTIONTYPE yy_reduce( SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-5].minor.yy0, NULL, A, TSDB_ALTER_TABLE_CHANGE_TAG_COLUMN, -1); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -#line 3925 "sql.c" +#line 4076 "src/query/inc/sql.c" break; - case 276: /* cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */ -#line 818 "sql.y" + case 277: /* cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */ +#line 821 "src/query/inc/sql.y" { yymsp[-6].minor.yy0.n += yymsp[-5].minor.yy0.n; @@ -3935,28 +4087,28 @@ static YYACTIONTYPE yy_reduce( SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-6].minor.yy0, NULL, A, TSDB_ALTER_TABLE_UPDATE_TAG_VAL, -1); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -#line 3939 "sql.c" +#line 4090 "src/query/inc/sql.c" break; - case 277: /* cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */ -#line 829 "sql.y" + case 278: /* cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */ +#line 832 "src/query/inc/sql.y" { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy131, NULL, TSDB_ALTER_TABLE_MODIFY_TAG_COLUMN, -1); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -#line 3948 "sql.c" +#line 4099 "src/query/inc/sql.c" break; - case 278: /* cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */ -#line 836 "sql.y" + case 279: /* cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */ +#line 839 "src/query/inc/sql.y" { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy131, NULL, TSDB_ALTER_TABLE_ADD_COLUMN, TSDB_SUPER_TABLE); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -#line 3957 "sql.c" +#line 4108 "src/query/inc/sql.c" break; - case 279: /* cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */ -#line 842 "sql.y" + case 280: /* cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */ +#line 845 "src/query/inc/sql.y" { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; @@ -3966,28 +4118,28 @@ static YYACTIONTYPE yy_reduce( SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, NULL, K, TSDB_ALTER_TABLE_DROP_COLUMN, TSDB_SUPER_TABLE); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -#line 3970 "sql.c" +#line 4121 "src/query/inc/sql.c" break; - case 280: /* cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */ -#line 852 "sql.y" + case 281: /* cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */ +#line 855 "src/query/inc/sql.y" { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy131, NULL, TSDB_ALTER_TABLE_CHANGE_COLUMN, TSDB_SUPER_TABLE); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -#line 3979 "sql.c" +#line 4130 "src/query/inc/sql.c" break; - case 281: /* cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */ -#line 859 "sql.y" + case 282: /* cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */ +#line 862 "src/query/inc/sql.y" { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy131, NULL, TSDB_ALTER_TABLE_ADD_TAG_COLUMN, TSDB_SUPER_TABLE); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -#line 3988 "sql.c" +#line 4139 "src/query/inc/sql.c" break; - case 282: /* cmd ::= ALTER STABLE ids cpxName DROP TAG ids */ -#line 864 "sql.y" + case 283: /* cmd ::= ALTER STABLE ids cpxName DROP TAG ids */ +#line 867 "src/query/inc/sql.y" { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; @@ -3997,10 +4149,10 @@ static YYACTIONTYPE yy_reduce( SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, NULL, A, TSDB_ALTER_TABLE_DROP_TAG_COLUMN, TSDB_SUPER_TABLE); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -#line 4001 "sql.c" +#line 4152 "src/query/inc/sql.c" break; - case 283: /* cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */ -#line 874 "sql.y" + case 284: /* cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */ +#line 877 "src/query/inc/sql.y" { yymsp[-5].minor.yy0.n += yymsp[-4].minor.yy0.n; @@ -4013,10 +4165,10 @@ static YYACTIONTYPE yy_reduce( SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-5].minor.yy0, NULL, A, TSDB_ALTER_TABLE_CHANGE_TAG_COLUMN, TSDB_SUPER_TABLE); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -#line 4017 "sql.c" +#line 4168 "src/query/inc/sql.c" break; - case 284: /* cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem */ -#line 887 "sql.y" + case 285: /* cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem */ +#line 890 "src/query/inc/sql.y" { yymsp[-6].minor.yy0.n += yymsp[-5].minor.yy0.n; @@ -4027,31 +4179,31 @@ static YYACTIONTYPE yy_reduce( 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); } -#line 4031 "sql.c" +#line 4182 "src/query/inc/sql.c" break; - case 285: /* cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */ -#line 898 "sql.y" + case 286: /* cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */ +#line 901 "src/query/inc/sql.y" { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy131, NULL, TSDB_ALTER_TABLE_MODIFY_TAG_COLUMN, TSDB_SUPER_TABLE); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -#line 4040 "sql.c" +#line 4191 "src/query/inc/sql.c" break; - case 286: /* cmd ::= KILL CONNECTION INTEGER */ -#line 905 "sql.y" + case 287: /* cmd ::= KILL CONNECTION INTEGER */ +#line 908 "src/query/inc/sql.y" {setKillSql(pInfo, TSDB_SQL_KILL_CONNECTION, &yymsp[0].minor.yy0);} -#line 4045 "sql.c" +#line 4196 "src/query/inc/sql.c" break; - case 287: /* cmd ::= KILL STREAM INTEGER COLON INTEGER */ -#line 906 "sql.y" + case 288: /* cmd ::= KILL STREAM INTEGER COLON INTEGER */ +#line 909 "src/query/inc/sql.y" {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);} -#line 4050 "sql.c" +#line 4201 "src/query/inc/sql.c" break; - case 288: /* cmd ::= KILL QUERY INTEGER COLON INTEGER */ -#line 907 "sql.y" + case 289: /* cmd ::= KILL QUERY INTEGER COLON INTEGER */ +#line 910 "src/query/inc/sql.y" {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);} -#line 4055 "sql.c" +#line 4206 "src/query/inc/sql.c" break; default: break; @@ -4113,7 +4265,7 @@ static void yy_syntax_error( ParseCTX_FETCH #define TOKEN yyminor /************ Begin %syntax_error code ****************************************/ -#line 37 "sql.y" +#line 37 "src/query/inc/sql.y" pInfo->valid = false; int32_t outputBufLen = tListLen(pInfo->msg); @@ -4136,7 +4288,7 @@ static void yy_syntax_error( } assert(len <= outputBufLen); -#line 4140 "sql.c" +#line 4291 "src/query/inc/sql.c" /************ End %syntax_error code ******************************************/ ParseARG_STORE /* Suppress warning about unused %extra_argument variable */ ParseCTX_STORE @@ -4162,8 +4314,8 @@ static void yy_accept( /* Here code is inserted which will be executed whenever the ** parser accepts */ /*********** Begin %parse_accept code *****************************************/ -#line 61 "sql.y" -#line 4167 "sql.c" +#line 61 "src/query/inc/sql.y" +#line 4318 "src/query/inc/sql.c" /*********** End %parse_accept code *******************************************/ ParseARG_STORE /* Suppress warning about unused %extra_argument variable */ ParseCTX_STORE @@ -4224,12 +4376,56 @@ void Parse( } #endif - do{ + while(1){ /* Exit by "break" */ + assert( yypParser->yytos>=yypParser->yystack ); assert( yyact==yypParser->yytos->stateno ); yyact = yy_find_shift_action((YYCODETYPE)yymajor,yyact); if( yyact >= YY_MIN_REDUCE ){ - yyact = yy_reduce(yypParser,yyact-YY_MIN_REDUCE,yymajor, - yyminor ParseCTX_PARAM); + unsigned int yyruleno = yyact - YY_MIN_REDUCE; /* Reduce by this rule */ + assert( yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) ); +#ifndef NDEBUG + if( yyTraceFILE ){ + int yysize = yyRuleInfoNRhs[yyruleno]; + if( yysize ){ + fprintf(yyTraceFILE, "%sReduce %d [%s]%s, pop back to state %d.\n", + yyTracePrompt, + yyruleno, yyRuleName[yyruleno], + yyrulenoyytos[yysize].stateno); + }else{ + fprintf(yyTraceFILE, "%sReduce %d [%s]%s.\n", + yyTracePrompt, yyruleno, yyRuleName[yyruleno], + yyrulenoyytos - yypParser->yystack)>yypParser->yyhwm ){ + yypParser->yyhwm++; + assert( yypParser->yyhwm == + (int)(yypParser->yytos - yypParser->yystack)); + } +#endif +#if YYSTACKDEPTH>0 + if( yypParser->yytos>=yypParser->yystackEnd ){ + yyStackOverflow(yypParser); + break; + } +#else + if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz-1] ){ + if( yyGrowStack(yypParser) ){ + yyStackOverflow(yypParser); + break; + } + } +#endif + } + yyact = yy_reduce(yypParser,yyruleno,yymajor,yyminor ParseCTX_PARAM); }else if( yyact <= YY_MAX_SHIFTREDUCE ){ yy_shift(yypParser,yyact,(YYCODETYPE)yymajor,yyminor); #ifndef YYNOERRORRECOVERY @@ -4342,7 +4538,7 @@ void Parse( break; #endif } - }while( yypParser->yytos>yypParser->yystack ); + } #ifndef NDEBUG if( yyTraceFILE ){ yyStackEntry *i;