提交 50b82d68 编写于 作者: wmmhello's avatar wmmhello

add json tag support for group by

上级 235fbfae
......@@ -3711,8 +3711,6 @@ int32_t validateGroupbyNode(SQueryInfo* pQueryInfo, SArray* pList, SSqlCmd* pCmd
const char* msg6 = "tags not allowed for table query";
const char* msg7 = "not support group by expression";
const char* msg8 = "normal column can only locate at the end of group by clause";
const char* msg9 = "json tag format error, like json->'key'";
const char* msg10 = "-> operation only apply for json tag";
// todo : handle two tables situation
STableMetaInfo* pTableMetaInfo = NULL;
......@@ -3748,33 +3746,27 @@ int32_t validateGroupbyNode(SQueryInfo* pQueryInfo, SArray* pList, SSqlCmd* pCmd
size_t num = taosArrayGetSize(pList);
for (int32_t i = 0; i < num; ++i) {
tVariantListItem * pItem = taosArrayGet(pList, i);
tVariant* pVar = &pItem->pVar;
SStrToken token = {pVar->nLen, pVar->nType, pVar->pz};
char* jsonName = NULL;
char* jsonKey = NULL;
int ret = getArrowKV(pVar->pz, pVar->nLen, &jsonName, &jsonKey);
if(jsonName && jsonKey) tscDebug("group by json k:%s, v:%s", jsonName, jsonKey);
if (ret == 2){
return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg9);
}
if(ret == 0){
token.z = jsonName;
token.n = strlen(jsonName);
CommonItem * pItem = taosArrayGet(pList, i);
SStrToken token = {0};
if(pItem->isJsonExp){
assert(pItem->jsonExp->tokenId == TK_ARROW);
token.n = pItem->jsonExp->pLeft->value.nLen;
token.z = pItem->jsonExp->pLeft->value.pz;
token.type = pItem->jsonExp->pLeft->value.nType;
}else{
token.n = pItem->pVar.nLen;
token.z = pItem->pVar.pz;
token.type = pItem->pVar.nType;
}
SColumnIndex index = COLUMN_INDEX_INITIALIZER;
if (getColumnIndexByName(&token, pQueryInfo, &index, tscGetErrorMsgPayload(pCmd)) != TSDB_CODE_SUCCESS) {
tfree(jsonName);
tfree(jsonKey);
return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg2);
}
if (tableIndex == COLUMN_INDEX_INITIAL_VAL) {
tableIndex = index.tableIndex;
} else if (tableIndex != index.tableIndex) {
tfree(jsonName);
tfree(jsonKey);
return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg3);
}
......@@ -3786,18 +3778,12 @@ int32_t validateGroupbyNode(SQueryInfo* pQueryInfo, SArray* pList, SSqlCmd* pCmd
} else {
pSchema = tscGetTableColumnSchema(pTableMeta, index.columnIndex);
}
if(ret == 0 && pSchema->type != TSDB_DATA_TYPE_JSON){
tfree(jsonName);
tfree(jsonKey);
return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg10);
}
int32_t numOfCols = tscGetNumOfColumns(pTableMeta);
bool groupTag = (index.columnIndex == TSDB_TBNAME_COLUMN_INDEX || index.columnIndex >= numOfCols);
if (groupTag) {
if (!UTIL_TABLE_IS_SUPER_TABLE(pTableMetaInfo)) {
tfree(jsonName);
tfree(jsonKey);
return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg6);
}
......@@ -3807,25 +3793,24 @@ int32_t validateGroupbyNode(SQueryInfo* pQueryInfo, SArray* pList, SSqlCmd* pCmd
}
SColIndex colIndex = { .colIndex = relIndex, .flag = TSDB_COL_TAG, .colId = pSchema->colId, };
if(ret == 0){
tstrncpy(colIndex.name, jsonKey, tListLen(colIndex.name));
if(pItem->isJsonExp) {
tstrncpy(colIndex.name, pItem->jsonExp->pRight->value.pz, tListLen(colIndex.name));
}else{
tstrncpy(colIndex.name, pSchema->name, tListLen(colIndex.name));
}
taosArrayPush(pGroupExpr->columnInfo, &colIndex);
index.columnIndex = relIndex;
tscColumnListInsert(pTableMetaInfo->tagColList, index.columnIndex, pTableMeta->id.uid, pSchema);
} else {
// check if the column type is valid, here only support the bool/tinyint/smallint/bigint group by
if (pSchema->type == TSDB_DATA_TYPE_FLOAT || pSchema->type == TSDB_DATA_TYPE_DOUBLE) {
tfree(jsonName);
tfree(jsonKey);
return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg5);
}
tscColumnListInsert(pQueryInfo->colList, index.columnIndex, pTableMeta->id.uid, pSchema);
SColIndex colIndex = { .colIndex = index.columnIndex, .flag = TSDB_COL_NORMAL, .colId = pSchema->colId };
strncpy(colIndex.name, pSchema->name, tListLen(colIndex.name));
......@@ -3833,8 +3818,6 @@ int32_t validateGroupbyNode(SQueryInfo* pQueryInfo, SArray* pList, SSqlCmd* pCmd
pQueryInfo->groupbyExpr.orderType = TSDB_ORDER_ASC;
numOfGroupCols++;
}
tfree(jsonName);
tfree(jsonKey);
}
// 1. only one normal column allowed in the group by clause
......@@ -3846,7 +3829,7 @@ int32_t validateGroupbyNode(SQueryInfo* pQueryInfo, SArray* pList, SSqlCmd* pCmd
for(int32_t i = 0; i < num; ++i) {
SColIndex* pIndex = taosArrayGet(pGroupExpr->columnInfo, i);
if (TSDB_COL_IS_NORMAL_COL(pIndex->flag) && i != num - 1) {
return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg8);
return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg8);
}
}
......
......@@ -79,6 +79,15 @@ typedef struct tVariantListItem {
uint8_t sortOrder;
} tVariantListItem;
typedef struct CommonItem {
union {
tVariant pVar;
struct tSqlExpr *jsonExp;
};
bool isJsonExp;
uint8_t sortOrder;
} CommonItem;
typedef struct SIntervalVal {
int32_t token;
SStrToken interval;
......
......@@ -621,25 +621,30 @@ sliding_opt(K) ::= . {K.n = 0; K.z = NULL; K.type = 0
%type sortlist {SArray*}
%destructor sortlist {taosArrayDestroy($$);}
%type sortitem {tVariant}
%destructor sortitem {tVariantDestroy(&$$);}
orderby_opt(A) ::= . {A = 0;}
orderby_opt(A) ::= ORDER BY sortlist(X). {A = X;}
sortlist(A) ::= sortlist(X) COMMA item(Y) sortorder(Z). {
A = tVariantListAppend(X, &Y, Z);
A = commonItemAppend(X, &Y, NULL, false, Z);
}
sortlist(A) ::= sortlist(X) COMMA arrow(Y) sortorder(Z). {
A = commonItemAppend(X, NULL, Y, true, Z);
}
sortlist(A) ::= item(Y) sortorder(Z). {
A = tVariantListAppend(NULL, &Y, Z);
A = commonItemAppend(NULL, &Y, NULL, false, Z);
}
sortlist(A) ::= arrow(Y) sortorder(Z). {
A = commonItemAppend(NULL, NULL, Y, true, Z);
}
%type item {tVariant}
item(A) ::= ids(X) cpxName(Y). {
item(A) ::= ID(X). { toTSDBType(X.type); tVariantCreate(&A, &X); }
item(A) ::= ID(X) DOT ID(Y). {
toTSDBType(X.type);
X.n += Y.n;
tVariantCreate(&A, &X);
}
......@@ -658,11 +663,19 @@ groupby_opt(A) ::= . { A = 0;}
groupby_opt(A) ::= GROUP BY grouplist(X). { A = X;}
grouplist(A) ::= grouplist(X) COMMA item(Y). {
A = tVariantListAppend(X, &Y, -1);
A = commonItemAppend(X, &Y, NULL, false, -1);
}
grouplist(A) ::= grouplist(X) COMMA arrow(Y). {
A = commonItemAppend(X, NULL, Y, true, -1);
}
grouplist(A) ::= item(X). {
A = tVariantListAppend(NULL, &X, -1);
A = commonItemAppend(NULL, &X, NULL, false, -1);
}
grouplist(A) ::= arrow(X). {
A = commonItemAppend(NULL, NULL, X, true, -1);
}
//having clause, ignore the input condition in having
......@@ -757,10 +770,15 @@ 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) ::= expr(X) QUESTION expr(Y). {A = tSqlExprCreate(X, Y, TK_QUESTION); }
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); }
// arrow expression
expr(A) ::= expr(X) ARROW expr(Y). {A = tSqlExprCreate(X, Y, TK_ARROW); }
%type arrow {tSqlExpr*}
%destructor arrow {tSqlExprDestroy($$);}
arrow(A) ::= ID(X) ARROW STRING(Y). {tSqlExpr* S = tSqlExprCreateIdValue(pInfo, &X, TK_ID); tSqlExpr* M = tSqlExprCreateIdValue(pInfo, &Y, TK_STRING); A = tSqlExprCreate(S, M, TK_ARROW); }
arrow(A) ::= ID(X) DOT ID(Y) ARROW 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_ARROW); }
expr(A) ::= arrow(X). {A = X;}
//in expression
expr(A) ::= expr(X) IN LP exprlist(Y) RP. {A = tSqlExprCreate(X, (tSqlExpr*)Y, TK_IN); }
......
......@@ -522,6 +522,24 @@ SArray *tVariantListAppendToken(SArray *pList, SStrToken *pToken, uint8_t order)
return pList;
}
SArray *commonItemAppend(SArray *pList, tVariant *pVar, tSqlExpr *jsonExp, bool isJsonExp, uint8_t sortOrder){
if (pList == NULL) {
pList = taosArrayInit(4, sizeof(CommonItem));
}
CommonItem item;
item.sortOrder = sortOrder;
item.isJsonExp = isJsonExp;
if(isJsonExp){
item.jsonExp = jsonExp;
}else{
item.pVar = *pVar;
}
taosArrayPush(pList, &item);
return pList;
}
SArray *tVariantListAppend(SArray *pList, tVariant *pVar, uint8_t sortOrder) {
if (pList == NULL) {
pList = taosArrayInit(4, sizeof(tVariantListItem));
......@@ -822,6 +840,15 @@ static void freeVariant(void *pItem) {
tVariantDestroy(&p->pVar);
}
static void freeCommonItem(void *pItem) {
CommonItem* p = (CommonItem *) pItem;
if (p->isJsonExp){
tSqlExprDestroy(p->jsonExp);
}else{
tVariantDestroy(&p->pVar);
}
}
void freeCreateTableInfo(void* p) {
SCreatedTableInfo* pInfo = (SCreatedTableInfo*) p;
taosArrayDestroy(pInfo->pTagNames);
......@@ -841,10 +868,10 @@ void destroySqlNode(SSqlNode *pSqlNode) {
tSqlExprDestroy(pSqlNode->pWhere);
pSqlNode->pWhere = NULL;
taosArrayDestroyEx(pSqlNode->pSortOrder, freeVariant);
taosArrayDestroyEx(pSqlNode->pSortOrder, freeCommonItem);
pSqlNode->pSortOrder = NULL;
taosArrayDestroyEx(pSqlNode->pGroupby, freeVariant);
taosArrayDestroyEx(pSqlNode->pGroupby, freeCommonItem);
pSqlNode->pGroupby = NULL;
pSqlNode->from = destroyRelationInfo(pSqlNode->from);
......
......@@ -340,18 +340,18 @@ typedef union {
#define ParseCTX_FETCH
#define ParseCTX_STORE
#define YYFALLBACK 1
#define YYNSTATE 375
#define YYNRULE 296
#define YYNRULE_WITH_ACTION 296
#define YYNSTATE 376
#define YYNRULE 303
#define YYNRULE_WITH_ACTION 303
#define YYNTOKEN 201
#define YY_MAX_SHIFT 374
#define YY_MIN_SHIFTREDUCE 580
#define YY_MAX_SHIFTREDUCE 875
#define YY_ERROR_ACTION 876
#define YY_ACCEPT_ACTION 877
#define YY_NO_ACTION 878
#define YY_MIN_REDUCE 879
#define YY_MAX_REDUCE 1174
#define YY_MAX_SHIFT 375
#define YY_MIN_SHIFTREDUCE 590
#define YY_MAX_SHIFTREDUCE 892
#define YY_ERROR_ACTION 893
#define YY_ACCEPT_ACTION 894
#define YY_NO_ACTION 895
#define YY_MIN_REDUCE 896
#define YY_MAX_REDUCE 1198
/************* End control #defines *******************************************/
#define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0])))
......@@ -418,172 +418,174 @@ typedef union {
** yy_default[] Default action for each state.
**
*********** Begin parsing tables **********************************************/
#define YY_ACTTAB_COUNT (796)
#define YY_ACTTAB_COUNT (811)
static const YYACTIONTYPE yy_action[] = {
/* 0 */ 23, 632, 159, 877, 374, 632, 210, 1057, 213, 633,
/* 10 */ 373, 237, 243, 633, 61, 62, 1035, 65, 66, 1150,
/* 20 */ 166, 262, 55, 54, 53, 668, 64, 331, 69, 67,
/* 30 */ 70, 68, 1005, 1034, 1003, 1004, 60, 59, 175, 1006,
/* 40 */ 58, 57, 56, 1007, 166, 1008, 1009, 52, 51, 259,
/* 50 */ 253, 61, 62, 1048, 65, 66, 293, 211, 262, 55,
/* 60 */ 54, 53, 1021, 64, 331, 69, 67, 70, 68, 284,
/* 70 */ 166, 291, 290, 60, 59, 1054, 716, 58, 57, 56,
/* 80 */ 58, 57, 56, 38, 52, 51, 632, 52, 51, 61,
/* 90 */ 62, 84, 65, 66, 633, 1095, 262, 55, 54, 53,
/* 100 */ 90, 64, 331, 69, 67, 70, 68, 351, 350, 213,
/* 110 */ 213, 60, 59, 263, 249, 58, 57, 56, 1035, 96,
/* 120 */ 1151, 1151, 52, 51, 928, 810, 61, 63, 239, 65,
/* 130 */ 66, 194, 1032, 262, 55, 54, 53, 45, 64, 331,
/* 140 */ 69, 67, 70, 68, 127, 1096, 251, 303, 60, 59,
/* 150 */ 1035, 329, 58, 57, 56, 62, 361, 65, 66, 52,
/* 160 */ 51, 262, 55, 54, 53, 276, 64, 331, 69, 67,
/* 170 */ 70, 68, 29, 213, 280, 279, 60, 59, 775, 776,
/* 180 */ 58, 57, 56, 329, 1151, 65, 66, 52, 51, 262,
/* 190 */ 55, 54, 53, 632, 64, 331, 69, 67, 70, 68,
/* 200 */ 44, 633, 368, 367, 60, 59, 271, 366, 58, 57,
/* 210 */ 56, 365, 361, 364, 363, 52, 51, 180, 254, 44,
/* 220 */ 327, 368, 367, 326, 325, 324, 366, 323, 322, 321,
/* 230 */ 365, 320, 364, 363, 156, 154, 153, 255, 265, 372,
/* 240 */ 371, 150, 581, 582, 583, 584, 585, 586, 587, 588,
/* 250 */ 589, 590, 591, 592, 593, 594, 157, 216, 238, 997,
/* 260 */ 985, 986, 987, 988, 989, 990, 991, 992, 993, 994,
/* 270 */ 995, 996, 998, 999, 24, 38, 69, 67, 70, 68,
/* 280 */ 217, 38, 270, 756, 60, 59, 166, 1048, 58, 57,
/* 290 */ 56, 222, 38, 261, 825, 52, 51, 814, 224, 817,
/* 300 */ 816, 820, 819, 240, 141, 140, 139, 223, 218, 261,
/* 310 */ 825, 336, 90, 814, 266, 817, 264, 820, 339, 338,
/* 320 */ 247, 815, 271, 818, 1032, 256, 248, 1048, 235, 236,
/* 330 */ 1032, 740, 332, 181, 737, 938, 738, 340, 739, 1029,
/* 340 */ 257, 1032, 194, 241, 235, 236, 5, 41, 184, 45,
/* 350 */ 97, 38, 258, 183, 108, 113, 104, 112, 272, 305,
/* 360 */ 269, 95, 346, 345, 85, 267, 268, 125, 119, 130,
/* 370 */ 760, 283, 316, 82, 129, 99, 135, 138, 128, 71,
/* 380 */ 233, 204, 202, 200, 38, 132, 250, 102, 199, 145,
/* 390 */ 144, 143, 142, 60, 59, 71, 341, 58, 57, 56,
/* 400 */ 1032, 38, 14, 792, 52, 51, 98, 38, 1018, 1019,
/* 410 */ 35, 1022, 75, 38, 826, 821, 87, 271, 38, 38,
/* 420 */ 38, 822, 753, 1023, 823, 369, 966, 929, 1033, 342,
/* 430 */ 826, 821, 83, 1032, 194, 285, 101, 822, 1, 182,
/* 440 */ 3, 195, 88, 772, 78, 824, 343, 782, 9, 39,
/* 450 */ 1032, 741, 742, 287, 76, 333, 1031, 161, 347, 783,
/* 460 */ 791, 72, 1032, 348, 349, 353, 1020, 1032, 1032, 1032,
/* 470 */ 812, 726, 308, 26, 728, 310, 727, 34, 260, 287,
/* 480 */ 850, 52, 51, 827, 79, 39, 39, 631, 72, 100,
/* 490 */ 72, 81, 229, 16, 25, 15, 118, 25, 117, 230,
/* 500 */ 6, 25, 18, 745, 17, 746, 743, 214, 744, 813,
/* 510 */ 311, 20, 124, 19, 123, 22, 215, 21, 137, 136,
/* 520 */ 219, 212, 220, 715, 221, 226, 227, 228, 225, 209,
/* 530 */ 1170, 1162, 1106, 1105, 245, 281, 1102, 1101, 158, 246,
/* 540 */ 352, 1056, 48, 1067, 1064, 1088, 1087, 1065, 1069, 1049,
/* 550 */ 288, 160, 165, 299, 1030, 155, 176, 292, 286, 177,
/* 560 */ 242, 829, 294, 1028, 173, 171, 178, 179, 1046, 943,
/* 570 */ 313, 314, 315, 318, 771, 319, 46, 207, 42, 330,
/* 580 */ 937, 337, 1169, 115, 1168, 1165, 296, 80, 185, 167,
/* 590 */ 77, 306, 344, 50, 1161, 168, 121, 1160, 304, 1157,
/* 600 */ 186, 963, 169, 43, 40, 47, 208, 302, 925, 131,
/* 610 */ 923, 133, 134, 921, 920, 273, 300, 197, 198, 917,
/* 620 */ 916, 915, 914, 913, 912, 911, 201, 203, 908, 906,
/* 630 */ 904, 902, 205, 899, 206, 895, 298, 295, 86, 49,
/* 640 */ 317, 91, 297, 1089, 362, 126, 355, 354, 356, 234,
/* 650 */ 360, 357, 358, 252, 312, 359, 370, 875, 274, 231,
/* 660 */ 275, 874, 278, 232, 277, 942, 941, 109, 110, 873,
/* 670 */ 856, 282, 919, 855, 287, 307, 10, 918, 30, 89,
/* 680 */ 146, 189, 147, 188, 964, 187, 190, 191, 193, 910,
/* 690 */ 192, 148, 965, 909, 1001, 149, 901, 900, 2, 33,
/* 700 */ 174, 172, 170, 4, 748, 289, 1011, 92, 773, 162,
/* 710 */ 164, 784, 163, 244, 778, 93, 31, 780, 94, 301,
/* 720 */ 11, 32, 12, 13, 27, 28, 309, 103, 101, 106,
/* 730 */ 646, 36, 105, 681, 37, 679, 107, 678, 677, 675,
/* 740 */ 674, 673, 670, 636, 328, 111, 7, 334, 828, 830,
/* 750 */ 8, 335, 114, 116, 120, 73, 74, 718, 717, 714,
/* 760 */ 39, 122, 662, 660, 652, 658, 654, 656, 650, 648,
/* 770 */ 684, 683, 682, 680, 676, 672, 671, 196, 634, 598,
/* 780 */ 879, 878, 878, 878, 878, 878, 878, 878, 878, 878,
/* 790 */ 878, 878, 878, 878, 151, 152,
/* 0 */ 58, 642, 1117, 245, 1118, 298, 1051, 302, 94, 643,
/* 10 */ 93, 894, 375, 678, 37, 38, 243, 41, 42, 58,
/* 20 */ 1052, 257, 31, 30, 29, 642, 40, 330, 45, 43,
/* 30 */ 46, 44, 255, 643, 1074, 1194, 36, 35, 374, 237,
/* 40 */ 34, 33, 32, 37, 38, 239, 41, 42, 58, 1049,
/* 50 */ 257, 31, 30, 29, 642, 40, 330, 45, 43, 46,
/* 60 */ 44, 1065, 643, 250, 248, 36, 35, 1052, 1049, 34,
/* 70 */ 33, 32, 37, 38, 159, 41, 42, 279, 1046, 257,
/* 80 */ 31, 30, 29, 1038, 40, 330, 45, 43, 46, 44,
/* 90 */ 326, 82, 212, 249, 36, 35, 642, 1049, 34, 33,
/* 100 */ 32, 1172, 1071, 1175, 643, 88, 37, 39, 252, 41,
/* 110 */ 42, 51, 1052, 257, 31, 30, 29, 825, 40, 330,
/* 120 */ 45, 43, 46, 44, 1022, 251, 1020, 1021, 36, 35,
/* 130 */ 212, 1023, 34, 33, 32, 1024, 58, 1025, 1026, 1172,
/* 140 */ 763, 1174, 67, 286, 285, 591, 592, 593, 594, 595,
/* 150 */ 596, 597, 598, 599, 600, 601, 602, 603, 604, 157,
/* 160 */ 81, 238, 38, 58, 41, 42, 10, 127, 257, 31,
/* 170 */ 30, 29, 326, 40, 330, 45, 43, 46, 44, 362,
/* 180 */ 831, 341, 834, 36, 35, 1049, 362, 34, 33, 32,
/* 190 */ 1065, 41, 42, 1065, 1037, 257, 31, 30, 29, 99,
/* 200 */ 40, 330, 45, 43, 46, 44, 240, 1186, 342, 241,
/* 210 */ 36, 35, 1049, 1128, 34, 33, 32, 66, 324, 369,
/* 220 */ 368, 323, 322, 321, 367, 320, 319, 318, 366, 317,
/* 230 */ 365, 364, 1035, 1036, 55, 1039, 726, 1014, 1002, 1003,
/* 240 */ 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013,
/* 250 */ 1015, 1016, 25, 785, 786, 5, 61, 183, 34, 33,
/* 260 */ 32, 24, 182, 108, 113, 104, 112, 352, 351, 215,
/* 270 */ 1172, 230, 840, 945, 174, 829, 223, 832, 1127, 835,
/* 280 */ 193, 313, 141, 140, 139, 222, 246, 230, 840, 337,
/* 290 */ 88, 829, 288, 832, 1124, 835, 254, 329, 328, 1123,
/* 300 */ 45, 43, 46, 44, 838, 58, 235, 236, 36, 35,
/* 310 */ 331, 102, 34, 33, 32, 256, 373, 372, 150, 830,
/* 320 */ 260, 833, 235, 236, 209, 750, 265, 67, 747, 271,
/* 330 */ 748, 210, 749, 1172, 125, 119, 130, 6, 275, 274,
/* 340 */ 1172, 129, 266, 135, 138, 128, 216, 1040, 247, 278,
/* 350 */ 343, 80, 132, 179, 1049, 1172, 212, 47, 231, 262,
/* 360 */ 263, 203, 201, 199, 258, 1172, 217, 1175, 198, 145,
/* 370 */ 144, 143, 142, 47, 58, 1172, 66, 280, 369, 368,
/* 380 */ 36, 35, 58, 367, 34, 33, 32, 366, 218, 365,
/* 390 */ 364, 59, 841, 836, 766, 58, 261, 1172, 259, 837,
/* 400 */ 340, 339, 267, 58, 264, 58, 347, 346, 841, 836,
/* 410 */ 1, 181, 58, 13, 276, 837, 1165, 98, 334, 344,
/* 420 */ 156, 154, 153, 1049, 212, 1172, 158, 348, 1164, 1163,
/* 430 */ 233, 1049, 234, 1172, 1115, 1175, 1116, 1172, 1172, 1172,
/* 440 */ 349, 1172, 213, 839, 1049, 751, 752, 101, 350, 805,
/* 450 */ 354, 1172, 1049, 214, 1049, 219, 211, 370, 983, 220,
/* 460 */ 221, 1048, 1172, 225, 1172, 1172, 226, 227, 1172, 1172,
/* 470 */ 955, 224, 1172, 97, 208, 1172, 1172, 193, 266, 266,
/* 480 */ 1172, 770, 96, 1172, 95, 85, 946, 83, 86, 180,
/* 490 */ 1050, 3, 194, 193, 782, 792, 793, 328, 73, 736,
/* 500 */ 54, 76, 305, 333, 738, 307, 804, 641, 161, 70,
/* 510 */ 48, 353, 737, 59, 301, 79, 59, 867, 70, 100,
/* 520 */ 842, 9, 282, 1073, 844, 282, 70, 15, 118, 14,
/* 530 */ 117, 9, 26, 308, 9, 17, 755, 16, 756, 1084,
/* 540 */ 74, 77, 828, 753, 19, 754, 18, 725, 124, 1081,
/* 550 */ 123, 21, 1082, 20, 137, 136, 1066, 283, 1086, 160,
/* 560 */ 165, 294, 175, 1107, 1047, 1106, 1105, 176, 1104, 1045,
/* 570 */ 177, 155, 178, 960, 310, 311, 312, 315, 316, 68,
/* 580 */ 167, 1063, 206, 64, 327, 954, 338, 1193, 781, 115,
/* 590 */ 1192, 1189, 184, 345, 1185, 121, 1184, 78, 1181, 287,
/* 600 */ 75, 242, 289, 291, 166, 303, 185, 980, 65, 169,
/* 610 */ 28, 168, 60, 69, 299, 207, 297, 295, 942, 293,
/* 620 */ 170, 131, 171, 940, 133, 134, 938, 290, 937, 268,
/* 630 */ 196, 27, 363, 197, 934, 314, 933, 932, 931, 930,
/* 640 */ 929, 928, 200, 202, 925, 923, 921, 919, 204, 916,
/* 650 */ 205, 912, 126, 355, 356, 281, 84, 89, 292, 357,
/* 660 */ 358, 359, 360, 361, 371, 232, 253, 309, 892, 270,
/* 670 */ 269, 891, 228, 229, 272, 273, 890, 109, 959, 958,
/* 680 */ 277, 873, 872, 110, 282, 304, 936, 11, 284, 87,
/* 690 */ 935, 758, 52, 90, 783, 188, 187, 981, 191, 186,
/* 700 */ 189, 146, 190, 147, 927, 192, 148, 1018, 926, 162,
/* 710 */ 149, 53, 918, 172, 917, 982, 173, 2, 4, 794,
/* 720 */ 163, 164, 1028, 788, 91, 244, 790, 92, 296, 62,
/* 730 */ 22, 332, 300, 23, 63, 12, 49, 306, 50, 101,
/* 740 */ 103, 656, 56, 105, 106, 57, 107, 691, 689, 688,
/* 750 */ 687, 685, 684, 683, 680, 646, 325, 111, 845, 864,
/* 760 */ 863, 843, 7, 865, 8, 336, 335, 114, 116, 71,
/* 770 */ 59, 728, 72, 120, 727, 122, 724, 672, 670, 662,
/* 780 */ 668, 664, 666, 660, 658, 694, 693, 692, 690, 686,
/* 790 */ 682, 681, 195, 644, 608, 896, 895, 895, 895, 895,
/* 800 */ 895, 895, 895, 895, 895, 895, 895, 895, 895, 151,
/* 810 */ 152,
};
static const YYCODETYPE yy_lookahead[] = {
/* 0 */ 270, 1, 203, 201, 202, 1, 270, 203, 270, 9,
/* 10 */ 203, 204, 249, 9, 14, 15, 253, 17, 18, 281,
/* 20 */ 203, 21, 22, 23, 24, 5, 26, 27, 28, 29,
/* 30 */ 30, 31, 227, 253, 229, 230, 36, 37, 257, 234,
/* 40 */ 40, 41, 42, 238, 203, 240, 241, 47, 48, 210,
/* 50 */ 210, 14, 15, 251, 17, 18, 275, 270, 21, 22,
/* 60 */ 23, 24, 0, 26, 27, 28, 29, 30, 31, 267,
/* 70 */ 203, 272, 273, 36, 37, 271, 5, 40, 41, 42,
/* 80 */ 40, 41, 42, 203, 47, 48, 1, 47, 48, 14,
/* 90 */ 15, 91, 17, 18, 9, 278, 21, 22, 23, 24,
/* 100 */ 87, 26, 27, 28, 29, 30, 31, 36, 37, 270,
/* 110 */ 270, 36, 37, 210, 249, 40, 41, 42, 253, 278,
/* 120 */ 281, 281, 47, 48, 209, 88, 14, 15, 248, 17,
/* 130 */ 18, 216, 252, 21, 22, 23, 24, 124, 26, 27,
/* 140 */ 28, 29, 30, 31, 83, 278, 249, 280, 36, 37,
/* 150 */ 253, 89, 40, 41, 42, 15, 95, 17, 18, 47,
/* 160 */ 48, 21, 22, 23, 24, 147, 26, 27, 28, 29,
/* 170 */ 30, 31, 87, 270, 156, 157, 36, 37, 130, 131,
/* 180 */ 40, 41, 42, 89, 281, 17, 18, 47, 48, 21,
/* 190 */ 22, 23, 24, 1, 26, 27, 28, 29, 30, 31,
/* 200 */ 103, 9, 105, 106, 36, 37, 203, 110, 40, 41,
/* 210 */ 42, 114, 95, 116, 117, 47, 48, 214, 270, 103,
/* 220 */ 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
/* 230 */ 114, 115, 116, 117, 67, 68, 69, 270, 73, 70,
/* 240 */ 71, 72, 50, 51, 52, 53, 54, 55, 56, 57,
/* 250 */ 58, 59, 60, 61, 62, 63, 64, 270, 66, 227,
/* 260 */ 228, 229, 230, 231, 232, 233, 234, 235, 236, 237,
/* 270 */ 238, 239, 240, 241, 49, 203, 28, 29, 30, 31,
/* 280 */ 270, 203, 73, 40, 36, 37, 203, 251, 40, 41,
/* 290 */ 42, 66, 203, 1, 2, 47, 48, 5, 73, 7,
/* 300 */ 5, 9, 7, 267, 79, 80, 81, 82, 270, 1,
/* 310 */ 2, 86, 87, 5, 149, 7, 151, 9, 153, 154,
/* 320 */ 248, 5, 203, 7, 252, 270, 248, 251, 36, 37,
/* 330 */ 252, 2, 40, 214, 5, 209, 7, 248, 9, 203,
/* 340 */ 270, 252, 216, 267, 36, 37, 67, 68, 69, 124,
/* 350 */ 254, 203, 270, 74, 75, 76, 77, 78, 149, 276,
/* 360 */ 151, 278, 153, 154, 268, 36, 37, 67, 68, 69,
/* 370 */ 127, 146, 93, 148, 74, 211, 76, 77, 78, 87,
/* 380 */ 155, 67, 68, 69, 203, 85, 250, 211, 74, 75,
/* 390 */ 76, 77, 78, 36, 37, 87, 248, 40, 41, 42,
/* 400 */ 252, 203, 87, 81, 47, 48, 91, 203, 244, 245,
/* 410 */ 246, 247, 102, 203, 122, 123, 88, 203, 203, 203,
/* 420 */ 203, 129, 102, 247, 129, 225, 226, 209, 214, 248,
/* 430 */ 122, 123, 211, 252, 216, 88, 121, 129, 212, 213,
/* 440 */ 207, 208, 88, 88, 102, 129, 248, 88, 128, 102,
/* 450 */ 252, 122, 123, 125, 144, 16, 252, 102, 248, 88,
/* 460 */ 138, 102, 252, 248, 248, 248, 245, 252, 252, 252,
/* 470 */ 1, 88, 88, 102, 88, 88, 88, 87, 65, 125,
/* 480 */ 88, 47, 48, 88, 142, 102, 102, 88, 102, 102,
/* 490 */ 102, 87, 270, 150, 102, 152, 150, 102, 152, 270,
/* 500 */ 87, 102, 150, 5, 152, 7, 5, 270, 7, 40,
/* 510 */ 120, 150, 150, 152, 152, 150, 270, 152, 83, 84,
/* 520 */ 270, 270, 270, 119, 270, 270, 270, 270, 270, 270,
/* 530 */ 253, 253, 243, 243, 243, 203, 243, 243, 203, 243,
/* 540 */ 243, 203, 269, 203, 203, 279, 279, 203, 203, 251,
/* 550 */ 251, 203, 203, 203, 251, 65, 255, 274, 205, 203,
/* 560 */ 274, 122, 274, 203, 259, 261, 203, 203, 266, 203,
/* 570 */ 203, 203, 203, 203, 129, 203, 203, 203, 203, 203,
/* 580 */ 203, 203, 203, 203, 203, 203, 274, 141, 203, 265,
/* 590 */ 143, 136, 203, 140, 203, 264, 203, 203, 139, 203,
/* 600 */ 203, 203, 263, 203, 203, 203, 203, 134, 203, 203,
/* 610 */ 203, 203, 203, 203, 203, 203, 133, 203, 203, 203,
/* 620 */ 203, 203, 203, 203, 203, 203, 203, 203, 203, 203,
/* 630 */ 203, 203, 203, 203, 203, 203, 132, 135, 205, 145,
/* 640 */ 94, 205, 205, 205, 118, 101, 56, 100, 97, 205,
/* 650 */ 96, 99, 60, 205, 205, 98, 89, 5, 158, 205,
/* 660 */ 5, 5, 5, 205, 158, 215, 215, 211, 211, 5,
/* 670 */ 105, 147, 205, 104, 125, 120, 87, 205, 87, 126,
/* 680 */ 206, 218, 206, 222, 224, 223, 221, 219, 217, 205,
/* 690 */ 220, 206, 226, 205, 242, 206, 205, 205, 212, 256,
/* 700 */ 258, 260, 262, 207, 88, 102, 242, 102, 88, 87,
/* 710 */ 102, 88, 87, 1, 88, 87, 102, 88, 87, 87,
/* 720 */ 137, 102, 137, 87, 87, 87, 120, 83, 121, 75,
/* 730 */ 5, 92, 91, 9, 92, 5, 91, 5, 5, 5,
/* 740 */ 5, 5, 5, 90, 16, 83, 87, 27, 88, 122,
/* 750 */ 87, 64, 152, 152, 152, 17, 17, 5, 5, 88,
/* 760 */ 102, 152, 5, 5, 5, 5, 5, 5, 5, 5,
/* 770 */ 5, 5, 5, 5, 5, 5, 5, 102, 90, 65,
/* 780 */ 0, 282, 282, 282, 282, 282, 282, 282, 282, 282,
/* 790 */ 282, 282, 282, 282, 22, 22, 282, 282, 282, 282,
/* 800 */ 282, 282, 282, 282, 282, 282, 282, 282, 282, 282,
/* 810 */ 282, 282, 282, 282, 282, 282, 282, 282, 282, 282,
/* 0 */ 203, 1, 277, 1, 279, 280, 253, 276, 277, 9,
/* 10 */ 279, 201, 202, 5, 14, 15, 249, 17, 18, 203,
/* 20 */ 253, 21, 22, 23, 24, 1, 26, 27, 28, 29,
/* 30 */ 30, 31, 210, 9, 203, 253, 36, 37, 203, 204,
/* 40 */ 40, 41, 42, 14, 15, 248, 17, 18, 203, 252,
/* 50 */ 21, 22, 23, 24, 1, 26, 27, 28, 29, 30,
/* 60 */ 31, 251, 9, 249, 248, 36, 37, 253, 252, 40,
/* 70 */ 41, 42, 14, 15, 203, 17, 18, 267, 203, 21,
/* 80 */ 22, 23, 24, 0, 26, 27, 28, 29, 30, 31,
/* 90 */ 89, 91, 270, 248, 36, 37, 1, 252, 40, 41,
/* 100 */ 42, 279, 271, 281, 9, 87, 14, 15, 249, 17,
/* 110 */ 18, 87, 253, 21, 22, 23, 24, 88, 26, 27,
/* 120 */ 28, 29, 30, 31, 227, 250, 229, 230, 36, 37,
/* 130 */ 270, 234, 40, 41, 42, 238, 203, 240, 241, 279,
/* 140 */ 102, 281, 124, 272, 273, 50, 51, 52, 53, 54,
/* 150 */ 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
/* 160 */ 211, 66, 15, 203, 17, 18, 128, 83, 21, 22,
/* 170 */ 23, 24, 89, 26, 27, 28, 29, 30, 31, 95,
/* 180 */ 5, 248, 7, 36, 37, 252, 95, 40, 41, 42,
/* 190 */ 251, 17, 18, 251, 245, 21, 22, 23, 24, 211,
/* 200 */ 26, 27, 28, 29, 30, 31, 267, 253, 248, 267,
/* 210 */ 36, 37, 252, 243, 40, 41, 42, 103, 104, 105,
/* 220 */ 106, 107, 108, 109, 110, 111, 112, 113, 114, 115,
/* 230 */ 116, 117, 244, 245, 246, 247, 5, 227, 228, 229,
/* 240 */ 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
/* 250 */ 240, 241, 49, 130, 131, 67, 68, 69, 40, 41,
/* 260 */ 42, 270, 74, 75, 76, 77, 78, 36, 37, 66,
/* 270 */ 279, 1, 2, 209, 257, 5, 73, 7, 243, 9,
/* 280 */ 216, 93, 79, 80, 81, 82, 243, 1, 2, 86,
/* 290 */ 87, 5, 275, 7, 243, 9, 210, 47, 48, 243,
/* 300 */ 28, 29, 30, 31, 129, 203, 36, 37, 36, 37,
/* 310 */ 40, 211, 40, 41, 42, 65, 70, 71, 72, 5,
/* 320 */ 73, 7, 36, 37, 270, 2, 73, 124, 5, 147,
/* 330 */ 7, 270, 9, 279, 67, 68, 69, 87, 156, 157,
/* 340 */ 279, 74, 203, 76, 77, 78, 270, 247, 243, 146,
/* 350 */ 248, 148, 85, 214, 252, 279, 270, 87, 155, 36,
/* 360 */ 37, 67, 68, 69, 210, 279, 270, 281, 74, 75,
/* 370 */ 76, 77, 78, 87, 203, 279, 103, 88, 105, 106,
/* 380 */ 36, 37, 203, 110, 40, 41, 42, 114, 270, 116,
/* 390 */ 117, 102, 122, 123, 40, 203, 149, 279, 151, 129,
/* 400 */ 153, 154, 149, 203, 151, 203, 153, 154, 122, 123,
/* 410 */ 212, 213, 203, 87, 203, 129, 270, 91, 16, 248,
/* 420 */ 67, 68, 69, 252, 270, 279, 203, 248, 270, 270,
/* 430 */ 270, 252, 270, 279, 277, 281, 279, 279, 279, 279,
/* 440 */ 248, 279, 270, 129, 252, 122, 123, 121, 248, 81,
/* 450 */ 248, 279, 252, 270, 252, 270, 270, 225, 226, 270,
/* 460 */ 270, 252, 279, 270, 279, 279, 270, 270, 279, 279,
/* 470 */ 209, 270, 279, 254, 270, 279, 279, 216, 203, 203,
/* 480 */ 279, 127, 277, 279, 279, 88, 209, 268, 88, 214,
/* 490 */ 214, 207, 208, 216, 88, 88, 88, 48, 102, 88,
/* 500 */ 87, 102, 88, 1, 88, 88, 138, 88, 102, 102,
/* 510 */ 102, 243, 88, 102, 65, 87, 102, 88, 102, 102,
/* 520 */ 88, 102, 125, 203, 122, 125, 102, 150, 150, 152,
/* 530 */ 152, 102, 269, 120, 102, 150, 5, 152, 7, 203,
/* 540 */ 144, 142, 40, 5, 150, 7, 152, 119, 150, 203,
/* 550 */ 152, 150, 203, 152, 83, 84, 251, 251, 203, 203,
/* 560 */ 203, 203, 255, 278, 251, 278, 278, 203, 278, 203,
/* 570 */ 203, 65, 203, 203, 203, 203, 203, 203, 203, 203,
/* 580 */ 264, 266, 203, 203, 203, 203, 203, 203, 129, 203,
/* 590 */ 203, 203, 203, 203, 203, 203, 203, 141, 203, 274,
/* 600 */ 143, 274, 274, 274, 265, 136, 203, 203, 203, 262,
/* 610 */ 140, 263, 203, 203, 139, 203, 134, 133, 203, 132,
/* 620 */ 261, 203, 260, 203, 203, 203, 203, 135, 203, 203,
/* 630 */ 203, 145, 118, 203, 203, 94, 203, 203, 203, 203,
/* 640 */ 203, 203, 203, 203, 203, 203, 203, 203, 203, 203,
/* 650 */ 203, 203, 101, 100, 56, 205, 205, 205, 205, 97,
/* 660 */ 99, 60, 98, 96, 89, 205, 205, 205, 5, 5,
/* 670 */ 158, 5, 205, 205, 158, 5, 5, 211, 215, 215,
/* 680 */ 147, 105, 104, 211, 125, 120, 205, 87, 102, 126,
/* 690 */ 205, 88, 87, 102, 88, 218, 222, 224, 220, 223,
/* 700 */ 221, 206, 219, 206, 205, 217, 206, 242, 205, 87,
/* 710 */ 206, 256, 205, 259, 205, 226, 258, 212, 207, 88,
/* 720 */ 87, 102, 242, 88, 87, 1, 88, 87, 87, 102,
/* 730 */ 137, 48, 1, 137, 102, 87, 87, 120, 87, 121,
/* 740 */ 83, 5, 92, 91, 75, 92, 91, 9, 5, 5,
/* 750 */ 5, 5, 5, 5, 5, 90, 16, 83, 122, 9,
/* 760 */ 9, 88, 87, 9, 87, 64, 27, 152, 152, 17,
/* 770 */ 102, 5, 17, 152, 5, 152, 88, 5, 5, 5,
/* 780 */ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
/* 790 */ 5, 5, 102, 90, 65, 0, 282, 282, 282, 282,
/* 800 */ 282, 282, 282, 282, 282, 282, 282, 282, 282, 22,
/* 810 */ 22, 282, 282, 282, 282, 282, 282, 282, 282, 282,
/* 820 */ 282, 282, 282, 282, 282, 282, 282, 282, 282, 282,
/* 830 */ 282, 282, 282, 282, 282, 282, 282, 282, 282, 282,
/* 840 */ 282, 282, 282, 282, 282, 282, 282, 282, 282, 282,
......@@ -601,116 +603,118 @@ static const YYCODETYPE yy_lookahead[] = {
/* 960 */ 282, 282, 282, 282, 282, 282, 282, 282, 282, 282,
/* 970 */ 282, 282, 282, 282, 282, 282, 282, 282, 282, 282,
/* 980 */ 282, 282, 282, 282, 282, 282, 282, 282, 282, 282,
/* 990 */ 282, 282, 282, 282, 282, 282, 282,
/* 990 */ 282, 282, 282, 282, 282, 282, 282, 282, 282, 282,
/* 1000 */ 282, 282, 282, 282, 282, 282, 282, 282, 282, 282,
/* 1010 */ 282, 282,
};
#define YY_SHIFT_COUNT (374)
#define YY_SHIFT_COUNT (375)
#define YY_SHIFT_MIN (0)
#define YY_SHIFT_MAX (780)
#define YY_SHIFT_MAX (795)
static const unsigned short int yy_shift_ofst[] = {
/* 0 */ 225, 116, 116, 97, 97, 94, 292, 308, 308, 85,
/* 10 */ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
/* 20 */ 4, 4, 4, 0, 192, 308, 329, 329, 329, 13,
/* 30 */ 13, 4, 4, 48, 4, 62, 4, 4, 4, 4,
/* 40 */ 61, 94, 117, 117, 20, 796, 796, 796, 308, 308,
/* 50 */ 308, 308, 308, 308, 308, 308, 308, 308, 308, 308,
/* 60 */ 308, 308, 308, 308, 308, 308, 308, 308, 308, 308,
/* 70 */ 308, 308, 329, 329, 329, 71, 71, 71, 71, 71,
/* 80 */ 71, 71, 4, 4, 4, 243, 4, 4, 4, 13,
/* 90 */ 13, 4, 4, 4, 4, 322, 322, 320, 13, 4,
/* 100 */ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
/* 110 */ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
/* 120 */ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
/* 130 */ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
/* 140 */ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
/* 150 */ 4, 4, 4, 4, 4, 4, 4, 4, 490, 490,
/* 160 */ 490, 445, 445, 445, 445, 490, 490, 446, 447, 455,
/* 170 */ 453, 459, 473, 483, 504, 502, 494, 490, 490, 490,
/* 180 */ 546, 546, 526, 94, 94, 490, 490, 544, 547, 590,
/* 190 */ 551, 552, 592, 557, 554, 526, 20, 490, 490, 567,
/* 200 */ 567, 490, 567, 490, 567, 490, 490, 796, 796, 37,
/* 210 */ 75, 75, 112, 75, 140, 168, 248, 248, 248, 248,
/* 220 */ 248, 248, 279, 300, 314, 357, 357, 357, 357, 40,
/* 230 */ 40, 165, 209, 18, 315, 295, 316, 169, 167, 347,
/* 240 */ 328, 354, 355, 359, 371, 310, 342, 383, 384, 386,
/* 250 */ 387, 388, 390, 392, 434, 434, 434, 434, 434, 395,
/* 260 */ 469, 413, 439, 399, 343, 346, 352, 498, 501, 361,
/* 270 */ 362, 404, 365, 435, 652, 500, 655, 656, 506, 657,
/* 280 */ 664, 565, 569, 524, 549, 555, 589, 553, 616, 591,
/* 290 */ 603, 605, 620, 622, 623, 625, 626, 608, 628, 629,
/* 300 */ 631, 712, 632, 614, 583, 619, 585, 636, 555, 637,
/* 310 */ 606, 638, 607, 644, 639, 641, 654, 725, 642, 645,
/* 320 */ 724, 730, 732, 733, 734, 735, 736, 737, 653, 728,
/* 330 */ 662, 659, 660, 627, 663, 720, 687, 738, 600, 601,
/* 340 */ 658, 658, 658, 658, 739, 602, 609, 658, 658, 658,
/* 350 */ 752, 753, 671, 658, 757, 758, 759, 760, 761, 762,
/* 360 */ 763, 764, 765, 766, 767, 768, 769, 770, 771, 675,
/* 370 */ 688, 772, 773, 714, 780,
/* 0 */ 203, 114, 114, 273, 273, 1, 270, 286, 286, 286,
/* 10 */ 24, 53, 53, 53, 53, 53, 53, 53, 53, 53,
/* 20 */ 53, 53, 2, 2, 0, 95, 286, 286, 286, 286,
/* 30 */ 286, 286, 286, 286, 286, 286, 286, 286, 286, 286,
/* 40 */ 286, 286, 286, 286, 286, 286, 286, 286, 323, 323,
/* 50 */ 323, 18, 18, 123, 53, 83, 53, 53, 53, 53,
/* 60 */ 84, 1, 2, 2, 91, 91, 8, 811, 811, 811,
/* 70 */ 323, 323, 323, 231, 231, 231, 231, 231, 231, 231,
/* 80 */ 53, 53, 53, 354, 53, 53, 53, 18, 18, 53,
/* 90 */ 53, 53, 53, 368, 368, 368, 368, 38, 18, 53,
/* 100 */ 53, 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, 506, 506,
/* 160 */ 506, 459, 459, 459, 459, 506, 456, 457, 469, 470,
/* 170 */ 475, 482, 484, 487, 492, 486, 506, 506, 506, 541,
/* 180 */ 541, 514, 1, 1, 506, 506, 551, 553, 598, 562,
/* 190 */ 561, 601, 564, 567, 514, 8, 506, 506, 575, 575,
/* 200 */ 506, 575, 506, 575, 506, 506, 811, 811, 29, 58,
/* 210 */ 58, 92, 58, 147, 174, 188, 272, 272, 272, 272,
/* 220 */ 272, 272, 267, 294, 344, 344, 344, 344, 247, 253,
/* 230 */ 250, 182, 326, 218, 218, 175, 314, 246, 353, 289,
/* 240 */ 397, 400, 406, 407, 408, 449, 396, 399, 411, 414,
/* 250 */ 416, 417, 424, 413, 429, 432, 502, 402, 419, 377,
/* 260 */ 378, 385, 531, 538, 394, 398, 428, 401, 471, 663,
/* 270 */ 512, 664, 666, 516, 670, 671, 576, 578, 533, 559,
/* 280 */ 565, 600, 563, 603, 605, 586, 591, 606, 622, 631,
/* 290 */ 633, 635, 619, 637, 638, 640, 724, 641, 627, 593,
/* 300 */ 683, 731, 632, 596, 648, 565, 649, 617, 651, 618,
/* 310 */ 657, 650, 652, 669, 736, 653, 655, 738, 743, 744,
/* 320 */ 745, 746, 747, 748, 749, 665, 740, 674, 750, 751,
/* 330 */ 675, 673, 754, 683, 636, 677, 739, 701, 752, 615,
/* 340 */ 616, 668, 668, 668, 668, 755, 621, 623, 668, 668,
/* 350 */ 668, 766, 769, 688, 668, 772, 773, 774, 775, 776,
/* 360 */ 777, 778, 779, 780, 781, 782, 783, 784, 785, 786,
/* 370 */ 690, 703, 787, 788, 729, 795,
};
#define YY_REDUCE_COUNT (208)
#define YY_REDUCE_MIN (-270)
#define YY_REDUCE_MAX (496)
#define YY_REDUCE_COUNT (207)
#define YY_REDUCE_MIN (-275)
#define YY_REDUCE_MAX (511)
static const short yy_reduce_ofst[] = {
/* 0 */ -198, 32, 32, -195, -195, 164, -161, -160, -97, -201,
/* 10 */ -120, -133, 83, 72, 78, 89, 148, 181, 198, 210,
/* 20 */ 215, 216, 217, -196, -193, -262, -237, -135, -103, 36,
/* 30 */ 76, -183, -159, -219, 136, 176, 3, 119, 214, 204,
/* 40 */ -85, 221, 126, 218, 200, 96, 226, 233, -270, -264,
/* 50 */ -213, -52, -33, -13, 10, 38, 55, 70, 82, 222,
/* 60 */ 229, 237, 246, 250, 251, 252, 254, 255, 256, 257,
/* 70 */ 258, 259, -220, 277, 278, 289, 290, 291, 293, 294,
/* 80 */ 296, 297, 332, 335, 338, 273, 340, 341, 344, 298,
/* 90 */ 299, 345, 348, 349, 350, 266, 267, 301, 303, 356,
/* 100 */ 360, 363, 364, 366, 367, 368, 369, 370, 372, 373,
/* 110 */ 374, 375, 376, 377, 378, 379, 380, 381, 382, 385,
/* 120 */ 389, 391, 393, 394, 396, 397, 398, 400, 401, 402,
/* 130 */ 403, 405, 406, 407, 408, 409, 410, 411, 412, 414,
/* 140 */ 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
/* 150 */ 425, 426, 427, 428, 429, 430, 431, 432, 353, 433,
/* 160 */ 436, 283, 286, 288, 312, 437, 438, 302, 324, 331,
/* 170 */ 339, 440, 304, 441, 305, 442, 443, 444, 448, 449,
/* 180 */ 450, 451, 452, 456, 457, 454, 458, 460, 462, 461,
/* 190 */ 463, 465, 468, 470, 471, 464, 466, 467, 472, 474,
/* 200 */ 476, 484, 485, 488, 489, 491, 492, 486, 496,
/* 0 */ -190, 10, 10, -103, -103, -12, -178, 86, 154, -140,
/* 10 */ -129, -203, -184, -155, -67, -40, 102, 171, 179, 192,
/* 20 */ 200, 202, -275, -269, -169, -165, -9, 54, 61, 76,
/* 30 */ 96, 118, 146, 158, 159, 160, 162, 172, 183, 185,
/* 40 */ 186, 189, 190, 193, 196, 197, 201, 204, -233, -186,
/* 50 */ -141, -61, -58, 17, -125, 100, 139, 275, 276, 209,
/* 60 */ 64, -51, 157, 205, 261, 277, 232, 219, 198, 284,
/* 70 */ -247, -218, -46, -30, 35, 43, 51, 56, 105, 268,
/* 80 */ 211, 223, 320, 263, 336, 346, 349, 305, 306, 355,
/* 90 */ 356, 357, 358, 285, 287, 288, 290, 307, 313, 364,
/* 100 */ 366, 367, 369, 370, 371, 372, 373, 374, 375, 376,
/* 110 */ 379, 380, 381, 382, 383, 384, 386, 387, 388, 389,
/* 120 */ 390, 391, 392, 393, 395, 403, 404, 405, 409, 410,
/* 130 */ 412, 415, 418, 420, 421, 422, 423, 425, 426, 427,
/* 140 */ 430, 431, 433, 434, 435, 436, 437, 438, 439, 440,
/* 150 */ 441, 442, 443, 444, 445, 446, 447, 448, 450, 451,
/* 160 */ 452, 325, 327, 328, 329, 453, 315, 339, 316, 348,
/* 170 */ 347, 359, 362, 454, 458, 455, 460, 461, 462, 463,
/* 180 */ 464, 465, 466, 472, 467, 468, 473, 476, 474, 477,
/* 190 */ 479, 483, 478, 488, 480, 489, 481, 485, 495, 497,
/* 200 */ 499, 500, 503, 504, 507, 509, 505, 511,
};
static const YYACTIONTYPE yy_default[] = {
/* 0 */ 876, 1000, 939, 1010, 926, 936, 1153, 1153, 1153, 876,
/* 10 */ 876, 876, 876, 876, 876, 876, 876, 876, 876, 876,
/* 20 */ 876, 876, 876, 1058, 896, 1153, 876, 876, 876, 876,
/* 30 */ 876, 876, 876, 1073, 876, 936, 876, 876, 876, 876,
/* 40 */ 946, 936, 946, 946, 876, 1053, 984, 1002, 876, 876,
/* 50 */ 876, 876, 876, 876, 876, 876, 876, 876, 876, 876,
/* 60 */ 876, 876, 876, 876, 876, 876, 876, 876, 876, 876,
/* 70 */ 876, 876, 876, 876, 876, 876, 876, 876, 876, 876,
/* 80 */ 876, 876, 876, 876, 876, 1060, 1066, 1063, 876, 876,
/* 90 */ 876, 1068, 876, 876, 876, 1092, 1092, 1051, 876, 876,
/* 100 */ 876, 876, 876, 876, 876, 876, 876, 876, 876, 876,
/* 110 */ 876, 876, 876, 876, 876, 876, 876, 876, 876, 876,
/* 120 */ 876, 876, 876, 876, 876, 876, 876, 876, 876, 876,
/* 130 */ 876, 924, 876, 922, 876, 876, 876, 876, 876, 876,
/* 140 */ 876, 876, 876, 876, 876, 876, 876, 876, 876, 876,
/* 150 */ 907, 876, 876, 876, 876, 876, 876, 894, 898, 898,
/* 160 */ 898, 876, 876, 876, 876, 898, 898, 1099, 1103, 1085,
/* 170 */ 1097, 1093, 1080, 1078, 1076, 1084, 1107, 898, 898, 898,
/* 180 */ 944, 944, 940, 936, 936, 898, 898, 962, 960, 958,
/* 190 */ 950, 956, 952, 954, 948, 927, 876, 898, 898, 934,
/* 200 */ 934, 898, 934, 898, 934, 898, 898, 984, 1002, 876,
/* 210 */ 1108, 1098, 876, 1152, 1138, 1137, 1146, 1145, 1144, 1136,
/* 220 */ 1135, 1134, 876, 876, 876, 1130, 1133, 1132, 1131, 1140,
/* 230 */ 1139, 876, 876, 876, 876, 876, 876, 876, 876, 876,
/* 240 */ 876, 876, 876, 876, 876, 1104, 1100, 876, 876, 876,
/* 250 */ 876, 876, 876, 876, 1148, 1147, 1143, 1142, 1141, 876,
/* 260 */ 876, 1110, 876, 876, 876, 876, 876, 876, 876, 876,
/* 270 */ 876, 1012, 876, 876, 876, 876, 876, 876, 876, 876,
/* 280 */ 876, 876, 876, 876, 1050, 876, 876, 876, 876, 876,
/* 290 */ 1062, 1061, 876, 876, 876, 876, 876, 876, 876, 876,
/* 300 */ 876, 876, 876, 1094, 876, 1086, 876, 876, 1024, 876,
/* 310 */ 876, 876, 876, 876, 876, 876, 876, 876, 876, 876,
/* 320 */ 876, 876, 876, 876, 876, 876, 876, 876, 876, 876,
/* 330 */ 876, 876, 876, 876, 876, 876, 876, 876, 876, 876,
/* 340 */ 1171, 1166, 1167, 1164, 876, 876, 876, 1163, 1158, 1159,
/* 350 */ 876, 876, 876, 1156, 876, 876, 876, 876, 876, 876,
/* 360 */ 876, 876, 876, 876, 876, 876, 876, 876, 876, 968,
/* 370 */ 876, 905, 903, 876, 876,
/* 0 */ 893, 1017, 956, 1027, 943, 953, 1177, 1177, 1177, 1177,
/* 10 */ 893, 893, 893, 893, 893, 893, 893, 893, 893, 893,
/* 20 */ 893, 893, 893, 893, 1075, 913, 893, 893, 893, 893,
/* 30 */ 893, 893, 893, 893, 893, 893, 893, 893, 893, 893,
/* 40 */ 893, 893, 893, 893, 893, 893, 893, 893, 893, 893,
/* 50 */ 893, 893, 893, 1090, 893, 953, 893, 893, 893, 893,
/* 60 */ 963, 953, 893, 893, 963, 963, 893, 1070, 1001, 1019,
/* 70 */ 893, 893, 893, 893, 893, 893, 893, 893, 893, 893,
/* 80 */ 893, 893, 893, 1077, 1083, 1080, 893, 893, 893, 1085,
/* 90 */ 893, 893, 893, 1112, 1112, 1112, 1112, 1068, 893, 893,
/* 100 */ 893, 893, 893, 893, 893, 893, 893, 893, 893, 893,
/* 110 */ 893, 893, 893, 893, 893, 893, 893, 893, 893, 893,
/* 120 */ 893, 893, 893, 893, 893, 893, 893, 893, 893, 893,
/* 130 */ 893, 941, 893, 939, 893, 893, 893, 893, 893, 893,
/* 140 */ 893, 893, 893, 893, 893, 893, 893, 893, 893, 893,
/* 150 */ 924, 893, 893, 893, 893, 893, 893, 911, 915, 915,
/* 160 */ 915, 893, 893, 893, 893, 915, 1121, 1125, 1102, 1119,
/* 170 */ 1113, 1097, 1095, 1093, 1101, 1129, 915, 915, 915, 961,
/* 180 */ 961, 957, 953, 953, 915, 915, 979, 977, 975, 967,
/* 190 */ 973, 969, 971, 965, 944, 893, 915, 915, 951, 951,
/* 200 */ 915, 951, 915, 951, 915, 915, 1001, 1019, 893, 1130,
/* 210 */ 1120, 893, 1176, 1160, 1159, 893, 1168, 1167, 1166, 1158,
/* 220 */ 1157, 1156, 893, 893, 1152, 1155, 1154, 1153, 893, 893,
/* 230 */ 1132, 893, 893, 1162, 1161, 893, 893, 893, 893, 893,
/* 240 */ 893, 893, 893, 893, 893, 1108, 1126, 1122, 893, 893,
/* 250 */ 893, 893, 893, 893, 893, 893, 893, 893, 893, 893,
/* 260 */ 893, 893, 893, 893, 893, 893, 1029, 893, 893, 893,
/* 270 */ 893, 893, 893, 893, 893, 893, 893, 893, 893, 1067,
/* 280 */ 893, 893, 893, 893, 893, 1079, 1078, 893, 893, 893,
/* 290 */ 893, 893, 893, 893, 893, 893, 893, 893, 1114, 893,
/* 300 */ 1109, 893, 1103, 893, 893, 1041, 893, 893, 893, 893,
/* 310 */ 893, 893, 893, 893, 893, 893, 893, 893, 893, 893,
/* 320 */ 893, 893, 893, 893, 893, 893, 893, 893, 893, 893,
/* 330 */ 893, 893, 893, 1133, 893, 893, 893, 893, 893, 893,
/* 340 */ 893, 1195, 1190, 1191, 1188, 893, 893, 893, 1187, 1182,
/* 350 */ 1183, 893, 893, 893, 1180, 893, 893, 893, 893, 893,
/* 360 */ 893, 893, 893, 893, 893, 893, 893, 893, 893, 893,
/* 370 */ 985, 893, 922, 920, 893, 893,
};
/********** End of lemon-generated parsing tables *****************************/
......@@ -1296,9 +1300,9 @@ static const char *const yyTokenName[] = {
/* 274 */ "tmvar",
/* 275 */ "intervalKey",
/* 276 */ "sortlist",
/* 277 */ "sortitem",
/* 278 */ "item",
/* 279 */ "sortorder",
/* 277 */ "item",
/* 278 */ "sortorder",
/* 279 */ "arrow",
/* 280 */ "grouplist",
/* 281 */ "expritem",
};
......@@ -1517,93 +1521,100 @@ static const char *const yyRuleName[] = {
/* 206 */ "orderby_opt ::=",
/* 207 */ "orderby_opt ::= ORDER BY sortlist",
/* 208 */ "sortlist ::= sortlist COMMA item sortorder",
/* 209 */ "sortlist ::= item sortorder",
/* 210 */ "item ::= ids cpxName",
/* 211 */ "sortorder ::= ASC",
/* 212 */ "sortorder ::= DESC",
/* 213 */ "sortorder ::=",
/* 214 */ "groupby_opt ::=",
/* 215 */ "groupby_opt ::= GROUP BY grouplist",
/* 216 */ "grouplist ::= grouplist COMMA item",
/* 217 */ "grouplist ::= item",
/* 218 */ "having_opt ::=",
/* 219 */ "having_opt ::= HAVING expr",
/* 220 */ "limit_opt ::=",
/* 221 */ "limit_opt ::= LIMIT signed",
/* 222 */ "limit_opt ::= LIMIT signed OFFSET signed",
/* 223 */ "limit_opt ::= LIMIT signed COMMA signed",
/* 224 */ "slimit_opt ::=",
/* 225 */ "slimit_opt ::= SLIMIT signed",
/* 226 */ "slimit_opt ::= SLIMIT signed SOFFSET signed",
/* 227 */ "slimit_opt ::= SLIMIT signed COMMA signed",
/* 228 */ "where_opt ::=",
/* 229 */ "where_opt ::= WHERE expr",
/* 230 */ "expr ::= LP expr RP",
/* 231 */ "expr ::= ID",
/* 232 */ "expr ::= ID DOT ID",
/* 233 */ "expr ::= ID DOT STAR",
/* 234 */ "expr ::= INTEGER",
/* 235 */ "expr ::= MINUS INTEGER",
/* 236 */ "expr ::= PLUS INTEGER",
/* 237 */ "expr ::= FLOAT",
/* 238 */ "expr ::= MINUS FLOAT",
/* 239 */ "expr ::= PLUS FLOAT",
/* 240 */ "expr ::= STRING",
/* 241 */ "expr ::= NOW",
/* 242 */ "expr ::= VARIABLE",
/* 243 */ "expr ::= PLUS VARIABLE",
/* 244 */ "expr ::= MINUS VARIABLE",
/* 245 */ "expr ::= BOOL",
/* 246 */ "expr ::= NULL",
/* 247 */ "expr ::= ID LP exprlist RP",
/* 248 */ "expr ::= ID LP STAR RP",
/* 249 */ "expr ::= expr IS NULL",
/* 250 */ "expr ::= expr IS NOT NULL",
/* 251 */ "expr ::= expr LT expr",
/* 252 */ "expr ::= expr GT expr",
/* 253 */ "expr ::= expr LE expr",
/* 254 */ "expr ::= expr GE expr",
/* 255 */ "expr ::= expr NE expr",
/* 256 */ "expr ::= expr EQ expr",
/* 257 */ "expr ::= expr BETWEEN expr AND expr",
/* 258 */ "expr ::= expr AND expr",
/* 259 */ "expr ::= expr OR expr",
/* 260 */ "expr ::= expr PLUS expr",
/* 261 */ "expr ::= expr MINUS expr",
/* 262 */ "expr ::= expr STAR expr",
/* 263 */ "expr ::= expr SLASH expr",
/* 264 */ "expr ::= expr REM expr",
/* 265 */ "expr ::= expr LIKE expr",
/* 266 */ "expr ::= expr MATCH expr",
/* 267 */ "expr ::= expr NMATCH expr",
/* 268 */ "expr ::= expr QUESTION expr",
/* 269 */ "expr ::= expr ARROW expr",
/* 270 */ "expr ::= expr IN LP exprlist RP",
/* 271 */ "exprlist ::= exprlist COMMA expritem",
/* 272 */ "exprlist ::= expritem",
/* 273 */ "expritem ::= expr",
/* 274 */ "expritem ::=",
/* 275 */ "cmd ::= RESET QUERY CACHE",
/* 276 */ "cmd ::= SYNCDB ids REPLICA",
/* 277 */ "cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist",
/* 278 */ "cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids",
/* 279 */ "cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist",
/* 280 */ "cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist",
/* 281 */ "cmd ::= ALTER TABLE ids cpxName DROP TAG ids",
/* 282 */ "cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids",
/* 283 */ "cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem",
/* 284 */ "cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist",
/* 285 */ "cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist",
/* 286 */ "cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids",
/* 287 */ "cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist",
/* 288 */ "cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist",
/* 289 */ "cmd ::= ALTER STABLE ids cpxName DROP TAG ids",
/* 290 */ "cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids",
/* 291 */ "cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem",
/* 292 */ "cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist",
/* 293 */ "cmd ::= KILL CONNECTION INTEGER",
/* 294 */ "cmd ::= KILL STREAM INTEGER COLON INTEGER",
/* 295 */ "cmd ::= KILL QUERY INTEGER COLON INTEGER",
/* 209 */ "sortlist ::= sortlist COMMA arrow sortorder",
/* 210 */ "sortlist ::= item sortorder",
/* 211 */ "sortlist ::= arrow sortorder",
/* 212 */ "item ::= ID",
/* 213 */ "item ::= ID DOT ID",
/* 214 */ "sortorder ::= ASC",
/* 215 */ "sortorder ::= DESC",
/* 216 */ "sortorder ::=",
/* 217 */ "groupby_opt ::=",
/* 218 */ "groupby_opt ::= GROUP BY grouplist",
/* 219 */ "grouplist ::= grouplist COMMA item",
/* 220 */ "grouplist ::= grouplist COMMA arrow",
/* 221 */ "grouplist ::= item",
/* 222 */ "grouplist ::= arrow",
/* 223 */ "having_opt ::=",
/* 224 */ "having_opt ::= HAVING expr",
/* 225 */ "limit_opt ::=",
/* 226 */ "limit_opt ::= LIMIT signed",
/* 227 */ "limit_opt ::= LIMIT signed OFFSET signed",
/* 228 */ "limit_opt ::= LIMIT signed COMMA signed",
/* 229 */ "slimit_opt ::=",
/* 230 */ "slimit_opt ::= SLIMIT signed",
/* 231 */ "slimit_opt ::= SLIMIT signed SOFFSET signed",
/* 232 */ "slimit_opt ::= SLIMIT signed COMMA signed",
/* 233 */ "where_opt ::=",
/* 234 */ "where_opt ::= WHERE expr",
/* 235 */ "expr ::= LP expr RP",
/* 236 */ "expr ::= ID",
/* 237 */ "expr ::= ID DOT ID",
/* 238 */ "expr ::= ID DOT STAR",
/* 239 */ "expr ::= INTEGER",
/* 240 */ "expr ::= MINUS INTEGER",
/* 241 */ "expr ::= PLUS INTEGER",
/* 242 */ "expr ::= FLOAT",
/* 243 */ "expr ::= MINUS FLOAT",
/* 244 */ "expr ::= PLUS FLOAT",
/* 245 */ "expr ::= STRING",
/* 246 */ "expr ::= NOW",
/* 247 */ "expr ::= VARIABLE",
/* 248 */ "expr ::= PLUS VARIABLE",
/* 249 */ "expr ::= MINUS VARIABLE",
/* 250 */ "expr ::= BOOL",
/* 251 */ "expr ::= NULL",
/* 252 */ "expr ::= ID LP exprlist RP",
/* 253 */ "expr ::= ID LP STAR RP",
/* 254 */ "expr ::= expr IS NULL",
/* 255 */ "expr ::= expr IS NOT NULL",
/* 256 */ "expr ::= expr LT expr",
/* 257 */ "expr ::= expr GT expr",
/* 258 */ "expr ::= expr LE expr",
/* 259 */ "expr ::= expr GE expr",
/* 260 */ "expr ::= expr NE expr",
/* 261 */ "expr ::= expr EQ expr",
/* 262 */ "expr ::= expr BETWEEN expr AND expr",
/* 263 */ "expr ::= expr AND expr",
/* 264 */ "expr ::= expr OR expr",
/* 265 */ "expr ::= expr PLUS expr",
/* 266 */ "expr ::= expr MINUS expr",
/* 267 */ "expr ::= expr STAR expr",
/* 268 */ "expr ::= expr SLASH expr",
/* 269 */ "expr ::= expr REM expr",
/* 270 */ "expr ::= expr LIKE expr",
/* 271 */ "expr ::= expr MATCH expr",
/* 272 */ "expr ::= expr NMATCH expr",
/* 273 */ "expr ::= ID QUESTION STRING",
/* 274 */ "arrow ::= ID ARROW STRING",
/* 275 */ "arrow ::= ID DOT ID ARROW STRING",
/* 276 */ "expr ::= arrow",
/* 277 */ "expr ::= expr IN LP exprlist RP",
/* 278 */ "exprlist ::= exprlist COMMA expritem",
/* 279 */ "exprlist ::= expritem",
/* 280 */ "expritem ::= expr",
/* 281 */ "expritem ::=",
/* 282 */ "cmd ::= RESET QUERY CACHE",
/* 283 */ "cmd ::= SYNCDB ids REPLICA",
/* 284 */ "cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist",
/* 285 */ "cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids",
/* 286 */ "cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist",
/* 287 */ "cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist",
/* 288 */ "cmd ::= ALTER TABLE ids cpxName DROP TAG ids",
/* 289 */ "cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids",
/* 290 */ "cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem",
/* 291 */ "cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist",
/* 292 */ "cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist",
/* 293 */ "cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids",
/* 294 */ "cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist",
/* 295 */ "cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist",
/* 296 */ "cmd ::= ALTER STABLE ids cpxName DROP TAG ids",
/* 297 */ "cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids",
/* 298 */ "cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem",
/* 299 */ "cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist",
/* 300 */ "cmd ::= KILL CONNECTION INTEGER",
/* 301 */ "cmd ::= KILL STREAM INTEGER COLON INTEGER",
/* 302 */ "cmd ::= KILL QUERY INTEGER COLON INTEGER",
};
#endif /* NDEBUG */
......@@ -1733,9 +1744,9 @@ static void yy_destructor(
case 254: /* selcollist */
case 268: /* sclp */
{
#line 769 "sql.y"
#line 787 "sql.y"
tSqlExprListDestroy((yypminor->yy345));
#line 1738 "sql.c"
#line 1749 "sql.c"
}
break;
case 225: /* intitemlist */
......@@ -1751,21 +1762,21 @@ tSqlExprListDestroy((yypminor->yy345));
{
#line 257 "sql.y"
taosArrayDestroy((yypminor->yy345));
#line 1754 "sql.c"
#line 1765 "sql.c"
}
break;
case 246: /* create_table_list */
{
#line 365 "sql.y"
destroyCreateTableSql((yypminor->yy170));
#line 1761 "sql.c"
#line 1772 "sql.c"
}
break;
case 251: /* select */
{
#line 485 "sql.y"
destroySqlNode((yypminor->yy68));
#line 1768 "sql.c"
#line 1779 "sql.c"
}
break;
case 255: /* from */
......@@ -1774,31 +1785,25 @@ destroySqlNode((yypminor->yy68));
{
#line 540 "sql.y"
destroyRelationInfo((yypminor->yy484));
#line 1777 "sql.c"
#line 1788 "sql.c"
}
break;
case 256: /* where_opt */
case 263: /* having_opt */
case 270: /* expr */
case 279: /* arrow */
case 281: /* expritem */
{
#line 692 "sql.y"
#line 705 "sql.y"
tSqlExprDestroy((yypminor->yy418));
#line 1787 "sql.c"
#line 1799 "sql.c"
}
break;
case 267: /* union */
{
#line 493 "sql.y"
destroyAllSqlNode((yypminor->yy345));
#line 1794 "sql.c"
}
break;
case 277: /* sortitem */
{
#line 625 "sql.y"
tVariantDestroy(&(yypminor->yy2));
#line 1801 "sql.c"
#line 1806 "sql.c"
}
break;
/********* End destructor definitions *****************************************/
......@@ -2296,93 +2301,100 @@ static const YYCODETYPE yyRuleInfoLhs[] = {
264, /* (206) orderby_opt ::= */
264, /* (207) orderby_opt ::= ORDER BY sortlist */
276, /* (208) sortlist ::= sortlist COMMA item sortorder */
276, /* (209) sortlist ::= item sortorder */
278, /* (210) item ::= ids cpxName */
279, /* (211) sortorder ::= ASC */
279, /* (212) sortorder ::= DESC */
279, /* (213) sortorder ::= */
262, /* (214) groupby_opt ::= */
262, /* (215) groupby_opt ::= GROUP BY grouplist */
280, /* (216) grouplist ::= grouplist COMMA item */
280, /* (217) grouplist ::= item */
263, /* (218) having_opt ::= */
263, /* (219) having_opt ::= HAVING expr */
266, /* (220) limit_opt ::= */
266, /* (221) limit_opt ::= LIMIT signed */
266, /* (222) limit_opt ::= LIMIT signed OFFSET signed */
266, /* (223) limit_opt ::= LIMIT signed COMMA signed */
265, /* (224) slimit_opt ::= */
265, /* (225) slimit_opt ::= SLIMIT signed */
265, /* (226) slimit_opt ::= SLIMIT signed SOFFSET signed */
265, /* (227) slimit_opt ::= SLIMIT signed COMMA signed */
256, /* (228) where_opt ::= */
256, /* (229) where_opt ::= WHERE expr */
270, /* (230) expr ::= LP expr RP */
270, /* (231) expr ::= ID */
270, /* (232) expr ::= ID DOT ID */
270, /* (233) expr ::= ID DOT STAR */
270, /* (234) expr ::= INTEGER */
270, /* (235) expr ::= MINUS INTEGER */
270, /* (236) expr ::= PLUS INTEGER */
270, /* (237) expr ::= FLOAT */
270, /* (238) expr ::= MINUS FLOAT */
270, /* (239) expr ::= PLUS FLOAT */
270, /* (240) expr ::= STRING */
270, /* (241) expr ::= NOW */
270, /* (242) expr ::= VARIABLE */
270, /* (243) expr ::= PLUS VARIABLE */
270, /* (244) expr ::= MINUS VARIABLE */
270, /* (245) expr ::= BOOL */
270, /* (246) expr ::= NULL */
270, /* (247) expr ::= ID LP exprlist RP */
270, /* (248) expr ::= ID LP STAR RP */
270, /* (249) expr ::= expr IS NULL */
270, /* (250) expr ::= expr IS NOT NULL */
270, /* (251) expr ::= expr LT expr */
270, /* (252) expr ::= expr GT expr */
270, /* (253) expr ::= expr LE expr */
270, /* (254) expr ::= expr GE expr */
270, /* (255) expr ::= expr NE expr */
270, /* (256) expr ::= expr EQ expr */
270, /* (257) expr ::= expr BETWEEN expr AND expr */
270, /* (258) expr ::= expr AND expr */
270, /* (259) expr ::= expr OR expr */
270, /* (260) expr ::= expr PLUS expr */
270, /* (261) expr ::= expr MINUS expr */
270, /* (262) expr ::= expr STAR expr */
270, /* (263) expr ::= expr SLASH expr */
270, /* (264) expr ::= expr REM expr */
270, /* (265) expr ::= expr LIKE expr */
270, /* (266) expr ::= expr MATCH expr */
270, /* (267) expr ::= expr NMATCH expr */
270, /* (268) expr ::= expr QUESTION expr */
270, /* (269) expr ::= expr ARROW expr */
270, /* (270) expr ::= expr IN LP exprlist RP */
210, /* (271) exprlist ::= exprlist COMMA expritem */
210, /* (272) exprlist ::= expritem */
281, /* (273) expritem ::= expr */
281, /* (274) expritem ::= */
202, /* (275) cmd ::= RESET QUERY CACHE */
202, /* (276) cmd ::= SYNCDB ids REPLICA */
202, /* (277) cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */
202, /* (278) cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */
202, /* (279) cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */
202, /* (280) cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */
202, /* (281) cmd ::= ALTER TABLE ids cpxName DROP TAG ids */
202, /* (282) cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */
202, /* (283) cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */
202, /* (284) cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */
202, /* (285) cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */
202, /* (286) cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */
202, /* (287) cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */
202, /* (288) cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */
202, /* (289) cmd ::= ALTER STABLE ids cpxName DROP TAG ids */
202, /* (290) cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */
202, /* (291) cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem */
202, /* (292) cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */
202, /* (293) cmd ::= KILL CONNECTION INTEGER */
202, /* (294) cmd ::= KILL STREAM INTEGER COLON INTEGER */
202, /* (295) cmd ::= KILL QUERY INTEGER COLON INTEGER */
276, /* (209) sortlist ::= sortlist COMMA arrow sortorder */
276, /* (210) sortlist ::= item sortorder */
276, /* (211) sortlist ::= arrow sortorder */
277, /* (212) item ::= ID */
277, /* (213) item ::= ID DOT ID */
278, /* (214) sortorder ::= ASC */
278, /* (215) sortorder ::= DESC */
278, /* (216) sortorder ::= */
262, /* (217) groupby_opt ::= */
262, /* (218) groupby_opt ::= GROUP BY grouplist */
280, /* (219) grouplist ::= grouplist COMMA item */
280, /* (220) grouplist ::= grouplist COMMA arrow */
280, /* (221) grouplist ::= item */
280, /* (222) grouplist ::= arrow */
263, /* (223) having_opt ::= */
263, /* (224) having_opt ::= HAVING expr */
266, /* (225) limit_opt ::= */
266, /* (226) limit_opt ::= LIMIT signed */
266, /* (227) limit_opt ::= LIMIT signed OFFSET signed */
266, /* (228) limit_opt ::= LIMIT signed COMMA signed */
265, /* (229) slimit_opt ::= */
265, /* (230) slimit_opt ::= SLIMIT signed */
265, /* (231) slimit_opt ::= SLIMIT signed SOFFSET signed */
265, /* (232) slimit_opt ::= SLIMIT signed COMMA signed */
256, /* (233) where_opt ::= */
256, /* (234) where_opt ::= WHERE expr */
270, /* (235) expr ::= LP expr RP */
270, /* (236) expr ::= ID */
270, /* (237) expr ::= ID DOT ID */
270, /* (238) expr ::= ID DOT STAR */
270, /* (239) expr ::= INTEGER */
270, /* (240) expr ::= MINUS INTEGER */
270, /* (241) expr ::= PLUS INTEGER */
270, /* (242) expr ::= FLOAT */
270, /* (243) expr ::= MINUS FLOAT */
270, /* (244) expr ::= PLUS FLOAT */
270, /* (245) expr ::= STRING */
270, /* (246) expr ::= NOW */
270, /* (247) expr ::= VARIABLE */
270, /* (248) expr ::= PLUS VARIABLE */
270, /* (249) expr ::= MINUS VARIABLE */
270, /* (250) expr ::= BOOL */
270, /* (251) expr ::= NULL */
270, /* (252) expr ::= ID LP exprlist RP */
270, /* (253) expr ::= ID LP STAR RP */
270, /* (254) expr ::= expr IS NULL */
270, /* (255) expr ::= expr IS NOT NULL */
270, /* (256) expr ::= expr LT expr */
270, /* (257) expr ::= expr GT expr */
270, /* (258) expr ::= expr LE expr */
270, /* (259) expr ::= expr GE expr */
270, /* (260) expr ::= expr NE expr */
270, /* (261) expr ::= expr EQ expr */
270, /* (262) expr ::= expr BETWEEN expr AND expr */
270, /* (263) expr ::= expr AND expr */
270, /* (264) expr ::= expr OR expr */
270, /* (265) expr ::= expr PLUS expr */
270, /* (266) expr ::= expr MINUS expr */
270, /* (267) expr ::= expr STAR expr */
270, /* (268) expr ::= expr SLASH expr */
270, /* (269) expr ::= expr REM expr */
270, /* (270) expr ::= expr LIKE expr */
270, /* (271) expr ::= expr MATCH expr */
270, /* (272) expr ::= expr NMATCH expr */
270, /* (273) expr ::= ID QUESTION STRING */
279, /* (274) arrow ::= ID ARROW STRING */
279, /* (275) arrow ::= ID DOT ID ARROW STRING */
270, /* (276) expr ::= arrow */
270, /* (277) expr ::= expr IN LP exprlist RP */
210, /* (278) exprlist ::= exprlist COMMA expritem */
210, /* (279) exprlist ::= expritem */
281, /* (280) expritem ::= expr */
281, /* (281) expritem ::= */
202, /* (282) cmd ::= RESET QUERY CACHE */
202, /* (283) cmd ::= SYNCDB ids REPLICA */
202, /* (284) cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */
202, /* (285) cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */
202, /* (286) cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */
202, /* (287) cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */
202, /* (288) cmd ::= ALTER TABLE ids cpxName DROP TAG ids */
202, /* (289) cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */
202, /* (290) cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */
202, /* (291) cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */
202, /* (292) cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */
202, /* (293) cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */
202, /* (294) cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */
202, /* (295) cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */
202, /* (296) cmd ::= ALTER STABLE ids cpxName DROP TAG ids */
202, /* (297) cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */
202, /* (298) cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem */
202, /* (299) cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */
202, /* (300) cmd ::= KILL CONNECTION INTEGER */
202, /* (301) cmd ::= KILL STREAM INTEGER COLON INTEGER */
202, /* (302) cmd ::= KILL QUERY INTEGER COLON INTEGER */
};
/* For rule J, yyRuleInfoNRhs[J] contains the negative of the number
......@@ -2597,93 +2609,100 @@ static const signed char yyRuleInfoNRhs[] = {
0, /* (206) orderby_opt ::= */
-3, /* (207) orderby_opt ::= ORDER BY sortlist */
-4, /* (208) sortlist ::= sortlist COMMA item sortorder */
-2, /* (209) sortlist ::= item sortorder */
-2, /* (210) item ::= ids cpxName */
-1, /* (211) sortorder ::= ASC */
-1, /* (212) sortorder ::= DESC */
0, /* (213) sortorder ::= */
0, /* (214) groupby_opt ::= */
-3, /* (215) groupby_opt ::= GROUP BY grouplist */
-3, /* (216) grouplist ::= grouplist COMMA item */
-1, /* (217) grouplist ::= item */
0, /* (218) having_opt ::= */
-2, /* (219) having_opt ::= HAVING expr */
0, /* (220) limit_opt ::= */
-2, /* (221) limit_opt ::= LIMIT signed */
-4, /* (222) limit_opt ::= LIMIT signed OFFSET signed */
-4, /* (223) limit_opt ::= LIMIT signed COMMA signed */
0, /* (224) slimit_opt ::= */
-2, /* (225) slimit_opt ::= SLIMIT signed */
-4, /* (226) slimit_opt ::= SLIMIT signed SOFFSET signed */
-4, /* (227) slimit_opt ::= SLIMIT signed COMMA signed */
0, /* (228) where_opt ::= */
-2, /* (229) where_opt ::= WHERE expr */
-3, /* (230) expr ::= LP expr RP */
-1, /* (231) expr ::= ID */
-3, /* (232) expr ::= ID DOT ID */
-3, /* (233) expr ::= ID DOT STAR */
-1, /* (234) expr ::= INTEGER */
-2, /* (235) expr ::= MINUS INTEGER */
-2, /* (236) expr ::= PLUS INTEGER */
-1, /* (237) expr ::= FLOAT */
-2, /* (238) expr ::= MINUS FLOAT */
-2, /* (239) expr ::= PLUS FLOAT */
-1, /* (240) expr ::= STRING */
-1, /* (241) expr ::= NOW */
-1, /* (242) expr ::= VARIABLE */
-2, /* (243) expr ::= PLUS VARIABLE */
-2, /* (244) expr ::= MINUS VARIABLE */
-1, /* (245) expr ::= BOOL */
-1, /* (246) expr ::= NULL */
-4, /* (247) expr ::= ID LP exprlist RP */
-4, /* (248) expr ::= ID LP STAR RP */
-3, /* (249) expr ::= expr IS NULL */
-4, /* (250) expr ::= expr IS NOT NULL */
-3, /* (251) expr ::= expr LT expr */
-3, /* (252) expr ::= expr GT expr */
-3, /* (253) expr ::= expr LE expr */
-3, /* (254) expr ::= expr GE expr */
-3, /* (255) expr ::= expr NE expr */
-3, /* (256) expr ::= expr EQ expr */
-5, /* (257) expr ::= expr BETWEEN expr AND expr */
-3, /* (258) expr ::= expr AND expr */
-3, /* (259) expr ::= expr OR expr */
-3, /* (260) expr ::= expr PLUS expr */
-3, /* (261) expr ::= expr MINUS expr */
-3, /* (262) expr ::= expr STAR expr */
-3, /* (263) expr ::= expr SLASH expr */
-3, /* (264) expr ::= expr REM expr */
-3, /* (265) expr ::= expr LIKE expr */
-3, /* (266) expr ::= expr MATCH expr */
-3, /* (267) expr ::= expr NMATCH expr */
-3, /* (268) expr ::= expr QUESTION expr */
-3, /* (269) expr ::= expr ARROW expr */
-5, /* (270) expr ::= expr IN LP exprlist RP */
-3, /* (271) exprlist ::= exprlist COMMA expritem */
-1, /* (272) exprlist ::= expritem */
-1, /* (273) expritem ::= expr */
0, /* (274) expritem ::= */
-3, /* (275) cmd ::= RESET QUERY CACHE */
-3, /* (276) cmd ::= SYNCDB ids REPLICA */
-7, /* (277) cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */
-7, /* (278) cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */
-7, /* (279) cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */
-7, /* (280) cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */
-7, /* (281) cmd ::= ALTER TABLE ids cpxName DROP TAG ids */
-8, /* (282) cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */
-9, /* (283) cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */
-7, /* (284) cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */
-7, /* (285) cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */
-7, /* (286) cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */
-7, /* (287) cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */
-7, /* (288) cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */
-7, /* (289) cmd ::= ALTER STABLE ids cpxName DROP TAG ids */
-8, /* (290) cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */
-9, /* (291) cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem */
-7, /* (292) cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */
-3, /* (293) cmd ::= KILL CONNECTION INTEGER */
-5, /* (294) cmd ::= KILL STREAM INTEGER COLON INTEGER */
-5, /* (295) cmd ::= KILL QUERY INTEGER COLON INTEGER */
-4, /* (209) sortlist ::= sortlist COMMA arrow sortorder */
-2, /* (210) sortlist ::= item sortorder */
-2, /* (211) sortlist ::= arrow sortorder */
-1, /* (212) item ::= ID */
-3, /* (213) item ::= ID DOT ID */
-1, /* (214) sortorder ::= ASC */
-1, /* (215) sortorder ::= DESC */
0, /* (216) sortorder ::= */
0, /* (217) groupby_opt ::= */
-3, /* (218) groupby_opt ::= GROUP BY grouplist */
-3, /* (219) grouplist ::= grouplist COMMA item */
-3, /* (220) grouplist ::= grouplist COMMA arrow */
-1, /* (221) grouplist ::= item */
-1, /* (222) grouplist ::= arrow */
0, /* (223) having_opt ::= */
-2, /* (224) having_opt ::= HAVING expr */
0, /* (225) limit_opt ::= */
-2, /* (226) limit_opt ::= LIMIT signed */
-4, /* (227) limit_opt ::= LIMIT signed OFFSET signed */
-4, /* (228) limit_opt ::= LIMIT signed COMMA signed */
0, /* (229) slimit_opt ::= */
-2, /* (230) slimit_opt ::= SLIMIT signed */
-4, /* (231) slimit_opt ::= SLIMIT signed SOFFSET signed */
-4, /* (232) slimit_opt ::= SLIMIT signed COMMA signed */
0, /* (233) where_opt ::= */
-2, /* (234) where_opt ::= WHERE expr */
-3, /* (235) expr ::= LP expr RP */
-1, /* (236) expr ::= ID */
-3, /* (237) expr ::= ID DOT ID */
-3, /* (238) expr ::= ID DOT STAR */
-1, /* (239) expr ::= INTEGER */
-2, /* (240) expr ::= MINUS INTEGER */
-2, /* (241) expr ::= PLUS INTEGER */
-1, /* (242) expr ::= FLOAT */
-2, /* (243) expr ::= MINUS FLOAT */
-2, /* (244) expr ::= PLUS FLOAT */
-1, /* (245) expr ::= STRING */
-1, /* (246) expr ::= NOW */
-1, /* (247) expr ::= VARIABLE */
-2, /* (248) expr ::= PLUS VARIABLE */
-2, /* (249) expr ::= MINUS VARIABLE */
-1, /* (250) expr ::= BOOL */
-1, /* (251) expr ::= NULL */
-4, /* (252) expr ::= ID LP exprlist RP */
-4, /* (253) expr ::= ID LP STAR RP */
-3, /* (254) expr ::= expr IS NULL */
-4, /* (255) expr ::= expr IS NOT NULL */
-3, /* (256) expr ::= expr LT expr */
-3, /* (257) expr ::= expr GT expr */
-3, /* (258) expr ::= expr LE expr */
-3, /* (259) expr ::= expr GE expr */
-3, /* (260) expr ::= expr NE expr */
-3, /* (261) expr ::= expr EQ expr */
-5, /* (262) expr ::= expr BETWEEN expr AND expr */
-3, /* (263) expr ::= expr AND expr */
-3, /* (264) expr ::= expr OR expr */
-3, /* (265) expr ::= expr PLUS expr */
-3, /* (266) expr ::= expr MINUS expr */
-3, /* (267) expr ::= expr STAR expr */
-3, /* (268) expr ::= expr SLASH expr */
-3, /* (269) expr ::= expr REM expr */
-3, /* (270) expr ::= expr LIKE expr */
-3, /* (271) expr ::= expr MATCH expr */
-3, /* (272) expr ::= expr NMATCH expr */
-3, /* (273) expr ::= ID QUESTION STRING */
-3, /* (274) arrow ::= ID ARROW STRING */
-5, /* (275) arrow ::= ID DOT ID ARROW STRING */
-1, /* (276) expr ::= arrow */
-5, /* (277) expr ::= expr IN LP exprlist RP */
-3, /* (278) exprlist ::= exprlist COMMA expritem */
-1, /* (279) exprlist ::= expritem */
-1, /* (280) expritem ::= expr */
0, /* (281) expritem ::= */
-3, /* (282) cmd ::= RESET QUERY CACHE */
-3, /* (283) cmd ::= SYNCDB ids REPLICA */
-7, /* (284) cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */
-7, /* (285) cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */
-7, /* (286) cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */
-7, /* (287) cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */
-7, /* (288) cmd ::= ALTER TABLE ids cpxName DROP TAG ids */
-8, /* (289) cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */
-9, /* (290) cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */
-7, /* (291) cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */
-7, /* (292) cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */
-7, /* (293) cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */
-7, /* (294) cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */
-7, /* (295) cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */
-7, /* (296) cmd ::= ALTER STABLE ids cpxName DROP TAG ids */
-8, /* (297) cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */
-9, /* (298) cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem */
-7, /* (299) cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */
-3, /* (300) cmd ::= KILL CONNECTION INTEGER */
-5, /* (301) cmd ::= KILL STREAM INTEGER COLON INTEGER */
-5, /* (302) cmd ::= KILL QUERY INTEGER COLON INTEGER */
};
static void yy_accept(yyParser*); /* Forward Declaration */
......@@ -2731,108 +2750,108 @@ static YYACTIONTYPE yy_reduce(
case 141: /* cmd ::= CREATE STABLE create_stable_args */ yytestcase(yyruleno==141);
#line 64 "sql.y"
{}
#line 2734 "sql.c"
#line 2753 "sql.c"
break;
case 1: /* cmd ::= SHOW DATABASES */
#line 67 "sql.y"
{ setShowOptions(pInfo, TSDB_MGMT_TABLE_DB, 0, 0);}
#line 2739 "sql.c"
#line 2758 "sql.c"
break;
case 2: /* cmd ::= SHOW TOPICS */
#line 68 "sql.y"
{ setShowOptions(pInfo, TSDB_MGMT_TABLE_TP, 0, 0);}
#line 2744 "sql.c"
#line 2763 "sql.c"
break;
case 3: /* cmd ::= SHOW FUNCTIONS */
#line 69 "sql.y"
{ setShowOptions(pInfo, TSDB_MGMT_TABLE_FUNCTION, 0, 0);}
#line 2749 "sql.c"
#line 2768 "sql.c"
break;
case 4: /* cmd ::= SHOW MNODES */
#line 70 "sql.y"
{ setShowOptions(pInfo, TSDB_MGMT_TABLE_MNODE, 0, 0);}
#line 2754 "sql.c"
#line 2773 "sql.c"
break;
case 5: /* cmd ::= SHOW DNODES */
#line 71 "sql.y"
{ setShowOptions(pInfo, TSDB_MGMT_TABLE_DNODE, 0, 0);}
#line 2759 "sql.c"
#line 2778 "sql.c"
break;
case 6: /* cmd ::= SHOW ACCOUNTS */
#line 72 "sql.y"
{ setShowOptions(pInfo, TSDB_MGMT_TABLE_ACCT, 0, 0);}
#line 2764 "sql.c"
#line 2783 "sql.c"
break;
case 7: /* cmd ::= SHOW USERS */
#line 73 "sql.y"
{ setShowOptions(pInfo, TSDB_MGMT_TABLE_USER, 0, 0);}
#line 2769 "sql.c"
#line 2788 "sql.c"
break;
case 8: /* cmd ::= SHOW MODULES */
#line 75 "sql.y"
{ setShowOptions(pInfo, TSDB_MGMT_TABLE_MODULE, 0, 0); }
#line 2774 "sql.c"
#line 2793 "sql.c"
break;
case 9: /* cmd ::= SHOW QUERIES */
#line 76 "sql.y"
{ setShowOptions(pInfo, TSDB_MGMT_TABLE_QUERIES, 0, 0); }
#line 2779 "sql.c"
#line 2798 "sql.c"
break;
case 10: /* cmd ::= SHOW CONNECTIONS */
#line 77 "sql.y"
{ setShowOptions(pInfo, TSDB_MGMT_TABLE_CONNS, 0, 0);}
#line 2784 "sql.c"
#line 2803 "sql.c"
break;
case 11: /* cmd ::= SHOW STREAMS */
#line 78 "sql.y"
{ setShowOptions(pInfo, TSDB_MGMT_TABLE_STREAMS, 0, 0); }
#line 2789 "sql.c"
#line 2808 "sql.c"
break;
case 12: /* cmd ::= SHOW VARIABLES */
#line 79 "sql.y"
{ setShowOptions(pInfo, TSDB_MGMT_TABLE_VARIABLES, 0, 0); }
#line 2794 "sql.c"
#line 2813 "sql.c"
break;
case 13: /* cmd ::= SHOW SCORES */
#line 80 "sql.y"
{ setShowOptions(pInfo, TSDB_MGMT_TABLE_SCORES, 0, 0); }
#line 2799 "sql.c"
#line 2818 "sql.c"
break;
case 14: /* cmd ::= SHOW GRANTS */
#line 81 "sql.y"
{ setShowOptions(pInfo, TSDB_MGMT_TABLE_GRANTS, 0, 0); }
#line 2804 "sql.c"
#line 2823 "sql.c"
break;
case 15: /* cmd ::= SHOW VNODES */
#line 83 "sql.y"
{ setShowOptions(pInfo, TSDB_MGMT_TABLE_VNODES, 0, 0); }
#line 2809 "sql.c"
#line 2828 "sql.c"
break;
case 16: /* cmd ::= SHOW VNODES ids */
#line 84 "sql.y"
{ setShowOptions(pInfo, TSDB_MGMT_TABLE_VNODES, &yymsp[0].minor.yy0, 0); }
#line 2814 "sql.c"
#line 2833 "sql.c"
break;
case 17: /* dbPrefix ::= */
#line 88 "sql.y"
{yymsp[1].minor.yy0.n = 0; yymsp[1].minor.yy0.type = 0;}
#line 2819 "sql.c"
#line 2838 "sql.c"
break;
case 18: /* dbPrefix ::= ids DOT */
#line 89 "sql.y"
{yylhsminor.yy0 = yymsp[-1].minor.yy0; }
#line 2824 "sql.c"
#line 2843 "sql.c"
yymsp[-1].minor.yy0 = yylhsminor.yy0;
break;
case 19: /* cpxName ::= */
#line 92 "sql.y"
{yymsp[1].minor.yy0.n = 0; }
#line 2830 "sql.c"
#line 2849 "sql.c"
break;
case 20: /* cpxName ::= DOT ids */
#line 93 "sql.y"
{yymsp[-1].minor.yy0 = yymsp[0].minor.yy0; yymsp[-1].minor.yy0.n += 1; }
#line 2835 "sql.c"
#line 2854 "sql.c"
break;
case 21: /* cmd ::= SHOW CREATE TABLE ids cpxName */
#line 94 "sql.y"
......@@ -2840,7 +2859,7 @@ static YYACTIONTYPE yy_reduce(
yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n;
setDCLSqlElems(pInfo, TSDB_SQL_SHOW_CREATE_TABLE, 1, &yymsp[-1].minor.yy0);
}
#line 2843 "sql.c"
#line 2862 "sql.c"
break;
case 22: /* cmd ::= SHOW CREATE STABLE ids cpxName */
#line 98 "sql.y"
......@@ -2848,35 +2867,35 @@ static YYACTIONTYPE yy_reduce(
yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n;
setDCLSqlElems(pInfo, TSDB_SQL_SHOW_CREATE_STABLE, 1, &yymsp[-1].minor.yy0);
}
#line 2851 "sql.c"
#line 2870 "sql.c"
break;
case 23: /* cmd ::= SHOW CREATE DATABASE ids */
#line 103 "sql.y"
{
setDCLSqlElems(pInfo, TSDB_SQL_SHOW_CREATE_DATABASE, 1, &yymsp[0].minor.yy0);
}
#line 2858 "sql.c"
#line 2877 "sql.c"
break;
case 24: /* cmd ::= SHOW dbPrefix TABLES */
#line 107 "sql.y"
{
setShowOptions(pInfo, TSDB_MGMT_TABLE_TABLE, &yymsp[-1].minor.yy0, 0);
}
#line 2865 "sql.c"
#line 2884 "sql.c"
break;
case 25: /* cmd ::= SHOW dbPrefix TABLES LIKE ids */
#line 111 "sql.y"
{
setShowOptions(pInfo, TSDB_MGMT_TABLE_TABLE, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0);
}
#line 2872 "sql.c"
#line 2891 "sql.c"
break;
case 26: /* cmd ::= SHOW dbPrefix STABLES */
#line 115 "sql.y"
{
setShowOptions(pInfo, TSDB_MGMT_TABLE_METRIC, &yymsp[-1].minor.yy0, 0);
}
#line 2879 "sql.c"
#line 2898 "sql.c"
break;
case 27: /* cmd ::= SHOW dbPrefix STABLES LIKE ids */
#line 119 "sql.y"
......@@ -2885,7 +2904,7 @@ static YYACTIONTYPE yy_reduce(
tSetDbName(&token, &yymsp[-3].minor.yy0);
setShowOptions(pInfo, TSDB_MGMT_TABLE_METRIC, &token, &yymsp[0].minor.yy0);
}
#line 2888 "sql.c"
#line 2907 "sql.c"
break;
case 28: /* cmd ::= SHOW dbPrefix VGROUPS */
#line 125 "sql.y"
......@@ -2894,7 +2913,7 @@ static YYACTIONTYPE yy_reduce(
tSetDbName(&token, &yymsp[-1].minor.yy0);
setShowOptions(pInfo, TSDB_MGMT_TABLE_VGROUP, &token, 0);
}
#line 2897 "sql.c"
#line 2916 "sql.c"
break;
case 29: /* cmd ::= SHOW dbPrefix VGROUPS ids */
#line 131 "sql.y"
......@@ -2903,7 +2922,7 @@ static YYACTIONTYPE yy_reduce(
tSetDbName(&token, &yymsp[-2].minor.yy0);
setShowOptions(pInfo, TSDB_MGMT_TABLE_VGROUP, &token, &yymsp[0].minor.yy0);
}
#line 2906 "sql.c"
#line 2925 "sql.c"
break;
case 30: /* cmd ::= DROP TABLE ifexists ids cpxName */
#line 138 "sql.y"
......@@ -2911,7 +2930,7 @@ static YYACTIONTYPE yy_reduce(
yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n;
setDropDbTableInfo(pInfo, TSDB_SQL_DROP_TABLE, &yymsp[-1].minor.yy0, &yymsp[-2].minor.yy0, -1, -1);
}
#line 2914 "sql.c"
#line 2933 "sql.c"
break;
case 31: /* cmd ::= DROP STABLE ifexists ids cpxName */
#line 144 "sql.y"
......@@ -2919,42 +2938,42 @@ static YYACTIONTYPE yy_reduce(
yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n;
setDropDbTableInfo(pInfo, TSDB_SQL_DROP_TABLE, &yymsp[-1].minor.yy0, &yymsp[-2].minor.yy0, -1, TSDB_SUPER_TABLE);
}
#line 2922 "sql.c"
#line 2941 "sql.c"
break;
case 32: /* cmd ::= DROP DATABASE ifexists ids */
#line 149 "sql.y"
{ setDropDbTableInfo(pInfo, TSDB_SQL_DROP_DB, &yymsp[0].minor.yy0, &yymsp[-1].minor.yy0, TSDB_DB_TYPE_DEFAULT, -1); }
#line 2927 "sql.c"
#line 2946 "sql.c"
break;
case 33: /* cmd ::= DROP TOPIC ifexists ids */
#line 150 "sql.y"
{ setDropDbTableInfo(pInfo, TSDB_SQL_DROP_DB, &yymsp[0].minor.yy0, &yymsp[-1].minor.yy0, TSDB_DB_TYPE_TOPIC, -1); }
#line 2932 "sql.c"
#line 2951 "sql.c"
break;
case 34: /* cmd ::= DROP FUNCTION ids */
#line 151 "sql.y"
{ setDropFuncInfo(pInfo, TSDB_SQL_DROP_FUNCTION, &yymsp[0].minor.yy0); }
#line 2937 "sql.c"
#line 2956 "sql.c"
break;
case 35: /* cmd ::= DROP DNODE ids */
#line 153 "sql.y"
{ setDCLSqlElems(pInfo, TSDB_SQL_DROP_DNODE, 1, &yymsp[0].minor.yy0); }
#line 2942 "sql.c"
#line 2961 "sql.c"
break;
case 36: /* cmd ::= DROP USER ids */
#line 154 "sql.y"
{ setDCLSqlElems(pInfo, TSDB_SQL_DROP_USER, 1, &yymsp[0].minor.yy0); }
#line 2947 "sql.c"
#line 2966 "sql.c"
break;
case 37: /* cmd ::= DROP ACCOUNT ids */
#line 155 "sql.y"
{ setDCLSqlElems(pInfo, TSDB_SQL_DROP_ACCT, 1, &yymsp[0].minor.yy0); }
#line 2952 "sql.c"
#line 2971 "sql.c"
break;
case 38: /* cmd ::= USE ids */
#line 158 "sql.y"
{ setDCLSqlElems(pInfo, TSDB_SQL_USE_DB, 1, &yymsp[0].minor.yy0);}
#line 2957 "sql.c"
#line 2976 "sql.c"
break;
case 39: /* cmd ::= DESCRIBE ids cpxName */
case 40: /* cmd ::= DESC ids cpxName */ yytestcase(yyruleno==40);
......@@ -2963,113 +2982,113 @@ static YYACTIONTYPE yy_reduce(
yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n;
setDCLSqlElems(pInfo, TSDB_SQL_DESCRIBE_TABLE, 1, &yymsp[-1].minor.yy0);
}
#line 2966 "sql.c"
#line 2985 "sql.c"
break;
case 41: /* cmd ::= ALTER USER ids PASS ids */
#line 171 "sql.y"
{ setAlterUserSql(pInfo, TSDB_ALTER_USER_PASSWD, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, NULL); }
#line 2971 "sql.c"
#line 2990 "sql.c"
break;
case 42: /* cmd ::= ALTER USER ids PRIVILEGE ids */
#line 172 "sql.y"
{ setAlterUserSql(pInfo, TSDB_ALTER_USER_PRIVILEGES, &yymsp[-2].minor.yy0, NULL, &yymsp[0].minor.yy0);}
#line 2976 "sql.c"
#line 2995 "sql.c"
break;
case 43: /* cmd ::= ALTER DNODE ids ids */
#line 173 "sql.y"
{ setDCLSqlElems(pInfo, TSDB_SQL_CFG_DNODE, 2, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); }
#line 2981 "sql.c"
#line 3000 "sql.c"
break;
case 44: /* cmd ::= ALTER DNODE ids ids ids */
#line 174 "sql.y"
{ setDCLSqlElems(pInfo, TSDB_SQL_CFG_DNODE, 3, &yymsp[-2].minor.yy0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); }
#line 2986 "sql.c"
#line 3005 "sql.c"
break;
case 45: /* cmd ::= ALTER LOCAL ids */
#line 175 "sql.y"
{ setDCLSqlElems(pInfo, TSDB_SQL_CFG_LOCAL, 1, &yymsp[0].minor.yy0); }
#line 2991 "sql.c"
#line 3010 "sql.c"
break;
case 46: /* cmd ::= ALTER LOCAL ids ids */
#line 176 "sql.y"
{ setDCLSqlElems(pInfo, TSDB_SQL_CFG_LOCAL, 2, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); }
#line 2996 "sql.c"
#line 3015 "sql.c"
break;
case 47: /* cmd ::= ALTER DATABASE ids alter_db_optr */
case 48: /* cmd ::= ALTER TOPIC ids alter_topic_optr */ yytestcase(yyruleno==48);
#line 177 "sql.y"
{ SStrToken t = {0}; setCreateDbInfo(pInfo, TSDB_SQL_ALTER_DB, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy10, &t);}
#line 3002 "sql.c"
#line 3021 "sql.c"
break;
case 49: /* cmd ::= ALTER ACCOUNT ids acct_optr */
#line 180 "sql.y"
{ setCreateAcctSql(pInfo, TSDB_SQL_ALTER_ACCT, &yymsp[-1].minor.yy0, NULL, &yymsp[0].minor.yy427);}
#line 3007 "sql.c"
#line 3026 "sql.c"
break;
case 50: /* cmd ::= ALTER ACCOUNT ids PASS ids acct_optr */
#line 181 "sql.y"
{ setCreateAcctSql(pInfo, TSDB_SQL_ALTER_ACCT, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy427);}
#line 3012 "sql.c"
#line 3031 "sql.c"
break;
case 51: /* cmd ::= COMPACT VNODES IN LP exprlist RP */
#line 185 "sql.y"
{ setCompactVnodeSql(pInfo, TSDB_SQL_COMPACT_VNODE, yymsp[-1].minor.yy345);}
#line 3017 "sql.c"
#line 3036 "sql.c"
break;
case 52: /* ids ::= ID */
case 53: /* ids ::= STRING */ yytestcase(yyruleno==53);
#line 191 "sql.y"
{yylhsminor.yy0 = yymsp[0].minor.yy0; }
#line 3023 "sql.c"
#line 3042 "sql.c"
yymsp[0].minor.yy0 = yylhsminor.yy0;
break;
case 54: /* ifexists ::= IF EXISTS */
#line 195 "sql.y"
{ yymsp[-1].minor.yy0.n = 1;}
#line 3029 "sql.c"
#line 3048 "sql.c"
break;
case 55: /* ifexists ::= */
case 57: /* ifnotexists ::= */ yytestcase(yyruleno==57);
case 181: /* distinct ::= */ yytestcase(yyruleno==181);
#line 196 "sql.y"
{ yymsp[1].minor.yy0.n = 0;}
#line 3036 "sql.c"
#line 3055 "sql.c"
break;
case 56: /* ifnotexists ::= IF NOT EXISTS */
#line 199 "sql.y"
{ yymsp[-2].minor.yy0.n = 1;}
#line 3041 "sql.c"
#line 3060 "sql.c"
break;
case 58: /* cmd ::= CREATE DNODE ids */
#line 204 "sql.y"
{ setDCLSqlElems(pInfo, TSDB_SQL_CREATE_DNODE, 1, &yymsp[0].minor.yy0);}
#line 3046 "sql.c"
#line 3065 "sql.c"
break;
case 59: /* cmd ::= CREATE ACCOUNT ids PASS ids acct_optr */
#line 206 "sql.y"
{ setCreateAcctSql(pInfo, TSDB_SQL_CREATE_ACCT, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy427);}
#line 3051 "sql.c"
#line 3070 "sql.c"
break;
case 60: /* cmd ::= CREATE DATABASE ifnotexists ids db_optr */
case 61: /* cmd ::= CREATE TOPIC ifnotexists ids topic_optr */ yytestcase(yyruleno==61);
#line 207 "sql.y"
{ setCreateDbInfo(pInfo, TSDB_SQL_CREATE_DB, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy10, &yymsp[-2].minor.yy0);}
#line 3057 "sql.c"
#line 3076 "sql.c"
break;
case 62: /* cmd ::= CREATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */
#line 209 "sql.y"
{ setCreateFuncInfo(pInfo, TSDB_SQL_CREATE_FUNCTION, &yymsp[-5].minor.yy0, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy487, &yymsp[0].minor.yy0, 1);}
#line 3062 "sql.c"
#line 3081 "sql.c"
break;
case 63: /* cmd ::= CREATE AGGREGATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */
#line 210 "sql.y"
{ setCreateFuncInfo(pInfo, TSDB_SQL_CREATE_FUNCTION, &yymsp[-5].minor.yy0, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy487, &yymsp[0].minor.yy0, 2);}
#line 3067 "sql.c"
#line 3086 "sql.c"
break;
case 64: /* cmd ::= CREATE USER ids PASS ids */
#line 211 "sql.y"
{ setCreateUserSql(pInfo, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0);}
#line 3072 "sql.c"
#line 3091 "sql.c"
break;
case 65: /* bufsize ::= */
case 67: /* pps ::= */ yytestcase(yyruleno==67);
......@@ -3083,7 +3102,7 @@ static YYACTIONTYPE yy_reduce(
case 83: /* state ::= */ yytestcase(yyruleno==83);
#line 213 "sql.y"
{ yymsp[1].minor.yy0.n = 0; }
#line 3086 "sql.c"
#line 3105 "sql.c"
break;
case 66: /* bufsize ::= BUFSIZE INTEGER */
case 68: /* pps ::= PPS INTEGER */ yytestcase(yyruleno==68);
......@@ -3097,7 +3116,7 @@ static YYACTIONTYPE yy_reduce(
case 84: /* state ::= STATE ids */ yytestcase(yyruleno==84);
#line 214 "sql.y"
{ yymsp[-1].minor.yy0 = yymsp[0].minor.yy0; }
#line 3100 "sql.c"
#line 3119 "sql.c"
break;
case 85: /* acct_optr ::= pps tseries storage streams qtime dbs users conns state */
#line 244 "sql.y"
......@@ -3112,21 +3131,21 @@ static YYACTIONTYPE yy_reduce(
yylhsminor.yy427.maxConnections = (yymsp[-1].minor.yy0.n>0)?atoi(yymsp[-1].minor.yy0.z):-1;
yylhsminor.yy427.stat = yymsp[0].minor.yy0;
}
#line 3115 "sql.c"
#line 3134 "sql.c"
yymsp[-8].minor.yy427 = yylhsminor.yy427;
break;
case 86: /* intitemlist ::= intitemlist COMMA intitem */
case 155: /* tagitemlist ::= tagitemlist COMMA tagitem */ yytestcase(yyruleno==155);
#line 260 "sql.y"
{ yylhsminor.yy345 = tVariantListAppend(yymsp[-2].minor.yy345, &yymsp[0].minor.yy2, -1); }
#line 3122 "sql.c"
#line 3141 "sql.c"
yymsp[-2].minor.yy345 = yylhsminor.yy345;
break;
case 87: /* intitemlist ::= intitem */
case 156: /* tagitemlist ::= tagitem */ yytestcase(yyruleno==156);
#line 261 "sql.y"
{ yylhsminor.yy345 = tVariantListAppend(NULL, &yymsp[0].minor.yy2, -1); }
#line 3129 "sql.c"
#line 3148 "sql.c"
yymsp[0].minor.yy345 = yylhsminor.yy345;
break;
case 88: /* intitem ::= INTEGER */
......@@ -3134,15 +3153,16 @@ static YYACTIONTYPE yy_reduce(
case 158: /* tagitem ::= FLOAT */ yytestcase(yyruleno==158);
case 159: /* tagitem ::= STRING */ yytestcase(yyruleno==159);
case 160: /* tagitem ::= BOOL */ yytestcase(yyruleno==160);
case 212: /* item ::= ID */ yytestcase(yyruleno==212);
#line 263 "sql.y"
{ toTSDBType(yymsp[0].minor.yy0.type); tVariantCreate(&yylhsminor.yy2, &yymsp[0].minor.yy0); }
#line 3139 "sql.c"
#line 3159 "sql.c"
yymsp[0].minor.yy2 = yylhsminor.yy2;
break;
case 89: /* keep ::= KEEP intitemlist */
#line 267 "sql.y"
{ yymsp[-1].minor.yy345 = yymsp[0].minor.yy345; }
#line 3145 "sql.c"
#line 3165 "sql.c"
break;
case 90: /* cache ::= CACHE INTEGER */
case 91: /* replica ::= REPLICA INTEGER */ yytestcase(yyruleno==91);
......@@ -3161,128 +3181,128 @@ static YYACTIONTYPE yy_reduce(
case 104: /* partitions ::= PARTITIONS INTEGER */ yytestcase(yyruleno==104);
#line 269 "sql.y"
{ yymsp[-1].minor.yy0 = yymsp[0].minor.yy0; }
#line 3164 "sql.c"
#line 3184 "sql.c"
break;
case 105: /* db_optr ::= */
#line 286 "sql.y"
{setDefaultCreateDbOption(&yymsp[1].minor.yy10); yymsp[1].minor.yy10.dbType = TSDB_DB_TYPE_DEFAULT;}
#line 3169 "sql.c"
#line 3189 "sql.c"
break;
case 106: /* db_optr ::= db_optr cache */
#line 288 "sql.y"
{ yylhsminor.yy10 = yymsp[-1].minor.yy10; yylhsminor.yy10.cacheBlockSize = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
#line 3174 "sql.c"
#line 3194 "sql.c"
yymsp[-1].minor.yy10 = yylhsminor.yy10;
break;
case 107: /* db_optr ::= db_optr replica */
case 124: /* alter_db_optr ::= alter_db_optr replica */ yytestcase(yyruleno==124);
#line 289 "sql.y"
{ yylhsminor.yy10 = yymsp[-1].minor.yy10; yylhsminor.yy10.replica = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
#line 3181 "sql.c"
#line 3201 "sql.c"
yymsp[-1].minor.yy10 = yylhsminor.yy10;
break;
case 108: /* db_optr ::= db_optr quorum */
case 125: /* alter_db_optr ::= alter_db_optr quorum */ yytestcase(yyruleno==125);
#line 290 "sql.y"
{ yylhsminor.yy10 = yymsp[-1].minor.yy10; yylhsminor.yy10.quorum = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
#line 3188 "sql.c"
#line 3208 "sql.c"
yymsp[-1].minor.yy10 = yylhsminor.yy10;
break;
case 109: /* db_optr ::= db_optr days */
#line 291 "sql.y"
{ yylhsminor.yy10 = yymsp[-1].minor.yy10; yylhsminor.yy10.daysPerFile = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
#line 3194 "sql.c"
#line 3214 "sql.c"
yymsp[-1].minor.yy10 = yylhsminor.yy10;
break;
case 110: /* db_optr ::= db_optr minrows */
#line 292 "sql.y"
{ yylhsminor.yy10 = yymsp[-1].minor.yy10; yylhsminor.yy10.minRowsPerBlock = strtod(yymsp[0].minor.yy0.z, NULL); }
#line 3200 "sql.c"
#line 3220 "sql.c"
yymsp[-1].minor.yy10 = yylhsminor.yy10;
break;
case 111: /* db_optr ::= db_optr maxrows */
#line 293 "sql.y"
{ yylhsminor.yy10 = yymsp[-1].minor.yy10; yylhsminor.yy10.maxRowsPerBlock = strtod(yymsp[0].minor.yy0.z, NULL); }
#line 3206 "sql.c"
#line 3226 "sql.c"
yymsp[-1].minor.yy10 = yylhsminor.yy10;
break;
case 112: /* db_optr ::= db_optr blocks */
case 127: /* alter_db_optr ::= alter_db_optr blocks */ yytestcase(yyruleno==127);
#line 294 "sql.y"
{ yylhsminor.yy10 = yymsp[-1].minor.yy10; yylhsminor.yy10.numOfBlocks = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
#line 3213 "sql.c"
#line 3233 "sql.c"
yymsp[-1].minor.yy10 = yylhsminor.yy10;
break;
case 113: /* db_optr ::= db_optr ctime */
#line 295 "sql.y"
{ yylhsminor.yy10 = yymsp[-1].minor.yy10; yylhsminor.yy10.commitTime = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
#line 3219 "sql.c"
#line 3239 "sql.c"
yymsp[-1].minor.yy10 = yylhsminor.yy10;
break;
case 114: /* db_optr ::= db_optr wal */
#line 296 "sql.y"
{ yylhsminor.yy10 = yymsp[-1].minor.yy10; yylhsminor.yy10.walLevel = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
#line 3225 "sql.c"
#line 3245 "sql.c"
yymsp[-1].minor.yy10 = yylhsminor.yy10;
break;
case 115: /* db_optr ::= db_optr fsync */
#line 297 "sql.y"
{ yylhsminor.yy10 = yymsp[-1].minor.yy10; yylhsminor.yy10.fsyncPeriod = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
#line 3231 "sql.c"
#line 3251 "sql.c"
yymsp[-1].minor.yy10 = yylhsminor.yy10;
break;
case 116: /* db_optr ::= db_optr comp */
case 128: /* alter_db_optr ::= alter_db_optr comp */ yytestcase(yyruleno==128);
#line 298 "sql.y"
{ yylhsminor.yy10 = yymsp[-1].minor.yy10; yylhsminor.yy10.compressionLevel = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
#line 3238 "sql.c"
#line 3258 "sql.c"
yymsp[-1].minor.yy10 = yylhsminor.yy10;
break;
case 117: /* db_optr ::= db_optr prec */
#line 299 "sql.y"
{ yylhsminor.yy10 = yymsp[-1].minor.yy10; yylhsminor.yy10.precision = yymsp[0].minor.yy0; }
#line 3244 "sql.c"
#line 3264 "sql.c"
yymsp[-1].minor.yy10 = yylhsminor.yy10;
break;
case 118: /* db_optr ::= db_optr keep */
case 126: /* alter_db_optr ::= alter_db_optr keep */ yytestcase(yyruleno==126);
#line 300 "sql.y"
{ yylhsminor.yy10 = yymsp[-1].minor.yy10; yylhsminor.yy10.keep = yymsp[0].minor.yy345; }
#line 3251 "sql.c"
#line 3271 "sql.c"
yymsp[-1].minor.yy10 = yylhsminor.yy10;
break;
case 119: /* db_optr ::= db_optr update */
case 129: /* alter_db_optr ::= alter_db_optr update */ yytestcase(yyruleno==129);
#line 301 "sql.y"
{ yylhsminor.yy10 = yymsp[-1].minor.yy10; yylhsminor.yy10.update = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
#line 3258 "sql.c"
#line 3278 "sql.c"
yymsp[-1].minor.yy10 = yylhsminor.yy10;
break;
case 120: /* db_optr ::= db_optr cachelast */
case 130: /* alter_db_optr ::= alter_db_optr cachelast */ yytestcase(yyruleno==130);
#line 302 "sql.y"
{ yylhsminor.yy10 = yymsp[-1].minor.yy10; yylhsminor.yy10.cachelast = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
#line 3265 "sql.c"
#line 3285 "sql.c"
yymsp[-1].minor.yy10 = yylhsminor.yy10;
break;
case 121: /* topic_optr ::= db_optr */
case 131: /* alter_topic_optr ::= alter_db_optr */ yytestcase(yyruleno==131);
#line 306 "sql.y"
{ yylhsminor.yy10 = yymsp[0].minor.yy10; yylhsminor.yy10.dbType = TSDB_DB_TYPE_TOPIC; }
#line 3272 "sql.c"
#line 3292 "sql.c"
yymsp[0].minor.yy10 = yylhsminor.yy10;
break;
case 122: /* topic_optr ::= topic_optr partitions */
case 132: /* alter_topic_optr ::= alter_topic_optr partitions */ yytestcase(yyruleno==132);
#line 307 "sql.y"
{ yylhsminor.yy10 = yymsp[-1].minor.yy10; yylhsminor.yy10.partitions = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
#line 3279 "sql.c"
#line 3299 "sql.c"
yymsp[-1].minor.yy10 = yylhsminor.yy10;
break;
case 123: /* alter_db_optr ::= */
#line 310 "sql.y"
{ setDefaultCreateDbOption(&yymsp[1].minor.yy10); yymsp[1].minor.yy10.dbType = TSDB_DB_TYPE_DEFAULT;}
#line 3285 "sql.c"
#line 3305 "sql.c"
break;
case 133: /* typename ::= ids */
#line 330 "sql.y"
......@@ -3290,7 +3310,7 @@ static YYACTIONTYPE yy_reduce(
yymsp[0].minor.yy0.type = 0;
tSetColumnType (&yylhsminor.yy487, &yymsp[0].minor.yy0);
}
#line 3293 "sql.c"
#line 3313 "sql.c"
yymsp[0].minor.yy487 = yylhsminor.yy487;
break;
case 134: /* typename ::= ids LP signed RP */
......@@ -3304,7 +3324,7 @@ static YYACTIONTYPE yy_reduce(
tSetColumnType(&yylhsminor.yy487, &yymsp[-3].minor.yy0);
}
}
#line 3307 "sql.c"
#line 3327 "sql.c"
yymsp[-3].minor.yy487 = yylhsminor.yy487;
break;
case 135: /* typename ::= ids UNSIGNED */
......@@ -3314,29 +3334,29 @@ static YYACTIONTYPE yy_reduce(
yymsp[-1].minor.yy0.n = ((yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z);
tSetColumnType (&yylhsminor.yy487, &yymsp[-1].minor.yy0);
}
#line 3317 "sql.c"
#line 3337 "sql.c"
yymsp[-1].minor.yy487 = yylhsminor.yy487;
break;
case 136: /* signed ::= INTEGER */
#line 354 "sql.y"
{ yylhsminor.yy525 = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
#line 3323 "sql.c"
#line 3343 "sql.c"
yymsp[0].minor.yy525 = yylhsminor.yy525;
break;
case 137: /* signed ::= PLUS INTEGER */
#line 355 "sql.y"
{ yymsp[-1].minor.yy525 = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
#line 3329 "sql.c"
#line 3349 "sql.c"
break;
case 138: /* signed ::= MINUS INTEGER */
#line 356 "sql.y"
{ yymsp[-1].minor.yy525 = -strtol(yymsp[0].minor.yy0.z, NULL, 10);}
#line 3334 "sql.c"
#line 3354 "sql.c"
break;
case 142: /* cmd ::= CREATE TABLE create_table_list */
#line 362 "sql.y"
{ pInfo->type = TSDB_SQL_CREATE_TABLE; pInfo->pCreateTableInfo = yymsp[0].minor.yy170;}
#line 3339 "sql.c"
#line 3359 "sql.c"
break;
case 143: /* create_table_list ::= create_from_stable */
#line 366 "sql.y"
......@@ -3348,7 +3368,7 @@ static YYACTIONTYPE yy_reduce(
pCreateTable->type = TSQL_CREATE_TABLE_FROM_STABLE;
yylhsminor.yy170 = pCreateTable;
}
#line 3351 "sql.c"
#line 3371 "sql.c"
yymsp[0].minor.yy170 = yylhsminor.yy170;
break;
case 144: /* create_table_list ::= create_table_list create_from_stable */
......@@ -3357,7 +3377,7 @@ static YYACTIONTYPE yy_reduce(
taosArrayPush(yymsp[-1].minor.yy170->childTableInfo, &yymsp[0].minor.yy72);
yylhsminor.yy170 = yymsp[-1].minor.yy170;
}
#line 3360 "sql.c"
#line 3380 "sql.c"
yymsp[-1].minor.yy170 = yylhsminor.yy170;
break;
case 145: /* create_table_args ::= ifnotexists ids cpxName LP columnlist RP */
......@@ -3369,7 +3389,7 @@ static YYACTIONTYPE yy_reduce(
yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n;
setCreatedTableName(pInfo, &yymsp[-4].minor.yy0, &yymsp[-5].minor.yy0);
}
#line 3372 "sql.c"
#line 3392 "sql.c"
yymsp[-5].minor.yy170 = yylhsminor.yy170;
break;
case 146: /* create_stable_args ::= ifnotexists ids cpxName LP columnlist RP TAGS LP columnlist RP */
......@@ -3381,7 +3401,7 @@ static YYACTIONTYPE yy_reduce(
yymsp[-8].minor.yy0.n += yymsp[-7].minor.yy0.n;
setCreatedTableName(pInfo, &yymsp[-8].minor.yy0, &yymsp[-9].minor.yy0);
}
#line 3384 "sql.c"
#line 3404 "sql.c"
yymsp[-9].minor.yy170 = yylhsminor.yy170;
break;
case 147: /* create_from_stable ::= ifnotexists ids cpxName USING ids cpxName TAGS LP tagitemlist RP */
......@@ -3391,7 +3411,7 @@ static YYACTIONTYPE yy_reduce(
yymsp[-8].minor.yy0.n += yymsp[-7].minor.yy0.n;
yylhsminor.yy72 = createNewChildTableInfo(&yymsp[-5].minor.yy0, NULL, yymsp[-1].minor.yy345, &yymsp[-8].minor.yy0, &yymsp[-9].minor.yy0);
}
#line 3394 "sql.c"
#line 3414 "sql.c"
yymsp[-9].minor.yy72 = yylhsminor.yy72;
break;
case 148: /* create_from_stable ::= ifnotexists ids cpxName USING ids cpxName LP tagNamelist RP TAGS LP tagitemlist RP */
......@@ -3401,19 +3421,19 @@ static YYACTIONTYPE yy_reduce(
yymsp[-11].minor.yy0.n += yymsp[-10].minor.yy0.n;
yylhsminor.yy72 = createNewChildTableInfo(&yymsp[-8].minor.yy0, yymsp[-5].minor.yy345, yymsp[-1].minor.yy345, &yymsp[-11].minor.yy0, &yymsp[-12].minor.yy0);
}
#line 3404 "sql.c"
#line 3424 "sql.c"
yymsp[-12].minor.yy72 = yylhsminor.yy72;
break;
case 149: /* tagNamelist ::= tagNamelist COMMA ids */
#line 416 "sql.y"
{taosArrayPush(yymsp[-2].minor.yy345, &yymsp[0].minor.yy0); yylhsminor.yy345 = yymsp[-2].minor.yy345; }
#line 3410 "sql.c"
#line 3430 "sql.c"
yymsp[-2].minor.yy345 = yylhsminor.yy345;
break;
case 150: /* tagNamelist ::= ids */
#line 417 "sql.y"
{yylhsminor.yy345 = taosArrayInit(4, sizeof(SStrToken)); taosArrayPush(yylhsminor.yy345, &yymsp[0].minor.yy0);}
#line 3416 "sql.c"
#line 3436 "sql.c"
yymsp[0].minor.yy345 = yylhsminor.yy345;
break;
case 151: /* create_table_args ::= ifnotexists ids cpxName AS select */
......@@ -3425,19 +3445,19 @@ static YYACTIONTYPE yy_reduce(
yymsp[-3].minor.yy0.n += yymsp[-2].minor.yy0.n;
setCreatedTableName(pInfo, &yymsp[-3].minor.yy0, &yymsp[-4].minor.yy0);
}
#line 3428 "sql.c"
#line 3448 "sql.c"
yymsp[-4].minor.yy170 = yylhsminor.yy170;
break;
case 152: /* columnlist ::= columnlist COMMA column */
#line 432 "sql.y"
{taosArrayPush(yymsp[-2].minor.yy345, &yymsp[0].minor.yy487); yylhsminor.yy345 = yymsp[-2].minor.yy345; }
#line 3434 "sql.c"
#line 3454 "sql.c"
yymsp[-2].minor.yy345 = yylhsminor.yy345;
break;
case 153: /* columnlist ::= column */
#line 433 "sql.y"
{yylhsminor.yy345 = taosArrayInit(4, sizeof(TAOS_FIELD)); taosArrayPush(yylhsminor.yy345, &yymsp[0].minor.yy487);}
#line 3440 "sql.c"
#line 3460 "sql.c"
yymsp[0].minor.yy345 = yylhsminor.yy345;
break;
case 154: /* column ::= ids typename */
......@@ -3445,19 +3465,19 @@ static YYACTIONTYPE yy_reduce(
{
tSetColumnInfo(&yylhsminor.yy487, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy487);
}
#line 3448 "sql.c"
#line 3468 "sql.c"
yymsp[-1].minor.yy487 = yylhsminor.yy487;
break;
case 161: /* tagitem ::= NULL */
#line 452 "sql.y"
{ yymsp[0].minor.yy0.type = 0; tVariantCreate(&yylhsminor.yy2, &yymsp[0].minor.yy0); }
#line 3454 "sql.c"
#line 3474 "sql.c"
yymsp[0].minor.yy2 = yylhsminor.yy2;
break;
case 162: /* tagitem ::= NOW */
#line 453 "sql.y"
{ yymsp[0].minor.yy0.type = TSDB_DATA_TYPE_TIMESTAMP; tVariantCreate(&yylhsminor.yy2, &yymsp[0].minor.yy0);}
#line 3460 "sql.c"
#line 3480 "sql.c"
yymsp[0].minor.yy2 = yylhsminor.yy2;
break;
case 163: /* tagitem ::= MINUS INTEGER */
......@@ -3471,7 +3491,7 @@ static YYACTIONTYPE yy_reduce(
toTSDBType(yymsp[-1].minor.yy0.type);
tVariantCreate(&yylhsminor.yy2, &yymsp[-1].minor.yy0);
}
#line 3474 "sql.c"
#line 3494 "sql.c"
yymsp[-1].minor.yy2 = yylhsminor.yy2;
break;
case 167: /* select ::= SELECT selcollist from where_opt interval_option sliding_opt session_option windowstate_option fill_opt groupby_opt having_opt orderby_opt slimit_opt limit_opt */
......@@ -3479,57 +3499,57 @@ static YYACTIONTYPE yy_reduce(
{
yylhsminor.yy68 = tSetQuerySqlNode(&yymsp[-13].minor.yy0, yymsp[-12].minor.yy345, yymsp[-11].minor.yy484, yymsp[-10].minor.yy418, yymsp[-4].minor.yy345, yymsp[-2].minor.yy345, &yymsp[-9].minor.yy280, &yymsp[-7].minor.yy295, &yymsp[-6].minor.yy432, &yymsp[-8].minor.yy0, yymsp[-5].minor.yy345, &yymsp[0].minor.yy114, &yymsp[-1].minor.yy114, yymsp[-3].minor.yy418);
}
#line 3482 "sql.c"
#line 3502 "sql.c"
yymsp[-13].minor.yy68 = yylhsminor.yy68;
break;
case 168: /* select ::= LP select RP */
#line 490 "sql.y"
{yymsp[-2].minor.yy68 = yymsp[-1].minor.yy68;}
#line 3488 "sql.c"
#line 3508 "sql.c"
break;
case 169: /* union ::= select */
#line 494 "sql.y"
{ yylhsminor.yy345 = setSubclause(NULL, yymsp[0].minor.yy68); }
#line 3493 "sql.c"
#line 3513 "sql.c"
yymsp[0].minor.yy345 = yylhsminor.yy345;
break;
case 170: /* union ::= union UNION ALL select */
#line 495 "sql.y"
{ yylhsminor.yy345 = appendSelectClause(yymsp[-3].minor.yy345, yymsp[0].minor.yy68); }
#line 3499 "sql.c"
#line 3519 "sql.c"
yymsp[-3].minor.yy345 = yylhsminor.yy345;
break;
case 171: /* cmd ::= union */
#line 497 "sql.y"
{ setSqlInfo(pInfo, yymsp[0].minor.yy345, NULL, TSDB_SQL_SELECT); }
#line 3505 "sql.c"
#line 3525 "sql.c"
break;
case 172: /* select ::= SELECT selcollist */
#line 504 "sql.y"
{
yylhsminor.yy68 = tSetQuerySqlNode(&yymsp[-1].minor.yy0, yymsp[0].minor.yy345, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
}
#line 3512 "sql.c"
#line 3532 "sql.c"
yymsp[-1].minor.yy68 = yylhsminor.yy68;
break;
case 173: /* sclp ::= selcollist COMMA */
#line 516 "sql.y"
{yylhsminor.yy345 = yymsp[-1].minor.yy345;}
#line 3518 "sql.c"
#line 3538 "sql.c"
yymsp[-1].minor.yy345 = yylhsminor.yy345;
break;
case 174: /* sclp ::= */
case 206: /* orderby_opt ::= */ yytestcase(yyruleno==206);
#line 517 "sql.y"
{yymsp[1].minor.yy345 = 0;}
#line 3525 "sql.c"
#line 3545 "sql.c"
break;
case 175: /* selcollist ::= sclp distinct expr as */
#line 518 "sql.y"
{
yylhsminor.yy345 = tSqlExprListAppend(yymsp[-3].minor.yy345, yymsp[-1].minor.yy418, yymsp[-2].minor.yy0.n? &yymsp[-2].minor.yy0:0, yymsp[0].minor.yy0.n?&yymsp[0].minor.yy0:0);
}
#line 3532 "sql.c"
#line 3552 "sql.c"
yymsp[-3].minor.yy345 = yylhsminor.yy345;
break;
case 176: /* selcollist ::= sclp STAR */
......@@ -3538,51 +3558,51 @@ static YYACTIONTYPE yy_reduce(
tSqlExpr *pNode = tSqlExprCreateIdValue(pInfo, NULL, TK_ALL);
yylhsminor.yy345 = tSqlExprListAppend(yymsp[-1].minor.yy345, pNode, 0, 0);
}
#line 3541 "sql.c"
#line 3561 "sql.c"
yymsp[-1].minor.yy345 = yylhsminor.yy345;
break;
case 177: /* as ::= AS ids */
#line 530 "sql.y"
{ yymsp[-1].minor.yy0 = yymsp[0].minor.yy0; }
#line 3547 "sql.c"
#line 3567 "sql.c"
break;
case 178: /* as ::= ids */
#line 531 "sql.y"
{ yylhsminor.yy0 = yymsp[0].minor.yy0; }
#line 3552 "sql.c"
#line 3572 "sql.c"
yymsp[0].minor.yy0 = yylhsminor.yy0;
break;
case 179: /* as ::= */
#line 532 "sql.y"
{ yymsp[1].minor.yy0.n = 0; }
#line 3558 "sql.c"
#line 3578 "sql.c"
break;
case 180: /* distinct ::= DISTINCT */
#line 535 "sql.y"
{ yylhsminor.yy0 = yymsp[0].minor.yy0; }
#line 3563 "sql.c"
#line 3583 "sql.c"
yymsp[0].minor.yy0 = yylhsminor.yy0;
break;
case 182: /* from ::= FROM tablelist */
case 183: /* from ::= FROM sub */ yytestcase(yyruleno==183);
#line 541 "sql.y"
{yymsp[-1].minor.yy484 = yymsp[0].minor.yy484;}
#line 3570 "sql.c"
#line 3590 "sql.c"
break;
case 184: /* sub ::= LP union RP */
#line 546 "sql.y"
{yymsp[-2].minor.yy484 = addSubqueryElem(NULL, yymsp[-1].minor.yy345, NULL);}
#line 3575 "sql.c"
#line 3595 "sql.c"
break;
case 185: /* sub ::= LP union RP ids */
#line 547 "sql.y"
{yymsp[-3].minor.yy484 = addSubqueryElem(NULL, yymsp[-2].minor.yy345, &yymsp[0].minor.yy0);}
#line 3580 "sql.c"
#line 3600 "sql.c"
break;
case 186: /* sub ::= sub COMMA LP union RP ids */
#line 548 "sql.y"
{yylhsminor.yy484 = addSubqueryElem(yymsp[-5].minor.yy484, yymsp[-2].minor.yy345, &yymsp[0].minor.yy0);}
#line 3585 "sql.c"
#line 3605 "sql.c"
yymsp[-5].minor.yy484 = yylhsminor.yy484;
break;
case 187: /* tablelist ::= ids cpxName */
......@@ -3591,7 +3611,7 @@ static YYACTIONTYPE yy_reduce(
yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n;
yylhsminor.yy484 = setTableNameList(NULL, &yymsp[-1].minor.yy0, NULL);
}
#line 3594 "sql.c"
#line 3614 "sql.c"
yymsp[-1].minor.yy484 = yylhsminor.yy484;
break;
case 188: /* tablelist ::= ids cpxName ids */
......@@ -3600,7 +3620,7 @@ static YYACTIONTYPE yy_reduce(
yymsp[-2].minor.yy0.n += yymsp[-1].minor.yy0.n;
yylhsminor.yy484 = setTableNameList(NULL, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0);
}
#line 3603 "sql.c"
#line 3623 "sql.c"
yymsp[-2].minor.yy484 = yylhsminor.yy484;
break;
case 189: /* tablelist ::= tablelist COMMA ids cpxName */
......@@ -3609,7 +3629,7 @@ static YYACTIONTYPE yy_reduce(
yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n;
yylhsminor.yy484 = setTableNameList(yymsp[-3].minor.yy484, &yymsp[-1].minor.yy0, NULL);
}
#line 3612 "sql.c"
#line 3632 "sql.c"
yymsp[-3].minor.yy484 = yylhsminor.yy484;
break;
case 190: /* tablelist ::= tablelist COMMA ids cpxName ids */
......@@ -3618,46 +3638,46 @@ static YYACTIONTYPE yy_reduce(
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);
}
#line 3621 "sql.c"
#line 3641 "sql.c"
yymsp[-4].minor.yy484 = yylhsminor.yy484;
break;
case 191: /* tmvar ::= VARIABLE */
#line 574 "sql.y"
{yylhsminor.yy0 = yymsp[0].minor.yy0;}
#line 3627 "sql.c"
#line 3647 "sql.c"
yymsp[0].minor.yy0 = yylhsminor.yy0;
break;
case 192: /* interval_option ::= intervalKey LP tmvar RP */
#line 577 "sql.y"
{yylhsminor.yy280.interval = yymsp[-1].minor.yy0; yylhsminor.yy280.offset.n = 0; yylhsminor.yy280.token = yymsp[-3].minor.yy40;}
#line 3633 "sql.c"
#line 3653 "sql.c"
yymsp[-3].minor.yy280 = yylhsminor.yy280;
break;
case 193: /* interval_option ::= intervalKey LP tmvar COMMA tmvar RP */
#line 578 "sql.y"
{yylhsminor.yy280.interval = yymsp[-3].minor.yy0; yylhsminor.yy280.offset = yymsp[-1].minor.yy0; yylhsminor.yy280.token = yymsp[-5].minor.yy40;}
#line 3639 "sql.c"
#line 3659 "sql.c"
yymsp[-5].minor.yy280 = yylhsminor.yy280;
break;
case 194: /* interval_option ::= */
#line 579 "sql.y"
{memset(&yymsp[1].minor.yy280, 0, sizeof(yymsp[1].minor.yy280));}
#line 3645 "sql.c"
#line 3665 "sql.c"
break;
case 195: /* intervalKey ::= INTERVAL */
#line 582 "sql.y"
{yymsp[0].minor.yy40 = TK_INTERVAL;}
#line 3650 "sql.c"
#line 3670 "sql.c"
break;
case 196: /* intervalKey ::= EVERY */
#line 583 "sql.y"
{yymsp[0].minor.yy40 = TK_EVERY; }
#line 3655 "sql.c"
#line 3675 "sql.c"
break;
case 197: /* session_option ::= */
#line 586 "sql.y"
{yymsp[1].minor.yy295.col.n = 0; yymsp[1].minor.yy295.gap.n = 0;}
#line 3660 "sql.c"
#line 3680 "sql.c"
break;
case 198: /* session_option ::= SESSION LP ids cpxName COMMA tmvar RP */
#line 587 "sql.y"
......@@ -3666,22 +3686,22 @@ static YYACTIONTYPE yy_reduce(
yymsp[-6].minor.yy295.col = yymsp[-4].minor.yy0;
yymsp[-6].minor.yy295.gap = yymsp[-1].minor.yy0;
}
#line 3669 "sql.c"
#line 3689 "sql.c"
break;
case 199: /* windowstate_option ::= */
#line 594 "sql.y"
{ yymsp[1].minor.yy432.col.n = 0; yymsp[1].minor.yy432.col.z = NULL;}
#line 3674 "sql.c"
#line 3694 "sql.c"
break;
case 200: /* windowstate_option ::= STATE_WINDOW LP ids RP */
#line 595 "sql.y"
{ yymsp[-3].minor.yy432.col = yymsp[-1].minor.yy0; }
#line 3679 "sql.c"
#line 3699 "sql.c"
break;
case 201: /* fill_opt ::= */
#line 599 "sql.y"
{ yymsp[1].minor.yy345 = 0; }
#line 3684 "sql.c"
#line 3704 "sql.c"
break;
case 202: /* fill_opt ::= FILL LP ID COMMA tagitemlist RP */
#line 600 "sql.y"
......@@ -3693,7 +3713,7 @@ static YYACTIONTYPE yy_reduce(
tVariantListInsert(yymsp[-1].minor.yy345, &A, -1, 0);
yymsp[-5].minor.yy345 = yymsp[-1].minor.yy345;
}
#line 3696 "sql.c"
#line 3716 "sql.c"
break;
case 203: /* fill_opt ::= FILL LP ID RP */
#line 609 "sql.y"
......@@ -3701,406 +3721,444 @@ static YYACTIONTYPE yy_reduce(
toTSDBType(yymsp[-1].minor.yy0.type);
yymsp[-3].minor.yy345 = tVariantListAppendToken(NULL, &yymsp[-1].minor.yy0, -1);
}
#line 3704 "sql.c"
#line 3724 "sql.c"
break;
case 204: /* sliding_opt ::= SLIDING LP tmvar RP */
#line 615 "sql.y"
{yymsp[-3].minor.yy0 = yymsp[-1].minor.yy0; }
#line 3709 "sql.c"
#line 3729 "sql.c"
break;
case 205: /* sliding_opt ::= */
#line 616 "sql.y"
{yymsp[1].minor.yy0.n = 0; yymsp[1].minor.yy0.z = NULL; yymsp[1].minor.yy0.type = 0; }
#line 3714 "sql.c"
#line 3734 "sql.c"
break;
case 207: /* orderby_opt ::= ORDER BY sortlist */
#line 628 "sql.y"
#line 625 "sql.y"
{yymsp[-2].minor.yy345 = yymsp[0].minor.yy345;}
#line 3719 "sql.c"
#line 3739 "sql.c"
break;
case 208: /* sortlist ::= sortlist COMMA item sortorder */
#line 630 "sql.y"
#line 627 "sql.y"
{
yylhsminor.yy345 = tVariantListAppend(yymsp[-3].minor.yy345, &yymsp[-1].minor.yy2, yymsp[0].minor.yy281);
yylhsminor.yy345 = commonItemAppend(yymsp[-3].minor.yy345, &yymsp[-1].minor.yy2, NULL, false, yymsp[0].minor.yy281);
}
#line 3726 "sql.c"
#line 3746 "sql.c"
yymsp[-3].minor.yy345 = yylhsminor.yy345;
break;
case 209: /* sortlist ::= item sortorder */
#line 634 "sql.y"
case 209: /* sortlist ::= sortlist COMMA arrow sortorder */
#line 631 "sql.y"
{
yylhsminor.yy345 = tVariantListAppend(NULL, &yymsp[-1].minor.yy2, yymsp[0].minor.yy281);
yylhsminor.yy345 = commonItemAppend(yymsp[-3].minor.yy345, NULL, yymsp[-1].minor.yy418, true, yymsp[0].minor.yy281);
}
#line 3734 "sql.c"
#line 3754 "sql.c"
yymsp[-3].minor.yy345 = yylhsminor.yy345;
break;
case 210: /* sortlist ::= item sortorder */
#line 635 "sql.y"
{
yylhsminor.yy345 = commonItemAppend(NULL, &yymsp[-1].minor.yy2, NULL, false, yymsp[0].minor.yy281);
}
#line 3762 "sql.c"
yymsp[-1].minor.yy345 = yylhsminor.yy345;
break;
case 210: /* item ::= ids cpxName */
case 211: /* sortlist ::= arrow sortorder */
#line 639 "sql.y"
{
toTSDBType(yymsp[-1].minor.yy0.type);
yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n;
tVariantCreate(&yylhsminor.yy2, &yymsp[-1].minor.yy0);
yylhsminor.yy345 = commonItemAppend(NULL, NULL, yymsp[-1].minor.yy418, true, yymsp[0].minor.yy281);
}
#line 3745 "sql.c"
yymsp[-1].minor.yy2 = yylhsminor.yy2;
#line 3770 "sql.c"
yymsp[-1].minor.yy345 = yylhsminor.yy345;
break;
case 213: /* item ::= ID DOT ID */
#line 645 "sql.y"
{
toTSDBType(yymsp[-2].minor.yy0.type);
yymsp[-2].minor.yy0.n += yymsp[0].minor.yy0.n;
tVariantCreate(&yylhsminor.yy2, &yymsp[-2].minor.yy0);
}
#line 3780 "sql.c"
yymsp[-2].minor.yy2 = yylhsminor.yy2;
break;
case 211: /* sortorder ::= ASC */
#line 647 "sql.y"
case 214: /* sortorder ::= ASC */
#line 652 "sql.y"
{ yymsp[0].minor.yy281 = TSDB_ORDER_ASC; }
#line 3751 "sql.c"
#line 3786 "sql.c"
break;
case 212: /* sortorder ::= DESC */
#line 648 "sql.y"
case 215: /* sortorder ::= DESC */
#line 653 "sql.y"
{ yymsp[0].minor.yy281 = TSDB_ORDER_DESC;}
#line 3756 "sql.c"
#line 3791 "sql.c"
break;
case 213: /* sortorder ::= */
#line 649 "sql.y"
case 216: /* sortorder ::= */
#line 654 "sql.y"
{ yymsp[1].minor.yy281 = TSDB_ORDER_ASC; }
#line 3761 "sql.c"
#line 3796 "sql.c"
break;
case 214: /* groupby_opt ::= */
#line 657 "sql.y"
case 217: /* groupby_opt ::= */
#line 662 "sql.y"
{ yymsp[1].minor.yy345 = 0;}
#line 3766 "sql.c"
#line 3801 "sql.c"
break;
case 215: /* groupby_opt ::= GROUP BY grouplist */
#line 658 "sql.y"
case 218: /* groupby_opt ::= GROUP BY grouplist */
#line 663 "sql.y"
{ yymsp[-2].minor.yy345 = yymsp[0].minor.yy345;}
#line 3771 "sql.c"
#line 3806 "sql.c"
break;
case 216: /* grouplist ::= grouplist COMMA item */
#line 660 "sql.y"
case 219: /* grouplist ::= grouplist COMMA item */
#line 665 "sql.y"
{
yylhsminor.yy345 = tVariantListAppend(yymsp[-2].minor.yy345, &yymsp[0].minor.yy2, -1);
yylhsminor.yy345 = commonItemAppend(yymsp[-2].minor.yy345, &yymsp[0].minor.yy2, NULL, false, -1);
}
#line 3778 "sql.c"
#line 3813 "sql.c"
yymsp[-2].minor.yy345 = yylhsminor.yy345;
break;
case 217: /* grouplist ::= item */
#line 664 "sql.y"
case 220: /* grouplist ::= grouplist COMMA arrow */
#line 669 "sql.y"
{
yylhsminor.yy345 = tVariantListAppend(NULL, &yymsp[0].minor.yy2, -1);
yylhsminor.yy345 = commonItemAppend(yymsp[-2].minor.yy345, NULL, yymsp[0].minor.yy418, true, -1);
}
#line 3786 "sql.c"
#line 3821 "sql.c"
yymsp[-2].minor.yy345 = yylhsminor.yy345;
break;
case 221: /* grouplist ::= item */
#line 673 "sql.y"
{
yylhsminor.yy345 = commonItemAppend(NULL, &yymsp[0].minor.yy2, NULL, false, -1);
}
#line 3829 "sql.c"
yymsp[0].minor.yy345 = yylhsminor.yy345;
break;
case 222: /* grouplist ::= arrow */
#line 677 "sql.y"
{
yylhsminor.yy345 = commonItemAppend(NULL, NULL, yymsp[0].minor.yy418, true, -1);
}
#line 3837 "sql.c"
yymsp[0].minor.yy345 = yylhsminor.yy345;
break;
case 218: /* having_opt ::= */
case 228: /* where_opt ::= */ yytestcase(yyruleno==228);
case 274: /* expritem ::= */ yytestcase(yyruleno==274);
#line 671 "sql.y"
case 223: /* having_opt ::= */
case 233: /* where_opt ::= */ yytestcase(yyruleno==233);
case 281: /* expritem ::= */ yytestcase(yyruleno==281);
#line 684 "sql.y"
{yymsp[1].minor.yy418 = 0;}
#line 3794 "sql.c"
#line 3845 "sql.c"
break;
case 219: /* having_opt ::= HAVING expr */
case 229: /* where_opt ::= WHERE expr */ yytestcase(yyruleno==229);
#line 672 "sql.y"
case 224: /* having_opt ::= HAVING expr */
case 234: /* where_opt ::= WHERE expr */ yytestcase(yyruleno==234);
#line 685 "sql.y"
{yymsp[-1].minor.yy418 = yymsp[0].minor.yy418;}
#line 3800 "sql.c"
#line 3851 "sql.c"
break;
case 220: /* limit_opt ::= */
case 224: /* slimit_opt ::= */ yytestcase(yyruleno==224);
#line 676 "sql.y"
case 225: /* limit_opt ::= */
case 229: /* slimit_opt ::= */ yytestcase(yyruleno==229);
#line 689 "sql.y"
{yymsp[1].minor.yy114.limit = -1; yymsp[1].minor.yy114.offset = 0;}
#line 3806 "sql.c"
#line 3857 "sql.c"
break;
case 221: /* limit_opt ::= LIMIT signed */
case 225: /* slimit_opt ::= SLIMIT signed */ yytestcase(yyruleno==225);
#line 677 "sql.y"
case 226: /* limit_opt ::= LIMIT signed */
case 230: /* slimit_opt ::= SLIMIT signed */ yytestcase(yyruleno==230);
#line 690 "sql.y"
{yymsp[-1].minor.yy114.limit = yymsp[0].minor.yy525; yymsp[-1].minor.yy114.offset = 0;}
#line 3812 "sql.c"
#line 3863 "sql.c"
break;
case 222: /* limit_opt ::= LIMIT signed OFFSET signed */
#line 679 "sql.y"
case 227: /* limit_opt ::= LIMIT signed OFFSET signed */
#line 692 "sql.y"
{ yymsp[-3].minor.yy114.limit = yymsp[-2].minor.yy525; yymsp[-3].minor.yy114.offset = yymsp[0].minor.yy525;}
#line 3817 "sql.c"
#line 3868 "sql.c"
break;
case 223: /* limit_opt ::= LIMIT signed COMMA signed */
#line 681 "sql.y"
case 228: /* limit_opt ::= LIMIT signed COMMA signed */
#line 694 "sql.y"
{ yymsp[-3].minor.yy114.limit = yymsp[0].minor.yy525; yymsp[-3].minor.yy114.offset = yymsp[-2].minor.yy525;}
#line 3822 "sql.c"
#line 3873 "sql.c"
break;
case 226: /* slimit_opt ::= SLIMIT signed SOFFSET signed */
#line 687 "sql.y"
case 231: /* slimit_opt ::= SLIMIT signed SOFFSET signed */
#line 700 "sql.y"
{yymsp[-3].minor.yy114.limit = yymsp[-2].minor.yy525; yymsp[-3].minor.yy114.offset = yymsp[0].minor.yy525;}
#line 3827 "sql.c"
#line 3878 "sql.c"
break;
case 227: /* slimit_opt ::= SLIMIT signed COMMA signed */
#line 689 "sql.y"
case 232: /* slimit_opt ::= SLIMIT signed COMMA signed */
#line 702 "sql.y"
{yymsp[-3].minor.yy114.limit = yymsp[0].minor.yy525; yymsp[-3].minor.yy114.offset = yymsp[-2].minor.yy525;}
#line 3832 "sql.c"
#line 3883 "sql.c"
break;
case 230: /* expr ::= LP expr RP */
#line 702 "sql.y"
case 235: /* expr ::= LP expr RP */
#line 715 "sql.y"
{yylhsminor.yy418 = yymsp[-1].minor.yy418; yylhsminor.yy418->exprToken.z = yymsp[-2].minor.yy0.z; yylhsminor.yy418->exprToken.n = (yymsp[0].minor.yy0.z - yymsp[-2].minor.yy0.z + 1);}
#line 3837 "sql.c"
#line 3888 "sql.c"
yymsp[-2].minor.yy418 = yylhsminor.yy418;
break;
case 231: /* expr ::= ID */
#line 704 "sql.y"
case 236: /* expr ::= ID */
#line 717 "sql.y"
{ yylhsminor.yy418 = tSqlExprCreateIdValue(pInfo, &yymsp[0].minor.yy0, TK_ID);}
#line 3843 "sql.c"
#line 3894 "sql.c"
yymsp[0].minor.yy418 = yylhsminor.yy418;
break;
case 232: /* expr ::= ID DOT ID */
#line 705 "sql.y"
case 237: /* expr ::= ID DOT ID */
#line 718 "sql.y"
{ yymsp[-2].minor.yy0.n += (1+yymsp[0].minor.yy0.n); yylhsminor.yy418 = tSqlExprCreateIdValue(pInfo, &yymsp[-2].minor.yy0, TK_ID);}
#line 3849 "sql.c"
#line 3900 "sql.c"
yymsp[-2].minor.yy418 = yylhsminor.yy418;
break;
case 233: /* expr ::= ID DOT STAR */
#line 706 "sql.y"
case 238: /* expr ::= ID DOT STAR */
#line 719 "sql.y"
{ yymsp[-2].minor.yy0.n += (1+yymsp[0].minor.yy0.n); yylhsminor.yy418 = tSqlExprCreateIdValue(pInfo, &yymsp[-2].minor.yy0, TK_ALL);}
#line 3855 "sql.c"
#line 3906 "sql.c"
yymsp[-2].minor.yy418 = yylhsminor.yy418;
break;
case 234: /* expr ::= INTEGER */
#line 708 "sql.y"
case 239: /* expr ::= INTEGER */
#line 721 "sql.y"
{ yylhsminor.yy418 = tSqlExprCreateIdValue(pInfo, &yymsp[0].minor.yy0, TK_INTEGER);}
#line 3861 "sql.c"
#line 3912 "sql.c"
yymsp[0].minor.yy418 = yylhsminor.yy418;
break;
case 235: /* expr ::= MINUS INTEGER */
case 236: /* expr ::= PLUS INTEGER */ yytestcase(yyruleno==236);
#line 709 "sql.y"
case 240: /* expr ::= MINUS INTEGER */
case 241: /* expr ::= PLUS INTEGER */ yytestcase(yyruleno==241);
#line 722 "sql.y"
{ yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yymsp[-1].minor.yy0.type = TK_INTEGER; yylhsminor.yy418 = tSqlExprCreateIdValue(pInfo, &yymsp[-1].minor.yy0, TK_INTEGER);}
#line 3868 "sql.c"
#line 3919 "sql.c"
yymsp[-1].minor.yy418 = yylhsminor.yy418;
break;
case 237: /* expr ::= FLOAT */
#line 711 "sql.y"
case 242: /* expr ::= FLOAT */
#line 724 "sql.y"
{ yylhsminor.yy418 = tSqlExprCreateIdValue(pInfo, &yymsp[0].minor.yy0, TK_FLOAT);}
#line 3874 "sql.c"
#line 3925 "sql.c"
yymsp[0].minor.yy418 = yylhsminor.yy418;
break;
case 238: /* expr ::= MINUS FLOAT */
case 239: /* expr ::= PLUS FLOAT */ yytestcase(yyruleno==239);
#line 712 "sql.y"
case 243: /* expr ::= MINUS FLOAT */
case 244: /* expr ::= PLUS FLOAT */ yytestcase(yyruleno==244);
#line 725 "sql.y"
{ yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yymsp[-1].minor.yy0.type = TK_FLOAT; yylhsminor.yy418 = tSqlExprCreateIdValue(pInfo, &yymsp[-1].minor.yy0, TK_FLOAT);}
#line 3881 "sql.c"
#line 3932 "sql.c"
yymsp[-1].minor.yy418 = yylhsminor.yy418;
break;
case 240: /* expr ::= STRING */
#line 714 "sql.y"
case 245: /* expr ::= STRING */
#line 727 "sql.y"
{ yylhsminor.yy418 = tSqlExprCreateIdValue(pInfo, &yymsp[0].minor.yy0, TK_STRING);}
#line 3887 "sql.c"
#line 3938 "sql.c"
yymsp[0].minor.yy418 = yylhsminor.yy418;
break;
case 241: /* expr ::= NOW */
#line 715 "sql.y"
case 246: /* expr ::= NOW */
#line 728 "sql.y"
{ yylhsminor.yy418 = tSqlExprCreateIdValue(pInfo, &yymsp[0].minor.yy0, TK_NOW); }
#line 3893 "sql.c"
#line 3944 "sql.c"
yymsp[0].minor.yy418 = yylhsminor.yy418;
break;
case 242: /* expr ::= VARIABLE */
#line 716 "sql.y"
case 247: /* expr ::= VARIABLE */
#line 729 "sql.y"
{ yylhsminor.yy418 = tSqlExprCreateIdValue(pInfo, &yymsp[0].minor.yy0, TK_VARIABLE);}
#line 3899 "sql.c"
#line 3950 "sql.c"
yymsp[0].minor.yy418 = yylhsminor.yy418;
break;
case 243: /* expr ::= PLUS VARIABLE */
case 244: /* expr ::= MINUS VARIABLE */ yytestcase(yyruleno==244);
#line 717 "sql.y"
case 248: /* expr ::= PLUS VARIABLE */
case 249: /* expr ::= MINUS VARIABLE */ yytestcase(yyruleno==249);
#line 730 "sql.y"
{ yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yymsp[-1].minor.yy0.type = TK_VARIABLE; yylhsminor.yy418 = tSqlExprCreateIdValue(pInfo, &yymsp[-1].minor.yy0, TK_VARIABLE);}
#line 3906 "sql.c"
#line 3957 "sql.c"
yymsp[-1].minor.yy418 = yylhsminor.yy418;
break;
case 245: /* expr ::= BOOL */
#line 719 "sql.y"
case 250: /* expr ::= BOOL */
#line 732 "sql.y"
{ yylhsminor.yy418 = tSqlExprCreateIdValue(pInfo, &yymsp[0].minor.yy0, TK_BOOL);}
#line 3912 "sql.c"
#line 3963 "sql.c"
yymsp[0].minor.yy418 = yylhsminor.yy418;
break;
case 246: /* expr ::= NULL */
#line 720 "sql.y"
case 251: /* expr ::= NULL */
#line 733 "sql.y"
{ yylhsminor.yy418 = tSqlExprCreateIdValue(pInfo, &yymsp[0].minor.yy0, TK_NULL);}
#line 3918 "sql.c"
#line 3969 "sql.c"
yymsp[0].minor.yy418 = yylhsminor.yy418;
break;
case 247: /* expr ::= ID LP exprlist RP */
#line 723 "sql.y"
case 252: /* expr ::= ID LP exprlist RP */
#line 736 "sql.y"
{ tStrTokenAppend(pInfo->funcs, &yymsp[-3].minor.yy0); yylhsminor.yy418 = tSqlExprCreateFunction(yymsp[-1].minor.yy345, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, yymsp[-3].minor.yy0.type); }
#line 3924 "sql.c"
#line 3975 "sql.c"
yymsp[-3].minor.yy418 = yylhsminor.yy418;
break;
case 248: /* expr ::= ID LP STAR RP */
#line 726 "sql.y"
case 253: /* expr ::= ID LP STAR RP */
#line 739 "sql.y"
{ tStrTokenAppend(pInfo->funcs, &yymsp[-3].minor.yy0); yylhsminor.yy418 = tSqlExprCreateFunction(NULL, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, yymsp[-3].minor.yy0.type); }
#line 3930 "sql.c"
#line 3981 "sql.c"
yymsp[-3].minor.yy418 = yylhsminor.yy418;
break;
case 249: /* expr ::= expr IS NULL */
#line 729 "sql.y"
case 254: /* expr ::= expr IS NULL */
#line 742 "sql.y"
{yylhsminor.yy418 = tSqlExprCreate(yymsp[-2].minor.yy418, NULL, TK_ISNULL);}
#line 3936 "sql.c"
#line 3987 "sql.c"
yymsp[-2].minor.yy418 = yylhsminor.yy418;
break;
case 250: /* expr ::= expr IS NOT NULL */
#line 730 "sql.y"
case 255: /* expr ::= expr IS NOT NULL */
#line 743 "sql.y"
{yylhsminor.yy418 = tSqlExprCreate(yymsp[-3].minor.yy418, NULL, TK_NOTNULL);}
#line 3942 "sql.c"
#line 3993 "sql.c"
yymsp[-3].minor.yy418 = yylhsminor.yy418;
break;
case 251: /* expr ::= expr LT expr */
#line 733 "sql.y"
case 256: /* expr ::= expr LT expr */
#line 746 "sql.y"
{yylhsminor.yy418 = tSqlExprCreate(yymsp[-2].minor.yy418, yymsp[0].minor.yy418, TK_LT);}
#line 3948 "sql.c"
#line 3999 "sql.c"
yymsp[-2].minor.yy418 = yylhsminor.yy418;
break;
case 252: /* expr ::= expr GT expr */
#line 734 "sql.y"
case 257: /* expr ::= expr GT expr */
#line 747 "sql.y"
{yylhsminor.yy418 = tSqlExprCreate(yymsp[-2].minor.yy418, yymsp[0].minor.yy418, TK_GT);}
#line 3954 "sql.c"
#line 4005 "sql.c"
yymsp[-2].minor.yy418 = yylhsminor.yy418;
break;
case 253: /* expr ::= expr LE expr */
#line 735 "sql.y"
case 258: /* expr ::= expr LE expr */
#line 748 "sql.y"
{yylhsminor.yy418 = tSqlExprCreate(yymsp[-2].minor.yy418, yymsp[0].minor.yy418, TK_LE);}
#line 3960 "sql.c"
#line 4011 "sql.c"
yymsp[-2].minor.yy418 = yylhsminor.yy418;
break;
case 254: /* expr ::= expr GE expr */
#line 736 "sql.y"
case 259: /* expr ::= expr GE expr */
#line 749 "sql.y"
{yylhsminor.yy418 = tSqlExprCreate(yymsp[-2].minor.yy418, yymsp[0].minor.yy418, TK_GE);}
#line 3966 "sql.c"
#line 4017 "sql.c"
yymsp[-2].minor.yy418 = yylhsminor.yy418;
break;
case 255: /* expr ::= expr NE expr */
#line 737 "sql.y"
case 260: /* expr ::= expr NE expr */
#line 750 "sql.y"
{yylhsminor.yy418 = tSqlExprCreate(yymsp[-2].minor.yy418, yymsp[0].minor.yy418, TK_NE);}
#line 3972 "sql.c"
#line 4023 "sql.c"
yymsp[-2].minor.yy418 = yylhsminor.yy418;
break;
case 256: /* expr ::= expr EQ expr */
#line 738 "sql.y"
case 261: /* expr ::= expr EQ expr */
#line 751 "sql.y"
{yylhsminor.yy418 = tSqlExprCreate(yymsp[-2].minor.yy418, yymsp[0].minor.yy418, TK_EQ);}
#line 3978 "sql.c"
#line 4029 "sql.c"
yymsp[-2].minor.yy418 = yylhsminor.yy418;
break;
case 257: /* expr ::= expr BETWEEN expr AND expr */
#line 740 "sql.y"
case 262: /* expr ::= expr BETWEEN expr AND expr */
#line 753 "sql.y"
{ tSqlExpr* X2 = tSqlExprClone(yymsp[-4].minor.yy418); yylhsminor.yy418 = tSqlExprCreate(tSqlExprCreate(yymsp[-4].minor.yy418, yymsp[-2].minor.yy418, TK_GE), tSqlExprCreate(X2, yymsp[0].minor.yy418, TK_LE), TK_AND);}
#line 3984 "sql.c"
#line 4035 "sql.c"
yymsp[-4].minor.yy418 = yylhsminor.yy418;
break;
case 258: /* expr ::= expr AND expr */
#line 742 "sql.y"
case 263: /* expr ::= expr AND expr */
#line 755 "sql.y"
{yylhsminor.yy418 = tSqlExprCreate(yymsp[-2].minor.yy418, yymsp[0].minor.yy418, TK_AND);}
#line 3990 "sql.c"
#line 4041 "sql.c"
yymsp[-2].minor.yy418 = yylhsminor.yy418;
break;
case 259: /* expr ::= expr OR expr */
#line 743 "sql.y"
case 264: /* expr ::= expr OR expr */
#line 756 "sql.y"
{yylhsminor.yy418 = tSqlExprCreate(yymsp[-2].minor.yy418, yymsp[0].minor.yy418, TK_OR); }
#line 3996 "sql.c"
#line 4047 "sql.c"
yymsp[-2].minor.yy418 = yylhsminor.yy418;
break;
case 260: /* expr ::= expr PLUS expr */
#line 746 "sql.y"
case 265: /* expr ::= expr PLUS expr */
#line 759 "sql.y"
{yylhsminor.yy418 = tSqlExprCreate(yymsp[-2].minor.yy418, yymsp[0].minor.yy418, TK_PLUS); }
#line 4002 "sql.c"
#line 4053 "sql.c"
yymsp[-2].minor.yy418 = yylhsminor.yy418;
break;
case 261: /* expr ::= expr MINUS expr */
#line 747 "sql.y"
case 266: /* expr ::= expr MINUS expr */
#line 760 "sql.y"
{yylhsminor.yy418 = tSqlExprCreate(yymsp[-2].minor.yy418, yymsp[0].minor.yy418, TK_MINUS); }
#line 4008 "sql.c"
#line 4059 "sql.c"
yymsp[-2].minor.yy418 = yylhsminor.yy418;
break;
case 262: /* expr ::= expr STAR expr */
#line 748 "sql.y"
case 267: /* expr ::= expr STAR expr */
#line 761 "sql.y"
{yylhsminor.yy418 = tSqlExprCreate(yymsp[-2].minor.yy418, yymsp[0].minor.yy418, TK_STAR); }
#line 4014 "sql.c"
#line 4065 "sql.c"
yymsp[-2].minor.yy418 = yylhsminor.yy418;
break;
case 263: /* expr ::= expr SLASH expr */
#line 749 "sql.y"
case 268: /* expr ::= expr SLASH expr */
#line 762 "sql.y"
{yylhsminor.yy418 = tSqlExprCreate(yymsp[-2].minor.yy418, yymsp[0].minor.yy418, TK_DIVIDE);}
#line 4020 "sql.c"
#line 4071 "sql.c"
yymsp[-2].minor.yy418 = yylhsminor.yy418;
break;
case 264: /* expr ::= expr REM expr */
#line 750 "sql.y"
case 269: /* expr ::= expr REM expr */
#line 763 "sql.y"
{yylhsminor.yy418 = tSqlExprCreate(yymsp[-2].minor.yy418, yymsp[0].minor.yy418, TK_REM); }
#line 4026 "sql.c"
#line 4077 "sql.c"
yymsp[-2].minor.yy418 = yylhsminor.yy418;
break;
case 265: /* expr ::= expr LIKE expr */
#line 753 "sql.y"
case 270: /* expr ::= expr LIKE expr */
#line 766 "sql.y"
{yylhsminor.yy418 = tSqlExprCreate(yymsp[-2].minor.yy418, yymsp[0].minor.yy418, TK_LIKE); }
#line 4032 "sql.c"
#line 4083 "sql.c"
yymsp[-2].minor.yy418 = yylhsminor.yy418;
break;
case 266: /* expr ::= expr MATCH expr */
#line 756 "sql.y"
case 271: /* expr ::= expr MATCH expr */
#line 769 "sql.y"
{yylhsminor.yy418 = tSqlExprCreate(yymsp[-2].minor.yy418, yymsp[0].minor.yy418, TK_MATCH); }
#line 4038 "sql.c"
#line 4089 "sql.c"
yymsp[-2].minor.yy418 = yylhsminor.yy418;
break;
case 267: /* expr ::= expr NMATCH expr */
#line 757 "sql.y"
case 272: /* expr ::= expr NMATCH expr */
#line 770 "sql.y"
{yylhsminor.yy418 = tSqlExprCreate(yymsp[-2].minor.yy418, yymsp[0].minor.yy418, TK_NMATCH); }
#line 4044 "sql.c"
#line 4095 "sql.c"
yymsp[-2].minor.yy418 = yylhsminor.yy418;
break;
case 268: /* expr ::= expr QUESTION expr */
#line 760 "sql.y"
{yylhsminor.yy418 = tSqlExprCreate(yymsp[-2].minor.yy418, yymsp[0].minor.yy418, TK_QUESTION); }
#line 4050 "sql.c"
case 273: /* expr ::= ID QUESTION STRING */
#line 773 "sql.y"
{ tSqlExpr* S = tSqlExprCreateIdValue(pInfo, &yymsp[-2].minor.yy0, TK_ID); tSqlExpr* M = tSqlExprCreateIdValue(pInfo, &yymsp[0].minor.yy0, TK_STRING); yylhsminor.yy418 = tSqlExprCreate(S, M, TK_QUESTION); }
#line 4101 "sql.c"
yymsp[-2].minor.yy418 = yylhsminor.yy418;
break;
case 269: /* expr ::= expr ARROW expr */
#line 763 "sql.y"
{yylhsminor.yy418 = tSqlExprCreate(yymsp[-2].minor.yy418, yymsp[0].minor.yy418, TK_ARROW); }
#line 4056 "sql.c"
case 274: /* arrow ::= ID ARROW STRING */
#line 778 "sql.y"
{tSqlExpr* S = tSqlExprCreateIdValue(pInfo, &yymsp[-2].minor.yy0, TK_ID); tSqlExpr* M = tSqlExprCreateIdValue(pInfo, &yymsp[0].minor.yy0, TK_STRING); yylhsminor.yy418 = tSqlExprCreate(S, M, TK_ARROW); }
#line 4107 "sql.c"
yymsp[-2].minor.yy418 = yylhsminor.yy418;
break;
case 270: /* expr ::= expr IN LP exprlist RP */
#line 766 "sql.y"
case 275: /* arrow ::= ID DOT ID ARROW STRING */
#line 779 "sql.y"
{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.yy418 = tSqlExprCreate(S, M, TK_ARROW); }
#line 4113 "sql.c"
yymsp[-4].minor.yy418 = yylhsminor.yy418;
break;
case 276: /* expr ::= arrow */
case 280: /* expritem ::= expr */ yytestcase(yyruleno==280);
#line 781 "sql.y"
{yylhsminor.yy418 = yymsp[0].minor.yy418;}
#line 4120 "sql.c"
yymsp[0].minor.yy418 = yylhsminor.yy418;
break;
case 277: /* expr ::= expr IN LP exprlist RP */
#line 784 "sql.y"
{yylhsminor.yy418 = tSqlExprCreate(yymsp[-4].minor.yy418, (tSqlExpr*)yymsp[-1].minor.yy345, TK_IN); }
#line 4062 "sql.c"
#line 4126 "sql.c"
yymsp[-4].minor.yy418 = yylhsminor.yy418;
break;
case 271: /* exprlist ::= exprlist COMMA expritem */
#line 774 "sql.y"
case 278: /* exprlist ::= exprlist COMMA expritem */
#line 792 "sql.y"
{yylhsminor.yy345 = tSqlExprListAppend(yymsp[-2].minor.yy345,yymsp[0].minor.yy418,0, 0);}
#line 4068 "sql.c"
#line 4132 "sql.c"
yymsp[-2].minor.yy345 = yylhsminor.yy345;
break;
case 272: /* exprlist ::= expritem */
#line 775 "sql.y"
case 279: /* exprlist ::= expritem */
#line 793 "sql.y"
{yylhsminor.yy345 = tSqlExprListAppend(0,yymsp[0].minor.yy418,0, 0);}
#line 4074 "sql.c"
#line 4138 "sql.c"
yymsp[0].minor.yy345 = yylhsminor.yy345;
break;
case 273: /* expritem ::= expr */
#line 776 "sql.y"
{yylhsminor.yy418 = yymsp[0].minor.yy418;}
#line 4080 "sql.c"
yymsp[0].minor.yy418 = yylhsminor.yy418;
break;
case 275: /* cmd ::= RESET QUERY CACHE */
#line 780 "sql.y"
case 282: /* cmd ::= RESET QUERY CACHE */
#line 798 "sql.y"
{ setDCLSqlElems(pInfo, TSDB_SQL_RESET_CACHE, 0);}
#line 4086 "sql.c"
#line 4144 "sql.c"
break;
case 276: /* cmd ::= SYNCDB ids REPLICA */
#line 783 "sql.y"
case 283: /* cmd ::= SYNCDB ids REPLICA */
#line 801 "sql.y"
{ setDCLSqlElems(pInfo, TSDB_SQL_SYNC_DB_REPLICA, 1, &yymsp[-1].minor.yy0);}
#line 4091 "sql.c"
#line 4149 "sql.c"
break;
case 277: /* cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */
#line 786 "sql.y"
case 284: /* cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */
#line 804 "sql.y"
{
yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n;
SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy345, NULL, TSDB_ALTER_TABLE_ADD_COLUMN, -1);
setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE);
}
#line 4100 "sql.c"
#line 4158 "sql.c"
break;
case 278: /* cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */
#line 792 "sql.y"
case 285: /* cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */
#line 810 "sql.y"
{
yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n;
......@@ -4110,28 +4168,28 @@ static YYACTIONTYPE yy_reduce(
SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, NULL, K, TSDB_ALTER_TABLE_DROP_COLUMN, -1);
setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE);
}
#line 4113 "sql.c"
#line 4171 "sql.c"
break;
case 279: /* cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */
#line 802 "sql.y"
case 286: /* cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */
#line 820 "sql.y"
{
yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n;
SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy345, NULL, TSDB_ALTER_TABLE_CHANGE_COLUMN, -1);
setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE);
}
#line 4122 "sql.c"
#line 4180 "sql.c"
break;
case 280: /* cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */
#line 809 "sql.y"
case 287: /* cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */
#line 827 "sql.y"
{
yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n;
SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy345, NULL, TSDB_ALTER_TABLE_ADD_TAG_COLUMN, -1);
setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE);
}
#line 4131 "sql.c"
#line 4189 "sql.c"
break;
case 281: /* cmd ::= ALTER TABLE ids cpxName DROP TAG ids */
#line 814 "sql.y"
case 288: /* cmd ::= ALTER TABLE ids cpxName DROP TAG ids */
#line 832 "sql.y"
{
yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n;
......@@ -4141,10 +4199,10 @@ static YYACTIONTYPE yy_reduce(
SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, NULL, A, TSDB_ALTER_TABLE_DROP_TAG_COLUMN, -1);
setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE);
}
#line 4144 "sql.c"
#line 4202 "sql.c"
break;
case 282: /* cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */
#line 824 "sql.y"
case 289: /* cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */
#line 842 "sql.y"
{
yymsp[-5].minor.yy0.n += yymsp[-4].minor.yy0.n;
......@@ -4157,10 +4215,10 @@ static YYACTIONTYPE yy_reduce(
SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-5].minor.yy0, NULL, A, TSDB_ALTER_TABLE_CHANGE_TAG_COLUMN, -1);
setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE);
}
#line 4160 "sql.c"
#line 4218 "sql.c"
break;
case 283: /* cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */
#line 837 "sql.y"
case 290: /* cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */
#line 855 "sql.y"
{
yymsp[-6].minor.yy0.n += yymsp[-5].minor.yy0.n;
......@@ -4171,28 +4229,28 @@ static YYACTIONTYPE yy_reduce(
SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-6].minor.yy0, NULL, A, TSDB_ALTER_TABLE_UPDATE_TAG_VAL, -1);
setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE);
}
#line 4174 "sql.c"
#line 4232 "sql.c"
break;
case 284: /* cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */
#line 848 "sql.y"
case 291: /* cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */
#line 866 "sql.y"
{
yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n;
SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy345, NULL, TSDB_ALTER_TABLE_MODIFY_TAG_COLUMN, -1);
setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE);
}
#line 4183 "sql.c"
#line 4241 "sql.c"
break;
case 285: /* cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */
#line 855 "sql.y"
case 292: /* cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */
#line 873 "sql.y"
{
yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n;
SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy345, NULL, TSDB_ALTER_TABLE_ADD_COLUMN, TSDB_SUPER_TABLE);
setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE);
}
#line 4192 "sql.c"
#line 4250 "sql.c"
break;
case 286: /* cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */
#line 861 "sql.y"
case 293: /* cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */
#line 879 "sql.y"
{
yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n;
......@@ -4202,28 +4260,28 @@ static YYACTIONTYPE yy_reduce(
SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, NULL, K, TSDB_ALTER_TABLE_DROP_COLUMN, TSDB_SUPER_TABLE);
setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE);
}
#line 4205 "sql.c"
#line 4263 "sql.c"
break;
case 287: /* cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */
#line 871 "sql.y"
case 294: /* cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */
#line 889 "sql.y"
{
yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n;
SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy345, NULL, TSDB_ALTER_TABLE_CHANGE_COLUMN, TSDB_SUPER_TABLE);
setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE);
}
#line 4214 "sql.c"
#line 4272 "sql.c"
break;
case 288: /* cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */
#line 878 "sql.y"
case 295: /* cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */
#line 896 "sql.y"
{
yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n;
SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy345, NULL, TSDB_ALTER_TABLE_ADD_TAG_COLUMN, TSDB_SUPER_TABLE);
setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE);
}
#line 4223 "sql.c"
#line 4281 "sql.c"
break;
case 289: /* cmd ::= ALTER STABLE ids cpxName DROP TAG ids */
#line 883 "sql.y"
case 296: /* cmd ::= ALTER STABLE ids cpxName DROP TAG ids */
#line 901 "sql.y"
{
yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n;
......@@ -4233,10 +4291,10 @@ static YYACTIONTYPE yy_reduce(
SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, NULL, A, TSDB_ALTER_TABLE_DROP_TAG_COLUMN, TSDB_SUPER_TABLE);
setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE);
}
#line 4236 "sql.c"
#line 4294 "sql.c"
break;
case 290: /* cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */
#line 893 "sql.y"
case 297: /* cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */
#line 911 "sql.y"
{
yymsp[-5].minor.yy0.n += yymsp[-4].minor.yy0.n;
......@@ -4249,10 +4307,10 @@ static YYACTIONTYPE yy_reduce(
SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-5].minor.yy0, NULL, A, TSDB_ALTER_TABLE_CHANGE_TAG_COLUMN, TSDB_SUPER_TABLE);
setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE);
}
#line 4252 "sql.c"
#line 4310 "sql.c"
break;
case 291: /* cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem */
#line 906 "sql.y"
case 298: /* cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem */
#line 924 "sql.y"
{
yymsp[-6].minor.yy0.n += yymsp[-5].minor.yy0.n;
......@@ -4263,31 +4321,31 @@ static YYACTIONTYPE yy_reduce(
SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-6].minor.yy0, NULL, A, TSDB_ALTER_TABLE_UPDATE_TAG_VAL, TSDB_SUPER_TABLE);
setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE);
}
#line 4266 "sql.c"
#line 4324 "sql.c"
break;
case 292: /* cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */
#line 917 "sql.y"
case 299: /* cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */
#line 935 "sql.y"
{
yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n;
SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy345, NULL, TSDB_ALTER_TABLE_MODIFY_TAG_COLUMN, TSDB_SUPER_TABLE);
setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE);
}
#line 4275 "sql.c"
#line 4333 "sql.c"
break;
case 293: /* cmd ::= KILL CONNECTION INTEGER */
#line 924 "sql.y"
case 300: /* cmd ::= KILL CONNECTION INTEGER */
#line 942 "sql.y"
{setKillSql(pInfo, TSDB_SQL_KILL_CONNECTION, &yymsp[0].minor.yy0);}
#line 4280 "sql.c"
#line 4338 "sql.c"
break;
case 294: /* cmd ::= KILL STREAM INTEGER COLON INTEGER */
#line 925 "sql.y"
case 301: /* cmd ::= KILL STREAM INTEGER COLON INTEGER */
#line 943 "sql.y"
{yymsp[-2].minor.yy0.n += (yymsp[-1].minor.yy0.n + yymsp[0].minor.yy0.n); setKillSql(pInfo, TSDB_SQL_KILL_STREAM, &yymsp[-2].minor.yy0);}
#line 4285 "sql.c"
#line 4343 "sql.c"
break;
case 295: /* cmd ::= KILL QUERY INTEGER COLON INTEGER */
#line 926 "sql.y"
case 302: /* cmd ::= KILL QUERY INTEGER COLON INTEGER */
#line 944 "sql.y"
{yymsp[-2].minor.yy0.n += (yymsp[-1].minor.yy0.n + yymsp[0].minor.yy0.n); setKillSql(pInfo, TSDB_SQL_KILL_QUERY, &yymsp[-2].minor.yy0);}
#line 4290 "sql.c"
#line 4348 "sql.c"
break;
default:
break;
......@@ -4372,7 +4430,7 @@ static void yy_syntax_error(
}
assert(len <= outputBufLen);
#line 4375 "sql.c"
#line 4433 "sql.c"
/************ End %syntax_error code ******************************************/
ParseARG_STORE /* Suppress warning about unused %extra_argument variable */
ParseCTX_STORE
......@@ -4399,7 +4457,7 @@ static void yy_accept(
** parser accepts */
/*********** Begin %parse_accept code *****************************************/
#line 62 "sql.y"
#line 4402 "sql.c"
#line 4460 "sql.c"
/*********** End %parse_accept code *******************************************/
ParseARG_STORE /* Suppress warning about unused %extra_argument variable */
ParseCTX_STORE
......
......@@ -38,7 +38,6 @@ char * strntolower_s(char *dst, const char *src, int32_t n);
int64_t strnatoi(char *num, int32_t len);
char * strbetween(char *string, char *begin, char *end);
char * paGetToken(char *src, char **token, int32_t *tokenLen);
int getArrowKV(char* src, int32_t len, char** name, char** key);
int32_t taosByteArrayToHexStr(char bytes[], int32_t len, char hexstr[]);
int32_t taosHexStrToByteArray(char hexstr[], char bytes[]);
......
......@@ -185,21 +185,6 @@ char *strnchr(char *haystack, char needle, int32_t len, bool skipquote) {
return NULL;
}
// src = json->'id' => name=json key=id
int getArrowKV(char* src, int32_t len, char** name, char** key){
char* loc = strstr(src, "->");
if(loc == NULL){return 1;}
if(loc-src + 4 >= len) {return 2;}
if(*(loc+2) != *(src + len - 1)) {return 2;}
if(*(loc+2) != '\'' && *(loc+2) != '"') {return 2;}
*name = calloc(1, loc-src+1);
*key = calloc(1, len - (loc-src+4) + 1);
tstrncpy(*name, src, loc-src+1);
tstrncpy(*key, loc+2, len - (loc-src+4) + 1);
return 0;
}
char *tstrstr(char *src, char *dst, bool ignoreInEsc) {
if (!ignoreInEsc) {
return strstr(src, dst);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册