From 7d1548914842ad9d0692451ae79741d540580ba2 Mon Sep 17 00:00:00 2001 From: Ganlin Zhao Date: Mon, 13 Dec 2021 11:23:16 +0800 Subject: [PATCH] [TD-11970]: support timestamp arithmatic operation on timestamp tags --- src/inc/ttokendef.h | 12 +- src/query/inc/sql.y | 38 +- src/query/src/sql.c | 1787 ++++++++++++++++++++++--------------------- 3 files changed, 933 insertions(+), 904 deletions(-) diff --git a/src/inc/ttokendef.h b/src/inc/ttokendef.h index 3e639c878c..ae26e94286 100644 --- a/src/inc/ttokendef.h +++ b/src/inc/ttokendef.h @@ -139,12 +139,12 @@ #define TK_USING 121 #define TK_NULL 122 #define TK_NOW 123 -#define TK_SELECT 124 -#define TK_UNION 125 -#define TK_ALL 126 -#define TK_DISTINCT 127 -#define TK_FROM 128 -#define TK_VARIABLE 129 +#define TK_VARIABLE 124 +#define TK_SELECT 125 +#define TK_UNION 126 +#define TK_ALL 127 +#define TK_DISTINCT 128 +#define TK_FROM 129 #define TK_RANGE 130 #define TK_INTERVAL 131 #define TK_EVERY 132 diff --git a/src/query/inc/sql.y b/src/query/inc/sql.y index 1c7290a530..09931e7ebb 100644 --- a/src/query/inc/sql.y +++ b/src/query/inc/sql.y @@ -254,7 +254,7 @@ acct_optr(Y) ::= pps(C) tseries(D) storage(P) streams(F) qtime(Q) dbs(E) users(K intitemlist(A) ::= intitemlist(X) COMMA intitem(Y). { A = tVariantListAppend(X, &Y, -1); } intitemlist(A) ::= intitem(X). { A = tVariantListAppend(NULL, &X, -1); } -intitem(A) ::= INTEGER(X). { toTSDBType(X.type); tVariantCreate(&A, &X, true); } +intitem(A) ::= INTEGER(X). { toTSDBType(X.type); tVariantCreate(&A, &X); } %type keep {SArray*} %destructor keep {taosArrayDestroy($$);} @@ -439,39 +439,49 @@ column(A) ::= ids(X) typename(Y). { tagitemlist(A) ::= tagitemlist(X) COMMA tagitem(Y). { A = tVariantListAppend(X, &Y, -1); } tagitemlist(A) ::= tagitem(X). { A = tVariantListAppend(NULL, &X, -1); } -tagitem(A) ::= INTEGER(X). { toTSDBType(X.type); tVariantCreate(&A, &X, true); } -tagitem(A) ::= FLOAT(X). { toTSDBType(X.type); tVariantCreate(&A, &X, true); } -tagitem(A) ::= STRING(X). { toTSDBType(X.type); tVariantCreate(&A, &X, true); } -tagitem(A) ::= BOOL(X). { toTSDBType(X.type); tVariantCreate(&A, &X, true); } -tagitem(A) ::= NULL(X). { X.type = 0; tVariantCreate(&A, &X, true); } -tagitem(A) ::= NOW(X). { X.type = TSDB_DATA_TYPE_TIMESTAMP; tVariantCreate(&A, &X, true);} +tagitem(A) ::= INTEGER(X). { toTSDBType(X.type); tVariantCreate(&A, &X); } +tagitem(A) ::= FLOAT(X). { toTSDBType(X.type); tVariantCreate(&A, &X); } +tagitem(A) ::= STRING(X). { toTSDBType(X.type); tVariantCreate(&A, &X); } +tagitem(A) ::= BOOL(X). { toTSDBType(X.type); tVariantCreate(&A, &X); } +tagitem(A) ::= NULL(X). { X.type = 0; tVariantCreate(&A, &X); } +tagitem(A) ::= NOW(X). { X.type = TSDB_DATA_TYPE_TIMESTAMP; tVariantCreateExt(&A, &X, TK_NOW, true);} + +tagitem(A) ::= NOW PLUS VARIABLE(X).{ + X.type = TSDB_DATA_TYPE_TIMESTAMP; + tVariantCreateExt(&A, &X, TK_PLUS, true); +} + +tagitem(A) ::= NOW MINUS VARIABLE(X).{ + X.type = TSDB_DATA_TYPE_TIMESTAMP; + tVariantCreateExt(&A, &X, TK_MINUS, true); +} tagitem(A) ::= MINUS(X) INTEGER(Y).{ X.n += Y.n; X.type = Y.type; toTSDBType(X.type); - tVariantCreate(&A, &X, true); + tVariantCreate(&A, &X); } tagitem(A) ::= MINUS(X) FLOAT(Y). { X.n += Y.n; X.type = Y.type; toTSDBType(X.type); - tVariantCreate(&A, &X, true); + tVariantCreate(&A, &X); } tagitem(A) ::= PLUS(X) INTEGER(Y). { X.n += Y.n; X.type = Y.type; toTSDBType(X.type); - tVariantCreate(&A, &X, true); + tVariantCreate(&A, &X); } tagitem(A) ::= PLUS(X) FLOAT(Y). { X.n += Y.n; X.type = Y.type; toTSDBType(X.type); - tVariantCreate(&A, &X, true); + tVariantCreate(&A, &X); } //////////////////////// The SELECT statement ///////////////////////////////// @@ -610,7 +620,7 @@ fill_opt(N) ::= . { N = 0; } fill_opt(N) ::= FILL LP ID(Y) COMMA tagitemlist(X) RP. { tVariant A = {0}; toTSDBType(Y.type); - tVariantCreate(&A, &Y, true); + tVariantCreate(&A, &Y); tVariantListInsert(X, &A, -1, 0); N = X; @@ -653,12 +663,12 @@ sortlist(A) ::= arrow(Y) sortorder(Z). { %type item {tVariant} item(A) ::= ID(X). { toTSDBType(X.type); - tVariantCreate(&A, &X, true); + tVariantCreate(&A, &X); } item(A) ::= ID(X) DOT ID(Y). { toTSDBType(X.type); X.n += (1+Y.n); - tVariantCreate(&A, &X, true); + tVariantCreate(&A, &X); } %type sortorder {int} diff --git a/src/query/src/sql.c b/src/query/src/sql.c index 120feeb204..0ce5780df1 100644 --- a/src/query/src/sql.c +++ b/src/query/src/sql.c @@ -163,12 +163,12 @@ #define TK_USING 121 #define TK_NULL 122 #define TK_NOW 123 -#define TK_SELECT 124 -#define TK_UNION 125 -#define TK_ALL 126 -#define TK_DISTINCT 127 -#define TK_FROM 128 -#define TK_VARIABLE 129 +#define TK_VARIABLE 124 +#define TK_SELECT 125 +#define TK_UNION 126 +#define TK_ALL 127 +#define TK_DISTINCT 128 +#define TK_FROM 129 #define TK_RANGE 130 #define TK_INTERVAL 131 #define TK_EVERY 132 @@ -339,18 +339,18 @@ typedef union { #define ParseCTX_FETCH #define ParseCTX_STORE #define YYFALLBACK 1 -#define YYNSTATE 387 -#define YYNRULE 312 -#define YYNRULE_WITH_ACTION 312 +#define YYNSTATE 390 +#define YYNRULE 314 +#define YYNRULE_WITH_ACTION 314 #define YYNTOKEN 202 -#define YY_MAX_SHIFT 386 -#define YY_MIN_SHIFTREDUCE 609 -#define YY_MAX_SHIFTREDUCE 920 -#define YY_ERROR_ACTION 921 -#define YY_ACCEPT_ACTION 922 -#define YY_NO_ACTION 923 -#define YY_MIN_REDUCE 924 -#define YY_MAX_REDUCE 1235 +#define YY_MAX_SHIFT 389 +#define YY_MIN_SHIFTREDUCE 613 +#define YY_MAX_SHIFTREDUCE 926 +#define YY_ERROR_ACTION 927 +#define YY_ACCEPT_ACTION 928 +#define YY_NO_ACTION 929 +#define YY_MIN_REDUCE 930 +#define YY_MAX_REDUCE 1243 /************* End control #defines *******************************************/ #define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0]))) @@ -417,92 +417,92 @@ typedef union { ** yy_default[] Default action for each state. ** *********** Begin parsing tables **********************************************/ -#define YY_ACTTAB_COUNT (831) +#define YY_ACTTAB_COUNT (835) static const YYACTIONTYPE yy_action[] = { - /* 0 */ 101, 660, 660, 1153, 660, 1154, 309, 744, 1073, 661, - /* 10 */ 661, 160, 661, 104, 37, 38, 248, 41, 42, 385, - /* 20 */ 239, 261, 31, 30, 29, 922, 386, 40, 341, 45, - /* 30 */ 43, 46, 44, 1062, 1063, 55, 1066, 36, 35, 363, - /* 40 */ 362, 34, 33, 32, 37, 38, 24, 41, 42, 1067, - /* 50 */ 696, 261, 31, 30, 29, 254, 1209, 40, 341, 45, - /* 60 */ 43, 46, 44, 1049, 1078, 1047, 1048, 36, 35, 1101, - /* 70 */ 1050, 34, 33, 32, 1051, 1092, 1052, 1053, 58, 36, - /* 80 */ 35, 290, 289, 34, 33, 32, 37, 38, 51, 41, - /* 90 */ 42, 84, 283, 261, 31, 30, 29, 660, 90, 40, - /* 100 */ 341, 45, 43, 46, 44, 661, 384, 383, 637, 36, - /* 110 */ 35, 211, 212, 34, 33, 32, 37, 39, 852, 41, - /* 120 */ 42, 1209, 1209, 261, 31, 30, 29, 1075, 337, 40, - /* 130 */ 341, 45, 43, 46, 44, 67, 58, 58, 1098, 36, - /* 140 */ 35, 381, 1010, 34, 33, 32, 610, 611, 612, 613, - /* 150 */ 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, - /* 160 */ 158, 38, 240, 41, 42, 58, 54, 261, 31, 30, - /* 170 */ 29, 812, 813, 40, 341, 45, 43, 46, 44, 284, - /* 180 */ 218, 241, 251, 36, 35, 1076, 1076, 34, 33, 32, - /* 190 */ 1209, 41, 42, 59, 175, 261, 31, 30, 29, 319, - /* 200 */ 264, 40, 341, 45, 43, 46, 44, 34, 33, 32, - /* 210 */ 252, 36, 35, 299, 1076, 34, 33, 32, 66, 335, - /* 220 */ 380, 379, 334, 333, 332, 378, 331, 330, 329, 377, - /* 230 */ 328, 376, 375, 313, 96, 291, 95, 25, 1041, 1029, - /* 240 */ 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, - /* 250 */ 1040, 1042, 1043, 214, 217, 246, 232, 867, 58, 1079, - /* 260 */ 856, 225, 859, 1209, 862, 1211, 1231, 143, 142, 141, - /* 270 */ 224, 373, 232, 867, 348, 90, 856, 265, 859, 263, - /* 280 */ 862, 351, 350, 157, 155, 154, 45, 43, 46, 44, - /* 290 */ 972, 58, 237, 238, 36, 35, 342, 195, 34, 33, - /* 300 */ 32, 800, 858, 352, 861, 803, 219, 1076, 237, 238, - /* 310 */ 1, 183, 67, 5, 61, 185, 1209, 1151, 58, 1152, - /* 320 */ 184, 110, 115, 106, 114, 768, 269, 857, 765, 860, - /* 330 */ 766, 258, 767, 295, 296, 282, 353, 82, 1223, 324, - /* 340 */ 1076, 98, 47, 97, 233, 257, 127, 121, 132, 1164, - /* 350 */ 253, 262, 58, 131, 1079, 137, 140, 130, 47, 275, - /* 360 */ 266, 267, 784, 354, 134, 58, 58, 1076, 279, 278, - /* 370 */ 294, 293, 66, 340, 380, 379, 832, 868, 863, 378, - /* 380 */ 205, 203, 201, 377, 864, 376, 375, 200, 147, 146, - /* 390 */ 145, 144, 214, 868, 863, 13, 339, 355, 1065, 100, - /* 400 */ 864, 1076, 1209, 271, 1212, 268, 214, 358, 357, 58, - /* 410 */ 359, 360, 214, 260, 1076, 1076, 1209, 58, 1212, 244, - /* 420 */ 345, 220, 1209, 1201, 1212, 270, 865, 1200, 1199, 103, - /* 430 */ 235, 1209, 236, 1209, 831, 6, 181, 1209, 1209, 1163, - /* 440 */ 1209, 83, 1209, 215, 292, 769, 770, 216, 788, 221, - /* 450 */ 213, 866, 255, 1209, 361, 222, 1079, 1209, 1076, 1209, - /* 460 */ 1209, 223, 365, 227, 228, 1209, 1076, 1092, 229, 226, - /* 470 */ 210, 1209, 1092, 1209, 1209, 1064, 982, 270, 1209, 1209, - /* 480 */ 1209, 270, 129, 195, 242, 99, 973, 337, 182, 243, - /* 490 */ 3, 196, 1077, 195, 373, 781, 87, 88, 809, 819, - /* 500 */ 85, 820, 339, 75, 78, 15, 754, 14, 316, 344, - /* 510 */ 756, 318, 162, 70, 755, 48, 895, 869, 259, 312, - /* 520 */ 59, 10, 59, 659, 70, 102, 871, 120, 70, 119, - /* 530 */ 9, 9, 343, 286, 286, 81, 17, 9, 16, 773, - /* 540 */ 771, 774, 772, 139, 138, 79, 76, 19, 126, 18, - /* 550 */ 125, 21, 26, 20, 249, 1160, 1159, 280, 855, 250, - /* 560 */ 364, 159, 1100, 1111, 1108, 1109, 1093, 743, 1113, 287, - /* 570 */ 161, 166, 305, 1143, 1142, 1141, 177, 1074, 178, 1140, - /* 580 */ 156, 1072, 179, 180, 987, 321, 322, 323, 326, 174, - /* 590 */ 327, 68, 208, 64, 338, 981, 349, 799, 1230, 117, - /* 600 */ 298, 167, 245, 300, 302, 1090, 80, 1229, 314, 1226, - /* 610 */ 186, 356, 168, 77, 28, 169, 1222, 310, 123, 1221, - /* 620 */ 1218, 187, 308, 1007, 306, 65, 170, 172, 60, 69, - /* 630 */ 304, 209, 171, 173, 969, 133, 967, 135, 136, 301, - /* 640 */ 965, 964, 272, 198, 199, 961, 960, 959, 958, 957, - /* 650 */ 956, 955, 297, 202, 204, 951, 949, 947, 27, 206, - /* 660 */ 944, 207, 940, 325, 374, 285, 128, 86, 91, 303, - /* 670 */ 366, 367, 234, 368, 369, 371, 256, 370, 320, 372, - /* 680 */ 382, 920, 273, 274, 230, 231, 919, 276, 277, 918, - /* 690 */ 986, 985, 111, 112, 901, 281, 900, 286, 315, 11, - /* 700 */ 89, 963, 962, 52, 954, 190, 189, 1008, 148, 188, - /* 710 */ 191, 192, 194, 193, 149, 150, 953, 2, 151, 1045, - /* 720 */ 1009, 4, 946, 53, 176, 945, 776, 288, 92, 808, - /* 730 */ 73, 806, 1055, 805, 802, 801, 74, 165, 810, 163, - /* 740 */ 247, 821, 164, 22, 815, 93, 62, 817, 94, 307, - /* 750 */ 343, 311, 23, 63, 12, 49, 317, 50, 103, 674, - /* 760 */ 105, 56, 107, 108, 57, 109, 709, 707, 706, 705, - /* 770 */ 703, 702, 701, 698, 336, 664, 113, 7, 892, 890, - /* 780 */ 870, 893, 891, 8, 346, 872, 347, 116, 71, 59, - /* 790 */ 746, 72, 118, 122, 745, 124, 742, 690, 688, 680, - /* 800 */ 686, 682, 684, 678, 676, 712, 711, 710, 708, 704, - /* 810 */ 700, 699, 197, 662, 627, 924, 923, 923, 923, 923, - /* 820 */ 923, 923, 923, 923, 923, 923, 923, 923, 923, 152, - /* 830 */ 153, + /* 0 */ 101, 664, 664, 1161, 664, 1162, 310, 748, 1079, 665, + /* 10 */ 665, 160, 665, 104, 37, 38, 248, 41, 42, 388, + /* 20 */ 239, 261, 31, 30, 29, 928, 389, 40, 342, 45, + /* 30 */ 43, 46, 44, 1068, 1069, 55, 1072, 36, 35, 366, + /* 40 */ 365, 34, 33, 32, 37, 38, 24, 41, 42, 1073, + /* 50 */ 1084, 261, 31, 30, 29, 254, 1217, 40, 342, 45, + /* 60 */ 43, 46, 44, 1055, 83, 1053, 1054, 36, 35, 1109, + /* 70 */ 1056, 34, 33, 32, 1057, 1100, 1058, 1059, 58, 36, + /* 80 */ 35, 291, 290, 34, 33, 32, 37, 38, 51, 41, + /* 90 */ 42, 84, 284, 261, 31, 30, 29, 664, 1070, 40, + /* 100 */ 342, 45, 43, 46, 44, 665, 387, 386, 641, 36, + /* 110 */ 35, 211, 212, 34, 33, 32, 37, 39, 858, 41, + /* 120 */ 42, 1217, 1217, 261, 31, 30, 29, 1081, 90, 40, + /* 130 */ 342, 45, 43, 46, 44, 978, 58, 58, 1106, 36, + /* 140 */ 35, 838, 195, 34, 33, 32, 614, 615, 616, 617, + /* 150 */ 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, + /* 160 */ 158, 38, 240, 41, 42, 58, 67, 261, 31, 30, + /* 170 */ 29, 818, 819, 40, 342, 45, 43, 46, 44, 285, + /* 180 */ 218, 241, 251, 36, 35, 1082, 1082, 34, 33, 32, + /* 190 */ 1217, 41, 42, 59, 175, 261, 31, 30, 29, 837, + /* 200 */ 264, 40, 342, 45, 43, 46, 44, 34, 33, 32, + /* 210 */ 252, 36, 35, 300, 1082, 34, 33, 32, 66, 336, + /* 220 */ 383, 382, 335, 334, 333, 381, 332, 331, 330, 380, + /* 230 */ 329, 379, 378, 314, 96, 376, 95, 25, 1047, 1035, + /* 240 */ 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045, + /* 250 */ 1046, 1048, 1049, 214, 217, 258, 232, 873, 58, 988, + /* 260 */ 862, 225, 865, 1217, 868, 1219, 195, 143, 142, 141, + /* 270 */ 224, 1239, 232, 873, 349, 90, 862, 265, 865, 263, + /* 280 */ 868, 352, 351, 157, 155, 154, 45, 43, 46, 44, + /* 290 */ 384, 1016, 237, 238, 36, 35, 343, 1100, 34, 33, + /* 300 */ 32, 806, 864, 353, 867, 809, 338, 1082, 237, 238, + /* 310 */ 5, 61, 185, 67, 242, 219, 214, 184, 110, 115, + /* 320 */ 106, 114, 270, 99, 772, 1217, 1217, 769, 1220, 770, + /* 330 */ 276, 771, 1100, 296, 297, 283, 325, 82, 85, 280, + /* 340 */ 279, 257, 47, 341, 233, 262, 127, 121, 132, 243, + /* 350 */ 863, 58, 866, 131, 87, 137, 140, 130, 47, 266, + /* 360 */ 267, 205, 203, 201, 134, 1071, 340, 979, 200, 147, + /* 370 */ 146, 145, 144, 66, 195, 383, 382, 874, 869, 870, + /* 380 */ 381, 58, 58, 260, 380, 129, 379, 378, 58, 58, + /* 390 */ 58, 58, 287, 874, 869, 870, 354, 376, 220, 272, + /* 400 */ 1082, 269, 214, 361, 360, 6, 214, 13, 1217, 790, + /* 410 */ 1209, 100, 1217, 1208, 1220, 346, 1217, 271, 1220, 244, + /* 420 */ 1217, 871, 1207, 1217, 1, 183, 355, 356, 181, 88, + /* 430 */ 1082, 1082, 1217, 362, 363, 364, 368, 1082, 1082, 1082, + /* 440 */ 1082, 103, 235, 236, 773, 268, 700, 215, 216, 3, + /* 450 */ 196, 221, 1217, 1217, 338, 213, 246, 1217, 1217, 75, + /* 460 */ 1085, 1217, 222, 223, 227, 1217, 271, 287, 228, 872, + /* 470 */ 229, 226, 1217, 1217, 1217, 210, 787, 182, 1217, 253, + /* 480 */ 1217, 1217, 255, 1085, 271, 1217, 1085, 1159, 98, 1160, + /* 490 */ 97, 295, 294, 815, 825, 1083, 794, 826, 340, 78, + /* 500 */ 758, 54, 76, 10, 259, 317, 760, 162, 70, 319, + /* 510 */ 759, 48, 901, 875, 59, 313, 345, 663, 81, 59, + /* 520 */ 70, 877, 1231, 102, 70, 292, 9, 9, 15, 293, + /* 530 */ 14, 9, 1172, 120, 320, 119, 17, 1171, 16, 344, + /* 540 */ 79, 779, 249, 780, 861, 777, 281, 778, 358, 357, + /* 550 */ 747, 19, 126, 18, 125, 21, 1168, 20, 139, 138, + /* 560 */ 1167, 250, 159, 367, 1108, 1119, 26, 1116, 1117, 177, + /* 570 */ 1121, 161, 1151, 1101, 166, 288, 306, 1080, 156, 178, + /* 580 */ 1150, 1149, 1148, 1078, 179, 180, 805, 993, 322, 169, + /* 590 */ 323, 324, 327, 328, 68, 208, 64, 339, 987, 350, + /* 600 */ 1238, 1098, 117, 299, 245, 301, 1237, 1234, 303, 80, + /* 610 */ 77, 186, 359, 167, 1230, 123, 315, 1229, 168, 1226, + /* 620 */ 187, 28, 311, 1013, 65, 309, 170, 60, 307, 305, + /* 630 */ 69, 209, 975, 172, 133, 302, 973, 135, 136, 971, + /* 640 */ 970, 273, 198, 199, 967, 298, 966, 965, 964, 963, + /* 650 */ 962, 961, 202, 204, 27, 957, 955, 953, 326, 206, + /* 660 */ 950, 207, 946, 377, 128, 286, 86, 91, 369, 304, + /* 670 */ 370, 371, 372, 373, 374, 234, 256, 375, 321, 385, + /* 680 */ 926, 274, 275, 925, 230, 278, 924, 277, 907, 906, + /* 690 */ 992, 231, 991, 111, 282, 112, 287, 316, 11, 89, + /* 700 */ 782, 289, 52, 92, 814, 73, 190, 194, 969, 1014, + /* 710 */ 188, 189, 968, 192, 191, 960, 193, 148, 2, 149, + /* 720 */ 1051, 150, 959, 808, 151, 1015, 173, 171, 174, 53, + /* 730 */ 176, 952, 951, 812, 811, 4, 807, 74, 165, 816, + /* 740 */ 1061, 163, 247, 827, 164, 62, 821, 93, 344, 823, + /* 750 */ 94, 308, 312, 12, 63, 22, 23, 49, 318, 50, + /* 760 */ 103, 56, 105, 108, 107, 678, 57, 109, 713, 711, + /* 770 */ 710, 709, 707, 706, 705, 702, 668, 337, 113, 7, + /* 780 */ 898, 896, 876, 899, 897, 8, 347, 878, 348, 59, + /* 790 */ 71, 776, 775, 116, 118, 72, 750, 122, 124, 749, + /* 800 */ 746, 694, 692, 684, 690, 686, 688, 682, 680, 716, + /* 810 */ 715, 714, 712, 708, 704, 703, 197, 666, 631, 930, + /* 820 */ 929, 929, 929, 929, 929, 929, 929, 929, 929, 929, + /* 830 */ 929, 929, 929, 152, 153, }; static const YYCODETYPE yy_lookahead[] = { /* 0 */ 212, 1, 1, 280, 1, 282, 283, 5, 204, 9, @@ -510,85 +510,85 @@ static const YYCODETYPE yy_lookahead[] = { /* 20 */ 205, 21, 22, 23, 24, 202, 203, 27, 28, 29, /* 30 */ 30, 31, 32, 245, 246, 247, 248, 37, 38, 37, /* 40 */ 38, 41, 42, 43, 14, 15, 272, 17, 18, 248, - /* 50 */ 5, 21, 22, 23, 24, 251, 282, 27, 28, 29, - /* 60 */ 30, 31, 32, 228, 254, 230, 231, 37, 38, 204, + /* 50 */ 254, 21, 22, 23, 24, 251, 282, 27, 28, 29, + /* 60 */ 30, 31, 32, 228, 212, 230, 231, 37, 38, 204, /* 70 */ 235, 41, 42, 43, 239, 252, 241, 242, 204, 37, /* 80 */ 38, 274, 275, 41, 42, 43, 14, 15, 87, 17, - /* 90 */ 18, 91, 269, 21, 22, 23, 24, 1, 87, 27, + /* 90 */ 18, 91, 269, 21, 22, 23, 24, 1, 246, 27, /* 100 */ 28, 29, 30, 31, 32, 9, 70, 71, 72, 37, /* 110 */ 38, 272, 272, 41, 42, 43, 14, 15, 88, 17, - /* 120 */ 18, 282, 282, 21, 22, 23, 24, 253, 89, 27, - /* 130 */ 28, 29, 30, 31, 32, 124, 204, 204, 273, 37, - /* 140 */ 38, 226, 227, 41, 42, 43, 50, 51, 52, 53, + /* 120 */ 18, 282, 282, 21, 22, 23, 24, 253, 87, 27, + /* 130 */ 28, 29, 30, 31, 32, 210, 204, 204, 273, 37, + /* 140 */ 38, 81, 217, 41, 42, 43, 50, 51, 52, 53, /* 150 */ 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - /* 160 */ 64, 15, 66, 17, 18, 204, 87, 21, 22, 23, + /* 160 */ 64, 15, 66, 17, 18, 204, 125, 21, 22, 23, /* 170 */ 24, 131, 132, 27, 28, 29, 30, 31, 32, 88, /* 180 */ 272, 249, 249, 37, 38, 253, 253, 41, 42, 43, - /* 190 */ 282, 17, 18, 102, 259, 21, 22, 23, 24, 120, + /* 190 */ 282, 17, 18, 102, 259, 21, 22, 23, 24, 139, /* 200 */ 73, 27, 28, 29, 30, 31, 32, 41, 42, 43, /* 210 */ 249, 37, 38, 278, 253, 41, 42, 43, 103, 104, /* 220 */ 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, - /* 230 */ 115, 116, 117, 279, 280, 277, 282, 49, 228, 229, + /* 230 */ 115, 116, 117, 279, 280, 95, 282, 49, 228, 229, /* 240 */ 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, - /* 250 */ 240, 241, 242, 272, 66, 250, 1, 2, 204, 254, - /* 260 */ 5, 73, 7, 282, 9, 284, 254, 79, 80, 81, - /* 270 */ 82, 95, 1, 2, 86, 87, 5, 150, 7, 152, + /* 250 */ 240, 241, 242, 272, 66, 211, 1, 2, 204, 210, + /* 260 */ 5, 73, 7, 282, 9, 284, 217, 79, 80, 81, + /* 270 */ 82, 254, 1, 2, 86, 87, 5, 150, 7, 152, /* 280 */ 9, 154, 155, 67, 68, 69, 29, 30, 31, 32, - /* 290 */ 210, 204, 37, 38, 37, 38, 41, 217, 41, 42, - /* 300 */ 43, 5, 5, 249, 7, 9, 272, 253, 37, 38, - /* 310 */ 213, 214, 124, 67, 68, 69, 282, 280, 204, 282, - /* 320 */ 74, 75, 76, 77, 78, 2, 73, 5, 5, 7, - /* 330 */ 7, 211, 9, 37, 38, 147, 249, 149, 254, 93, - /* 340 */ 253, 280, 87, 282, 156, 211, 67, 68, 69, 244, - /* 350 */ 250, 211, 204, 74, 254, 76, 77, 78, 87, 148, - /* 360 */ 37, 38, 41, 249, 85, 204, 204, 253, 157, 158, - /* 370 */ 37, 38, 103, 25, 105, 106, 81, 122, 123, 110, - /* 380 */ 67, 68, 69, 114, 129, 116, 117, 74, 75, 76, - /* 390 */ 77, 78, 272, 122, 123, 87, 48, 249, 0, 91, - /* 400 */ 129, 253, 282, 150, 284, 152, 272, 154, 155, 204, - /* 410 */ 249, 249, 272, 65, 253, 253, 282, 204, 284, 123, - /* 420 */ 16, 272, 282, 272, 284, 204, 129, 272, 272, 121, - /* 430 */ 272, 282, 272, 282, 139, 87, 215, 282, 282, 244, - /* 440 */ 282, 212, 282, 272, 277, 122, 123, 272, 127, 272, - /* 450 */ 272, 129, 250, 282, 249, 272, 254, 282, 253, 282, - /* 460 */ 282, 272, 249, 272, 272, 282, 253, 252, 272, 272, - /* 470 */ 272, 282, 252, 282, 282, 246, 210, 204, 282, 282, - /* 480 */ 282, 204, 83, 217, 269, 255, 210, 89, 215, 269, - /* 490 */ 208, 209, 215, 217, 95, 102, 88, 88, 88, 88, - /* 500 */ 270, 88, 48, 102, 102, 151, 88, 153, 88, 25, - /* 510 */ 88, 88, 102, 102, 88, 102, 88, 88, 1, 65, - /* 520 */ 102, 128, 102, 88, 102, 102, 122, 151, 102, 153, - /* 530 */ 102, 102, 48, 125, 125, 87, 151, 102, 153, 5, - /* 540 */ 5, 7, 7, 83, 84, 143, 145, 151, 151, 153, - /* 550 */ 153, 151, 271, 153, 244, 244, 244, 204, 41, 244, - /* 560 */ 244, 204, 204, 204, 204, 204, 252, 119, 204, 252, - /* 570 */ 204, 204, 204, 281, 281, 281, 256, 252, 204, 281, - /* 580 */ 65, 204, 204, 204, 204, 204, 204, 204, 204, 260, - /* 590 */ 204, 204, 204, 204, 204, 204, 204, 129, 204, 204, - /* 600 */ 276, 267, 276, 276, 276, 268, 142, 204, 137, 204, - /* 610 */ 204, 204, 266, 144, 141, 265, 204, 140, 204, 204, - /* 620 */ 204, 204, 135, 204, 134, 204, 264, 262, 204, 204, - /* 630 */ 133, 204, 263, 261, 204, 204, 204, 204, 204, 136, - /* 640 */ 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, - /* 650 */ 204, 204, 130, 204, 204, 204, 204, 204, 146, 204, - /* 660 */ 204, 204, 204, 94, 118, 206, 101, 206, 206, 206, - /* 670 */ 100, 56, 206, 97, 99, 98, 206, 60, 206, 96, - /* 680 */ 89, 5, 159, 5, 206, 206, 5, 159, 5, 5, - /* 690 */ 216, 216, 212, 212, 105, 148, 104, 125, 120, 87, - /* 700 */ 126, 206, 206, 87, 206, 219, 223, 225, 207, 224, - /* 710 */ 222, 220, 218, 221, 207, 207, 206, 213, 207, 243, - /* 720 */ 227, 208, 206, 258, 257, 206, 88, 102, 102, 88, - /* 730 */ 102, 129, 243, 129, 5, 5, 87, 102, 88, 87, - /* 740 */ 1, 88, 87, 138, 88, 87, 102, 88, 87, 87, - /* 750 */ 48, 1, 138, 102, 87, 87, 120, 87, 121, 5, - /* 760 */ 83, 92, 91, 75, 92, 91, 9, 5, 5, 5, - /* 770 */ 5, 5, 5, 5, 16, 90, 83, 87, 9, 9, - /* 780 */ 88, 9, 9, 87, 28, 122, 64, 153, 17, 102, - /* 790 */ 5, 17, 153, 153, 5, 153, 88, 5, 5, 5, - /* 800 */ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - /* 810 */ 5, 5, 102, 90, 65, 0, 285, 285, 285, 285, - /* 820 */ 285, 285, 285, 285, 285, 285, 285, 285, 285, 22, - /* 830 */ 22, 285, 285, 285, 285, 285, 285, 285, 285, 285, + /* 290 */ 226, 227, 37, 38, 37, 38, 41, 252, 41, 42, + /* 300 */ 43, 5, 5, 249, 7, 9, 89, 253, 37, 38, + /* 310 */ 67, 68, 69, 125, 269, 272, 272, 74, 75, 76, + /* 320 */ 77, 78, 73, 255, 2, 282, 282, 5, 284, 7, + /* 330 */ 148, 9, 252, 37, 38, 147, 93, 149, 270, 157, + /* 340 */ 158, 211, 87, 25, 156, 211, 67, 68, 69, 269, + /* 350 */ 5, 204, 7, 74, 88, 76, 77, 78, 87, 37, + /* 360 */ 38, 67, 68, 69, 85, 0, 48, 210, 74, 75, + /* 370 */ 76, 77, 78, 103, 217, 105, 106, 122, 123, 124, + /* 380 */ 110, 204, 204, 65, 114, 83, 116, 117, 204, 204, + /* 390 */ 204, 204, 126, 122, 123, 124, 249, 95, 272, 150, + /* 400 */ 253, 152, 272, 154, 155, 87, 272, 87, 282, 41, + /* 410 */ 272, 91, 282, 272, 284, 16, 282, 204, 284, 123, + /* 420 */ 282, 124, 272, 282, 213, 214, 249, 249, 215, 88, + /* 430 */ 253, 253, 282, 249, 249, 249, 249, 253, 253, 253, + /* 440 */ 253, 121, 272, 272, 122, 123, 5, 272, 272, 208, + /* 450 */ 209, 272, 282, 282, 89, 272, 250, 282, 282, 102, + /* 460 */ 254, 282, 272, 272, 272, 282, 204, 126, 272, 124, + /* 470 */ 272, 272, 282, 282, 282, 272, 102, 215, 282, 250, + /* 480 */ 282, 282, 250, 254, 204, 282, 254, 280, 280, 282, + /* 490 */ 282, 37, 38, 88, 88, 215, 128, 88, 48, 102, + /* 500 */ 88, 87, 145, 129, 1, 88, 88, 102, 102, 88, + /* 510 */ 88, 102, 88, 88, 102, 65, 25, 88, 87, 102, + /* 520 */ 102, 122, 254, 102, 102, 277, 102, 102, 151, 277, + /* 530 */ 153, 102, 244, 151, 120, 153, 151, 244, 153, 48, + /* 540 */ 143, 5, 244, 7, 41, 5, 204, 7, 37, 38, + /* 550 */ 119, 151, 151, 153, 153, 151, 244, 153, 83, 84, + /* 560 */ 244, 244, 204, 244, 204, 204, 271, 204, 204, 256, + /* 570 */ 204, 204, 281, 252, 204, 252, 204, 252, 65, 204, + /* 580 */ 281, 281, 281, 204, 204, 204, 124, 204, 204, 265, + /* 590 */ 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, + /* 600 */ 204, 268, 204, 276, 276, 276, 204, 204, 276, 142, + /* 610 */ 144, 204, 204, 267, 204, 204, 137, 204, 266, 204, + /* 620 */ 204, 141, 140, 204, 204, 135, 264, 204, 134, 133, + /* 630 */ 204, 204, 204, 262, 204, 136, 204, 204, 204, 204, + /* 640 */ 204, 204, 204, 204, 204, 130, 204, 204, 204, 204, + /* 650 */ 204, 204, 204, 204, 146, 204, 204, 204, 94, 204, + /* 660 */ 204, 204, 204, 118, 101, 206, 206, 206, 100, 206, + /* 670 */ 56, 97, 99, 60, 98, 206, 206, 96, 206, 89, + /* 680 */ 5, 159, 5, 5, 206, 5, 5, 159, 105, 104, + /* 690 */ 216, 206, 216, 212, 148, 212, 126, 120, 87, 127, + /* 700 */ 88, 102, 87, 102, 88, 102, 219, 218, 206, 225, + /* 710 */ 224, 223, 206, 220, 222, 206, 221, 207, 213, 207, + /* 720 */ 243, 207, 206, 5, 207, 227, 261, 263, 260, 258, + /* 730 */ 257, 206, 206, 124, 124, 208, 5, 87, 102, 88, + /* 740 */ 243, 87, 1, 88, 87, 102, 88, 87, 48, 88, + /* 750 */ 87, 87, 1, 87, 102, 138, 138, 87, 120, 87, + /* 760 */ 121, 92, 83, 75, 91, 5, 92, 91, 9, 5, + /* 770 */ 5, 5, 5, 5, 5, 5, 90, 16, 83, 87, + /* 780 */ 9, 9, 88, 9, 9, 87, 28, 122, 64, 102, + /* 790 */ 17, 124, 124, 153, 153, 17, 5, 153, 153, 5, + /* 800 */ 88, 5, 5, 5, 5, 5, 5, 5, 5, 5, + /* 810 */ 5, 5, 5, 5, 5, 5, 102, 90, 65, 0, + /* 820 */ 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, + /* 830 */ 285, 285, 285, 22, 22, 285, 285, 285, 285, 285, /* 840 */ 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, /* 850 */ 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, /* 860 */ 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, @@ -608,118 +608,118 @@ static const YYCODETYPE yy_lookahead[] = { /* 1000 */ 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, /* 1010 */ 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, /* 1020 */ 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, - /* 1030 */ 285, 285, 285, + /* 1030 */ 285, 285, 285, 285, 285, 285, 285, }; -#define YY_SHIFT_COUNT (386) +#define YY_SHIFT_COUNT (389) #define YY_SHIFT_MIN (0) -#define YY_SHIFT_MAX (815) +#define YY_SHIFT_MAX (819) static const unsigned short int yy_shift_ofst[] = { - /* 0 */ 188, 115, 115, 269, 269, 39, 255, 271, 271, 271, + /* 0 */ 188, 115, 115, 270, 270, 217, 255, 271, 271, 271, /* 10 */ 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, /* 20 */ 3, 3, 15, 15, 0, 96, 271, 271, 271, 271, /* 30 */ 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, - /* 40 */ 271, 271, 271, 271, 271, 271, 271, 271, 323, 323, - /* 50 */ 323, 11, 11, 40, 3, 398, 3, 3, 3, 3, - /* 60 */ 399, 39, 15, 15, 176, 176, 45, 831, 831, 831, - /* 70 */ 323, 323, 323, 296, 296, 2, 2, 2, 2, 2, - /* 80 */ 2, 2, 3, 3, 3, 321, 3, 3, 3, 11, - /* 90 */ 11, 3, 3, 3, 3, 295, 295, 295, 295, 393, - /* 100 */ 11, 3, 3, 3, 3, 3, 3, 3, 3, 3, + /* 40 */ 271, 271, 271, 271, 271, 271, 271, 271, 322, 322, + /* 50 */ 322, 41, 41, 40, 3, 365, 3, 3, 3, 3, + /* 60 */ 302, 217, 15, 15, 140, 140, 441, 835, 835, 835, + /* 70 */ 322, 322, 322, 296, 296, 2, 2, 2, 2, 2, + /* 80 */ 2, 2, 3, 3, 3, 368, 3, 3, 3, 41, + /* 90 */ 41, 3, 3, 3, 3, 60, 60, 60, 60, 374, + /* 100 */ 41, 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, 3, 3, 3, 3, 3, 3, 3, 515, - /* 160 */ 515, 515, 468, 468, 468, 468, 515, 464, 469, 471, - /* 170 */ 473, 477, 487, 490, 497, 503, 522, 512, 515, 515, - /* 180 */ 515, 569, 569, 546, 39, 39, 515, 515, 565, 570, - /* 190 */ 615, 576, 575, 617, 577, 583, 546, 45, 515, 515, - /* 200 */ 591, 591, 515, 591, 515, 591, 515, 515, 831, 831, - /* 210 */ 30, 72, 72, 102, 72, 146, 174, 246, 257, 257, - /* 220 */ 257, 257, 257, 257, 279, 313, 42, 42, 42, 42, - /* 230 */ 127, 253, 348, 211, 308, 166, 166, 297, 322, 36, - /* 240 */ 216, 91, 408, 409, 333, 410, 411, 413, 454, 401, - /* 250 */ 402, 418, 420, 422, 423, 426, 79, 428, 429, 484, - /* 260 */ 517, 404, 435, 354, 376, 385, 534, 535, 396, 397, - /* 270 */ 448, 400, 460, 676, 523, 678, 681, 528, 683, 684, - /* 280 */ 589, 592, 547, 572, 578, 612, 574, 638, 616, 625, - /* 290 */ 626, 641, 628, 602, 604, 729, 730, 649, 650, 652, - /* 300 */ 653, 655, 656, 635, 658, 659, 661, 739, 662, 644, - /* 310 */ 605, 702, 750, 651, 614, 667, 578, 668, 636, 670, - /* 320 */ 637, 677, 669, 671, 688, 754, 672, 674, 757, 762, - /* 330 */ 763, 764, 765, 766, 767, 768, 685, 758, 693, 769, - /* 340 */ 770, 690, 692, 772, 773, 663, 696, 756, 722, 771, - /* 350 */ 634, 639, 687, 687, 687, 687, 774, 640, 642, 687, - /* 360 */ 687, 687, 785, 789, 708, 687, 792, 793, 794, 795, - /* 370 */ 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, - /* 380 */ 806, 710, 723, 807, 808, 749, 815, + /* 150 */ 3, 3, 3, 3, 3, 3, 3, 3, 3, 513, + /* 160 */ 513, 513, 462, 462, 462, 462, 513, 467, 466, 479, + /* 170 */ 480, 482, 490, 494, 496, 499, 515, 508, 513, 513, + /* 180 */ 513, 564, 564, 545, 217, 217, 513, 513, 563, 568, + /* 190 */ 614, 574, 573, 613, 576, 581, 545, 441, 513, 513, + /* 200 */ 590, 590, 513, 590, 513, 590, 513, 513, 835, 835, + /* 210 */ 30, 72, 72, 102, 72, 146, 174, 243, 257, 257, + /* 220 */ 257, 257, 257, 257, 279, 294, 42, 42, 42, 42, + /* 230 */ 127, 249, 318, 182, 320, 166, 166, 297, 345, 36, + /* 240 */ 216, 91, 266, 341, 454, 405, 406, 409, 450, 357, + /* 250 */ 397, 412, 417, 418, 421, 422, 414, 424, 425, 491, + /* 260 */ 503, 399, 429, 377, 382, 385, 536, 540, 511, 400, + /* 270 */ 401, 431, 404, 475, 675, 522, 677, 678, 528, 680, + /* 280 */ 681, 583, 585, 546, 570, 577, 611, 572, 612, 615, + /* 290 */ 599, 601, 616, 603, 609, 610, 718, 731, 650, 651, + /* 300 */ 654, 655, 657, 658, 636, 660, 661, 663, 741, 664, + /* 310 */ 643, 617, 700, 751, 652, 618, 666, 577, 670, 638, + /* 320 */ 672, 639, 679, 669, 673, 688, 760, 674, 676, 759, + /* 330 */ 764, 765, 766, 767, 768, 769, 770, 686, 761, 695, + /* 340 */ 771, 772, 692, 694, 774, 775, 665, 698, 758, 724, + /* 350 */ 773, 640, 641, 687, 687, 687, 687, 667, 668, 778, + /* 360 */ 644, 645, 687, 687, 687, 791, 794, 712, 687, 796, + /* 370 */ 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, + /* 380 */ 807, 808, 809, 810, 714, 727, 811, 812, 753, 819, }; #define YY_REDUCE_COUNT (209) #define YY_REDUCE_MIN (-277) -#define YY_REDUCE_MAX (519) +#define YY_REDUCE_MAX (527) static const short yy_reduce_ofst[] = { - /* 0 */ -177, 10, 10, -165, -165, -212, 120, 134, 140, -19, - /* 10 */ -193, -68, -67, -39, 54, 87, 114, 148, 161, 162, - /* 20 */ 205, 213, -277, -46, -135, -185, -226, -161, -160, -92, - /* 30 */ 34, 149, 151, 155, 156, 158, 160, 171, 175, 177, - /* 40 */ 178, 183, 189, 191, 192, 196, 197, 198, 5, 100, - /* 50 */ 202, 215, 220, -65, -196, -199, 221, 273, 277, -126, - /* 60 */ 80, 229, 37, 61, 266, 276, -85, 230, 97, 282, - /* 70 */ -190, 12, 84, -42, 167, 105, 195, 310, 311, 312, - /* 80 */ 315, 316, 353, 357, 358, 281, 359, 360, 361, 314, - /* 90 */ 317, 364, 366, 367, 368, 292, 293, 294, 298, 320, - /* 100 */ 325, 374, 377, 378, 379, 380, 381, 382, 383, 384, - /* 110 */ 386, 387, 388, 389, 390, 391, 392, 394, 395, 403, - /* 120 */ 405, 406, 407, 412, 414, 415, 416, 417, 419, 421, - /* 130 */ 424, 425, 427, 430, 431, 432, 433, 434, 436, 437, - /* 140 */ 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, - /* 150 */ 449, 450, 451, 452, 453, 455, 456, 457, 458, 459, - /* 160 */ 461, 462, 324, 326, 327, 328, 463, 337, 334, 346, - /* 170 */ 350, 362, 369, 365, 372, 329, 465, 467, 466, 470, - /* 180 */ 472, 474, 475, 476, 480, 481, 478, 479, 482, 485, - /* 190 */ 483, 486, 488, 491, 492, 494, 489, 493, 495, 496, - /* 200 */ 501, 507, 498, 508, 510, 511, 516, 519, 504, 513, + /* 0 */ -177, 10, 10, -165, -165, -212, 44, 130, 134, -19, + /* 10 */ -193, -68, -67, -39, 54, 147, 177, 178, 184, 185, + /* 20 */ 186, 187, -277, -46, -135, -185, -226, -161, -160, -92, + /* 30 */ 43, 126, 138, 141, 150, 170, 171, 175, 176, 179, + /* 40 */ 183, 190, 191, 192, 196, 198, 199, 203, 206, 229, + /* 50 */ 232, 45, 80, -65, -196, -199, 213, 262, 280, -126, + /* 60 */ -75, -148, 207, 208, 49, 157, 64, 68, 211, 241, + /* 70 */ -204, 17, 268, 248, 252, 288, 293, 298, 312, 316, + /* 80 */ 317, 319, 342, 358, 360, 295, 361, 363, 364, 321, + /* 90 */ 323, 366, 367, 370, 372, 291, 299, 300, 301, 313, + /* 100 */ 325, 375, 379, 380, 381, 383, 384, 386, 387, 388, + /* 110 */ 389, 390, 391, 392, 393, 394, 395, 396, 398, 402, + /* 120 */ 403, 407, 408, 410, 411, 413, 415, 416, 419, 420, + /* 130 */ 423, 426, 427, 428, 430, 432, 433, 434, 435, 436, + /* 140 */ 437, 438, 439, 440, 442, 443, 444, 445, 446, 447, + /* 150 */ 448, 449, 451, 452, 453, 455, 456, 457, 458, 459, + /* 160 */ 460, 461, 327, 328, 329, 332, 463, 333, 346, 352, + /* 170 */ 324, 362, 464, 371, 465, 468, 471, 473, 469, 470, + /* 180 */ 472, 474, 476, 477, 481, 483, 478, 485, 484, 486, + /* 190 */ 488, 487, 492, 493, 495, 489, 497, 498, 502, 506, + /* 200 */ 510, 512, 509, 514, 516, 517, 525, 526, 505, 527, }; static const YYACTIONTYPE yy_default[] = { - /* 0 */ 921, 1044, 983, 1054, 970, 980, 1214, 1214, 1214, 1214, - /* 10 */ 921, 921, 921, 921, 921, 921, 921, 921, 921, 921, - /* 20 */ 921, 921, 921, 921, 1102, 941, 921, 921, 921, 921, - /* 30 */ 921, 921, 921, 921, 921, 921, 921, 921, 921, 921, - /* 40 */ 921, 921, 921, 921, 921, 921, 921, 921, 921, 921, - /* 50 */ 921, 921, 921, 1126, 921, 980, 921, 921, 921, 921, - /* 60 */ 990, 980, 921, 921, 990, 990, 921, 1097, 1028, 1046, - /* 70 */ 921, 921, 921, 921, 921, 921, 921, 921, 921, 921, - /* 80 */ 921, 921, 921, 921, 921, 1104, 1110, 1107, 921, 921, - /* 90 */ 921, 1112, 921, 921, 921, 1148, 1148, 1148, 1148, 1095, - /* 100 */ 921, 921, 921, 921, 921, 921, 921, 921, 921, 921, - /* 110 */ 921, 921, 921, 921, 921, 921, 921, 921, 921, 921, - /* 120 */ 921, 921, 921, 921, 921, 921, 921, 921, 921, 921, - /* 130 */ 921, 921, 921, 968, 921, 966, 921, 921, 921, 921, - /* 140 */ 921, 921, 921, 921, 921, 921, 921, 921, 921, 921, - /* 150 */ 921, 921, 921, 921, 921, 921, 921, 921, 939, 943, - /* 160 */ 943, 943, 921, 921, 921, 921, 943, 1157, 1161, 1138, - /* 170 */ 1155, 1149, 1133, 1131, 1129, 1137, 1122, 1165, 943, 943, - /* 180 */ 943, 988, 988, 984, 980, 980, 943, 943, 1006, 1004, - /* 190 */ 1002, 994, 1000, 996, 998, 992, 971, 921, 943, 943, - /* 200 */ 978, 978, 943, 978, 943, 978, 943, 943, 1028, 1046, - /* 210 */ 921, 1166, 1156, 921, 1213, 1196, 1195, 921, 1204, 1203, - /* 220 */ 1202, 1194, 1193, 1192, 921, 921, 1188, 1191, 1190, 1189, - /* 230 */ 921, 921, 1168, 921, 921, 1198, 1197, 921, 921, 921, - /* 240 */ 921, 921, 921, 921, 1119, 921, 921, 921, 1144, 1162, - /* 250 */ 1158, 921, 921, 921, 921, 921, 921, 921, 921, 1169, - /* 260 */ 921, 921, 921, 921, 921, 921, 921, 921, 921, 921, - /* 270 */ 1056, 921, 921, 921, 921, 921, 921, 921, 921, 921, - /* 280 */ 921, 921, 921, 1094, 921, 921, 921, 921, 921, 1106, - /* 290 */ 1105, 921, 921, 921, 921, 921, 921, 921, 921, 921, - /* 300 */ 921, 921, 921, 921, 921, 921, 921, 921, 921, 1150, - /* 310 */ 921, 1145, 921, 1139, 921, 921, 1068, 921, 921, 921, - /* 320 */ 921, 921, 921, 921, 921, 921, 921, 921, 921, 921, - /* 330 */ 921, 921, 921, 921, 921, 921, 921, 921, 921, 921, - /* 340 */ 921, 921, 921, 921, 921, 921, 921, 921, 921, 921, - /* 350 */ 921, 921, 1232, 1227, 1228, 1225, 921, 921, 921, 1224, - /* 360 */ 1219, 1220, 921, 921, 921, 1217, 921, 921, 921, 921, - /* 370 */ 921, 921, 921, 921, 921, 921, 921, 921, 921, 921, - /* 380 */ 921, 1012, 921, 950, 948, 921, 921, + /* 0 */ 927, 1050, 989, 1060, 976, 986, 1222, 1222, 1222, 1222, + /* 10 */ 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, + /* 20 */ 927, 927, 927, 927, 1110, 947, 927, 927, 927, 927, + /* 30 */ 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, + /* 40 */ 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, + /* 50 */ 927, 927, 927, 1134, 927, 986, 927, 927, 927, 927, + /* 60 */ 996, 986, 927, 927, 996, 996, 927, 1105, 1034, 1052, + /* 70 */ 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, + /* 80 */ 927, 927, 927, 927, 927, 1112, 1118, 1115, 927, 927, + /* 90 */ 927, 1120, 927, 927, 927, 1156, 1156, 1156, 1156, 1103, + /* 100 */ 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, + /* 110 */ 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, + /* 120 */ 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, + /* 130 */ 927, 927, 927, 974, 927, 972, 927, 927, 927, 927, + /* 140 */ 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, + /* 150 */ 927, 927, 927, 927, 927, 927, 927, 927, 945, 949, + /* 160 */ 949, 949, 927, 927, 927, 927, 949, 1165, 1169, 1146, + /* 170 */ 1163, 1157, 1141, 1139, 1137, 1145, 1130, 1173, 949, 949, + /* 180 */ 949, 994, 994, 990, 986, 986, 949, 949, 1012, 1010, + /* 190 */ 1008, 1000, 1006, 1002, 1004, 998, 977, 927, 949, 949, + /* 200 */ 984, 984, 949, 984, 949, 984, 949, 949, 1034, 1052, + /* 210 */ 927, 1174, 1164, 927, 1221, 1204, 1203, 927, 1212, 1211, + /* 220 */ 1210, 1202, 1201, 1200, 927, 927, 1196, 1199, 1198, 1197, + /* 230 */ 927, 927, 1176, 927, 927, 1206, 1205, 927, 927, 927, + /* 240 */ 927, 927, 927, 927, 1127, 927, 927, 927, 1152, 1170, + /* 250 */ 1166, 927, 927, 927, 927, 927, 927, 927, 927, 1177, + /* 260 */ 927, 927, 927, 927, 927, 927, 927, 927, 1091, 927, + /* 270 */ 927, 1062, 927, 927, 927, 927, 927, 927, 927, 927, + /* 280 */ 927, 927, 927, 927, 1102, 927, 927, 927, 927, 927, + /* 290 */ 1114, 1113, 927, 927, 927, 927, 927, 927, 927, 927, + /* 300 */ 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, + /* 310 */ 1158, 927, 1153, 927, 1147, 927, 927, 1074, 927, 927, + /* 320 */ 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, + /* 330 */ 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, + /* 340 */ 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, + /* 350 */ 927, 927, 927, 1240, 1235, 1236, 1233, 927, 927, 927, + /* 360 */ 927, 927, 1232, 1227, 1228, 927, 927, 927, 1225, 927, + /* 370 */ 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, + /* 380 */ 927, 927, 927, 927, 1018, 927, 956, 954, 927, 927, }; /********** End of lemon-generated parsing tables *****************************/ @@ -863,12 +863,12 @@ static const YYCODETYPE yyFallback[] = { 0, /* USING => nothing */ 1, /* NULL => ID */ 1, /* NOW => ID */ + 0, /* VARIABLE => nothing */ 0, /* SELECT => nothing */ 0, /* UNION => nothing */ 1, /* ALL => ID */ 0, /* DISTINCT => nothing */ 0, /* FROM => nothing */ - 0, /* VARIABLE => nothing */ 0, /* RANGE => nothing */ 0, /* INTERVAL => nothing */ 0, /* EVERY => nothing */ @@ -1153,12 +1153,12 @@ static const char *const yyTokenName[] = { /* 121 */ "USING", /* 122 */ "NULL", /* 123 */ "NOW", - /* 124 */ "SELECT", - /* 125 */ "UNION", - /* 126 */ "ALL", - /* 127 */ "DISTINCT", - /* 128 */ "FROM", - /* 129 */ "VARIABLE", + /* 124 */ "VARIABLE", + /* 125 */ "SELECT", + /* 126 */ "UNION", + /* 127 */ "ALL", + /* 128 */ "DISTINCT", + /* 129 */ "FROM", /* 130 */ "RANGE", /* 131 */ "INTERVAL", /* 132 */ "EVERY", @@ -1483,156 +1483,158 @@ static const char *const yyRuleName[] = { /* 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 range_option interval_option 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 */ "timestamp ::= INTEGER", - /* 192 */ "timestamp ::= MINUS INTEGER", - /* 193 */ "timestamp ::= PLUS INTEGER", - /* 194 */ "timestamp ::= STRING", - /* 195 */ "timestamp ::= NOW", - /* 196 */ "timestamp ::= NOW PLUS VARIABLE", - /* 197 */ "timestamp ::= NOW MINUS VARIABLE", - /* 198 */ "range_option ::=", - /* 199 */ "range_option ::= RANGE LP timestamp COMMA timestamp RP", - /* 200 */ "interval_option ::= intervalKey LP tmvar RP", - /* 201 */ "interval_option ::= intervalKey LP tmvar COMMA tmvar RP", - /* 202 */ "interval_option ::=", - /* 203 */ "intervalKey ::= INTERVAL", - /* 204 */ "intervalKey ::= EVERY", - /* 205 */ "session_option ::=", - /* 206 */ "session_option ::= SESSION LP ids cpxName COMMA tmvar RP", - /* 207 */ "windowstate_option ::=", - /* 208 */ "windowstate_option ::= STATE_WINDOW LP ids RP", - /* 209 */ "fill_opt ::=", - /* 210 */ "fill_opt ::= FILL LP ID COMMA tagitemlist RP", - /* 211 */ "fill_opt ::= FILL LP ID RP", - /* 212 */ "sliding_opt ::= SLIDING LP tmvar RP", - /* 213 */ "sliding_opt ::=", - /* 214 */ "orderby_opt ::=", - /* 215 */ "orderby_opt ::= ORDER BY sortlist", - /* 216 */ "sortlist ::= sortlist COMMA item sortorder", - /* 217 */ "sortlist ::= sortlist COMMA arrow sortorder", - /* 218 */ "sortlist ::= item sortorder", - /* 219 */ "sortlist ::= arrow sortorder", - /* 220 */ "item ::= ID", - /* 221 */ "item ::= ID DOT ID", - /* 222 */ "sortorder ::= ASC", - /* 223 */ "sortorder ::= DESC", - /* 224 */ "sortorder ::=", - /* 225 */ "groupby_opt ::=", - /* 226 */ "groupby_opt ::= GROUP BY grouplist", - /* 227 */ "grouplist ::= grouplist COMMA item", - /* 228 */ "grouplist ::= grouplist COMMA arrow", - /* 229 */ "grouplist ::= item", - /* 230 */ "grouplist ::= arrow", - /* 231 */ "having_opt ::=", - /* 232 */ "having_opt ::= HAVING expr", - /* 233 */ "limit_opt ::=", - /* 234 */ "limit_opt ::= LIMIT signed", - /* 235 */ "limit_opt ::= LIMIT signed OFFSET signed", - /* 236 */ "limit_opt ::= LIMIT signed COMMA signed", - /* 237 */ "slimit_opt ::=", - /* 238 */ "slimit_opt ::= SLIMIT signed", - /* 239 */ "slimit_opt ::= SLIMIT signed SOFFSET signed", - /* 240 */ "slimit_opt ::= SLIMIT signed COMMA signed", - /* 241 */ "where_opt ::=", - /* 242 */ "where_opt ::= WHERE expr", - /* 243 */ "expr ::= LP expr RP", - /* 244 */ "expr ::= ID", - /* 245 */ "expr ::= ID DOT ID", - /* 246 */ "expr ::= ID DOT STAR", - /* 247 */ "expr ::= INTEGER", - /* 248 */ "expr ::= MINUS INTEGER", - /* 249 */ "expr ::= PLUS INTEGER", - /* 250 */ "expr ::= FLOAT", - /* 251 */ "expr ::= MINUS FLOAT", - /* 252 */ "expr ::= PLUS FLOAT", - /* 253 */ "expr ::= STRING", - /* 254 */ "expr ::= NOW", - /* 255 */ "expr ::= VARIABLE", - /* 256 */ "expr ::= PLUS VARIABLE", - /* 257 */ "expr ::= MINUS VARIABLE", - /* 258 */ "expr ::= BOOL", - /* 259 */ "expr ::= NULL", - /* 260 */ "expr ::= ID LP exprlist RP", - /* 261 */ "expr ::= ID LP STAR RP", - /* 262 */ "expr ::= expr IS NULL", - /* 263 */ "expr ::= expr IS NOT NULL", - /* 264 */ "expr ::= expr LT expr", - /* 265 */ "expr ::= expr GT expr", - /* 266 */ "expr ::= expr LE expr", - /* 267 */ "expr ::= expr GE expr", - /* 268 */ "expr ::= expr NE expr", - /* 269 */ "expr ::= expr EQ expr", - /* 270 */ "expr ::= expr BETWEEN expr AND expr", - /* 271 */ "expr ::= expr AND expr", - /* 272 */ "expr ::= expr OR expr", - /* 273 */ "expr ::= expr PLUS expr", - /* 274 */ "expr ::= expr MINUS expr", - /* 275 */ "expr ::= expr STAR expr", - /* 276 */ "expr ::= expr SLASH expr", - /* 277 */ "expr ::= expr REM expr", - /* 278 */ "expr ::= expr LIKE expr", - /* 279 */ "expr ::= expr MATCH expr", - /* 280 */ "expr ::= expr NMATCH expr", - /* 281 */ "expr ::= ID CONTAINS STRING", - /* 282 */ "expr ::= ID DOT ID CONTAINS STRING", - /* 283 */ "arrow ::= ID ARROW STRING", - /* 284 */ "arrow ::= ID DOT ID ARROW STRING", - /* 285 */ "expr ::= arrow", - /* 286 */ "expr ::= expr IN LP exprlist RP", - /* 287 */ "exprlist ::= exprlist COMMA expritem", - /* 288 */ "exprlist ::= expritem", - /* 289 */ "expritem ::= expr", - /* 290 */ "expritem ::=", - /* 291 */ "cmd ::= RESET QUERY CACHE", - /* 292 */ "cmd ::= SYNCDB ids REPLICA", - /* 293 */ "cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist", - /* 294 */ "cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids", - /* 295 */ "cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist", - /* 296 */ "cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist", - /* 297 */ "cmd ::= ALTER TABLE ids cpxName DROP TAG ids", - /* 298 */ "cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids", - /* 299 */ "cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem", - /* 300 */ "cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist", - /* 301 */ "cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist", - /* 302 */ "cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids", - /* 303 */ "cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist", - /* 304 */ "cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist", - /* 305 */ "cmd ::= ALTER STABLE ids cpxName DROP TAG ids", - /* 306 */ "cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids", - /* 307 */ "cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem", - /* 308 */ "cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist", - /* 309 */ "cmd ::= KILL CONNECTION INTEGER", - /* 310 */ "cmd ::= KILL STREAM INTEGER COLON INTEGER", - /* 311 */ "cmd ::= KILL QUERY INTEGER COLON INTEGER", + /* 162 */ "tagitem ::= NOW PLUS VARIABLE", + /* 163 */ "tagitem ::= NOW MINUS VARIABLE", + /* 164 */ "tagitem ::= MINUS INTEGER", + /* 165 */ "tagitem ::= MINUS FLOAT", + /* 166 */ "tagitem ::= PLUS INTEGER", + /* 167 */ "tagitem ::= PLUS FLOAT", + /* 168 */ "select ::= SELECT selcollist from where_opt range_option interval_option sliding_opt session_option windowstate_option fill_opt groupby_opt having_opt orderby_opt slimit_opt limit_opt", + /* 169 */ "select ::= LP select RP", + /* 170 */ "union ::= select", + /* 171 */ "union ::= union UNION ALL select", + /* 172 */ "cmd ::= union", + /* 173 */ "select ::= SELECT selcollist", + /* 174 */ "sclp ::= selcollist COMMA", + /* 175 */ "sclp ::=", + /* 176 */ "selcollist ::= sclp distinct expr as", + /* 177 */ "selcollist ::= sclp STAR", + /* 178 */ "as ::= AS ids", + /* 179 */ "as ::= ids", + /* 180 */ "as ::=", + /* 181 */ "distinct ::= DISTINCT", + /* 182 */ "distinct ::=", + /* 183 */ "from ::= FROM tablelist", + /* 184 */ "from ::= FROM sub", + /* 185 */ "sub ::= LP union RP", + /* 186 */ "sub ::= LP union RP ids", + /* 187 */ "sub ::= sub COMMA LP union RP ids", + /* 188 */ "tablelist ::= ids cpxName", + /* 189 */ "tablelist ::= ids cpxName ids", + /* 190 */ "tablelist ::= tablelist COMMA ids cpxName", + /* 191 */ "tablelist ::= tablelist COMMA ids cpxName ids", + /* 192 */ "tmvar ::= VARIABLE", + /* 193 */ "timestamp ::= INTEGER", + /* 194 */ "timestamp ::= MINUS INTEGER", + /* 195 */ "timestamp ::= PLUS INTEGER", + /* 196 */ "timestamp ::= STRING", + /* 197 */ "timestamp ::= NOW", + /* 198 */ "timestamp ::= NOW PLUS VARIABLE", + /* 199 */ "timestamp ::= NOW MINUS VARIABLE", + /* 200 */ "range_option ::=", + /* 201 */ "range_option ::= RANGE LP timestamp COMMA timestamp RP", + /* 202 */ "interval_option ::= intervalKey LP tmvar RP", + /* 203 */ "interval_option ::= intervalKey LP tmvar COMMA tmvar RP", + /* 204 */ "interval_option ::=", + /* 205 */ "intervalKey ::= INTERVAL", + /* 206 */ "intervalKey ::= EVERY", + /* 207 */ "session_option ::=", + /* 208 */ "session_option ::= SESSION LP ids cpxName COMMA tmvar RP", + /* 209 */ "windowstate_option ::=", + /* 210 */ "windowstate_option ::= STATE_WINDOW LP ids RP", + /* 211 */ "fill_opt ::=", + /* 212 */ "fill_opt ::= FILL LP ID COMMA tagitemlist RP", + /* 213 */ "fill_opt ::= FILL LP ID RP", + /* 214 */ "sliding_opt ::= SLIDING LP tmvar RP", + /* 215 */ "sliding_opt ::=", + /* 216 */ "orderby_opt ::=", + /* 217 */ "orderby_opt ::= ORDER BY sortlist", + /* 218 */ "sortlist ::= sortlist COMMA item sortorder", + /* 219 */ "sortlist ::= sortlist COMMA arrow sortorder", + /* 220 */ "sortlist ::= item sortorder", + /* 221 */ "sortlist ::= arrow sortorder", + /* 222 */ "item ::= ID", + /* 223 */ "item ::= ID DOT ID", + /* 224 */ "sortorder ::= ASC", + /* 225 */ "sortorder ::= DESC", + /* 226 */ "sortorder ::=", + /* 227 */ "groupby_opt ::=", + /* 228 */ "groupby_opt ::= GROUP BY grouplist", + /* 229 */ "grouplist ::= grouplist COMMA item", + /* 230 */ "grouplist ::= grouplist COMMA arrow", + /* 231 */ "grouplist ::= item", + /* 232 */ "grouplist ::= arrow", + /* 233 */ "having_opt ::=", + /* 234 */ "having_opt ::= HAVING expr", + /* 235 */ "limit_opt ::=", + /* 236 */ "limit_opt ::= LIMIT signed", + /* 237 */ "limit_opt ::= LIMIT signed OFFSET signed", + /* 238 */ "limit_opt ::= LIMIT signed COMMA signed", + /* 239 */ "slimit_opt ::=", + /* 240 */ "slimit_opt ::= SLIMIT signed", + /* 241 */ "slimit_opt ::= SLIMIT signed SOFFSET signed", + /* 242 */ "slimit_opt ::= SLIMIT signed COMMA signed", + /* 243 */ "where_opt ::=", + /* 244 */ "where_opt ::= WHERE expr", + /* 245 */ "expr ::= LP expr RP", + /* 246 */ "expr ::= ID", + /* 247 */ "expr ::= ID DOT ID", + /* 248 */ "expr ::= ID DOT STAR", + /* 249 */ "expr ::= INTEGER", + /* 250 */ "expr ::= MINUS INTEGER", + /* 251 */ "expr ::= PLUS INTEGER", + /* 252 */ "expr ::= FLOAT", + /* 253 */ "expr ::= MINUS FLOAT", + /* 254 */ "expr ::= PLUS FLOAT", + /* 255 */ "expr ::= STRING", + /* 256 */ "expr ::= NOW", + /* 257 */ "expr ::= VARIABLE", + /* 258 */ "expr ::= PLUS VARIABLE", + /* 259 */ "expr ::= MINUS VARIABLE", + /* 260 */ "expr ::= BOOL", + /* 261 */ "expr ::= NULL", + /* 262 */ "expr ::= ID LP exprlist RP", + /* 263 */ "expr ::= ID LP STAR RP", + /* 264 */ "expr ::= expr IS NULL", + /* 265 */ "expr ::= expr IS NOT NULL", + /* 266 */ "expr ::= expr LT expr", + /* 267 */ "expr ::= expr GT expr", + /* 268 */ "expr ::= expr LE expr", + /* 269 */ "expr ::= expr GE expr", + /* 270 */ "expr ::= expr NE expr", + /* 271 */ "expr ::= expr EQ expr", + /* 272 */ "expr ::= expr BETWEEN expr AND expr", + /* 273 */ "expr ::= expr AND expr", + /* 274 */ "expr ::= expr OR expr", + /* 275 */ "expr ::= expr PLUS expr", + /* 276 */ "expr ::= expr MINUS expr", + /* 277 */ "expr ::= expr STAR expr", + /* 278 */ "expr ::= expr SLASH expr", + /* 279 */ "expr ::= expr REM expr", + /* 280 */ "expr ::= expr LIKE expr", + /* 281 */ "expr ::= expr MATCH expr", + /* 282 */ "expr ::= expr NMATCH expr", + /* 283 */ "expr ::= ID CONTAINS STRING", + /* 284 */ "expr ::= ID DOT ID CONTAINS STRING", + /* 285 */ "arrow ::= ID ARROW STRING", + /* 286 */ "arrow ::= ID DOT ID ARROW STRING", + /* 287 */ "expr ::= arrow", + /* 288 */ "expr ::= expr IN LP exprlist RP", + /* 289 */ "exprlist ::= exprlist COMMA expritem", + /* 290 */ "exprlist ::= expritem", + /* 291 */ "expritem ::= expr", + /* 292 */ "expritem ::=", + /* 293 */ "cmd ::= RESET QUERY CACHE", + /* 294 */ "cmd ::= SYNCDB ids REPLICA", + /* 295 */ "cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist", + /* 296 */ "cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids", + /* 297 */ "cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist", + /* 298 */ "cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist", + /* 299 */ "cmd ::= ALTER TABLE ids cpxName DROP TAG ids", + /* 300 */ "cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids", + /* 301 */ "cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem", + /* 302 */ "cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist", + /* 303 */ "cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist", + /* 304 */ "cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids", + /* 305 */ "cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist", + /* 306 */ "cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist", + /* 307 */ "cmd ::= ALTER STABLE ids cpxName DROP TAG ids", + /* 308 */ "cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids", + /* 309 */ "cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem", + /* 310 */ "cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist", + /* 311 */ "cmd ::= KILL CONNECTION INTEGER", + /* 312 */ "cmd ::= KILL STREAM INTEGER COLON INTEGER", + /* 313 */ "cmd ::= KILL QUERY INTEGER COLON INTEGER", }; #endif /* NDEBUG */ @@ -2259,156 +2261,158 @@ static const YYCODETYPE yyRuleInfoLhs[] = { 254, /* (159) tagitem ::= BOOL */ 254, /* (160) tagitem ::= NULL */ 254, /* (161) tagitem ::= NOW */ - 254, /* (162) tagitem ::= MINUS INTEGER */ - 254, /* (163) tagitem ::= MINUS FLOAT */ - 254, /* (164) tagitem ::= PLUS INTEGER */ - 254, /* (165) tagitem ::= PLUS FLOAT */ - 252, /* (166) select ::= SELECT selcollist from where_opt range_option interval_option sliding_opt session_option windowstate_option fill_opt groupby_opt having_opt orderby_opt slimit_opt limit_opt */ - 252, /* (167) select ::= LP select RP */ - 269, /* (168) union ::= select */ - 269, /* (169) union ::= union UNION ALL select */ - 203, /* (170) cmd ::= union */ - 252, /* (171) select ::= SELECT selcollist */ - 270, /* (172) sclp ::= selcollist COMMA */ - 270, /* (173) sclp ::= */ - 255, /* (174) selcollist ::= sclp distinct expr as */ - 255, /* (175) selcollist ::= sclp STAR */ - 273, /* (176) as ::= AS ids */ - 273, /* (177) as ::= ids */ - 273, /* (178) as ::= */ - 271, /* (179) distinct ::= DISTINCT */ - 271, /* (180) distinct ::= */ - 256, /* (181) from ::= FROM tablelist */ - 256, /* (182) from ::= FROM sub */ - 275, /* (183) sub ::= LP union RP */ - 275, /* (184) sub ::= LP union RP ids */ - 275, /* (185) sub ::= sub COMMA LP union RP ids */ - 274, /* (186) tablelist ::= ids cpxName */ - 274, /* (187) tablelist ::= ids cpxName ids */ - 274, /* (188) tablelist ::= tablelist COMMA ids cpxName */ - 274, /* (189) tablelist ::= tablelist COMMA ids cpxName ids */ - 276, /* (190) tmvar ::= VARIABLE */ - 277, /* (191) timestamp ::= INTEGER */ - 277, /* (192) timestamp ::= MINUS INTEGER */ - 277, /* (193) timestamp ::= PLUS INTEGER */ - 277, /* (194) timestamp ::= STRING */ - 277, /* (195) timestamp ::= NOW */ - 277, /* (196) timestamp ::= NOW PLUS VARIABLE */ - 277, /* (197) timestamp ::= NOW MINUS VARIABLE */ - 258, /* (198) range_option ::= */ - 258, /* (199) range_option ::= RANGE LP timestamp COMMA timestamp RP */ - 259, /* (200) interval_option ::= intervalKey LP tmvar RP */ - 259, /* (201) interval_option ::= intervalKey LP tmvar COMMA tmvar RP */ - 259, /* (202) interval_option ::= */ - 278, /* (203) intervalKey ::= INTERVAL */ - 278, /* (204) intervalKey ::= EVERY */ - 261, /* (205) session_option ::= */ - 261, /* (206) session_option ::= SESSION LP ids cpxName COMMA tmvar RP */ - 262, /* (207) windowstate_option ::= */ - 262, /* (208) windowstate_option ::= STATE_WINDOW LP ids RP */ - 263, /* (209) fill_opt ::= */ - 263, /* (210) fill_opt ::= FILL LP ID COMMA tagitemlist RP */ - 263, /* (211) fill_opt ::= FILL LP ID RP */ - 260, /* (212) sliding_opt ::= SLIDING LP tmvar RP */ - 260, /* (213) sliding_opt ::= */ - 266, /* (214) orderby_opt ::= */ - 266, /* (215) orderby_opt ::= ORDER BY sortlist */ - 279, /* (216) sortlist ::= sortlist COMMA item sortorder */ - 279, /* (217) sortlist ::= sortlist COMMA arrow sortorder */ - 279, /* (218) sortlist ::= item sortorder */ - 279, /* (219) sortlist ::= arrow sortorder */ - 280, /* (220) item ::= ID */ - 280, /* (221) item ::= ID DOT ID */ - 281, /* (222) sortorder ::= ASC */ - 281, /* (223) sortorder ::= DESC */ - 281, /* (224) sortorder ::= */ - 264, /* (225) groupby_opt ::= */ - 264, /* (226) groupby_opt ::= GROUP BY grouplist */ - 283, /* (227) grouplist ::= grouplist COMMA item */ - 283, /* (228) grouplist ::= grouplist COMMA arrow */ - 283, /* (229) grouplist ::= item */ - 283, /* (230) grouplist ::= arrow */ - 265, /* (231) having_opt ::= */ - 265, /* (232) having_opt ::= HAVING expr */ - 268, /* (233) limit_opt ::= */ - 268, /* (234) limit_opt ::= LIMIT signed */ - 268, /* (235) limit_opt ::= LIMIT signed OFFSET signed */ - 268, /* (236) limit_opt ::= LIMIT signed COMMA signed */ - 267, /* (237) slimit_opt ::= */ - 267, /* (238) slimit_opt ::= SLIMIT signed */ - 267, /* (239) slimit_opt ::= SLIMIT signed SOFFSET signed */ - 267, /* (240) slimit_opt ::= SLIMIT signed COMMA signed */ - 257, /* (241) where_opt ::= */ - 257, /* (242) where_opt ::= WHERE expr */ - 272, /* (243) expr ::= LP expr RP */ - 272, /* (244) expr ::= ID */ - 272, /* (245) expr ::= ID DOT ID */ - 272, /* (246) expr ::= ID DOT STAR */ - 272, /* (247) expr ::= INTEGER */ - 272, /* (248) expr ::= MINUS INTEGER */ - 272, /* (249) expr ::= PLUS INTEGER */ - 272, /* (250) expr ::= FLOAT */ - 272, /* (251) expr ::= MINUS FLOAT */ - 272, /* (252) expr ::= PLUS FLOAT */ - 272, /* (253) expr ::= STRING */ - 272, /* (254) expr ::= NOW */ - 272, /* (255) expr ::= VARIABLE */ - 272, /* (256) expr ::= PLUS VARIABLE */ - 272, /* (257) expr ::= MINUS VARIABLE */ - 272, /* (258) expr ::= BOOL */ - 272, /* (259) expr ::= NULL */ - 272, /* (260) expr ::= ID LP exprlist RP */ - 272, /* (261) expr ::= ID LP STAR RP */ - 272, /* (262) expr ::= expr IS NULL */ - 272, /* (263) expr ::= expr IS NOT NULL */ - 272, /* (264) expr ::= expr LT expr */ - 272, /* (265) expr ::= expr GT expr */ - 272, /* (266) expr ::= expr LE expr */ - 272, /* (267) expr ::= expr GE expr */ - 272, /* (268) expr ::= expr NE expr */ - 272, /* (269) expr ::= expr EQ expr */ - 272, /* (270) expr ::= expr BETWEEN expr AND expr */ - 272, /* (271) expr ::= expr AND expr */ - 272, /* (272) expr ::= expr OR expr */ - 272, /* (273) expr ::= expr PLUS expr */ - 272, /* (274) expr ::= expr MINUS expr */ - 272, /* (275) expr ::= expr STAR expr */ - 272, /* (276) expr ::= expr SLASH expr */ - 272, /* (277) expr ::= expr REM expr */ - 272, /* (278) expr ::= expr LIKE expr */ - 272, /* (279) expr ::= expr MATCH expr */ - 272, /* (280) expr ::= expr NMATCH expr */ - 272, /* (281) expr ::= ID CONTAINS STRING */ - 272, /* (282) expr ::= ID DOT ID CONTAINS STRING */ - 282, /* (283) arrow ::= ID ARROW STRING */ - 282, /* (284) arrow ::= ID DOT ID ARROW STRING */ - 272, /* (285) expr ::= arrow */ - 272, /* (286) expr ::= expr IN LP exprlist RP */ - 211, /* (287) exprlist ::= exprlist COMMA expritem */ - 211, /* (288) exprlist ::= expritem */ - 284, /* (289) expritem ::= expr */ - 284, /* (290) expritem ::= */ - 203, /* (291) cmd ::= RESET QUERY CACHE */ - 203, /* (292) cmd ::= SYNCDB ids REPLICA */ - 203, /* (293) cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */ - 203, /* (294) cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */ - 203, /* (295) cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */ - 203, /* (296) cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */ - 203, /* (297) cmd ::= ALTER TABLE ids cpxName DROP TAG ids */ - 203, /* (298) cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */ - 203, /* (299) cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */ - 203, /* (300) cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */ - 203, /* (301) cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */ - 203, /* (302) cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */ - 203, /* (303) cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */ - 203, /* (304) cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */ - 203, /* (305) cmd ::= ALTER STABLE ids cpxName DROP TAG ids */ - 203, /* (306) cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */ - 203, /* (307) cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem */ - 203, /* (308) cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */ - 203, /* (309) cmd ::= KILL CONNECTION INTEGER */ - 203, /* (310) cmd ::= KILL STREAM INTEGER COLON INTEGER */ - 203, /* (311) cmd ::= KILL QUERY INTEGER COLON INTEGER */ + 254, /* (162) tagitem ::= NOW PLUS VARIABLE */ + 254, /* (163) tagitem ::= NOW MINUS VARIABLE */ + 254, /* (164) tagitem ::= MINUS INTEGER */ + 254, /* (165) tagitem ::= MINUS FLOAT */ + 254, /* (166) tagitem ::= PLUS INTEGER */ + 254, /* (167) tagitem ::= PLUS FLOAT */ + 252, /* (168) select ::= SELECT selcollist from where_opt range_option interval_option sliding_opt session_option windowstate_option fill_opt groupby_opt having_opt orderby_opt slimit_opt limit_opt */ + 252, /* (169) select ::= LP select RP */ + 269, /* (170) union ::= select */ + 269, /* (171) union ::= union UNION ALL select */ + 203, /* (172) cmd ::= union */ + 252, /* (173) select ::= SELECT selcollist */ + 270, /* (174) sclp ::= selcollist COMMA */ + 270, /* (175) sclp ::= */ + 255, /* (176) selcollist ::= sclp distinct expr as */ + 255, /* (177) selcollist ::= sclp STAR */ + 273, /* (178) as ::= AS ids */ + 273, /* (179) as ::= ids */ + 273, /* (180) as ::= */ + 271, /* (181) distinct ::= DISTINCT */ + 271, /* (182) distinct ::= */ + 256, /* (183) from ::= FROM tablelist */ + 256, /* (184) from ::= FROM sub */ + 275, /* (185) sub ::= LP union RP */ + 275, /* (186) sub ::= LP union RP ids */ + 275, /* (187) sub ::= sub COMMA LP union RP ids */ + 274, /* (188) tablelist ::= ids cpxName */ + 274, /* (189) tablelist ::= ids cpxName ids */ + 274, /* (190) tablelist ::= tablelist COMMA ids cpxName */ + 274, /* (191) tablelist ::= tablelist COMMA ids cpxName ids */ + 276, /* (192) tmvar ::= VARIABLE */ + 277, /* (193) timestamp ::= INTEGER */ + 277, /* (194) timestamp ::= MINUS INTEGER */ + 277, /* (195) timestamp ::= PLUS INTEGER */ + 277, /* (196) timestamp ::= STRING */ + 277, /* (197) timestamp ::= NOW */ + 277, /* (198) timestamp ::= NOW PLUS VARIABLE */ + 277, /* (199) timestamp ::= NOW MINUS VARIABLE */ + 258, /* (200) range_option ::= */ + 258, /* (201) range_option ::= RANGE LP timestamp COMMA timestamp RP */ + 259, /* (202) interval_option ::= intervalKey LP tmvar RP */ + 259, /* (203) interval_option ::= intervalKey LP tmvar COMMA tmvar RP */ + 259, /* (204) interval_option ::= */ + 278, /* (205) intervalKey ::= INTERVAL */ + 278, /* (206) intervalKey ::= EVERY */ + 261, /* (207) session_option ::= */ + 261, /* (208) session_option ::= SESSION LP ids cpxName COMMA tmvar RP */ + 262, /* (209) windowstate_option ::= */ + 262, /* (210) windowstate_option ::= STATE_WINDOW LP ids RP */ + 263, /* (211) fill_opt ::= */ + 263, /* (212) fill_opt ::= FILL LP ID COMMA tagitemlist RP */ + 263, /* (213) fill_opt ::= FILL LP ID RP */ + 260, /* (214) sliding_opt ::= SLIDING LP tmvar RP */ + 260, /* (215) sliding_opt ::= */ + 266, /* (216) orderby_opt ::= */ + 266, /* (217) orderby_opt ::= ORDER BY sortlist */ + 279, /* (218) sortlist ::= sortlist COMMA item sortorder */ + 279, /* (219) sortlist ::= sortlist COMMA arrow sortorder */ + 279, /* (220) sortlist ::= item sortorder */ + 279, /* (221) sortlist ::= arrow sortorder */ + 280, /* (222) item ::= ID */ + 280, /* (223) item ::= ID DOT ID */ + 281, /* (224) sortorder ::= ASC */ + 281, /* (225) sortorder ::= DESC */ + 281, /* (226) sortorder ::= */ + 264, /* (227) groupby_opt ::= */ + 264, /* (228) groupby_opt ::= GROUP BY grouplist */ + 283, /* (229) grouplist ::= grouplist COMMA item */ + 283, /* (230) grouplist ::= grouplist COMMA arrow */ + 283, /* (231) grouplist ::= item */ + 283, /* (232) grouplist ::= arrow */ + 265, /* (233) having_opt ::= */ + 265, /* (234) having_opt ::= HAVING expr */ + 268, /* (235) limit_opt ::= */ + 268, /* (236) limit_opt ::= LIMIT signed */ + 268, /* (237) limit_opt ::= LIMIT signed OFFSET signed */ + 268, /* (238) limit_opt ::= LIMIT signed COMMA signed */ + 267, /* (239) slimit_opt ::= */ + 267, /* (240) slimit_opt ::= SLIMIT signed */ + 267, /* (241) slimit_opt ::= SLIMIT signed SOFFSET signed */ + 267, /* (242) slimit_opt ::= SLIMIT signed COMMA signed */ + 257, /* (243) where_opt ::= */ + 257, /* (244) where_opt ::= WHERE expr */ + 272, /* (245) expr ::= LP expr RP */ + 272, /* (246) expr ::= ID */ + 272, /* (247) expr ::= ID DOT ID */ + 272, /* (248) expr ::= ID DOT STAR */ + 272, /* (249) expr ::= INTEGER */ + 272, /* (250) expr ::= MINUS INTEGER */ + 272, /* (251) expr ::= PLUS INTEGER */ + 272, /* (252) expr ::= FLOAT */ + 272, /* (253) expr ::= MINUS FLOAT */ + 272, /* (254) expr ::= PLUS FLOAT */ + 272, /* (255) expr ::= STRING */ + 272, /* (256) expr ::= NOW */ + 272, /* (257) expr ::= VARIABLE */ + 272, /* (258) expr ::= PLUS VARIABLE */ + 272, /* (259) expr ::= MINUS VARIABLE */ + 272, /* (260) expr ::= BOOL */ + 272, /* (261) expr ::= NULL */ + 272, /* (262) expr ::= ID LP exprlist RP */ + 272, /* (263) expr ::= ID LP STAR RP */ + 272, /* (264) expr ::= expr IS NULL */ + 272, /* (265) expr ::= expr IS NOT NULL */ + 272, /* (266) expr ::= expr LT expr */ + 272, /* (267) expr ::= expr GT expr */ + 272, /* (268) expr ::= expr LE expr */ + 272, /* (269) expr ::= expr GE expr */ + 272, /* (270) expr ::= expr NE expr */ + 272, /* (271) expr ::= expr EQ expr */ + 272, /* (272) expr ::= expr BETWEEN expr AND expr */ + 272, /* (273) expr ::= expr AND expr */ + 272, /* (274) expr ::= expr OR expr */ + 272, /* (275) expr ::= expr PLUS expr */ + 272, /* (276) expr ::= expr MINUS expr */ + 272, /* (277) expr ::= expr STAR expr */ + 272, /* (278) expr ::= expr SLASH expr */ + 272, /* (279) expr ::= expr REM expr */ + 272, /* (280) expr ::= expr LIKE expr */ + 272, /* (281) expr ::= expr MATCH expr */ + 272, /* (282) expr ::= expr NMATCH expr */ + 272, /* (283) expr ::= ID CONTAINS STRING */ + 272, /* (284) expr ::= ID DOT ID CONTAINS STRING */ + 282, /* (285) arrow ::= ID ARROW STRING */ + 282, /* (286) arrow ::= ID DOT ID ARROW STRING */ + 272, /* (287) expr ::= arrow */ + 272, /* (288) expr ::= expr IN LP exprlist RP */ + 211, /* (289) exprlist ::= exprlist COMMA expritem */ + 211, /* (290) exprlist ::= expritem */ + 284, /* (291) expritem ::= expr */ + 284, /* (292) expritem ::= */ + 203, /* (293) cmd ::= RESET QUERY CACHE */ + 203, /* (294) cmd ::= SYNCDB ids REPLICA */ + 203, /* (295) cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */ + 203, /* (296) cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */ + 203, /* (297) cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */ + 203, /* (298) cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */ + 203, /* (299) cmd ::= ALTER TABLE ids cpxName DROP TAG ids */ + 203, /* (300) cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */ + 203, /* (301) cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */ + 203, /* (302) cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */ + 203, /* (303) cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */ + 203, /* (304) cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */ + 203, /* (305) cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */ + 203, /* (306) cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */ + 203, /* (307) cmd ::= ALTER STABLE ids cpxName DROP TAG ids */ + 203, /* (308) cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */ + 203, /* (309) cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem */ + 203, /* (310) cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */ + 203, /* (311) cmd ::= KILL CONNECTION INTEGER */ + 203, /* (312) cmd ::= KILL STREAM INTEGER COLON INTEGER */ + 203, /* (313) cmd ::= KILL QUERY INTEGER COLON INTEGER */ }; /* For rule J, yyRuleInfoNRhs[J] contains the negative of the number @@ -2576,156 +2580,158 @@ static const signed char yyRuleInfoNRhs[] = { -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 */ - -15, /* (166) select ::= SELECT selcollist from where_opt range_option interval_option 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 */ - -1, /* (191) timestamp ::= INTEGER */ - -2, /* (192) timestamp ::= MINUS INTEGER */ - -2, /* (193) timestamp ::= PLUS INTEGER */ - -1, /* (194) timestamp ::= STRING */ - -1, /* (195) timestamp ::= NOW */ - -3, /* (196) timestamp ::= NOW PLUS VARIABLE */ - -3, /* (197) timestamp ::= NOW MINUS VARIABLE */ - 0, /* (198) range_option ::= */ - -6, /* (199) range_option ::= RANGE LP timestamp COMMA timestamp RP */ - -4, /* (200) interval_option ::= intervalKey LP tmvar RP */ - -6, /* (201) interval_option ::= intervalKey LP tmvar COMMA tmvar RP */ - 0, /* (202) interval_option ::= */ - -1, /* (203) intervalKey ::= INTERVAL */ - -1, /* (204) intervalKey ::= EVERY */ - 0, /* (205) session_option ::= */ - -7, /* (206) session_option ::= SESSION LP ids cpxName COMMA tmvar RP */ - 0, /* (207) windowstate_option ::= */ - -4, /* (208) windowstate_option ::= STATE_WINDOW LP ids RP */ - 0, /* (209) fill_opt ::= */ - -6, /* (210) fill_opt ::= FILL LP ID COMMA tagitemlist RP */ - -4, /* (211) fill_opt ::= FILL LP ID RP */ - -4, /* (212) sliding_opt ::= SLIDING LP tmvar RP */ - 0, /* (213) sliding_opt ::= */ - 0, /* (214) orderby_opt ::= */ - -3, /* (215) orderby_opt ::= ORDER BY sortlist */ - -4, /* (216) sortlist ::= sortlist COMMA item sortorder */ - -4, /* (217) sortlist ::= sortlist COMMA arrow sortorder */ - -2, /* (218) sortlist ::= item sortorder */ - -2, /* (219) sortlist ::= arrow sortorder */ - -1, /* (220) item ::= ID */ - -3, /* (221) item ::= ID DOT ID */ - -1, /* (222) sortorder ::= ASC */ - -1, /* (223) sortorder ::= DESC */ - 0, /* (224) sortorder ::= */ - 0, /* (225) groupby_opt ::= */ - -3, /* (226) groupby_opt ::= GROUP BY grouplist */ - -3, /* (227) grouplist ::= grouplist COMMA item */ - -3, /* (228) grouplist ::= grouplist COMMA arrow */ - -1, /* (229) grouplist ::= item */ - -1, /* (230) grouplist ::= arrow */ - 0, /* (231) having_opt ::= */ - -2, /* (232) having_opt ::= HAVING expr */ - 0, /* (233) limit_opt ::= */ - -2, /* (234) limit_opt ::= LIMIT signed */ - -4, /* (235) limit_opt ::= LIMIT signed OFFSET signed */ - -4, /* (236) limit_opt ::= LIMIT signed COMMA signed */ - 0, /* (237) slimit_opt ::= */ - -2, /* (238) slimit_opt ::= SLIMIT signed */ - -4, /* (239) slimit_opt ::= SLIMIT signed SOFFSET signed */ - -4, /* (240) slimit_opt ::= SLIMIT signed COMMA signed */ - 0, /* (241) where_opt ::= */ - -2, /* (242) where_opt ::= WHERE expr */ - -3, /* (243) expr ::= LP expr RP */ - -1, /* (244) expr ::= ID */ - -3, /* (245) expr ::= ID DOT ID */ - -3, /* (246) expr ::= ID DOT STAR */ - -1, /* (247) expr ::= INTEGER */ - -2, /* (248) expr ::= MINUS INTEGER */ - -2, /* (249) expr ::= PLUS INTEGER */ - -1, /* (250) expr ::= FLOAT */ - -2, /* (251) expr ::= MINUS FLOAT */ - -2, /* (252) expr ::= PLUS FLOAT */ - -1, /* (253) expr ::= STRING */ - -1, /* (254) expr ::= NOW */ - -1, /* (255) expr ::= VARIABLE */ - -2, /* (256) expr ::= PLUS VARIABLE */ - -2, /* (257) expr ::= MINUS VARIABLE */ - -1, /* (258) expr ::= BOOL */ - -1, /* (259) expr ::= NULL */ - -4, /* (260) expr ::= ID LP exprlist RP */ - -4, /* (261) expr ::= ID LP STAR RP */ - -3, /* (262) expr ::= expr IS NULL */ - -4, /* (263) expr ::= expr IS NOT NULL */ - -3, /* (264) expr ::= expr LT expr */ - -3, /* (265) expr ::= expr GT expr */ - -3, /* (266) expr ::= expr LE expr */ - -3, /* (267) expr ::= expr GE expr */ - -3, /* (268) expr ::= expr NE expr */ - -3, /* (269) expr ::= expr EQ expr */ - -5, /* (270) expr ::= expr BETWEEN expr AND expr */ - -3, /* (271) expr ::= expr AND expr */ - -3, /* (272) expr ::= expr OR expr */ - -3, /* (273) expr ::= expr PLUS expr */ - -3, /* (274) expr ::= expr MINUS expr */ - -3, /* (275) expr ::= expr STAR expr */ - -3, /* (276) expr ::= expr SLASH expr */ - -3, /* (277) expr ::= expr REM expr */ - -3, /* (278) expr ::= expr LIKE expr */ - -3, /* (279) expr ::= expr MATCH expr */ - -3, /* (280) expr ::= expr NMATCH expr */ - -3, /* (281) expr ::= ID CONTAINS STRING */ - -5, /* (282) expr ::= ID DOT ID CONTAINS STRING */ - -3, /* (283) arrow ::= ID ARROW STRING */ - -5, /* (284) arrow ::= ID DOT ID ARROW STRING */ - -1, /* (285) expr ::= arrow */ - -5, /* (286) expr ::= expr IN LP exprlist RP */ - -3, /* (287) exprlist ::= exprlist COMMA expritem */ - -1, /* (288) exprlist ::= expritem */ - -1, /* (289) expritem ::= expr */ - 0, /* (290) expritem ::= */ - -3, /* (291) cmd ::= RESET QUERY CACHE */ - -3, /* (292) cmd ::= SYNCDB ids REPLICA */ - -7, /* (293) cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */ - -7, /* (294) cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */ - -7, /* (295) cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */ - -7, /* (296) cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */ - -7, /* (297) cmd ::= ALTER TABLE ids cpxName DROP TAG ids */ - -8, /* (298) cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */ - -9, /* (299) cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */ - -7, /* (300) cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */ - -7, /* (301) cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */ - -7, /* (302) cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */ - -7, /* (303) cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */ - -7, /* (304) cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */ - -7, /* (305) cmd ::= ALTER STABLE ids cpxName DROP TAG ids */ - -8, /* (306) cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */ - -9, /* (307) cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem */ - -7, /* (308) cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */ - -3, /* (309) cmd ::= KILL CONNECTION INTEGER */ - -5, /* (310) cmd ::= KILL STREAM INTEGER COLON INTEGER */ - -5, /* (311) cmd ::= KILL QUERY INTEGER COLON INTEGER */ + -3, /* (162) tagitem ::= NOW PLUS VARIABLE */ + -3, /* (163) tagitem ::= NOW MINUS VARIABLE */ + -2, /* (164) tagitem ::= MINUS INTEGER */ + -2, /* (165) tagitem ::= MINUS FLOAT */ + -2, /* (166) tagitem ::= PLUS INTEGER */ + -2, /* (167) tagitem ::= PLUS FLOAT */ + -15, /* (168) select ::= SELECT selcollist from where_opt range_option interval_option sliding_opt session_option windowstate_option fill_opt groupby_opt having_opt orderby_opt slimit_opt limit_opt */ + -3, /* (169) select ::= LP select RP */ + -1, /* (170) union ::= select */ + -4, /* (171) union ::= union UNION ALL select */ + -1, /* (172) cmd ::= union */ + -2, /* (173) select ::= SELECT selcollist */ + -2, /* (174) sclp ::= selcollist COMMA */ + 0, /* (175) sclp ::= */ + -4, /* (176) selcollist ::= sclp distinct expr as */ + -2, /* (177) selcollist ::= sclp STAR */ + -2, /* (178) as ::= AS ids */ + -1, /* (179) as ::= ids */ + 0, /* (180) as ::= */ + -1, /* (181) distinct ::= DISTINCT */ + 0, /* (182) distinct ::= */ + -2, /* (183) from ::= FROM tablelist */ + -2, /* (184) from ::= FROM sub */ + -3, /* (185) sub ::= LP union RP */ + -4, /* (186) sub ::= LP union RP ids */ + -6, /* (187) sub ::= sub COMMA LP union RP ids */ + -2, /* (188) tablelist ::= ids cpxName */ + -3, /* (189) tablelist ::= ids cpxName ids */ + -4, /* (190) tablelist ::= tablelist COMMA ids cpxName */ + -5, /* (191) tablelist ::= tablelist COMMA ids cpxName ids */ + -1, /* (192) tmvar ::= VARIABLE */ + -1, /* (193) timestamp ::= INTEGER */ + -2, /* (194) timestamp ::= MINUS INTEGER */ + -2, /* (195) timestamp ::= PLUS INTEGER */ + -1, /* (196) timestamp ::= STRING */ + -1, /* (197) timestamp ::= NOW */ + -3, /* (198) timestamp ::= NOW PLUS VARIABLE */ + -3, /* (199) timestamp ::= NOW MINUS VARIABLE */ + 0, /* (200) range_option ::= */ + -6, /* (201) range_option ::= RANGE LP timestamp COMMA timestamp RP */ + -4, /* (202) interval_option ::= intervalKey LP tmvar RP */ + -6, /* (203) interval_option ::= intervalKey LP tmvar COMMA tmvar RP */ + 0, /* (204) interval_option ::= */ + -1, /* (205) intervalKey ::= INTERVAL */ + -1, /* (206) intervalKey ::= EVERY */ + 0, /* (207) session_option ::= */ + -7, /* (208) session_option ::= SESSION LP ids cpxName COMMA tmvar RP */ + 0, /* (209) windowstate_option ::= */ + -4, /* (210) windowstate_option ::= STATE_WINDOW LP ids RP */ + 0, /* (211) fill_opt ::= */ + -6, /* (212) fill_opt ::= FILL LP ID COMMA tagitemlist RP */ + -4, /* (213) fill_opt ::= FILL LP ID RP */ + -4, /* (214) sliding_opt ::= SLIDING LP tmvar RP */ + 0, /* (215) sliding_opt ::= */ + 0, /* (216) orderby_opt ::= */ + -3, /* (217) orderby_opt ::= ORDER BY sortlist */ + -4, /* (218) sortlist ::= sortlist COMMA item sortorder */ + -4, /* (219) sortlist ::= sortlist COMMA arrow sortorder */ + -2, /* (220) sortlist ::= item sortorder */ + -2, /* (221) sortlist ::= arrow sortorder */ + -1, /* (222) item ::= ID */ + -3, /* (223) item ::= ID DOT ID */ + -1, /* (224) sortorder ::= ASC */ + -1, /* (225) sortorder ::= DESC */ + 0, /* (226) sortorder ::= */ + 0, /* (227) groupby_opt ::= */ + -3, /* (228) groupby_opt ::= GROUP BY grouplist */ + -3, /* (229) grouplist ::= grouplist COMMA item */ + -3, /* (230) grouplist ::= grouplist COMMA arrow */ + -1, /* (231) grouplist ::= item */ + -1, /* (232) grouplist ::= arrow */ + 0, /* (233) having_opt ::= */ + -2, /* (234) having_opt ::= HAVING expr */ + 0, /* (235) limit_opt ::= */ + -2, /* (236) limit_opt ::= LIMIT signed */ + -4, /* (237) limit_opt ::= LIMIT signed OFFSET signed */ + -4, /* (238) limit_opt ::= LIMIT signed COMMA signed */ + 0, /* (239) slimit_opt ::= */ + -2, /* (240) slimit_opt ::= SLIMIT signed */ + -4, /* (241) slimit_opt ::= SLIMIT signed SOFFSET signed */ + -4, /* (242) slimit_opt ::= SLIMIT signed COMMA signed */ + 0, /* (243) where_opt ::= */ + -2, /* (244) where_opt ::= WHERE expr */ + -3, /* (245) expr ::= LP expr RP */ + -1, /* (246) expr ::= ID */ + -3, /* (247) expr ::= ID DOT ID */ + -3, /* (248) expr ::= ID DOT STAR */ + -1, /* (249) expr ::= INTEGER */ + -2, /* (250) expr ::= MINUS INTEGER */ + -2, /* (251) expr ::= PLUS INTEGER */ + -1, /* (252) expr ::= FLOAT */ + -2, /* (253) expr ::= MINUS FLOAT */ + -2, /* (254) expr ::= PLUS FLOAT */ + -1, /* (255) expr ::= STRING */ + -1, /* (256) expr ::= NOW */ + -1, /* (257) expr ::= VARIABLE */ + -2, /* (258) expr ::= PLUS VARIABLE */ + -2, /* (259) expr ::= MINUS VARIABLE */ + -1, /* (260) expr ::= BOOL */ + -1, /* (261) expr ::= NULL */ + -4, /* (262) expr ::= ID LP exprlist RP */ + -4, /* (263) expr ::= ID LP STAR RP */ + -3, /* (264) expr ::= expr IS NULL */ + -4, /* (265) expr ::= expr IS NOT NULL */ + -3, /* (266) expr ::= expr LT expr */ + -3, /* (267) expr ::= expr GT expr */ + -3, /* (268) expr ::= expr LE expr */ + -3, /* (269) expr ::= expr GE expr */ + -3, /* (270) expr ::= expr NE expr */ + -3, /* (271) expr ::= expr EQ expr */ + -5, /* (272) expr ::= expr BETWEEN expr AND expr */ + -3, /* (273) expr ::= expr AND expr */ + -3, /* (274) expr ::= expr OR expr */ + -3, /* (275) expr ::= expr PLUS expr */ + -3, /* (276) expr ::= expr MINUS expr */ + -3, /* (277) expr ::= expr STAR expr */ + -3, /* (278) expr ::= expr SLASH expr */ + -3, /* (279) expr ::= expr REM expr */ + -3, /* (280) expr ::= expr LIKE expr */ + -3, /* (281) expr ::= expr MATCH expr */ + -3, /* (282) expr ::= expr NMATCH expr */ + -3, /* (283) expr ::= ID CONTAINS STRING */ + -5, /* (284) expr ::= ID DOT ID CONTAINS STRING */ + -3, /* (285) arrow ::= ID ARROW STRING */ + -5, /* (286) arrow ::= ID DOT ID ARROW STRING */ + -1, /* (287) expr ::= arrow */ + -5, /* (288) expr ::= expr IN LP exprlist RP */ + -3, /* (289) exprlist ::= exprlist COMMA expritem */ + -1, /* (290) exprlist ::= expritem */ + -1, /* (291) expritem ::= expr */ + 0, /* (292) expritem ::= */ + -3, /* (293) cmd ::= RESET QUERY CACHE */ + -3, /* (294) cmd ::= SYNCDB ids REPLICA */ + -7, /* (295) cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */ + -7, /* (296) cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */ + -7, /* (297) cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */ + -7, /* (298) cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */ + -7, /* (299) cmd ::= ALTER TABLE ids cpxName DROP TAG ids */ + -8, /* (300) cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */ + -9, /* (301) cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */ + -7, /* (302) cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */ + -7, /* (303) cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */ + -7, /* (304) cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */ + -7, /* (305) cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */ + -7, /* (306) cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */ + -7, /* (307) cmd ::= ALTER STABLE ids cpxName DROP TAG ids */ + -8, /* (308) cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */ + -9, /* (309) cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem */ + -7, /* (310) cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */ + -3, /* (311) cmd ::= KILL CONNECTION INTEGER */ + -5, /* (312) cmd ::= KILL STREAM INTEGER COLON INTEGER */ + -5, /* (313) cmd ::= KILL QUERY INTEGER COLON INTEGER */ }; static void yy_accept(yyParser*); /* Forward Declaration */ @@ -2961,7 +2967,7 @@ static YYACTIONTYPE yy_reduce( break; case 54: /* ifexists ::= */ case 56: /* ifnotexists ::= */ yytestcase(yyruleno==56); - case 180: /* distinct ::= */ yytestcase(yyruleno==180); + case 182: /* distinct ::= */ yytestcase(yyruleno==182); { yymsp[1].minor.yy0.n = 0;} break; case 55: /* ifnotexists ::= IF NOT EXISTS */ @@ -3039,7 +3045,7 @@ static YYACTIONTYPE yy_reduce( case 157: /* tagitem ::= FLOAT */ yytestcase(yyruleno==157); case 158: /* tagitem ::= STRING */ yytestcase(yyruleno==158); case 159: /* tagitem ::= BOOL */ yytestcase(yyruleno==159); -{ toTSDBType(yymsp[0].minor.yy0.type); tVariantCreate(&yylhsminor.yy176, &yymsp[0].minor.yy0, true); } +{ toTSDBType(yymsp[0].minor.yy0.type); tVariantCreate(&yylhsminor.yy176, &yymsp[0].minor.yy0); } yymsp[0].minor.yy176 = yylhsminor.yy176; break; case 88: /* keep ::= KEEP intitemlist */ @@ -3272,519 +3278,531 @@ static YYACTIONTYPE yy_reduce( yymsp[-1].minor.yy103 = yylhsminor.yy103; break; case 160: /* tagitem ::= NULL */ -{ yymsp[0].minor.yy0.type = 0; tVariantCreate(&yylhsminor.yy176, &yymsp[0].minor.yy0, true); } +{ yymsp[0].minor.yy0.type = 0; tVariantCreate(&yylhsminor.yy176, &yymsp[0].minor.yy0); } yymsp[0].minor.yy176 = yylhsminor.yy176; break; case 161: /* tagitem ::= NOW */ -{ yymsp[0].minor.yy0.type = TSDB_DATA_TYPE_TIMESTAMP; tVariantCreate(&yylhsminor.yy176, &yymsp[0].minor.yy0, true);} +{ yymsp[0].minor.yy0.type = TSDB_DATA_TYPE_TIMESTAMP; tVariantCreateExt(&yylhsminor.yy176, &yymsp[0].minor.yy0, TK_NOW, true);} yymsp[0].minor.yy176 = yylhsminor.yy176; break; - case 162: /* tagitem ::= MINUS INTEGER */ - case 163: /* tagitem ::= MINUS FLOAT */ yytestcase(yyruleno==163); - case 164: /* tagitem ::= PLUS INTEGER */ yytestcase(yyruleno==164); - case 165: /* tagitem ::= PLUS FLOAT */ yytestcase(yyruleno==165); + case 162: /* tagitem ::= NOW PLUS VARIABLE */ +{ + yymsp[0].minor.yy0.type = TSDB_DATA_TYPE_TIMESTAMP; + tVariantCreateExt(&yymsp[-2].minor.yy176, &yymsp[0].minor.yy0, TK_PLUS, true); +} + break; + case 163: /* tagitem ::= NOW MINUS VARIABLE */ +{ + yymsp[0].minor.yy0.type = TSDB_DATA_TYPE_TIMESTAMP; + tVariantCreateExt(&yymsp[-2].minor.yy176, &yymsp[0].minor.yy0, TK_MINUS, true); +} + break; + case 164: /* tagitem ::= MINUS INTEGER */ + case 165: /* tagitem ::= MINUS FLOAT */ yytestcase(yyruleno==165); + case 166: /* tagitem ::= PLUS INTEGER */ yytestcase(yyruleno==166); + case 167: /* tagitem ::= PLUS FLOAT */ yytestcase(yyruleno==167); { 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.yy176, &yymsp[-1].minor.yy0, true); + tVariantCreate(&yylhsminor.yy176, &yymsp[-1].minor.yy0); } yymsp[-1].minor.yy176 = yylhsminor.yy176; break; - case 166: /* select ::= SELECT selcollist from where_opt range_option interval_option sliding_opt session_option windowstate_option fill_opt groupby_opt having_opt orderby_opt slimit_opt limit_opt */ + case 168: /* select ::= SELECT selcollist from where_opt range_option interval_option sliding_opt session_option windowstate_option fill_opt groupby_opt having_opt orderby_opt slimit_opt limit_opt */ { yylhsminor.yy86 = tSetQuerySqlNode(&yymsp[-14].minor.yy0, yymsp[-13].minor.yy231, yymsp[-12].minor.yy484, yymsp[-11].minor.yy226, yymsp[-4].minor.yy231, yymsp[-2].minor.yy231, &yymsp[-9].minor.yy430, &yymsp[-7].minor.yy409, &yymsp[-6].minor.yy228, &yymsp[-8].minor.yy0, yymsp[-5].minor.yy231, &yymsp[0].minor.yy444, &yymsp[-1].minor.yy444, yymsp[-3].minor.yy226, &yymsp[-10].minor.yy480); } yymsp[-14].minor.yy86 = yylhsminor.yy86; break; - case 167: /* select ::= LP select RP */ + case 169: /* select ::= LP select RP */ {yymsp[-2].minor.yy86 = yymsp[-1].minor.yy86;} break; - case 168: /* union ::= select */ + case 170: /* union ::= select */ { yylhsminor.yy231 = setSubclause(NULL, yymsp[0].minor.yy86); } yymsp[0].minor.yy231 = yylhsminor.yy231; break; - case 169: /* union ::= union UNION ALL select */ + case 171: /* union ::= union UNION ALL select */ { yylhsminor.yy231 = appendSelectClause(yymsp[-3].minor.yy231, yymsp[0].minor.yy86); } yymsp[-3].minor.yy231 = yylhsminor.yy231; break; - case 170: /* cmd ::= union */ + case 172: /* cmd ::= union */ { setSqlInfo(pInfo, yymsp[0].minor.yy231, NULL, TSDB_SQL_SELECT); } break; - case 171: /* select ::= SELECT selcollist */ + case 173: /* select ::= SELECT selcollist */ { yylhsminor.yy86 = tSetQuerySqlNode(&yymsp[-1].minor.yy0, yymsp[0].minor.yy231, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); } yymsp[-1].minor.yy86 = yylhsminor.yy86; break; - case 172: /* sclp ::= selcollist COMMA */ + case 174: /* sclp ::= selcollist COMMA */ {yylhsminor.yy231 = yymsp[-1].minor.yy231;} yymsp[-1].minor.yy231 = yylhsminor.yy231; break; - case 173: /* sclp ::= */ - case 214: /* orderby_opt ::= */ yytestcase(yyruleno==214); + case 175: /* sclp ::= */ + case 216: /* orderby_opt ::= */ yytestcase(yyruleno==216); {yymsp[1].minor.yy231 = 0;} break; - case 174: /* selcollist ::= sclp distinct expr as */ + case 176: /* selcollist ::= sclp distinct expr as */ { yylhsminor.yy231 = tSqlExprListAppend(yymsp[-3].minor.yy231, yymsp[-1].minor.yy226, yymsp[-2].minor.yy0.n? &yymsp[-2].minor.yy0:0, yymsp[0].minor.yy0.n?&yymsp[0].minor.yy0:0); } yymsp[-3].minor.yy231 = yylhsminor.yy231; break; - case 175: /* selcollist ::= sclp STAR */ + case 177: /* selcollist ::= sclp STAR */ { tSqlExpr *pNode = tSqlExprCreateIdValue(pInfo, NULL, TK_ALL); yylhsminor.yy231 = tSqlExprListAppend(yymsp[-1].minor.yy231, pNode, 0, 0); } yymsp[-1].minor.yy231 = yylhsminor.yy231; break; - case 176: /* as ::= AS ids */ + case 178: /* as ::= AS ids */ { yymsp[-1].minor.yy0 = yymsp[0].minor.yy0; } break; - case 177: /* as ::= ids */ + case 179: /* as ::= ids */ { yylhsminor.yy0 = yymsp[0].minor.yy0; } yymsp[0].minor.yy0 = yylhsminor.yy0; break; - case 178: /* as ::= */ + case 180: /* as ::= */ { yymsp[1].minor.yy0.n = 0; } break; - case 179: /* distinct ::= DISTINCT */ + case 181: /* distinct ::= DISTINCT */ { yylhsminor.yy0 = yymsp[0].minor.yy0; } yymsp[0].minor.yy0 = yylhsminor.yy0; break; - case 181: /* from ::= FROM tablelist */ - case 182: /* from ::= FROM sub */ yytestcase(yyruleno==182); + case 183: /* from ::= FROM tablelist */ + case 184: /* from ::= FROM sub */ yytestcase(yyruleno==184); {yymsp[-1].minor.yy484 = yymsp[0].minor.yy484;} break; - case 183: /* sub ::= LP union RP */ + case 185: /* sub ::= LP union RP */ {yymsp[-2].minor.yy484 = addSubqueryElem(NULL, yymsp[-1].minor.yy231, NULL);} break; - case 184: /* sub ::= LP union RP ids */ + case 186: /* sub ::= LP union RP ids */ {yymsp[-3].minor.yy484 = addSubqueryElem(NULL, yymsp[-2].minor.yy231, &yymsp[0].minor.yy0);} break; - case 185: /* sub ::= sub COMMA LP union RP ids */ + case 187: /* sub ::= sub COMMA LP union RP ids */ {yylhsminor.yy484 = addSubqueryElem(yymsp[-5].minor.yy484, yymsp[-2].minor.yy231, &yymsp[0].minor.yy0);} yymsp[-5].minor.yy484 = yylhsminor.yy484; break; - case 186: /* tablelist ::= ids cpxName */ + case 188: /* tablelist ::= ids cpxName */ { yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yylhsminor.yy484 = setTableNameList(NULL, &yymsp[-1].minor.yy0, NULL); } yymsp[-1].minor.yy484 = yylhsminor.yy484; break; - case 187: /* tablelist ::= ids cpxName ids */ + case 189: /* tablelist ::= ids cpxName ids */ { yymsp[-2].minor.yy0.n += yymsp[-1].minor.yy0.n; yylhsminor.yy484 = setTableNameList(NULL, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy484 = yylhsminor.yy484; break; - case 188: /* tablelist ::= tablelist COMMA ids cpxName */ + case 190: /* tablelist ::= tablelist COMMA ids cpxName */ { yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yylhsminor.yy484 = setTableNameList(yymsp[-3].minor.yy484, &yymsp[-1].minor.yy0, NULL); } yymsp[-3].minor.yy484 = yylhsminor.yy484; break; - case 189: /* tablelist ::= tablelist COMMA ids cpxName ids */ + case 191: /* tablelist ::= tablelist COMMA ids cpxName ids */ { yymsp[-2].minor.yy0.n += yymsp[-1].minor.yy0.n; yylhsminor.yy484 = setTableNameList(yymsp[-4].minor.yy484, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } yymsp[-4].minor.yy484 = yylhsminor.yy484; break; - case 190: /* tmvar ::= VARIABLE */ + case 192: /* tmvar ::= VARIABLE */ {yylhsminor.yy0 = yymsp[0].minor.yy0;} yymsp[0].minor.yy0 = yylhsminor.yy0; break; - case 191: /* timestamp ::= INTEGER */ + case 193: /* timestamp ::= INTEGER */ { yylhsminor.yy226 = tSqlExprCreateTimestamp(&yymsp[0].minor.yy0, TK_INTEGER);} yymsp[0].minor.yy226 = yylhsminor.yy226; break; - case 192: /* timestamp ::= MINUS INTEGER */ - case 193: /* timestamp ::= PLUS INTEGER */ yytestcase(yyruleno==193); + case 194: /* timestamp ::= MINUS INTEGER */ + case 195: /* timestamp ::= PLUS INTEGER */ yytestcase(yyruleno==195); { yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yymsp[-1].minor.yy0.type = TK_INTEGER; yylhsminor.yy226 = tSqlExprCreateTimestamp(&yymsp[-1].minor.yy0, TK_INTEGER);} yymsp[-1].minor.yy226 = yylhsminor.yy226; break; - case 194: /* timestamp ::= STRING */ + case 196: /* timestamp ::= STRING */ { yylhsminor.yy226 = tSqlExprCreateTimestamp(&yymsp[0].minor.yy0, TK_STRING);} yymsp[0].minor.yy226 = yylhsminor.yy226; break; - case 195: /* timestamp ::= NOW */ + case 197: /* timestamp ::= NOW */ { yylhsminor.yy226 = tSqlExprCreateTimestamp(&yymsp[0].minor.yy0, TK_NOW); } yymsp[0].minor.yy226 = yylhsminor.yy226; break; - case 196: /* timestamp ::= NOW PLUS VARIABLE */ + case 198: /* timestamp ::= NOW PLUS VARIABLE */ {yymsp[-2].minor.yy226 = tSqlExprCreateTimestamp(&yymsp[0].minor.yy0, TK_PLUS); } break; - case 197: /* timestamp ::= NOW MINUS VARIABLE */ + case 199: /* timestamp ::= NOW MINUS VARIABLE */ {yymsp[-2].minor.yy226 = tSqlExprCreateTimestamp(&yymsp[0].minor.yy0, TK_MINUS); } break; - case 198: /* range_option ::= */ + case 200: /* range_option ::= */ {yymsp[1].minor.yy480.start = 0; yymsp[1].minor.yy480.end = 0;} break; - case 199: /* range_option ::= RANGE LP timestamp COMMA timestamp RP */ + case 201: /* range_option ::= RANGE LP timestamp COMMA timestamp RP */ {yymsp[-5].minor.yy480.start = yymsp[-3].minor.yy226; yymsp[-5].minor.yy480.end = yymsp[-1].minor.yy226;} break; - case 200: /* interval_option ::= intervalKey LP tmvar RP */ + case 202: /* interval_option ::= intervalKey LP tmvar RP */ {yylhsminor.yy430.interval = yymsp[-1].minor.yy0; yylhsminor.yy430.offset.n = 0; yylhsminor.yy430.token = yymsp[-3].minor.yy310;} yymsp[-3].minor.yy430 = yylhsminor.yy430; break; - case 201: /* interval_option ::= intervalKey LP tmvar COMMA tmvar RP */ + case 203: /* interval_option ::= intervalKey LP tmvar COMMA tmvar RP */ {yylhsminor.yy430.interval = yymsp[-3].minor.yy0; yylhsminor.yy430.offset = yymsp[-1].minor.yy0; yylhsminor.yy430.token = yymsp[-5].minor.yy310;} yymsp[-5].minor.yy430 = yylhsminor.yy430; break; - case 202: /* interval_option ::= */ + case 204: /* interval_option ::= */ {memset(&yymsp[1].minor.yy430, 0, sizeof(yymsp[1].minor.yy430));} break; - case 203: /* intervalKey ::= INTERVAL */ + case 205: /* intervalKey ::= INTERVAL */ {yymsp[0].minor.yy310 = TK_INTERVAL;} break; - case 204: /* intervalKey ::= EVERY */ + case 206: /* intervalKey ::= EVERY */ {yymsp[0].minor.yy310 = TK_EVERY; } break; - case 205: /* session_option ::= */ + case 207: /* session_option ::= */ {yymsp[1].minor.yy409.col.n = 0; yymsp[1].minor.yy409.gap.n = 0;} break; - case 206: /* session_option ::= SESSION LP ids cpxName COMMA tmvar RP */ + case 208: /* session_option ::= SESSION LP ids cpxName COMMA tmvar RP */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; yymsp[-6].minor.yy409.col = yymsp[-4].minor.yy0; yymsp[-6].minor.yy409.gap = yymsp[-1].minor.yy0; } break; - case 207: /* windowstate_option ::= */ + case 209: /* windowstate_option ::= */ { yymsp[1].minor.yy228.col.n = 0; yymsp[1].minor.yy228.col.z = NULL;} break; - case 208: /* windowstate_option ::= STATE_WINDOW LP ids RP */ + case 210: /* windowstate_option ::= STATE_WINDOW LP ids RP */ { yymsp[-3].minor.yy228.col = yymsp[-1].minor.yy0; } break; - case 209: /* fill_opt ::= */ + case 211: /* fill_opt ::= */ { yymsp[1].minor.yy231 = 0; } break; - case 210: /* fill_opt ::= FILL LP ID COMMA tagitemlist RP */ + case 212: /* fill_opt ::= FILL LP ID COMMA tagitemlist RP */ { tVariant A = {0}; toTSDBType(yymsp[-3].minor.yy0.type); - tVariantCreate(&A, &yymsp[-3].minor.yy0, true); + tVariantCreate(&A, &yymsp[-3].minor.yy0); tVariantListInsert(yymsp[-1].minor.yy231, &A, -1, 0); yymsp[-5].minor.yy231 = yymsp[-1].minor.yy231; } break; - case 211: /* fill_opt ::= FILL LP ID RP */ + case 213: /* fill_opt ::= FILL LP ID RP */ { toTSDBType(yymsp[-1].minor.yy0.type); yymsp[-3].minor.yy231 = tVariantListAppendToken(NULL, &yymsp[-1].minor.yy0, -1, true); } break; - case 212: /* sliding_opt ::= SLIDING LP tmvar RP */ + case 214: /* sliding_opt ::= SLIDING LP tmvar RP */ {yymsp[-3].minor.yy0 = yymsp[-1].minor.yy0; } break; - case 213: /* sliding_opt ::= */ + case 215: /* sliding_opt ::= */ {yymsp[1].minor.yy0.n = 0; yymsp[1].minor.yy0.z = NULL; yymsp[1].minor.yy0.type = 0; } break; - case 215: /* orderby_opt ::= ORDER BY sortlist */ + case 217: /* orderby_opt ::= ORDER BY sortlist */ {yymsp[-2].minor.yy231 = yymsp[0].minor.yy231;} break; - case 216: /* sortlist ::= sortlist COMMA item sortorder */ + case 218: /* sortlist ::= sortlist COMMA item sortorder */ { yylhsminor.yy231 = commonItemAppend(yymsp[-3].minor.yy231, &yymsp[-1].minor.yy176, NULL, false, yymsp[0].minor.yy502); } yymsp[-3].minor.yy231 = yylhsminor.yy231; break; - case 217: /* sortlist ::= sortlist COMMA arrow sortorder */ + case 219: /* sortlist ::= sortlist COMMA arrow sortorder */ { yylhsminor.yy231 = commonItemAppend(yymsp[-3].minor.yy231, NULL, yymsp[-1].minor.yy226, true, yymsp[0].minor.yy502); } yymsp[-3].minor.yy231 = yylhsminor.yy231; break; - case 218: /* sortlist ::= item sortorder */ + case 220: /* sortlist ::= item sortorder */ { yylhsminor.yy231 = commonItemAppend(NULL, &yymsp[-1].minor.yy176, NULL, false, yymsp[0].minor.yy502); } yymsp[-1].minor.yy231 = yylhsminor.yy231; break; - case 219: /* sortlist ::= arrow sortorder */ + case 221: /* sortlist ::= arrow sortorder */ { yylhsminor.yy231 = commonItemAppend(NULL, NULL, yymsp[-1].minor.yy226, true, yymsp[0].minor.yy502); } yymsp[-1].minor.yy231 = yylhsminor.yy231; break; - case 220: /* item ::= ID */ + case 222: /* item ::= ID */ { toTSDBType(yymsp[0].minor.yy0.type); - tVariantCreate(&yylhsminor.yy176, &yymsp[0].minor.yy0, true); + tVariantCreate(&yylhsminor.yy176, &yymsp[0].minor.yy0); } yymsp[0].minor.yy176 = yylhsminor.yy176; break; - case 221: /* item ::= ID DOT ID */ + case 223: /* item ::= ID DOT ID */ { toTSDBType(yymsp[-2].minor.yy0.type); yymsp[-2].minor.yy0.n += (1+yymsp[0].minor.yy0.n); - tVariantCreate(&yylhsminor.yy176, &yymsp[-2].minor.yy0, true); + tVariantCreate(&yylhsminor.yy176, &yymsp[-2].minor.yy0); } yymsp[-2].minor.yy176 = yylhsminor.yy176; break; - case 222: /* sortorder ::= ASC */ + case 224: /* sortorder ::= ASC */ { yymsp[0].minor.yy502 = TSDB_ORDER_ASC; } break; - case 223: /* sortorder ::= DESC */ + case 225: /* sortorder ::= DESC */ { yymsp[0].minor.yy502 = TSDB_ORDER_DESC;} break; - case 224: /* sortorder ::= */ + case 226: /* sortorder ::= */ { yymsp[1].minor.yy502 = TSDB_ORDER_ASC; } break; - case 225: /* groupby_opt ::= */ + case 227: /* groupby_opt ::= */ { yymsp[1].minor.yy231 = 0;} break; - case 226: /* groupby_opt ::= GROUP BY grouplist */ + case 228: /* groupby_opt ::= GROUP BY grouplist */ { yymsp[-2].minor.yy231 = yymsp[0].minor.yy231;} break; - case 227: /* grouplist ::= grouplist COMMA item */ + case 229: /* grouplist ::= grouplist COMMA item */ { yylhsminor.yy231 = commonItemAppend(yymsp[-2].minor.yy231, &yymsp[0].minor.yy176, NULL, false, -1); } yymsp[-2].minor.yy231 = yylhsminor.yy231; break; - case 228: /* grouplist ::= grouplist COMMA arrow */ + case 230: /* grouplist ::= grouplist COMMA arrow */ { yylhsminor.yy231 = commonItemAppend(yymsp[-2].minor.yy231, NULL, yymsp[0].minor.yy226, true, -1); } yymsp[-2].minor.yy231 = yylhsminor.yy231; break; - case 229: /* grouplist ::= item */ + case 231: /* grouplist ::= item */ { yylhsminor.yy231 = commonItemAppend(NULL, &yymsp[0].minor.yy176, NULL, false, -1); } yymsp[0].minor.yy231 = yylhsminor.yy231; break; - case 230: /* grouplist ::= arrow */ + case 232: /* grouplist ::= arrow */ { yylhsminor.yy231 = commonItemAppend(NULL, NULL, yymsp[0].minor.yy226, true, -1); } yymsp[0].minor.yy231 = yylhsminor.yy231; break; - case 231: /* having_opt ::= */ - case 241: /* where_opt ::= */ yytestcase(yyruleno==241); - case 290: /* expritem ::= */ yytestcase(yyruleno==290); + case 233: /* having_opt ::= */ + case 243: /* where_opt ::= */ yytestcase(yyruleno==243); + case 292: /* expritem ::= */ yytestcase(yyruleno==292); {yymsp[1].minor.yy226 = 0;} break; - case 232: /* having_opt ::= HAVING expr */ - case 242: /* where_opt ::= WHERE expr */ yytestcase(yyruleno==242); + case 234: /* having_opt ::= HAVING expr */ + case 244: /* where_opt ::= WHERE expr */ yytestcase(yyruleno==244); {yymsp[-1].minor.yy226 = yymsp[0].minor.yy226;} break; - case 233: /* limit_opt ::= */ - case 237: /* slimit_opt ::= */ yytestcase(yyruleno==237); + case 235: /* limit_opt ::= */ + case 239: /* slimit_opt ::= */ yytestcase(yyruleno==239); {yymsp[1].minor.yy444.limit = -1; yymsp[1].minor.yy444.offset = 0;} break; - case 234: /* limit_opt ::= LIMIT signed */ - case 238: /* slimit_opt ::= SLIMIT signed */ yytestcase(yyruleno==238); + case 236: /* limit_opt ::= LIMIT signed */ + case 240: /* slimit_opt ::= SLIMIT signed */ yytestcase(yyruleno==240); {yymsp[-1].minor.yy444.limit = yymsp[0].minor.yy549; yymsp[-1].minor.yy444.offset = 0;} break; - case 235: /* limit_opt ::= LIMIT signed OFFSET signed */ + case 237: /* limit_opt ::= LIMIT signed OFFSET signed */ { yymsp[-3].minor.yy444.limit = yymsp[-2].minor.yy549; yymsp[-3].minor.yy444.offset = yymsp[0].minor.yy549;} break; - case 236: /* limit_opt ::= LIMIT signed COMMA signed */ + case 238: /* limit_opt ::= LIMIT signed COMMA signed */ { yymsp[-3].minor.yy444.limit = yymsp[0].minor.yy549; yymsp[-3].minor.yy444.offset = yymsp[-2].minor.yy549;} break; - case 239: /* slimit_opt ::= SLIMIT signed SOFFSET signed */ + case 241: /* slimit_opt ::= SLIMIT signed SOFFSET signed */ {yymsp[-3].minor.yy444.limit = yymsp[-2].minor.yy549; yymsp[-3].minor.yy444.offset = yymsp[0].minor.yy549;} break; - case 240: /* slimit_opt ::= SLIMIT signed COMMA signed */ + case 242: /* slimit_opt ::= SLIMIT signed COMMA signed */ {yymsp[-3].minor.yy444.limit = yymsp[0].minor.yy549; yymsp[-3].minor.yy444.offset = yymsp[-2].minor.yy549;} break; - case 243: /* expr ::= LP expr RP */ + case 245: /* expr ::= LP expr RP */ {yylhsminor.yy226 = yymsp[-1].minor.yy226; yylhsminor.yy226->exprToken.z = yymsp[-2].minor.yy0.z; yylhsminor.yy226->exprToken.n = (yymsp[0].minor.yy0.z - yymsp[-2].minor.yy0.z + 1);} yymsp[-2].minor.yy226 = yylhsminor.yy226; break; - case 244: /* expr ::= ID */ + case 246: /* expr ::= ID */ { yylhsminor.yy226 = tSqlExprCreateIdValue(pInfo, &yymsp[0].minor.yy0, TK_ID);} yymsp[0].minor.yy226 = yylhsminor.yy226; break; - case 245: /* expr ::= ID DOT ID */ + case 247: /* expr ::= ID DOT ID */ { yymsp[-2].minor.yy0.n += (1+yymsp[0].minor.yy0.n); yylhsminor.yy226 = tSqlExprCreateIdValue(pInfo, &yymsp[-2].minor.yy0, TK_ID);} yymsp[-2].minor.yy226 = yylhsminor.yy226; break; - case 246: /* expr ::= ID DOT STAR */ + case 248: /* expr ::= ID DOT STAR */ { yymsp[-2].minor.yy0.n += (1+yymsp[0].minor.yy0.n); yylhsminor.yy226 = tSqlExprCreateIdValue(pInfo, &yymsp[-2].minor.yy0, TK_ALL);} yymsp[-2].minor.yy226 = yylhsminor.yy226; break; - case 247: /* expr ::= INTEGER */ + case 249: /* expr ::= INTEGER */ { yylhsminor.yy226 = tSqlExprCreateIdValue(pInfo, &yymsp[0].minor.yy0, TK_INTEGER);} yymsp[0].minor.yy226 = yylhsminor.yy226; break; - case 248: /* expr ::= MINUS INTEGER */ - case 249: /* expr ::= PLUS INTEGER */ yytestcase(yyruleno==249); + case 250: /* expr ::= MINUS INTEGER */ + case 251: /* expr ::= PLUS INTEGER */ yytestcase(yyruleno==251); { yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yymsp[-1].minor.yy0.type = TK_INTEGER; yylhsminor.yy226 = tSqlExprCreateIdValue(pInfo, &yymsp[-1].minor.yy0, TK_INTEGER);} yymsp[-1].minor.yy226 = yylhsminor.yy226; break; - case 250: /* expr ::= FLOAT */ + case 252: /* expr ::= FLOAT */ { yylhsminor.yy226 = tSqlExprCreateIdValue(pInfo, &yymsp[0].minor.yy0, TK_FLOAT);} yymsp[0].minor.yy226 = yylhsminor.yy226; break; - case 251: /* expr ::= MINUS FLOAT */ - case 252: /* expr ::= PLUS FLOAT */ yytestcase(yyruleno==252); + case 253: /* expr ::= MINUS FLOAT */ + case 254: /* expr ::= PLUS FLOAT */ yytestcase(yyruleno==254); { yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yymsp[-1].minor.yy0.type = TK_FLOAT; yylhsminor.yy226 = tSqlExprCreateIdValue(pInfo, &yymsp[-1].minor.yy0, TK_FLOAT);} yymsp[-1].minor.yy226 = yylhsminor.yy226; break; - case 253: /* expr ::= STRING */ + case 255: /* expr ::= STRING */ { yylhsminor.yy226 = tSqlExprCreateIdValue(pInfo, &yymsp[0].minor.yy0, TK_STRING);} yymsp[0].minor.yy226 = yylhsminor.yy226; break; - case 254: /* expr ::= NOW */ + case 256: /* expr ::= NOW */ { yylhsminor.yy226 = tSqlExprCreateIdValue(pInfo, &yymsp[0].minor.yy0, TK_NOW); } yymsp[0].minor.yy226 = yylhsminor.yy226; break; - case 255: /* expr ::= VARIABLE */ + case 257: /* expr ::= VARIABLE */ { yylhsminor.yy226 = tSqlExprCreateIdValue(pInfo, &yymsp[0].minor.yy0, TK_VARIABLE);} yymsp[0].minor.yy226 = yylhsminor.yy226; break; - case 256: /* expr ::= PLUS VARIABLE */ - case 257: /* expr ::= MINUS VARIABLE */ yytestcase(yyruleno==257); + case 258: /* expr ::= PLUS VARIABLE */ + case 259: /* expr ::= MINUS VARIABLE */ yytestcase(yyruleno==259); { yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yymsp[-1].minor.yy0.type = TK_VARIABLE; yylhsminor.yy226 = tSqlExprCreateIdValue(pInfo, &yymsp[-1].minor.yy0, TK_VARIABLE);} yymsp[-1].minor.yy226 = yylhsminor.yy226; break; - case 258: /* expr ::= BOOL */ + case 260: /* expr ::= BOOL */ { yylhsminor.yy226 = tSqlExprCreateIdValue(pInfo, &yymsp[0].minor.yy0, TK_BOOL);} yymsp[0].minor.yy226 = yylhsminor.yy226; break; - case 259: /* expr ::= NULL */ + case 261: /* expr ::= NULL */ { yylhsminor.yy226 = tSqlExprCreateIdValue(pInfo, &yymsp[0].minor.yy0, TK_NULL);} yymsp[0].minor.yy226 = yylhsminor.yy226; break; - case 260: /* expr ::= ID LP exprlist RP */ + case 262: /* expr ::= ID LP exprlist RP */ { tStrTokenAppend(pInfo->funcs, &yymsp[-3].minor.yy0); yylhsminor.yy226 = tSqlExprCreateFunction(yymsp[-1].minor.yy231, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, yymsp[-3].minor.yy0.type); } yymsp[-3].minor.yy226 = yylhsminor.yy226; break; - case 261: /* expr ::= ID LP STAR RP */ + case 263: /* expr ::= ID LP STAR RP */ { tStrTokenAppend(pInfo->funcs, &yymsp[-3].minor.yy0); yylhsminor.yy226 = tSqlExprCreateFunction(NULL, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, yymsp[-3].minor.yy0.type); } yymsp[-3].minor.yy226 = yylhsminor.yy226; break; - case 262: /* expr ::= expr IS NULL */ + case 264: /* expr ::= expr IS NULL */ {yylhsminor.yy226 = tSqlExprCreate(yymsp[-2].minor.yy226, NULL, TK_ISNULL);} yymsp[-2].minor.yy226 = yylhsminor.yy226; break; - case 263: /* expr ::= expr IS NOT NULL */ + case 265: /* expr ::= expr IS NOT NULL */ {yylhsminor.yy226 = tSqlExprCreate(yymsp[-3].minor.yy226, NULL, TK_NOTNULL);} yymsp[-3].minor.yy226 = yylhsminor.yy226; break; - case 264: /* expr ::= expr LT expr */ + case 266: /* expr ::= expr LT expr */ {yylhsminor.yy226 = tSqlExprCreate(yymsp[-2].minor.yy226, yymsp[0].minor.yy226, TK_LT);} yymsp[-2].minor.yy226 = yylhsminor.yy226; break; - case 265: /* expr ::= expr GT expr */ + case 267: /* expr ::= expr GT expr */ {yylhsminor.yy226 = tSqlExprCreate(yymsp[-2].minor.yy226, yymsp[0].minor.yy226, TK_GT);} yymsp[-2].minor.yy226 = yylhsminor.yy226; break; - case 266: /* expr ::= expr LE expr */ + case 268: /* expr ::= expr LE expr */ {yylhsminor.yy226 = tSqlExprCreate(yymsp[-2].minor.yy226, yymsp[0].minor.yy226, TK_LE);} yymsp[-2].minor.yy226 = yylhsminor.yy226; break; - case 267: /* expr ::= expr GE expr */ + case 269: /* expr ::= expr GE expr */ {yylhsminor.yy226 = tSqlExprCreate(yymsp[-2].minor.yy226, yymsp[0].minor.yy226, TK_GE);} yymsp[-2].minor.yy226 = yylhsminor.yy226; break; - case 268: /* expr ::= expr NE expr */ + case 270: /* expr ::= expr NE expr */ {yylhsminor.yy226 = tSqlExprCreate(yymsp[-2].minor.yy226, yymsp[0].minor.yy226, TK_NE);} yymsp[-2].minor.yy226 = yylhsminor.yy226; break; - case 269: /* expr ::= expr EQ expr */ + case 271: /* expr ::= expr EQ expr */ {yylhsminor.yy226 = tSqlExprCreate(yymsp[-2].minor.yy226, yymsp[0].minor.yy226, TK_EQ);} yymsp[-2].minor.yy226 = yylhsminor.yy226; break; - case 270: /* expr ::= expr BETWEEN expr AND expr */ + case 272: /* expr ::= expr BETWEEN expr AND expr */ { tSqlExpr* X2 = tSqlExprClone(yymsp[-4].minor.yy226); yylhsminor.yy226 = tSqlExprCreate(tSqlExprCreate(yymsp[-4].minor.yy226, yymsp[-2].minor.yy226, TK_GE), tSqlExprCreate(X2, yymsp[0].minor.yy226, TK_LE), TK_AND);} yymsp[-4].minor.yy226 = yylhsminor.yy226; break; - case 271: /* expr ::= expr AND expr */ + case 273: /* expr ::= expr AND expr */ {yylhsminor.yy226 = tSqlExprCreate(yymsp[-2].minor.yy226, yymsp[0].minor.yy226, TK_AND);} yymsp[-2].minor.yy226 = yylhsminor.yy226; break; - case 272: /* expr ::= expr OR expr */ + case 274: /* expr ::= expr OR expr */ {yylhsminor.yy226 = tSqlExprCreate(yymsp[-2].minor.yy226, yymsp[0].minor.yy226, TK_OR); } yymsp[-2].minor.yy226 = yylhsminor.yy226; break; - case 273: /* expr ::= expr PLUS expr */ + case 275: /* expr ::= expr PLUS expr */ {yylhsminor.yy226 = tSqlExprCreate(yymsp[-2].minor.yy226, yymsp[0].minor.yy226, TK_PLUS); } yymsp[-2].minor.yy226 = yylhsminor.yy226; break; - case 274: /* expr ::= expr MINUS expr */ + case 276: /* expr ::= expr MINUS expr */ {yylhsminor.yy226 = tSqlExprCreate(yymsp[-2].minor.yy226, yymsp[0].minor.yy226, TK_MINUS); } yymsp[-2].minor.yy226 = yylhsminor.yy226; break; - case 275: /* expr ::= expr STAR expr */ + case 277: /* expr ::= expr STAR expr */ {yylhsminor.yy226 = tSqlExprCreate(yymsp[-2].minor.yy226, yymsp[0].minor.yy226, TK_STAR); } yymsp[-2].minor.yy226 = yylhsminor.yy226; break; - case 276: /* expr ::= expr SLASH expr */ + case 278: /* expr ::= expr SLASH expr */ {yylhsminor.yy226 = tSqlExprCreate(yymsp[-2].minor.yy226, yymsp[0].minor.yy226, TK_DIVIDE);} yymsp[-2].minor.yy226 = yylhsminor.yy226; break; - case 277: /* expr ::= expr REM expr */ + case 279: /* expr ::= expr REM expr */ {yylhsminor.yy226 = tSqlExprCreate(yymsp[-2].minor.yy226, yymsp[0].minor.yy226, TK_REM); } yymsp[-2].minor.yy226 = yylhsminor.yy226; break; - case 278: /* expr ::= expr LIKE expr */ + case 280: /* expr ::= expr LIKE expr */ {yylhsminor.yy226 = tSqlExprCreate(yymsp[-2].minor.yy226, yymsp[0].minor.yy226, TK_LIKE); } yymsp[-2].minor.yy226 = yylhsminor.yy226; break; - case 279: /* expr ::= expr MATCH expr */ + case 281: /* expr ::= expr MATCH expr */ {yylhsminor.yy226 = tSqlExprCreate(yymsp[-2].minor.yy226, yymsp[0].minor.yy226, TK_MATCH); } yymsp[-2].minor.yy226 = yylhsminor.yy226; break; - case 280: /* expr ::= expr NMATCH expr */ + case 282: /* expr ::= expr NMATCH expr */ {yylhsminor.yy226 = tSqlExprCreate(yymsp[-2].minor.yy226, yymsp[0].minor.yy226, TK_NMATCH); } yymsp[-2].minor.yy226 = yylhsminor.yy226; break; - case 281: /* expr ::= ID CONTAINS STRING */ + case 283: /* expr ::= ID CONTAINS STRING */ { tSqlExpr* S = tSqlExprCreateIdValue(pInfo, &yymsp[-2].minor.yy0, TK_ID); tSqlExpr* M = tSqlExprCreateIdValue(pInfo, &yymsp[0].minor.yy0, TK_STRING); yylhsminor.yy226 = tSqlExprCreate(S, M, TK_CONTAINS); } yymsp[-2].minor.yy226 = yylhsminor.yy226; break; - case 282: /* expr ::= ID DOT ID CONTAINS STRING */ + case 284: /* expr ::= ID DOT ID CONTAINS STRING */ { yymsp[-4].minor.yy0.n += (1+yymsp[-2].minor.yy0.n); tSqlExpr* S = tSqlExprCreateIdValue(pInfo, &yymsp[-4].minor.yy0, TK_ID); tSqlExpr* M = tSqlExprCreateIdValue(pInfo, &yymsp[0].minor.yy0, TK_STRING); yylhsminor.yy226 = tSqlExprCreate(S, M, TK_CONTAINS); } yymsp[-4].minor.yy226 = yylhsminor.yy226; break; - case 283: /* arrow ::= ID ARROW STRING */ + case 285: /* arrow ::= ID ARROW STRING */ {tSqlExpr* S = tSqlExprCreateIdValue(pInfo, &yymsp[-2].minor.yy0, TK_ID); tSqlExpr* M = tSqlExprCreateIdValue(pInfo, &yymsp[0].minor.yy0, TK_STRING); yylhsminor.yy226 = tSqlExprCreate(S, M, TK_ARROW); } yymsp[-2].minor.yy226 = yylhsminor.yy226; break; - case 284: /* arrow ::= ID DOT ID ARROW STRING */ + case 286: /* arrow ::= ID DOT ID ARROW STRING */ {yymsp[-4].minor.yy0.n += (1+yymsp[-2].minor.yy0.n); tSqlExpr* S = tSqlExprCreateIdValue(pInfo, &yymsp[-4].minor.yy0, TK_ID); tSqlExpr* M = tSqlExprCreateIdValue(pInfo, &yymsp[0].minor.yy0, TK_STRING); yylhsminor.yy226 = tSqlExprCreate(S, M, TK_ARROW); } yymsp[-4].minor.yy226 = yylhsminor.yy226; break; - case 285: /* expr ::= arrow */ - case 289: /* expritem ::= expr */ yytestcase(yyruleno==289); + case 287: /* expr ::= arrow */ + case 291: /* expritem ::= expr */ yytestcase(yyruleno==291); {yylhsminor.yy226 = yymsp[0].minor.yy226;} yymsp[0].minor.yy226 = yylhsminor.yy226; break; - case 286: /* expr ::= expr IN LP exprlist RP */ + case 288: /* expr ::= expr IN LP exprlist RP */ {yylhsminor.yy226 = tSqlExprCreate(yymsp[-4].minor.yy226, (tSqlExpr*)yymsp[-1].minor.yy231, TK_IN); } yymsp[-4].minor.yy226 = yylhsminor.yy226; break; - case 287: /* exprlist ::= exprlist COMMA expritem */ + case 289: /* exprlist ::= exprlist COMMA expritem */ {yylhsminor.yy231 = tSqlExprListAppend(yymsp[-2].minor.yy231,yymsp[0].minor.yy226,0, 0);} yymsp[-2].minor.yy231 = yylhsminor.yy231; break; - case 288: /* exprlist ::= expritem */ + case 290: /* exprlist ::= expritem */ {yylhsminor.yy231 = tSqlExprListAppend(0,yymsp[0].minor.yy226,0, 0);} yymsp[0].minor.yy231 = yylhsminor.yy231; break; - case 291: /* cmd ::= RESET QUERY CACHE */ + case 293: /* cmd ::= RESET QUERY CACHE */ { setDCLSqlElems(pInfo, TSDB_SQL_RESET_CACHE, 0);} break; - case 292: /* cmd ::= SYNCDB ids REPLICA */ + case 294: /* cmd ::= SYNCDB ids REPLICA */ { setDCLSqlElems(pInfo, TSDB_SQL_SYNC_DB_REPLICA, 1, &yymsp[-1].minor.yy0);} break; - case 293: /* cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */ + case 295: /* cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy231, NULL, TSDB_ALTER_TABLE_ADD_COLUMN, -1); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 294: /* cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */ + case 296: /* cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; @@ -3795,21 +3813,21 @@ static YYACTIONTYPE yy_reduce( setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 295: /* cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */ + case 297: /* cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy231, NULL, TSDB_ALTER_TABLE_CHANGE_COLUMN, -1); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 296: /* cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */ + case 298: /* cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy231, NULL, TSDB_ALTER_TABLE_ADD_TAG_COLUMN, -1); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 297: /* cmd ::= ALTER TABLE ids cpxName DROP TAG ids */ + case 299: /* cmd ::= ALTER TABLE ids cpxName DROP TAG ids */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; @@ -3820,7 +3838,7 @@ static YYACTIONTYPE yy_reduce( setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 298: /* cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */ + case 300: /* cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */ { yymsp[-5].minor.yy0.n += yymsp[-4].minor.yy0.n; @@ -3834,7 +3852,7 @@ static YYACTIONTYPE yy_reduce( setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 299: /* cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */ + case 301: /* cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */ { yymsp[-6].minor.yy0.n += yymsp[-5].minor.yy0.n; @@ -3846,21 +3864,21 @@ static YYACTIONTYPE yy_reduce( setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 300: /* cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */ + case 302: /* cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy231, NULL, TSDB_ALTER_TABLE_MODIFY_TAG_COLUMN, -1); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 301: /* cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */ + case 303: /* cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy231, NULL, TSDB_ALTER_TABLE_ADD_COLUMN, TSDB_SUPER_TABLE); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 302: /* cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */ + case 304: /* cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; @@ -3871,21 +3889,21 @@ static YYACTIONTYPE yy_reduce( setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 303: /* cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */ + case 305: /* cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy231, NULL, TSDB_ALTER_TABLE_CHANGE_COLUMN, TSDB_SUPER_TABLE); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 304: /* cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */ + case 306: /* cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy231, NULL, TSDB_ALTER_TABLE_ADD_TAG_COLUMN, TSDB_SUPER_TABLE); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 305: /* cmd ::= ALTER STABLE ids cpxName DROP TAG ids */ + case 307: /* cmd ::= ALTER STABLE ids cpxName DROP TAG ids */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; @@ -3896,7 +3914,7 @@ static YYACTIONTYPE yy_reduce( setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 306: /* cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */ + case 308: /* cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */ { yymsp[-5].minor.yy0.n += yymsp[-4].minor.yy0.n; @@ -3910,7 +3928,7 @@ static YYACTIONTYPE yy_reduce( setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 307: /* cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem */ + case 309: /* cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem */ { yymsp[-6].minor.yy0.n += yymsp[-5].minor.yy0.n; @@ -3922,20 +3940,20 @@ static YYACTIONTYPE yy_reduce( setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 308: /* cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */ + case 310: /* cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy231, NULL, TSDB_ALTER_TABLE_MODIFY_TAG_COLUMN, TSDB_SUPER_TABLE); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 309: /* cmd ::= KILL CONNECTION INTEGER */ + case 311: /* cmd ::= KILL CONNECTION INTEGER */ {setKillSql(pInfo, TSDB_SQL_KILL_CONNECTION, &yymsp[0].minor.yy0);} break; - case 310: /* cmd ::= KILL STREAM INTEGER COLON INTEGER */ + case 312: /* cmd ::= KILL STREAM INTEGER COLON INTEGER */ {yymsp[-2].minor.yy0.n += (yymsp[-1].minor.yy0.n + yymsp[0].minor.yy0.n); setKillSql(pInfo, TSDB_SQL_KILL_STREAM, &yymsp[-2].minor.yy0);} break; - case 311: /* cmd ::= KILL QUERY INTEGER COLON INTEGER */ + case 313: /* cmd ::= KILL QUERY INTEGER COLON INTEGER */ {yymsp[-2].minor.yy0.n += (yymsp[-1].minor.yy0.n + yymsp[0].minor.yy0.n); setKillSql(pInfo, TSDB_SQL_KILL_QUERY, &yymsp[-2].minor.yy0);} break; default: @@ -4211,13 +4229,14 @@ void Parse( yy_destructor(yypParser, (YYCODETYPE)yymajor, &yyminorunion); yymajor = YYNOCODE; }else{ - while( yypParser->yytos > yypParser->yystack ){ - yyact = yy_find_reduce_action(yypParser->yytos->stateno, - YYERRORSYMBOL); - if( yyact<=YY_MAX_SHIFTREDUCE ) break; + while( yypParser->yytos >= yypParser->yystack + && (yyact = yy_find_reduce_action( + yypParser->yytos->stateno, + YYERRORSYMBOL)) > YY_MAX_SHIFTREDUCE + ){ yy_pop_parser_stack(yypParser); } - if( yypParser->yytos <= yypParser->yystack || yymajor==0 ){ + if( yypParser->yytos < yypParser->yystack || yymajor==0 ){ yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion); yy_parse_failed(yypParser); #ifndef YYNOERRORRECOVERY -- GitLab