diff --git a/src/client/src/tscSQLParser.c b/src/client/src/tscSQLParser.c index 9c157308b4f24d9c43e578cd6091057ac8950621..b009e04885cb3f30fe66efbdab28eee14b5c73eb 100644 --- a/src/client/src/tscSQLParser.c +++ b/src/client/src/tscSQLParser.c @@ -286,8 +286,8 @@ static uint8_t convertRelationalOperator(SStrToken *pToken) { return TSDB_RELATION_MATCH; case TK_NMATCH: return TSDB_RELATION_NMATCH; - case TK_QUESTION: - return TSDB_RELATION_QUESTION; + case TK_CONTAINS: + return TSDB_RELATION_CONTAINS; case TK_ARROW: return TSDB_RELATION_ARROW; case TK_ISNULL: @@ -4743,7 +4743,7 @@ static int32_t validateJsonTagExpr(tSqlExpr* pExpr, char* msgBuf) { tSqlExpr* pLeft = pExpr->pLeft; tSqlExpr* pRight = pExpr->pRight; - if (pExpr->tokenId == TK_QUESTION) { + if (pExpr->tokenId == TK_CONTAINS) { if (pRight != NULL && !IS_VAR_DATA_TYPE(pRight->value.nType)) return invalidOperationMsg(msgBuf, msg3); diff --git a/src/inc/taosdef.h b/src/inc/taosdef.h index 127f41ba28ac24cebe6f7c6e6722bc5e3ca87157..b7c628a1189c1c9f368d4079de6a2e1078e2cfa8 100644 --- a/src/inc/taosdef.h +++ b/src/inc/taosdef.h @@ -181,7 +181,7 @@ do { \ #define TSDB_RELATION_MATCH 14 #define TSDB_RELATION_NMATCH 15 -#define TSDB_RELATION_QUESTION 16 +#define TSDB_RELATION_CONTAINS 16 #define TSDB_RELATION_ARROW 17 #define TSDB_BINARY_OP_ADD 30 diff --git a/src/inc/ttokendef.h b/src/inc/ttokendef.h index a92d257e0107a274f4936e2e5f9d3a620889feab..3e639c878c5bd101418a9177ec5c5409a5d65838 100644 --- a/src/inc/ttokendef.h +++ b/src/inc/ttokendef.h @@ -40,29 +40,29 @@ #define TK_LIKE 22 #define TK_MATCH 23 #define TK_NMATCH 24 -#define TK_GLOB 25 -#define TK_BETWEEN 26 -#define TK_IN 27 -#define TK_GT 28 -#define TK_GE 29 -#define TK_LT 30 -#define TK_LE 31 -#define TK_BITAND 32 -#define TK_BITOR 33 -#define TK_LSHIFT 34 -#define TK_RSHIFT 35 -#define TK_PLUS 36 -#define TK_MINUS 37 -#define TK_DIVIDE 38 -#define TK_TIMES 39 -#define TK_STAR 40 -#define TK_SLASH 41 -#define TK_REM 42 -#define TK_CONCAT 43 -#define TK_UMINUS 44 -#define TK_UPLUS 45 -#define TK_BITNOT 46 -#define TK_QUESTION 47 +#define TK_CONTAINS 25 +#define TK_GLOB 26 +#define TK_BETWEEN 27 +#define TK_IN 28 +#define TK_GT 29 +#define TK_GE 30 +#define TK_LT 31 +#define TK_LE 32 +#define TK_BITAND 33 +#define TK_BITOR 34 +#define TK_LSHIFT 35 +#define TK_RSHIFT 36 +#define TK_PLUS 37 +#define TK_MINUS 38 +#define TK_DIVIDE 39 +#define TK_TIMES 40 +#define TK_STAR 41 +#define TK_SLASH 42 +#define TK_REM 43 +#define TK_CONCAT 44 +#define TK_UMINUS 45 +#define TK_UPLUS 46 +#define TK_BITNOT 47 #define TK_ARROW 48 #define TK_SHOW 49 #define TK_DATABASES 50 @@ -225,6 +225,7 @@ #define TK_HEX 303 // hex number 0x123 #define TK_OCT 304 // oct number #define TK_BIN 305 // bin format data 0b111 +#define TK_QUESTION 307 // denoting the placeholder of "?",when invoking statement bind query #endif diff --git a/src/query/inc/sql.y b/src/query/inc/sql.y index f34445a692b4ae279a6550b3796fdfbbd47aa8a8..1c7290a5306209c17ff70ab02a5f757493139205 100644 --- a/src/query/inc/sql.y +++ b/src/query/inc/sql.y @@ -11,7 +11,7 @@ %left OR. %left AND. %right NOT. -%left EQ NE ISNULL NOTNULL IS LIKE MATCH NMATCH GLOB BETWEEN IN. +%left EQ NE ISNULL NOTNULL IS LIKE MATCH NMATCH CONTAINS GLOB BETWEEN IN. %left GT GE LT LE. %left BITAND BITOR LSHIFT RSHIFT. %left PLUS MINUS. @@ -19,7 +19,7 @@ %left STAR SLASH REM. %left CONCAT. %right UMINUS UPLUS BITNOT. -%right QUESTION ARROW. +%right ARROW. %include { #include @@ -651,10 +651,13 @@ sortlist(A) ::= arrow(Y) sortorder(Z). { } %type item {tVariant} -item(A) ::= ID(X). { toTSDBType(X.type); tVariantCreate(&A, &X, true); } +item(A) ::= ID(X). { + toTSDBType(X.type); + tVariantCreate(&A, &X, true); +} item(A) ::= ID(X) DOT ID(Y). { toTSDBType(X.type); - X.n += Y.n; + X.n += (1+Y.n); tVariantCreate(&A, &X, true); } @@ -779,8 +782,9 @@ expr(A) ::= expr(X) LIKE expr(Y). {A = tSqlExprCreate(X, Y, TK_LIKE); } expr(A) ::= expr(X) MATCH expr(Y). {A = tSqlExprCreate(X, Y, TK_MATCH); } expr(A) ::= expr(X) NMATCH expr(Y). {A = tSqlExprCreate(X, Y, TK_NMATCH); } -// question expression -expr(A) ::= ID(X) QUESTION STRING(Y). { tSqlExpr* S = tSqlExprCreateIdValue(pInfo, &X, TK_ID); tSqlExpr* M = tSqlExprCreateIdValue(pInfo, &Y, TK_STRING); A = tSqlExprCreate(S, M, TK_QUESTION); } +// contains expression +expr(A) ::= ID(X) CONTAINS STRING(Y). { tSqlExpr* S = tSqlExprCreateIdValue(pInfo, &X, TK_ID); tSqlExpr* M = tSqlExprCreateIdValue(pInfo, &Y, TK_STRING); A = tSqlExprCreate(S, M, TK_CONTAINS); } +expr(A) ::= ID(X) DOT ID(Y) CONTAINS STRING(Z). { X.n += (1+Y.n); tSqlExpr* S = tSqlExprCreateIdValue(pInfo, &X, TK_ID); tSqlExpr* M = tSqlExprCreateIdValue(pInfo, &Z, TK_STRING); A = tSqlExprCreate(S, M, TK_CONTAINS); } // arrow expression %type arrow {tSqlExpr*} diff --git a/src/query/src/qFilter.c b/src/query/src/qFilter.c index fbef608a3541d8639f8060a20483f23c38d69141..41ccab4c99775161a39d78497b7afd3f30a8d588 100644 --- a/src/query/src/qFilter.c +++ b/src/query/src/qFilter.c @@ -37,7 +37,7 @@ OptrStr gOptrStr[] = { {TSDB_RELATION_NOT, "not"}, {TSDB_RELATION_MATCH, "match"}, {TSDB_RELATION_NMATCH, "nmatch"}, - {TSDB_RELATION_QUESTION, "?"}, + {TSDB_RELATION_CONTAINS, "contains"}, }; static FORCE_INLINE int32_t filterFieldColDescCompare(const void *desc1, const void *desc2) { @@ -244,7 +244,7 @@ int8_t filterGetCompFuncIdx(int32_t type, int32_t optr) { comparFn = 20; } else if (optr == TSDB_RELATION_LIKE) { /* wildcard query using like operator */ comparFn = 9; - } else if (optr == TSDB_RELATION_QUESTION) { + } else if (optr == TSDB_RELATION_CONTAINS) { comparFn = 21; } else { comparFn = 22; @@ -1193,7 +1193,7 @@ static int32_t filterDealJson(SFilterInfo *info, tExprNode* tree, tExprNode** pL uint32_t nullData = TSDB_DATA_JSON_NULL; jsonKeyMd5(&nullData, INT_BYTES, keyMd5); memcpy(schema->name, keyMd5, TSDB_MAX_JSON_KEY_MD5_LEN); - }else if(tree->_node.optr == TSDB_RELATION_QUESTION){ + }else if(tree->_node.optr == TSDB_RELATION_CONTAINS){ SSchema* schema = (*pLeft)->pSchema; if(tree->_node.pRight->pVal->nLen > TSDB_MAX_JSON_KEY_LEN) return TSDB_CODE_TSC_INVALID_COLUMN_LENGTH; char keyMd5[TSDB_MAX_JSON_KEY_MD5_LEN] = {0}; @@ -1945,7 +1945,7 @@ bool filterDoCompare(__compar_fn_t func, uint8_t optr, void *left, void *right) case TSDB_RELATION_MATCH: { return ret == 0; } - case TSDB_RELATION_QUESTION: { + case TSDB_RELATION_CONTAINS: { return ret == 0; } case TSDB_RELATION_NMATCH: { @@ -2718,7 +2718,7 @@ int32_t filterRmUnitByRange(SFilterInfo *info, SDataStatis *pDataStatis, int32_t if (cunit->optr == TSDB_RELATION_ISNULL || cunit->optr == TSDB_RELATION_NOTNULL || cunit->optr == TSDB_RELATION_IN || cunit->optr == TSDB_RELATION_LIKE || cunit->optr == TSDB_RELATION_MATCH - || cunit->optr == TSDB_RELATION_NOT_EQUAL || cunit->optr == TSDB_RELATION_QUESTION) { + || cunit->optr == TSDB_RELATION_NOT_EQUAL || cunit->optr == TSDB_RELATION_CONTAINS) { continue; } @@ -3600,7 +3600,7 @@ int32_t filterIsIndexedColumnQuery(SFilterInfo* info, int32_t idxId, bool *res) int32_t optr = FILTER_UNIT_OPTR(info->units); CHK_JMP(optr == TSDB_RELATION_LIKE || optr == TSDB_RELATION_IN || optr == TSDB_RELATION_MATCH - || optr == TSDB_RELATION_ISNULL || optr == TSDB_RELATION_NOTNULL || optr == TSDB_RELATION_QUESTION); + || optr == TSDB_RELATION_ISNULL || optr == TSDB_RELATION_NOTNULL || optr == TSDB_RELATION_CONTAINS); *res = true; diff --git a/src/query/src/qSqlParser.c b/src/query/src/qSqlParser.c index fbfa87a254c674134e5d6f249281f2349b4d338d..c6936781acd37d87a3e8ac03217bab00d7df4886 100644 --- a/src/query/src/qSqlParser.c +++ b/src/query/src/qSqlParser.c @@ -387,7 +387,7 @@ tSqlExpr *tSqlExprCreate(tSqlExpr *pLeft, tSqlExpr *pRight, int32_t optrType) { pRSub->Expr.paramList = (SArray *)pRight; pExpr->pRight = pRSub; - } else if (optrType == TK_ARROW || optrType == TK_QUESTION) { + } else if (optrType == TK_ARROW || optrType == TK_CONTAINS) { pExpr->tokenId = optrType; pExpr->pLeft = pLeft; pExpr->pRight = pRight; diff --git a/src/query/src/sql.c b/src/query/src/sql.c index c669712fc5ea3a776b94ef28eff4b22b7c41253b..120feeb2046b5539ed8acc8510064919d7289187 100644 --- a/src/query/src/sql.c +++ b/src/query/src/sql.c @@ -64,29 +64,29 @@ #define TK_LIKE 22 #define TK_MATCH 23 #define TK_NMATCH 24 -#define TK_GLOB 25 -#define TK_BETWEEN 26 -#define TK_IN 27 -#define TK_GT 28 -#define TK_GE 29 -#define TK_LT 30 -#define TK_LE 31 -#define TK_BITAND 32 -#define TK_BITOR 33 -#define TK_LSHIFT 34 -#define TK_RSHIFT 35 -#define TK_PLUS 36 -#define TK_MINUS 37 -#define TK_DIVIDE 38 -#define TK_TIMES 39 -#define TK_STAR 40 -#define TK_SLASH 41 -#define TK_REM 42 -#define TK_CONCAT 43 -#define TK_UMINUS 44 -#define TK_UPLUS 45 -#define TK_BITNOT 46 -#define TK_QUESTION 47 +#define TK_CONTAINS 25 +#define TK_GLOB 26 +#define TK_BETWEEN 27 +#define TK_IN 28 +#define TK_GT 29 +#define TK_GE 30 +#define TK_LT 31 +#define TK_LE 32 +#define TK_BITAND 33 +#define TK_BITOR 34 +#define TK_LSHIFT 35 +#define TK_RSHIFT 36 +#define TK_PLUS 37 +#define TK_MINUS 38 +#define TK_DIVIDE 39 +#define TK_TIMES 40 +#define TK_STAR 41 +#define TK_SLASH 42 +#define TK_REM 43 +#define TK_CONCAT 44 +#define TK_UMINUS 45 +#define TK_UPLUS 46 +#define TK_BITNOT 47 #define TK_ARROW 48 #define TK_SHOW 49 #define TK_DATABASES 50 @@ -339,18 +339,18 @@ typedef union { #define ParseCTX_FETCH #define ParseCTX_STORE #define YYFALLBACK 1 -#define YYNSTATE 386 -#define YYNRULE 311 -#define YYNRULE_WITH_ACTION 311 +#define YYNSTATE 387 +#define YYNRULE 312 +#define YYNRULE_WITH_ACTION 312 #define YYNTOKEN 202 -#define YY_MAX_SHIFT 385 -#define YY_MIN_SHIFTREDUCE 607 -#define YY_MAX_SHIFTREDUCE 917 -#define YY_ERROR_ACTION 918 -#define YY_ACCEPT_ACTION 919 -#define YY_NO_ACTION 920 -#define YY_MIN_REDUCE 921 -#define YY_MAX_REDUCE 1231 +#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 /************* End control #defines *******************************************/ #define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0]))) @@ -417,177 +417,178 @@ typedef union { ** yy_default[] Default action for each state. ** *********** Begin parsing tables **********************************************/ -#define YY_ACTTAB_COUNT (828) +#define YY_ACTTAB_COUNT (831) static const YYACTIONTYPE yy_action[] = { - /* 0 */ 214, 658, 1150, 24, 1151, 308, 856, 798, 859, 659, - /* 10 */ 1205, 801, 1207, 1205, 37, 38, 246, 41, 42, 58, - /* 20 */ 1076, 260, 31, 30, 29, 658, 40, 340, 45, 43, - /* 30 */ 46, 44, 258, 659, 384, 239, 36, 35, 294, 295, - /* 40 */ 34, 33, 32, 37, 38, 248, 41, 42, 380, 1007, - /* 50 */ 260, 31, 30, 29, 658, 40, 340, 45, 43, 46, - /* 60 */ 44, 1089, 659, 58, 241, 36, 35, 211, 1073, 34, - /* 70 */ 33, 32, 37, 38, 1098, 41, 42, 1205, 242, 260, - /* 80 */ 31, 30, 29, 969, 40, 340, 45, 43, 46, 44, - /* 90 */ 195, 84, 212, 214, 36, 35, 658, 253, 34, 33, - /* 100 */ 32, 1076, 1205, 1205, 659, 1208, 37, 39, 251, 41, - /* 110 */ 42, 51, 1073, 260, 31, 30, 29, 850, 40, 340, - /* 120 */ 45, 43, 46, 44, 1046, 244, 1044, 1045, 36, 35, - /* 130 */ 863, 1047, 34, 33, 32, 1048, 58, 1049, 1050, 1070, - /* 140 */ 919, 385, 855, 1095, 858, 608, 609, 610, 611, 612, - /* 150 */ 613, 614, 615, 616, 617, 618, 619, 620, 621, 158, - /* 160 */ 336, 240, 38, 255, 41, 42, 694, 1076, 260, 31, - /* 170 */ 30, 29, 90, 40, 340, 45, 43, 46, 44, 312, - /* 180 */ 96, 252, 95, 36, 35, 1073, 254, 34, 33, 32, - /* 190 */ 1089, 41, 42, 810, 811, 260, 31, 30, 29, 101, - /* 200 */ 40, 340, 45, 43, 46, 44, 1148, 282, 1149, 67, - /* 210 */ 36, 35, 160, 372, 34, 33, 32, 66, 334, 379, - /* 220 */ 378, 333, 332, 331, 377, 330, 329, 328, 376, 327, - /* 230 */ 375, 374, 1059, 1060, 55, 1063, 175, 25, 1038, 1026, - /* 240 */ 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, - /* 250 */ 1037, 1039, 1040, 218, 217, 298, 232, 865, 257, 1075, - /* 260 */ 854, 225, 857, 1205, 860, 261, 864, 143, 142, 141, - /* 270 */ 224, 742, 232, 865, 347, 90, 854, 1227, 857, 219, - /* 280 */ 860, 344, 289, 288, 129, 45, 43, 46, 44, 1205, - /* 290 */ 1219, 237, 238, 36, 35, 341, 372, 34, 33, 32, - /* 300 */ 339, 338, 362, 361, 263, 36, 35, 237, 238, 34, - /* 310 */ 33, 32, 67, 5, 61, 185, 1089, 220, 259, 214, - /* 320 */ 184, 110, 115, 106, 114, 766, 214, 1205, 763, 1205, - /* 330 */ 764, 1208, 765, 243, 268, 281, 1205, 82, 1208, 323, - /* 340 */ 6, 274, 47, 58, 233, 13, 127, 121, 132, 100, - /* 350 */ 278, 277, 1062, 131, 58, 137, 140, 130, 47, 265, - /* 360 */ 266, 205, 203, 201, 134, 34, 33, 32, 200, 147, - /* 370 */ 146, 145, 144, 58, 58, 58, 58, 866, 861, 103, - /* 380 */ 1198, 264, 58, 262, 862, 350, 349, 869, 351, 58, - /* 390 */ 1205, 1197, 1073, 866, 861, 66, 1161, 379, 378, 352, - /* 400 */ 862, 1205, 377, 1073, 1196, 290, 376, 235, 375, 374, - /* 410 */ 98, 270, 97, 267, 1205, 357, 356, 1205, 353, 354, - /* 420 */ 358, 359, 1073, 1073, 1073, 1073, 782, 360, 383, 382, - /* 430 */ 635, 1073, 236, 269, 364, 157, 155, 154, 1073, 104, - /* 440 */ 58, 336, 1205, 830, 181, 767, 768, 215, 216, 221, - /* 450 */ 83, 213, 222, 223, 227, 228, 229, 1205, 1205, 1205, - /* 460 */ 269, 1205, 1205, 1205, 1205, 1205, 1205, 99, 226, 210, - /* 470 */ 87, 182, 269, 979, 970, 1064, 779, 88, 1205, 1205, - /* 480 */ 195, 195, 85, 1074, 1061, 1, 183, 293, 292, 1072, - /* 490 */ 283, 3, 196, 75, 78, 807, 817, 818, 338, 54, - /* 500 */ 343, 829, 10, 752, 59, 315, 754, 285, 317, 162, - /* 510 */ 70, 48, 753, 786, 285, 311, 892, 59, 81, 59, - /* 520 */ 70, 291, 102, 867, 657, 1160, 70, 15, 249, 14, - /* 530 */ 9, 120, 318, 119, 1157, 79, 76, 9, 9, 853, - /* 540 */ 1156, 17, 771, 16, 772, 769, 19, 770, 18, 126, - /* 550 */ 741, 125, 21, 250, 20, 139, 138, 363, 279, 159, - /* 560 */ 1097, 1108, 26, 1105, 1106, 1110, 1090, 286, 161, 166, - /* 570 */ 304, 1071, 177, 178, 1140, 1069, 1139, 179, 1138, 1137, - /* 580 */ 156, 180, 984, 320, 297, 321, 245, 322, 325, 326, - /* 590 */ 797, 68, 208, 299, 301, 1087, 167, 64, 337, 168, - /* 600 */ 978, 348, 313, 1226, 117, 80, 169, 1225, 1222, 186, - /* 610 */ 355, 77, 28, 309, 1218, 123, 307, 1217, 1214, 305, - /* 620 */ 187, 303, 300, 1004, 173, 65, 60, 69, 296, 209, - /* 630 */ 966, 133, 172, 964, 135, 171, 136, 962, 961, 170, - /* 640 */ 27, 271, 198, 199, 958, 957, 956, 955, 954, 953, - /* 650 */ 952, 202, 204, 948, 324, 128, 946, 944, 206, 941, - /* 660 */ 207, 937, 373, 365, 284, 86, 91, 366, 302, 367, - /* 670 */ 368, 370, 369, 371, 381, 234, 256, 917, 273, 272, - /* 680 */ 319, 916, 276, 275, 915, 230, 231, 898, 897, 280, - /* 690 */ 111, 983, 982, 285, 112, 314, 11, 287, 774, 92, - /* 700 */ 89, 52, 73, 960, 806, 804, 959, 189, 1005, 190, - /* 710 */ 193, 188, 192, 191, 194, 148, 149, 951, 2, 150, - /* 720 */ 1042, 151, 1006, 176, 174, 950, 53, 943, 942, 800, - /* 730 */ 803, 4, 799, 74, 165, 808, 1052, 163, 247, 819, - /* 740 */ 164, 62, 813, 93, 22, 815, 94, 306, 342, 310, - /* 750 */ 63, 23, 12, 49, 316, 50, 103, 105, 108, 56, - /* 760 */ 107, 672, 57, 707, 705, 704, 109, 703, 701, 700, - /* 770 */ 699, 696, 662, 335, 113, 7, 889, 888, 868, 890, - /* 780 */ 870, 8, 345, 346, 116, 744, 71, 59, 72, 118, - /* 790 */ 122, 124, 743, 740, 688, 686, 678, 684, 680, 682, - /* 800 */ 676, 674, 710, 709, 708, 706, 702, 698, 697, 197, - /* 810 */ 660, 625, 921, 920, 920, 920, 920, 920, 920, 920, - /* 820 */ 920, 920, 920, 920, 920, 920, 152, 153, + /* 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, }; static const YYCODETYPE yy_lookahead[] = { - /* 0 */ 272, 1, 280, 272, 282, 283, 5, 5, 7, 9, - /* 10 */ 282, 9, 284, 282, 14, 15, 250, 17, 18, 204, - /* 20 */ 254, 21, 22, 23, 24, 1, 26, 27, 28, 29, - /* 30 */ 30, 31, 211, 9, 204, 205, 36, 37, 36, 37, - /* 40 */ 40, 41, 42, 14, 15, 1, 17, 18, 226, 227, - /* 50 */ 21, 22, 23, 24, 1, 26, 27, 28, 29, 30, - /* 60 */ 31, 252, 9, 204, 249, 36, 37, 272, 253, 40, - /* 70 */ 41, 42, 14, 15, 204, 17, 18, 282, 269, 21, - /* 80 */ 22, 23, 24, 210, 26, 27, 28, 29, 30, 31, - /* 90 */ 217, 91, 272, 272, 36, 37, 1, 250, 40, 41, - /* 100 */ 42, 254, 282, 282, 9, 284, 14, 15, 249, 17, - /* 110 */ 18, 87, 253, 21, 22, 23, 24, 88, 26, 27, - /* 120 */ 28, 29, 30, 31, 228, 123, 230, 231, 36, 37, - /* 130 */ 129, 235, 40, 41, 42, 239, 204, 241, 242, 204, - /* 140 */ 202, 203, 5, 273, 7, 50, 51, 52, 53, 54, - /* 150 */ 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, - /* 160 */ 89, 66, 15, 250, 17, 18, 5, 254, 21, 22, - /* 170 */ 23, 24, 87, 26, 27, 28, 29, 30, 31, 279, - /* 180 */ 280, 249, 282, 36, 37, 253, 251, 40, 41, 42, - /* 190 */ 252, 17, 18, 131, 132, 21, 22, 23, 24, 212, - /* 200 */ 26, 27, 28, 29, 30, 31, 280, 269, 282, 124, - /* 210 */ 36, 37, 204, 95, 40, 41, 42, 103, 104, 105, - /* 220 */ 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, - /* 230 */ 116, 117, 245, 246, 247, 248, 259, 49, 228, 229, + /* 0 */ 212, 1, 1, 280, 1, 282, 283, 5, 204, 9, + /* 10 */ 9, 204, 9, 212, 14, 15, 1, 17, 18, 204, + /* 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, + /* 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, + /* 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, + /* 150 */ 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + /* 160 */ 64, 15, 66, 17, 18, 204, 87, 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, + /* 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, /* 240 */ 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, - /* 250 */ 240, 241, 242, 272, 66, 278, 1, 2, 211, 254, - /* 260 */ 5, 73, 7, 282, 9, 211, 129, 79, 80, 81, - /* 270 */ 82, 5, 1, 2, 86, 87, 5, 254, 7, 272, - /* 280 */ 9, 16, 274, 275, 83, 28, 29, 30, 31, 282, - /* 290 */ 254, 36, 37, 36, 37, 40, 95, 40, 41, 42, - /* 300 */ 47, 48, 36, 37, 73, 36, 37, 36, 37, 40, - /* 310 */ 41, 42, 124, 67, 68, 69, 252, 272, 65, 272, - /* 320 */ 74, 75, 76, 77, 78, 2, 272, 282, 5, 282, - /* 330 */ 7, 284, 9, 269, 73, 147, 282, 149, 284, 93, - /* 340 */ 87, 148, 87, 204, 156, 87, 67, 68, 69, 91, - /* 350 */ 157, 158, 0, 74, 204, 76, 77, 78, 87, 36, - /* 360 */ 37, 67, 68, 69, 85, 40, 41, 42, 74, 75, - /* 370 */ 76, 77, 78, 204, 204, 204, 204, 122, 123, 121, - /* 380 */ 272, 150, 204, 152, 129, 154, 155, 122, 249, 204, - /* 390 */ 282, 272, 253, 122, 123, 103, 244, 105, 106, 249, - /* 400 */ 129, 282, 110, 253, 272, 277, 114, 272, 116, 117, - /* 410 */ 280, 150, 282, 152, 282, 154, 155, 282, 249, 249, - /* 420 */ 249, 249, 253, 253, 253, 253, 40, 249, 70, 71, - /* 430 */ 72, 253, 272, 204, 249, 67, 68, 69, 253, 212, - /* 440 */ 204, 89, 282, 81, 215, 122, 123, 272, 272, 272, - /* 450 */ 212, 272, 272, 272, 272, 272, 272, 282, 282, 282, - /* 460 */ 204, 282, 282, 282, 282, 282, 282, 255, 272, 272, - /* 470 */ 88, 215, 204, 210, 210, 248, 102, 88, 282, 282, - /* 480 */ 217, 217, 270, 215, 246, 213, 214, 36, 37, 253, - /* 490 */ 88, 208, 209, 102, 102, 88, 88, 88, 48, 87, - /* 500 */ 1, 139, 128, 88, 102, 88, 88, 125, 88, 102, - /* 510 */ 102, 102, 88, 127, 125, 65, 88, 102, 87, 102, - /* 520 */ 102, 277, 102, 88, 88, 244, 102, 151, 244, 153, - /* 530 */ 102, 151, 120, 153, 244, 143, 145, 102, 102, 40, - /* 540 */ 244, 151, 5, 153, 7, 5, 151, 7, 153, 151, - /* 550 */ 119, 153, 151, 244, 153, 83, 84, 244, 204, 204, - /* 560 */ 204, 204, 271, 204, 204, 204, 252, 252, 204, 204, - /* 570 */ 204, 252, 256, 204, 281, 204, 281, 204, 281, 281, - /* 580 */ 65, 204, 204, 204, 276, 204, 276, 204, 204, 204, - /* 590 */ 129, 204, 204, 276, 276, 268, 267, 204, 204, 266, - /* 600 */ 204, 204, 137, 204, 204, 142, 265, 204, 204, 204, - /* 610 */ 204, 144, 141, 140, 204, 204, 135, 204, 204, 134, - /* 620 */ 204, 133, 136, 204, 261, 204, 204, 204, 130, 204, - /* 630 */ 204, 204, 262, 204, 204, 263, 204, 204, 204, 264, - /* 640 */ 146, 204, 204, 204, 204, 204, 204, 204, 204, 204, - /* 650 */ 204, 204, 204, 204, 94, 101, 204, 204, 204, 204, - /* 660 */ 204, 204, 118, 100, 206, 206, 206, 56, 206, 97, - /* 670 */ 99, 98, 60, 96, 89, 206, 206, 5, 5, 159, - /* 680 */ 206, 5, 5, 159, 5, 206, 206, 105, 104, 148, - /* 690 */ 212, 216, 216, 125, 212, 120, 87, 102, 88, 102, - /* 700 */ 126, 87, 102, 206, 88, 129, 206, 223, 225, 219, - /* 710 */ 221, 224, 220, 222, 218, 207, 207, 206, 213, 207, - /* 720 */ 243, 207, 227, 257, 260, 206, 258, 206, 206, 5, - /* 730 */ 129, 208, 5, 87, 102, 88, 243, 87, 1, 88, - /* 740 */ 87, 102, 88, 87, 138, 88, 87, 87, 48, 1, - /* 750 */ 102, 138, 87, 87, 120, 87, 121, 83, 75, 92, - /* 760 */ 91, 5, 92, 9, 5, 5, 91, 5, 5, 5, - /* 770 */ 5, 5, 90, 16, 83, 87, 9, 9, 88, 9, - /* 780 */ 122, 87, 27, 64, 153, 5, 17, 102, 17, 153, - /* 790 */ 153, 153, 5, 88, 5, 5, 5, 5, 5, 5, - /* 800 */ 5, 5, 5, 5, 5, 5, 5, 5, 5, 102, - /* 810 */ 90, 65, 0, 285, 285, 285, 285, 285, 285, 285, - /* 820 */ 285, 285, 285, 285, 285, 285, 22, 22, 285, 285, - /* 830 */ 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, + /* 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, + /* 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, /* 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, @@ -607,117 +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, }; -#define YY_SHIFT_COUNT (385) +#define YY_SHIFT_COUNT (386) #define YY_SHIFT_MIN (0) -#define YY_SHIFT_MAX (812) +#define YY_SHIFT_MAX (815) static const unsigned short int yy_shift_ofst[] = { - /* 0 */ 188, 114, 114, 292, 292, 71, 255, 271, 271, 271, - /* 10 */ 24, 53, 53, 53, 53, 53, 53, 53, 53, 53, - /* 20 */ 53, 53, 44, 44, 0, 95, 271, 271, 271, 271, + /* 0 */ 188, 115, 115, 269, 269, 39, 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, 85, 85, 62, 53, 352, 53, 53, 53, 53, - /* 60 */ 201, 71, 44, 44, 118, 118, 161, 828, 828, 828, - /* 70 */ 323, 323, 323, 2, 2, 266, 266, 266, 266, 266, - /* 80 */ 266, 266, 53, 53, 53, 386, 53, 53, 53, 85, - /* 90 */ 85, 53, 53, 53, 53, 362, 362, 362, 362, 374, - /* 100 */ 85, 53, 53, 53, 53, 53, 53, 53, 53, 53, - /* 110 */ 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, - /* 120 */ 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, - /* 130 */ 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, - /* 140 */ 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, - /* 150 */ 53, 53, 53, 53, 53, 53, 53, 53, 53, 515, - /* 160 */ 515, 515, 461, 461, 461, 461, 515, 463, 467, 465, - /* 170 */ 471, 473, 481, 485, 488, 486, 498, 494, 515, 515, - /* 180 */ 515, 560, 560, 544, 71, 71, 515, 515, 554, 563, - /* 190 */ 611, 572, 571, 612, 573, 577, 544, 161, 515, 515, - /* 200 */ 585, 585, 515, 585, 515, 585, 515, 515, 828, 828, - /* 210 */ 29, 58, 58, 92, 58, 147, 174, 246, 257, 257, - /* 220 */ 257, 257, 257, 257, 279, 294, 269, 269, 269, 269, - /* 230 */ 231, 261, 253, 193, 258, 325, 325, 1, 137, 358, - /* 240 */ 368, 402, 382, 389, 451, 407, 408, 409, 450, 391, - /* 250 */ 392, 415, 417, 418, 420, 424, 412, 428, 435, 499, - /* 260 */ 265, 436, 376, 380, 390, 537, 540, 395, 398, 431, - /* 270 */ 401, 472, 672, 520, 673, 676, 524, 677, 679, 582, - /* 280 */ 584, 541, 568, 575, 609, 574, 610, 614, 595, 597, - /* 290 */ 616, 600, 576, 601, 724, 727, 646, 647, 650, 651, - /* 300 */ 653, 654, 632, 656, 657, 659, 737, 660, 639, 606, - /* 310 */ 700, 748, 648, 613, 665, 575, 666, 634, 668, 635, - /* 320 */ 674, 667, 669, 683, 756, 670, 675, 754, 759, 760, - /* 330 */ 762, 763, 764, 765, 766, 682, 757, 691, 767, 768, - /* 340 */ 688, 690, 770, 700, 658, 694, 755, 719, 769, 631, - /* 350 */ 636, 685, 685, 685, 685, 771, 637, 638, 685, 685, - /* 360 */ 685, 780, 787, 705, 685, 789, 790, 791, 792, 793, - /* 370 */ 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, - /* 380 */ 707, 720, 804, 805, 746, 812, + /* 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, + /* 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, }; #define YY_REDUCE_COUNT (209) -#define YY_REDUCE_MIN (-278) -#define YY_REDUCE_MAX (523) +#define YY_REDUCE_MIN (-277) +#define YY_REDUCE_MAX (519) static const short yy_reduce_ofst[] = { - /* 0 */ -62, 10, 10, -104, -104, -13, -179, 47, 54, -272, - /* 10 */ 8, -185, -141, -68, 139, 150, 169, 170, 171, 172, - /* 20 */ 178, 185, -278, -100, -130, -170, -269, -205, -180, -19, - /* 30 */ 7, 45, 108, 119, 132, 135, 160, 175, 176, 177, - /* 40 */ 179, 180, 181, 182, 183, 184, 196, 197, -234, -153, - /* 50 */ -87, -191, 64, -23, -65, 227, 229, 256, 268, 236, - /* 60 */ -127, 238, -74, 130, 263, 264, -178, 212, 272, 283, - /* 70 */ 5, 23, 36, 128, 244, 152, 281, 284, 290, 296, - /* 80 */ 309, 313, 354, 355, 356, 291, 357, 359, 360, 314, - /* 90 */ 315, 361, 364, 365, 366, 293, 295, 297, 298, 316, - /* 100 */ 319, 369, 371, 373, 377, 378, 379, 381, 383, 384, - /* 110 */ 385, 387, 388, 393, 394, 396, 397, 399, 400, 403, - /* 120 */ 404, 405, 406, 410, 411, 413, 414, 416, 419, 421, - /* 130 */ 422, 423, 425, 426, 427, 429, 430, 432, 433, 434, - /* 140 */ 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, - /* 150 */ 447, 448, 449, 452, 453, 454, 455, 456, 457, 458, - /* 160 */ 459, 460, 308, 310, 317, 318, 462, 327, 329, 333, - /* 170 */ 341, 375, 372, 370, 363, 464, 468, 466, 469, 470, - /* 180 */ 474, 475, 476, 477, 478, 482, 479, 480, 483, 487, - /* 190 */ 484, 490, 491, 492, 489, 496, 493, 495, 497, 500, - /* 200 */ 508, 509, 511, 512, 519, 514, 521, 522, 505, 523, + /* 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, }; static const YYACTIONTYPE yy_default[] = { - /* 0 */ 918, 1041, 980, 1051, 967, 977, 1210, 1210, 1210, 1210, - /* 10 */ 918, 918, 918, 918, 918, 918, 918, 918, 918, 918, - /* 20 */ 918, 918, 918, 918, 1099, 938, 918, 918, 918, 918, - /* 30 */ 918, 918, 918, 918, 918, 918, 918, 918, 918, 918, - /* 40 */ 918, 918, 918, 918, 918, 918, 918, 918, 918, 918, - /* 50 */ 918, 918, 918, 1123, 918, 977, 918, 918, 918, 918, - /* 60 */ 987, 977, 918, 918, 987, 987, 918, 1094, 1025, 1043, - /* 70 */ 918, 918, 918, 918, 918, 918, 918, 918, 918, 918, - /* 80 */ 918, 918, 918, 918, 918, 1101, 1107, 1104, 918, 918, - /* 90 */ 918, 1109, 918, 918, 918, 1145, 1145, 1145, 1145, 1092, - /* 100 */ 918, 918, 918, 918, 918, 918, 918, 918, 918, 918, - /* 110 */ 918, 918, 918, 918, 918, 918, 918, 918, 918, 918, - /* 120 */ 918, 918, 918, 918, 918, 918, 918, 918, 918, 918, - /* 130 */ 918, 918, 918, 965, 918, 963, 918, 918, 918, 918, - /* 140 */ 918, 918, 918, 918, 918, 918, 918, 918, 918, 918, - /* 150 */ 918, 918, 918, 918, 918, 918, 918, 918, 936, 940, - /* 160 */ 940, 940, 918, 918, 918, 918, 940, 1154, 1158, 1135, - /* 170 */ 1152, 1146, 1130, 1128, 1126, 1134, 1119, 1162, 940, 940, - /* 180 */ 940, 985, 985, 981, 977, 977, 940, 940, 1003, 1001, - /* 190 */ 999, 991, 997, 993, 995, 989, 968, 918, 940, 940, - /* 200 */ 975, 975, 940, 975, 940, 975, 940, 940, 1025, 1043, - /* 210 */ 918, 1163, 1153, 918, 1209, 1193, 1192, 918, 1201, 1200, - /* 220 */ 1199, 1191, 1190, 1189, 918, 918, 1185, 1188, 1187, 1186, - /* 230 */ 918, 918, 1165, 918, 918, 1195, 1194, 918, 918, 918, - /* 240 */ 918, 918, 918, 918, 1116, 918, 918, 918, 1141, 1159, - /* 250 */ 1155, 918, 918, 918, 918, 918, 918, 918, 918, 918, - /* 260 */ 918, 918, 918, 918, 918, 918, 918, 918, 918, 1053, - /* 270 */ 918, 918, 918, 918, 918, 918, 918, 918, 918, 918, - /* 280 */ 918, 918, 1091, 918, 918, 918, 918, 918, 1103, 1102, - /* 290 */ 918, 918, 918, 918, 918, 918, 918, 918, 918, 918, - /* 300 */ 918, 918, 918, 918, 918, 918, 918, 918, 1147, 918, - /* 310 */ 1142, 918, 1136, 918, 918, 1065, 918, 918, 918, 918, - /* 320 */ 918, 918, 918, 918, 918, 918, 918, 918, 918, 918, - /* 330 */ 918, 918, 918, 918, 918, 918, 918, 918, 918, 918, - /* 340 */ 918, 918, 918, 1166, 918, 918, 918, 918, 918, 918, - /* 350 */ 918, 1228, 1223, 1224, 1221, 918, 918, 918, 1220, 1215, - /* 360 */ 1216, 918, 918, 918, 1213, 918, 918, 918, 918, 918, - /* 370 */ 918, 918, 918, 918, 918, 918, 918, 918, 918, 918, - /* 380 */ 1009, 918, 947, 945, 918, 918, + /* 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, }; /********** End of lemon-generated parsing tables *****************************/ @@ -762,6 +764,7 @@ static const YYCODETYPE yyFallback[] = { 1, /* LIKE => ID */ 1, /* MATCH => ID */ 1, /* NMATCH => ID */ + 0, /* CONTAINS => nothing */ 1, /* GLOB => ID */ 0, /* BETWEEN => nothing */ 0, /* IN => nothing */ @@ -784,7 +787,6 @@ static const YYCODETYPE yyFallback[] = { 0, /* UMINUS => nothing */ 0, /* UPLUS => nothing */ 0, /* BITNOT => nothing */ - 0, /* QUESTION => nothing */ 0, /* ARROW => nothing */ 0, /* SHOW => nothing */ 0, /* DATABASES => nothing */ @@ -1052,29 +1054,29 @@ static const char *const yyTokenName[] = { /* 22 */ "LIKE", /* 23 */ "MATCH", /* 24 */ "NMATCH", - /* 25 */ "GLOB", - /* 26 */ "BETWEEN", - /* 27 */ "IN", - /* 28 */ "GT", - /* 29 */ "GE", - /* 30 */ "LT", - /* 31 */ "LE", - /* 32 */ "BITAND", - /* 33 */ "BITOR", - /* 34 */ "LSHIFT", - /* 35 */ "RSHIFT", - /* 36 */ "PLUS", - /* 37 */ "MINUS", - /* 38 */ "DIVIDE", - /* 39 */ "TIMES", - /* 40 */ "STAR", - /* 41 */ "SLASH", - /* 42 */ "REM", - /* 43 */ "CONCAT", - /* 44 */ "UMINUS", - /* 45 */ "UPLUS", - /* 46 */ "BITNOT", - /* 47 */ "QUESTION", + /* 25 */ "CONTAINS", + /* 26 */ "GLOB", + /* 27 */ "BETWEEN", + /* 28 */ "IN", + /* 29 */ "GT", + /* 30 */ "GE", + /* 31 */ "LT", + /* 32 */ "LE", + /* 33 */ "BITAND", + /* 34 */ "BITOR", + /* 35 */ "LSHIFT", + /* 36 */ "RSHIFT", + /* 37 */ "PLUS", + /* 38 */ "MINUS", + /* 39 */ "DIVIDE", + /* 40 */ "TIMES", + /* 41 */ "STAR", + /* 42 */ "SLASH", + /* 43 */ "REM", + /* 44 */ "CONCAT", + /* 45 */ "UMINUS", + /* 46 */ "UPLUS", + /* 47 */ "BITNOT", /* 48 */ "ARROW", /* 49 */ "SHOW", /* 50 */ "DATABASES", @@ -1600,36 +1602,37 @@ static const char *const yyRuleName[] = { /* 278 */ "expr ::= expr LIKE expr", /* 279 */ "expr ::= expr MATCH expr", /* 280 */ "expr ::= expr NMATCH expr", - /* 281 */ "expr ::= ID QUESTION STRING", - /* 282 */ "arrow ::= ID ARROW STRING", - /* 283 */ "arrow ::= ID DOT ID ARROW STRING", - /* 284 */ "expr ::= arrow", - /* 285 */ "expr ::= expr IN LP exprlist RP", - /* 286 */ "exprlist ::= exprlist COMMA expritem", - /* 287 */ "exprlist ::= expritem", - /* 288 */ "expritem ::= expr", - /* 289 */ "expritem ::=", - /* 290 */ "cmd ::= RESET QUERY CACHE", - /* 291 */ "cmd ::= SYNCDB ids REPLICA", - /* 292 */ "cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist", - /* 293 */ "cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids", - /* 294 */ "cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist", - /* 295 */ "cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist", - /* 296 */ "cmd ::= ALTER TABLE ids cpxName DROP TAG ids", - /* 297 */ "cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids", - /* 298 */ "cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem", - /* 299 */ "cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist", - /* 300 */ "cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist", - /* 301 */ "cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids", - /* 302 */ "cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist", - /* 303 */ "cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist", - /* 304 */ "cmd ::= ALTER STABLE ids cpxName DROP TAG ids", - /* 305 */ "cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids", - /* 306 */ "cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem", - /* 307 */ "cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist", - /* 308 */ "cmd ::= KILL CONNECTION INTEGER", - /* 309 */ "cmd ::= KILL STREAM INTEGER COLON INTEGER", - /* 310 */ "cmd ::= KILL QUERY INTEGER COLON INTEGER", + /* 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", }; #endif /* NDEBUG */ @@ -2375,36 +2378,37 @@ static const YYCODETYPE yyRuleInfoLhs[] = { 272, /* (278) expr ::= expr LIKE expr */ 272, /* (279) expr ::= expr MATCH expr */ 272, /* (280) expr ::= expr NMATCH expr */ - 272, /* (281) expr ::= ID QUESTION STRING */ - 282, /* (282) arrow ::= ID ARROW STRING */ - 282, /* (283) arrow ::= ID DOT ID ARROW STRING */ - 272, /* (284) expr ::= arrow */ - 272, /* (285) expr ::= expr IN LP exprlist RP */ - 211, /* (286) exprlist ::= exprlist COMMA expritem */ - 211, /* (287) exprlist ::= expritem */ - 284, /* (288) expritem ::= expr */ - 284, /* (289) expritem ::= */ - 203, /* (290) cmd ::= RESET QUERY CACHE */ - 203, /* (291) cmd ::= SYNCDB ids REPLICA */ - 203, /* (292) cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */ - 203, /* (293) cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */ - 203, /* (294) cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */ - 203, /* (295) cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */ - 203, /* (296) cmd ::= ALTER TABLE ids cpxName DROP TAG ids */ - 203, /* (297) cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */ - 203, /* (298) cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */ - 203, /* (299) cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */ - 203, /* (300) cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */ - 203, /* (301) cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */ - 203, /* (302) cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */ - 203, /* (303) cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */ - 203, /* (304) cmd ::= ALTER STABLE ids cpxName DROP TAG ids */ - 203, /* (305) cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */ - 203, /* (306) cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem */ - 203, /* (307) cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */ - 203, /* (308) cmd ::= KILL CONNECTION INTEGER */ - 203, /* (309) cmd ::= KILL STREAM INTEGER COLON INTEGER */ - 203, /* (310) cmd ::= KILL QUERY INTEGER COLON INTEGER */ + 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 */ }; /* For rule J, yyRuleInfoNRhs[J] contains the negative of the number @@ -2691,36 +2695,37 @@ static const signed char yyRuleInfoNRhs[] = { -3, /* (278) expr ::= expr LIKE expr */ -3, /* (279) expr ::= expr MATCH expr */ -3, /* (280) expr ::= expr NMATCH expr */ - -3, /* (281) expr ::= ID QUESTION STRING */ - -3, /* (282) arrow ::= ID ARROW STRING */ - -5, /* (283) arrow ::= ID DOT ID ARROW STRING */ - -1, /* (284) expr ::= arrow */ - -5, /* (285) expr ::= expr IN LP exprlist RP */ - -3, /* (286) exprlist ::= exprlist COMMA expritem */ - -1, /* (287) exprlist ::= expritem */ - -1, /* (288) expritem ::= expr */ - 0, /* (289) expritem ::= */ - -3, /* (290) cmd ::= RESET QUERY CACHE */ - -3, /* (291) cmd ::= SYNCDB ids REPLICA */ - -7, /* (292) cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */ - -7, /* (293) cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */ - -7, /* (294) cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */ - -7, /* (295) cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */ - -7, /* (296) cmd ::= ALTER TABLE ids cpxName DROP TAG ids */ - -8, /* (297) cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */ - -9, /* (298) cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */ - -7, /* (299) cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */ - -7, /* (300) cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */ - -7, /* (301) cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */ - -7, /* (302) cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */ - -7, /* (303) cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */ - -7, /* (304) cmd ::= ALTER STABLE ids cpxName DROP TAG ids */ - -8, /* (305) cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */ - -9, /* (306) cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem */ - -7, /* (307) cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */ - -3, /* (308) cmd ::= KILL CONNECTION INTEGER */ - -5, /* (309) cmd ::= KILL STREAM INTEGER COLON INTEGER */ - -5, /* (310) cmd ::= KILL QUERY INTEGER COLON INTEGER */ + -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 */ }; static void yy_accept(yyParser*); /* Forward Declaration */ @@ -3034,7 +3039,6 @@ 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); - case 220: /* item ::= ID */ yytestcase(yyruleno==220); { toTSDBType(yymsp[0].minor.yy0.type); tVariantCreate(&yylhsminor.yy176, &yymsp[0].minor.yy0, true); } yymsp[0].minor.yy176 = yylhsminor.yy176; break; @@ -3508,10 +3512,17 @@ static YYACTIONTYPE yy_reduce( } yymsp[-1].minor.yy231 = yylhsminor.yy231; break; + case 220: /* item ::= ID */ +{ + toTSDBType(yymsp[0].minor.yy0.type); + tVariantCreate(&yylhsminor.yy176, &yymsp[0].minor.yy0, true); +} + yymsp[0].minor.yy176 = yylhsminor.yy176; + break; case 221: /* item ::= ID DOT ID */ { toTSDBType(yymsp[-2].minor.yy0.type); - yymsp[-2].minor.yy0.n += yymsp[0].minor.yy0.n; + yymsp[-2].minor.yy0.n += (1+yymsp[0].minor.yy0.n); tVariantCreate(&yylhsminor.yy176, &yymsp[-2].minor.yy0, true); } yymsp[-2].minor.yy176 = yylhsminor.yy176; @@ -3557,7 +3568,7 @@ static YYACTIONTYPE yy_reduce( break; case 231: /* having_opt ::= */ case 241: /* where_opt ::= */ yytestcase(yyruleno==241); - case 289: /* expritem ::= */ yytestcase(yyruleno==289); + case 290: /* expritem ::= */ yytestcase(yyruleno==290); {yymsp[1].minor.yy226 = 0;} break; case 232: /* having_opt ::= HAVING expr */ @@ -3727,49 +3738,53 @@ static YYACTIONTYPE yy_reduce( {yylhsminor.yy226 = tSqlExprCreate(yymsp[-2].minor.yy226, yymsp[0].minor.yy226, TK_NMATCH); } yymsp[-2].minor.yy226 = yylhsminor.yy226; break; - case 281: /* expr ::= ID QUESTION 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_QUESTION); } + case 281: /* 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: /* arrow ::= ID ARROW STRING */ + case 282: /* 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 */ {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 283: /* arrow ::= ID DOT ID ARROW STRING */ + case 284: /* 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 284: /* expr ::= arrow */ - case 288: /* expritem ::= expr */ yytestcase(yyruleno==288); + case 285: /* expr ::= arrow */ + case 289: /* expritem ::= expr */ yytestcase(yyruleno==289); {yylhsminor.yy226 = yymsp[0].minor.yy226;} yymsp[0].minor.yy226 = yylhsminor.yy226; break; - case 285: /* expr ::= expr IN LP exprlist RP */ + case 286: /* 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 286: /* exprlist ::= exprlist COMMA expritem */ + case 287: /* 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 287: /* exprlist ::= expritem */ + case 288: /* exprlist ::= expritem */ {yylhsminor.yy231 = tSqlExprListAppend(0,yymsp[0].minor.yy226,0, 0);} yymsp[0].minor.yy231 = yylhsminor.yy231; break; - case 290: /* cmd ::= RESET QUERY CACHE */ + case 291: /* cmd ::= RESET QUERY CACHE */ { setDCLSqlElems(pInfo, TSDB_SQL_RESET_CACHE, 0);} break; - case 291: /* cmd ::= SYNCDB ids REPLICA */ + case 292: /* cmd ::= SYNCDB ids REPLICA */ { setDCLSqlElems(pInfo, TSDB_SQL_SYNC_DB_REPLICA, 1, &yymsp[-1].minor.yy0);} break; - case 292: /* cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */ + case 293: /* 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 293: /* cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */ + case 294: /* cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; @@ -3780,21 +3795,21 @@ static YYACTIONTYPE yy_reduce( setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 294: /* cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */ + case 295: /* 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 295: /* cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */ + case 296: /* 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 296: /* cmd ::= ALTER TABLE ids cpxName DROP TAG ids */ + case 297: /* cmd ::= ALTER TABLE ids cpxName DROP TAG ids */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; @@ -3805,7 +3820,7 @@ static YYACTIONTYPE yy_reduce( setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 297: /* cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */ + case 298: /* cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */ { yymsp[-5].minor.yy0.n += yymsp[-4].minor.yy0.n; @@ -3819,7 +3834,7 @@ static YYACTIONTYPE yy_reduce( setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 298: /* cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */ + case 299: /* cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */ { yymsp[-6].minor.yy0.n += yymsp[-5].minor.yy0.n; @@ -3831,21 +3846,21 @@ static YYACTIONTYPE yy_reduce( setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 299: /* cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */ + case 300: /* 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 300: /* cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */ + case 301: /* 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 301: /* cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */ + case 302: /* cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; @@ -3856,21 +3871,21 @@ static YYACTIONTYPE yy_reduce( setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 302: /* cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */ + case 303: /* 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 303: /* cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */ + case 304: /* 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 304: /* cmd ::= ALTER STABLE ids cpxName DROP TAG ids */ + case 305: /* cmd ::= ALTER STABLE ids cpxName DROP TAG ids */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; @@ -3881,7 +3896,7 @@ static YYACTIONTYPE yy_reduce( setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 305: /* cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */ + case 306: /* cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */ { yymsp[-5].minor.yy0.n += yymsp[-4].minor.yy0.n; @@ -3895,7 +3910,7 @@ static YYACTIONTYPE yy_reduce( setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 306: /* cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem */ + case 307: /* cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem */ { yymsp[-6].minor.yy0.n += yymsp[-5].minor.yy0.n; @@ -3907,20 +3922,20 @@ static YYACTIONTYPE yy_reduce( setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 307: /* cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */ + case 308: /* 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 308: /* cmd ::= KILL CONNECTION INTEGER */ + case 309: /* cmd ::= KILL CONNECTION INTEGER */ {setKillSql(pInfo, TSDB_SQL_KILL_CONNECTION, &yymsp[0].minor.yy0);} break; - case 309: /* cmd ::= KILL STREAM INTEGER COLON INTEGER */ + case 310: /* 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 310: /* cmd ::= KILL QUERY INTEGER COLON INTEGER */ + case 311: /* cmd ::= KILL QUERY INTEGER COLON INTEGER */ {yymsp[-2].minor.yy0.n += (yymsp[-1].minor.yy0.n + yymsp[0].minor.yy0.n); setKillSql(pInfo, TSDB_SQL_KILL_QUERY, &yymsp[-2].minor.yy0);} break; default: diff --git a/src/util/src/tcompare.c b/src/util/src/tcompare.c index deb34e9456a0188a54fe02ccf0fd25a2152b1e1b..a0499b52418b3a59c3109ea3f2d79332c2dc6f3f 100644 --- a/src/util/src/tcompare.c +++ b/src/util/src/tcompare.c @@ -544,7 +544,7 @@ __compar_fn_t getComparFunc(int32_t type, int32_t optr) { comparFn = compareStrRegexCompNMatch; } else if (optr == TSDB_RELATION_LIKE) { /* wildcard query using like operator */ comparFn = compareWStrPatternComp; - } else if (optr == TSDB_RELATION_QUESTION) { + } else if (optr == TSDB_RELATION_CONTAINS) { comparFn = compareStrContainJson; } else { comparFn = compareJsonVal; diff --git a/src/util/src/ttokenizer.c b/src/util/src/ttokenizer.c index 4b1285d3db67eede97a0499ade1020cbe11b19cf..5e3aa82ef4740d60f362807a086d50cfdb4aa491 100644 --- a/src/util/src/ttokenizer.c +++ b/src/util/src/ttokenizer.c @@ -231,7 +231,8 @@ static SKeyword keywordTable[] = { {"OUTPUTTYPE", TK_OUTPUTTYPE}, {"AGGREGATE", TK_AGGREGATE}, {"BUFSIZE", TK_BUFSIZE}, - {"RANGE", TK_RANGE} + {"RANGE", TK_RANGE}, + {"CONTAINS", TK_CONTAINS} }; static const char isIdChar[] = { diff --git a/tests/pytest/stable/json_tag.py b/tests/pytest/stable/json_tag.py index cc204c1055814ce9979d9550bcc57bbc57a1fa17..e914765fd301c04a2df348be6143776dbc55b1f1 100644 --- a/tests/pytest/stable/json_tag.py +++ b/tests/pytest/stable/json_tag.py @@ -78,14 +78,13 @@ class TDTestCase: tdSql.error("select * from jsons1 where jtag->''") tdSql.error("select * from jsons1 where jtag->''=9") tdSql.error("select -> from jsons1") - tdSql.error("select ? from jsons1") - tdSql.error("select * from jsons1 where ?") + tdSql.error("select * from jsons1 where contains") tdSql.error("select * from jsons1 where jtag->") tdSql.error("select jtag->location from jsons1") - tdSql.error("select jtag?location from jsons1") - tdSql.error("select * from jsons1 where jtag?location") - tdSql.error("select * from jsons1 where jtag?''") - tdSql.error("select * from jsons1 where jtag?'location'='beijing'") + tdSql.error("select jtag contains location from jsons1") + tdSql.error("select * from jsons1 where jtag contains location") + tdSql.error("select * from jsons1 where jtag contains''") + tdSql.error("select * from jsons1 where jtag contains 'location'='beijing'") # test select normal column tdSql.query("select dataint from jsons1") @@ -246,12 +245,12 @@ class TDTestCase: tdSql.query("select * from jsons1 where jtag->'tag3' is not null") tdSql.checkRows(4) - # test ? - tdSql.query("select * from jsons1 where jtag?'tag1'") + # test contains + tdSql.query("select * from jsons1 where jtag contains 'tag1'") tdSql.checkRows(8) - tdSql.query("select * from jsons1 where jtag?'tag3'") + tdSql.query("select * from jsons1 where jtag contains 'tag3'") tdSql.checkRows(4) - tdSql.query("select * from jsons1 where jtag?'tag_no_exist'") + tdSql.query("select * from jsons1 where jtag contains 'tag_no_exist'") tdSql.checkRows(0) # test json tag in where condition with and/or @@ -267,19 +266,19 @@ class TDTestCase: tdSql.checkRows(0) tdSql.query("select * from jsons1 where jtag->'tag1'=13 or jtag->'tag2'>35") tdSql.checkRows(0) - tdSql.query("select * from jsons1 where jtag->'tag1' is not null and jtag?'tag3'") + tdSql.query("select * from jsons1 where jtag->'tag1' is not null and jtag contains 'tag3'") tdSql.checkRows(4) - tdSql.query("select * from jsons1 where jtag->'tag1'='femail' and jtag?'tag3'") + tdSql.query("select * from jsons1 where jtag->'tag1'='femail' and jtag contains 'tag3'") tdSql.checkRows(2) # test with tbname/normal column tdSql.query("select * from jsons1 where tbname = 'jsons1_1'") tdSql.checkRows(2) - tdSql.query("select * from jsons1 where tbname = 'jsons1_1' and jtag?'tag3'") + tdSql.query("select * from jsons1 where tbname = 'jsons1_1' and jtag contains 'tag3'") tdSql.checkRows(2) - tdSql.query("select * from jsons1 where tbname = 'jsons1_1' and jtag?'tag3' and dataint=3") + tdSql.query("select * from jsons1 where tbname = 'jsons1_1' and jtag contains 'tag3' and dataint=3") tdSql.checkRows(0) - tdSql.query("select * from jsons1 where tbname = 'jsons1_1' and jtag?'tag3' and dataint=23") + tdSql.query("select * from jsons1 where tbname = 'jsons1_1' and jtag contains 'tag3' and dataint=23") tdSql.checkRows(1)