提交 8880e515 编写于 作者: H Haojun Liao

[td-3949]

上级 f28e7b4e
......@@ -6689,8 +6689,8 @@ int32_t doCheckForStream(SSqlObj* pSql, SSqlInfo* pInfo) {
return invalidSqlErrMsg(tscGetErrorMsgPayload(pCmd), msg6);
}
STableNamePair* p1 = taosArrayGet(pFromInfo->list, 0);
SStrToken srcToken = {.z = p1->name.z, .n = p1->name.n, .type = TK_STRING};
SRelElementPair* p1 = taosArrayGet(pFromInfo->list, 0);
SStrToken srcToken = {.z = p1->tableName.z, .n = p1->tableName.n, .type = TK_STRING};
if (tscValidateName(&srcToken) != TSDB_CODE_SUCCESS) {
return invalidSqlErrMsg(tscGetErrorMsgPayload(pCmd), msg1);
}
......@@ -7085,8 +7085,8 @@ static int32_t doLoadAllTableMeta(SSqlObj* pSql, SQueryInfo* pQueryInfo, SSqlNod
tscAddEmptyMetaInfo(pQueryInfo);
}
STableNamePair *item = taosArrayGet(pSqlNode->from->list, i);
SStrToken *oriName = &item->name;
SRelElementPair *item = taosArrayGet(pSqlNode->from->list, i);
SStrToken *oriName = &item->tableName;
if (oriName->type == TK_INTEGER || oriName->type == TK_FLOAT) {
return invalidSqlErrMsg(tscGetErrorMsgPayload(pCmd), msg1);
......@@ -7284,10 +7284,9 @@ int32_t validateSqlNode(SSqlObj* pSql, SSqlNode* pSqlNode, SQueryInfo* pQueryInf
pQueryInfo->window.skey = pQueryInfo->window.skey / 1000;
pQueryInfo->window.ekey = pQueryInfo->window.ekey / 1000;
}
} else { // set the time rang
if (taosArrayGetSize(pSqlNode->from->list) > 1) {
// If it is a join query, no where clause is not allowed.
return invalidSqlErrMsg(tscGetErrorMsgPayload(pCmd), "condition missing for join query ");
} else {
if (taosArrayGetSize(pSqlNode->from->list) > 1) { // Cross join not allowed yet
return invalidSqlErrMsg(tscGetErrorMsgPayload(pCmd), "cross join not supported yet");
}
}
......
......@@ -107,14 +107,19 @@ typedef struct SSqlNode {
struct tSqlExpr *pHaving; // having clause [optional]
} SSqlNode;
typedef struct STableNamePair {
SStrToken name;
typedef struct SRelElementPair {
union {
SStrToken tableName;
SArray *pSubquery;
//SSqlNode *pSubquery;
};
SStrToken aliasName;
} STableNamePair;
} SRelElementPair;
typedef struct SRelationInfo {
int32_t type; // nested query|table name list
SArray *list; // SArray<STableNamePair>|SArray<SSqlNode*>
SArray *list; // SArray<SRelElementPair>|SArray<SSqlNode*>
} SRelationInfo;
typedef struct SCreatedTableInfo {
......@@ -254,8 +259,9 @@ SArray *tVariantListInsert(SArray *pList, tVariant *pVar, uint8_t sortOrder, int
SArray *tVariantListAppendToken(SArray *pList, SStrToken *pAliasToken, uint8_t sortOrder);
SRelationInfo *setTableNameList(SRelationInfo* pFromInfo, SStrToken *pName, SStrToken* pAlias);
SRelationInfo *setSubquery(SRelationInfo* pFromInfo, SArray* pSqlNode);
//SRelationInfo *setSubquery(SRelationInfo* pFromInfo, SRelElementPair* p);
void *destroyRelationInfo(SRelationInfo* pFromInfo);
SRelationInfo *addSubqueryElem(SRelationInfo* pRelationInfo, SArray* pSub, SStrToken* pAlias);
// sql expr leaf node
tSqlExpr *tSqlExprCreateIdValue(SStrToken *pToken, int32_t optrType);
......
......@@ -508,7 +508,13 @@ distinct(X) ::= . { X.n = 0;}
%type from {SRelationInfo*}
%destructor from {destroyRelationInfo($$);}
from(A) ::= FROM tablelist(X). {A = X;}
from(A) ::= FROM LP union(Y) RP. {A = setSubquery(NULL, Y);}
from(A) ::= FROM sub(X). {A = X;}
%type sub {SRelationInfo*}
%destructor sub {destroyRelationInfo($$);}
sub(A) ::= LP union(Y) RP. {A = addSubqueryElem(NULL, Y, NULL);}
sub(A) ::= LP union(Y) RP ids(Z). {A = addSubqueryElem(NULL, Y, &Z);}
sub(A) ::= sub(X) COMMA LP union(Y) RP ids(Z).{A = addSubqueryElem(X, Y, &Z);}
%type tablelist {SRelationInfo*}
%destructor tablelist {destroyRelationInfo($$);}
......
......@@ -535,11 +535,11 @@ SArray *tVariantListInsert(SArray *pList, tVariant *pVar, uint8_t sortOrder, int
SRelationInfo *setTableNameList(SRelationInfo* pRelationInfo, SStrToken *pName, SStrToken* pAlias) {
if (pRelationInfo == NULL) {
pRelationInfo = calloc(1, sizeof(SRelationInfo));
pRelationInfo->list = taosArrayInit(4, sizeof(STableNamePair));
pRelationInfo->list = taosArrayInit(4, sizeof(SRelElementPair));
}
pRelationInfo->type = SQL_NODE_FROM_TABLELIST;
STableNamePair p = {.name = *pName};
SRelElementPair p = {.tableName = *pName};
if (pAlias != NULL) {
p.aliasName = *pAlias;
} else {
......@@ -550,17 +550,41 @@ SRelationInfo *setTableNameList(SRelationInfo* pRelationInfo, SStrToken *pName,
return pRelationInfo;
}
SRelationInfo* setSubquery(SRelationInfo* pRelationInfo, SArray* pList) {
if (pRelationInfo == NULL) {
pRelationInfo = calloc(1, sizeof(SRelationInfo));
pRelationInfo->list = taosArrayInit(4, POINTER_BYTES);
}
pRelationInfo->type = SQL_NODE_FROM_SUBQUERY;
taosArrayPush(pRelationInfo->list, &pList);
return pRelationInfo;
}
//SRelationInfo* setSubquery(SRelationInfo* pRelationInfo, SArray* pList, SStrToken* pAlias) {
// if (pRelationInfo == NULL) {
// pRelationInfo = calloc(1, sizeof(SRelationInfo));
// pRelationInfo->list = taosArrayInit(4, POINTER_BYTES);
// }
//
// pRelationInfo->type = SQL_NODE_FROM_SUBQUERY;
// SRelElementPair p = {.pSubquery = pList};
// if (pAlias != NULL) {
// p.aliasName = *pAlias;
// } else {
// TPARSER_SET_NONE_TOKEN(p.aliasName);
// }
//
// taosArrayPush(pRelationInfo->list, &p);
// return pRelationInfo;
//}
//SRelationInfo* setSubquery(SRelationInfo* pRelationInfo, SRelElementPair* p) {
// if (pRelationInfo == NULL) {
// pRelationInfo = calloc(1, sizeof(SRelationInfo));
// pRelationInfo->list = taosArrayInit(4, POINTER_BYTES);
// }
//
// pRelationInfo->type = SQL_NODE_FROM_SUBQUERY;
// SRelElementPair elem = *p;
//// if (pAlias != NULL) {
//// p.aliasName = *pAlias;
//// } else {
//// TPARSER_SET_NONE_TOKEN(p.aliasName);
//// }
//
// taosArrayPush(pRelationInfo->list, &p);
// return pRelationInfo;
//}
void* destroyRelationInfo(SRelationInfo* pRelationInfo) {
if (pRelationInfo == NULL) {
......@@ -582,6 +606,25 @@ void* destroyRelationInfo(SRelationInfo* pRelationInfo) {
return NULL;
}
SRelationInfo* addSubqueryElem(SRelationInfo* pRelationInfo, SArray* pSub, SStrToken* pAlias) {
if (pRelationInfo == NULL) {
pRelationInfo = calloc(1, sizeof(SRelationInfo));
pRelationInfo->list = taosArrayInit(4, sizeof(SRelElementPair));
}
pRelationInfo->type = SQL_NODE_FROM_SUBQUERY;
SRelElementPair p = {.pSubquery = pSub};
if (pAlias != NULL) {
p.aliasName = *pAlias;
} else {
TPARSER_SET_NONE_TOKEN(p.aliasName);
}
taosArrayPush(pRelationInfo->list, &p);
return pRelationInfo;
}
void tSetDbName(SStrToken *pCpxName, SStrToken *pDb) {
pCpxName->type = pDb->type;
......
......@@ -97,27 +97,27 @@
#endif
/************* Begin control #defines *****************************************/
#define YYCODETYPE unsigned short int
#define YYNOCODE 264
#define YYNOCODE 265
#define YYACTIONTYPE unsigned short int
#define ParseTOKENTYPE SStrToken
typedef union {
int yyinit;
ParseTOKENTYPE yy0;
SCreateTableSql* yy14;
int yy20;
SSqlNode* yy116;
tSqlExpr* yy118;
SArray* yy159;
SIntervalVal yy184;
SCreatedTableInfo yy206;
SRelationInfo* yy236;
SSessionWindowVal yy249;
int64_t yy317;
SCreateDbInfo yy322;
SCreateAcctInfo yy351;
TAOS_FIELD yy407;
SLimitVal yy440;
tVariant yy488;
SCreatedTableInfo yy96;
SRelationInfo* yy148;
tSqlExpr* yy178;
SCreateAcctInfo yy187;
SArray* yy285;
TAOS_FIELD yy295;
SSqlNode* yy344;
tVariant yy362;
SIntervalVal yy376;
SLimitVal yy438;
int yy460;
SCreateTableSql* yy470;
SSessionWindowVal yy523;
int64_t yy525;
SCreateDbInfo yy526;
} YYMINORTYPE;
#ifndef YYSTACKDEPTH
#define YYSTACKDEPTH 100
......@@ -127,17 +127,17 @@ typedef union {
#define ParseARG_FETCH SSqlInfo* pInfo = yypParser->pInfo
#define ParseARG_STORE yypParser->pInfo = pInfo
#define YYFALLBACK 1
#define YYNSTATE 315
#define YYNRULE 269
#define YYNSTATE 321
#define YYNRULE 272
#define YYNTOKEN 187
#define YY_MAX_SHIFT 314
#define YY_MIN_SHIFTREDUCE 508
#define YY_MAX_SHIFTREDUCE 776
#define YY_ERROR_ACTION 777
#define YY_ACCEPT_ACTION 778
#define YY_NO_ACTION 779
#define YY_MIN_REDUCE 780
#define YY_MAX_REDUCE 1048
#define YY_MAX_SHIFT 320
#define YY_MIN_SHIFTREDUCE 515
#define YY_MAX_SHIFTREDUCE 786
#define YY_ERROR_ACTION 787
#define YY_ACCEPT_ACTION 788
#define YY_NO_ACTION 789
#define YY_MIN_REDUCE 790
#define YY_MAX_REDUCE 1061
/************* End control #defines *******************************************/
/* Define the yytestcase() macro to be a no-op if is not already defined
......@@ -203,260 +203,265 @@ typedef union {
** yy_default[] Default action for each state.
**
*********** Begin parsing tables **********************************************/
#define YY_ACTTAB_COUNT (683)
#define YY_ACTTAB_COUNT (691)
static const YYACTIONTYPE yy_action[] = {
/* 0 */ 133, 555, 204, 312, 208, 140, 947, 226, 140, 556,
/* 10 */ 778, 314, 17, 47, 48, 140, 51, 52, 30, 181,
/* 20 */ 214, 41, 181, 50, 262, 55, 53, 57, 54, 1029,
/* 30 */ 926, 211, 1030, 46, 45, 179, 181, 44, 43, 42,
/* 40 */ 47, 48, 924, 51, 52, 210, 1030, 214, 41, 555,
/* 50 */ 50, 262, 55, 53, 57, 54, 938, 556, 185, 205,
/* 60 */ 46, 45, 923, 247, 44, 43, 42, 48, 944, 51,
/* 70 */ 52, 242, 978, 214, 41, 79, 50, 262, 55, 53,
/* 80 */ 57, 54, 979, 634, 257, 30, 46, 45, 278, 225,
/* 90 */ 44, 43, 42, 509, 510, 511, 512, 513, 514, 515,
/* 100 */ 516, 517, 518, 519, 520, 521, 313, 555, 85, 231,
/* 110 */ 70, 288, 287, 47, 48, 556, 51, 52, 298, 219,
/* 120 */ 214, 41, 555, 50, 262, 55, 53, 57, 54, 922,
/* 130 */ 556, 105, 720, 46, 45, 1026, 298, 44, 43, 42,
/* 140 */ 47, 49, 914, 51, 52, 926, 140, 214, 41, 234,
/* 150 */ 50, 262, 55, 53, 57, 54, 1025, 238, 237, 227,
/* 160 */ 46, 45, 285, 284, 44, 43, 42, 23, 276, 307,
/* 170 */ 306, 275, 274, 273, 305, 272, 304, 303, 302, 271,
/* 180 */ 301, 300, 886, 30, 874, 875, 876, 877, 878, 879,
/* 190 */ 880, 881, 882, 883, 884, 885, 887, 888, 51, 52,
/* 200 */ 825, 1024, 214, 41, 166, 50, 262, 55, 53, 57,
/* 210 */ 54, 259, 18, 78, 82, 46, 45, 61, 223, 44,
/* 220 */ 43, 42, 213, 735, 217, 25, 724, 923, 727, 190,
/* 230 */ 730, 221, 213, 735, 198, 191, 724, 912, 727, 62,
/* 240 */ 730, 118, 117, 189, 69, 909, 910, 29, 913, 44,
/* 250 */ 43, 42, 30, 74, 200, 201, 308, 926, 261, 30,
/* 260 */ 23, 36, 307, 306, 200, 201, 938, 305, 30, 304,
/* 270 */ 303, 302, 74, 301, 300, 894, 911, 199, 892, 893,
/* 280 */ 36, 206, 926, 895, 920, 897, 898, 896, 224, 899,
/* 290 */ 900, 280, 658, 218, 834, 655, 923, 656, 166, 657,
/* 300 */ 281, 673, 241, 923, 68, 55, 53, 57, 54, 282,
/* 310 */ 197, 263, 923, 46, 45, 30, 278, 44, 43, 42,
/* 320 */ 80, 103, 108, 228, 229, 56, 220, 97, 107, 113,
/* 330 */ 116, 106, 736, 71, 726, 56, 729, 110, 732, 30,
/* 340 */ 1, 154, 736, 5, 156, 725, 183, 728, 732, 33,
/* 350 */ 155, 92, 87, 91, 731, 680, 286, 184, 826, 923,
/* 360 */ 174, 170, 166, 245, 731, 212, 172, 169, 121, 120,
/* 370 */ 119, 46, 45, 3, 167, 44, 43, 42, 12, 677,
/* 380 */ 290, 722, 84, 923, 81, 670, 311, 310, 126, 701,
/* 390 */ 702, 243, 24, 686, 692, 31, 693, 135, 60, 756,
/* 400 */ 20, 659, 737, 19, 64, 186, 19, 739, 644, 6,
/* 410 */ 180, 265, 31, 187, 646, 31, 267, 723, 60, 645,
/* 420 */ 83, 188, 28, 60, 65, 268, 662, 67, 663, 633,
/* 430 */ 96, 95, 660, 194, 661, 115, 114, 14, 13, 102,
/* 440 */ 101, 195, 16, 15, 131, 129, 733, 193, 178, 192,
/* 450 */ 182, 1040, 925, 989, 988, 215, 985, 734, 239, 984,
/* 460 */ 216, 289, 132, 946, 39, 971, 954, 970, 956, 939,
/* 470 */ 246, 130, 248, 134, 138, 921, 150, 244, 151, 207,
/* 480 */ 250, 299, 685, 149, 919, 255, 142, 936, 143, 141,
/* 490 */ 144, 152, 256, 153, 260, 258, 66, 145, 837, 270,
/* 500 */ 63, 37, 58, 176, 34, 254, 279, 833, 1045, 252,
/* 510 */ 93, 1044, 1042, 249, 147, 157, 283, 1039, 99, 1038,
/* 520 */ 146, 1036, 158, 855, 35, 32, 38, 177, 822, 40,
/* 530 */ 109, 104, 820, 111, 112, 818, 817, 230, 168, 815,
/* 540 */ 814, 813, 812, 811, 810, 171, 173, 807, 805, 803,
/* 550 */ 291, 801, 799, 175, 292, 72, 75, 293, 251, 972,
/* 560 */ 294, 295, 296, 297, 309, 776, 202, 232, 222, 269,
/* 570 */ 233, 775, 236, 235, 774, 761, 203, 762, 88, 196,
/* 580 */ 89, 240, 245, 264, 8, 73, 76, 665, 687, 690,
/* 590 */ 816, 161, 136, 122, 856, 159, 164, 160, 162, 163,
/* 600 */ 165, 123, 809, 2, 890, 124, 808, 4, 125, 800,
/* 610 */ 137, 209, 77, 148, 253, 26, 694, 139, 9, 902,
/* 620 */ 10, 27, 738, 7, 11, 740, 21, 22, 266, 86,
/* 630 */ 597, 593, 84, 591, 590, 589, 586, 559, 277, 90,
/* 640 */ 31, 94, 98, 59, 100, 636, 635, 632, 581, 579,
/* 650 */ 571, 577, 573, 575, 569, 567, 600, 599, 598, 596,
/* 660 */ 595, 594, 592, 588, 587, 60, 557, 525, 523, 780,
/* 670 */ 779, 779, 779, 779, 779, 779, 779, 779, 779, 779,
/* 680 */ 779, 127, 128,
/* 0 */ 957, 562, 207, 318, 70, 18, 212, 948, 184, 563,
/* 10 */ 788, 320, 182, 48, 49, 143, 52, 53, 215, 1043,
/* 20 */ 218, 42, 209, 51, 268, 56, 54, 58, 55, 922,
/* 30 */ 641, 184, 936, 47, 46, 184, 921, 45, 44, 43,
/* 40 */ 48, 49, 1042, 52, 53, 214, 1043, 218, 42, 562,
/* 50 */ 51, 268, 56, 54, 58, 55, 948, 563, 294, 293,
/* 60 */ 47, 46, 954, 143, 45, 44, 43, 49, 31, 52,
/* 70 */ 53, 246, 136, 218, 42, 188, 51, 268, 56, 54,
/* 80 */ 58, 55, 304, 992, 88, 263, 47, 46, 143, 229,
/* 90 */ 45, 44, 43, 516, 517, 518, 519, 520, 521, 522,
/* 100 */ 523, 524, 525, 526, 527, 528, 319, 562, 284, 235,
/* 110 */ 71, 230, 932, 48, 49, 563, 52, 53, 924, 223,
/* 120 */ 218, 42, 562, 51, 268, 56, 54, 58, 55, 265,
/* 130 */ 563, 81, 730, 47, 46, 253, 252, 45, 44, 43,
/* 140 */ 48, 50, 284, 52, 53, 936, 934, 218, 42, 238,
/* 150 */ 51, 268, 56, 54, 58, 55, 991, 242, 241, 231,
/* 160 */ 47, 46, 291, 290, 45, 44, 43, 24, 282, 313,
/* 170 */ 312, 281, 280, 279, 311, 278, 310, 309, 308, 277,
/* 180 */ 307, 306, 896, 31, 884, 885, 886, 887, 888, 889,
/* 190 */ 890, 891, 892, 893, 894, 895, 897, 898, 52, 53,
/* 200 */ 835, 1039, 218, 42, 169, 51, 268, 56, 54, 58,
/* 210 */ 55, 227, 19, 225, 85, 47, 46, 1, 157, 45,
/* 220 */ 44, 43, 217, 745, 208, 25, 734, 933, 737, 193,
/* 230 */ 740, 314, 217, 745, 1038, 194, 734, 677, 737, 936,
/* 240 */ 740, 121, 120, 192, 8, 919, 920, 30, 923, 3,
/* 250 */ 170, 736, 31, 739, 203, 204, 930, 936, 267, 31,
/* 260 */ 24, 108, 313, 312, 203, 204, 304, 311, 31, 310,
/* 270 */ 309, 308, 77, 307, 306, 904, 948, 680, 902, 903,
/* 280 */ 37, 228, 216, 905, 286, 907, 908, 906, 83, 909,
/* 290 */ 910, 210, 665, 221, 143, 662, 933, 663, 224, 664,
/* 300 */ 222, 72, 245, 933, 69, 56, 54, 58, 55, 287,
/* 310 */ 200, 269, 933, 47, 46, 31, 844, 45, 44, 43,
/* 320 */ 169, 106, 111, 232, 233, 57, 6, 100, 110, 116,
/* 330 */ 119, 109, 746, 77, 735, 57, 738, 113, 742, 31,
/* 340 */ 31, 37, 746, 5, 159, 45, 44, 43, 742, 34,
/* 350 */ 158, 95, 90, 94, 741, 684, 288, 711, 712, 933,
/* 360 */ 177, 173, 82, 743, 741, 74, 175, 172, 124, 123,
/* 370 */ 122, 47, 46, 249, 836, 45, 44, 43, 169, 75,
/* 380 */ 292, 296, 247, 933, 933, 732, 32, 249, 13, 317,
/* 390 */ 316, 129, 87, 696, 84, 62, 702, 138, 703, 766,
/* 400 */ 61, 666, 21, 20, 747, 651, 65, 749, 20, 32,
/* 410 */ 271, 653, 273, 1037, 32, 61, 86, 63, 652, 201,
/* 420 */ 29, 733, 61, 274, 118, 117, 66, 99, 98, 202,
/* 430 */ 15, 14, 186, 105, 104, 68, 669, 640, 670, 17,
/* 440 */ 16, 667, 187, 668, 134, 132, 744, 189, 183, 190,
/* 450 */ 191, 197, 198, 196, 181, 195, 185, 1002, 243, 1053,
/* 460 */ 935, 1001, 219, 998, 997, 220, 295, 135, 40, 956,
/* 470 */ 967, 984, 983, 964, 965, 949, 250, 133, 969, 931,
/* 480 */ 900, 153, 254, 211, 256, 695, 305, 107, 261, 152,
/* 490 */ 149, 147, 946, 137, 141, 154, 144, 145, 266, 67,
/* 500 */ 929, 155, 156, 847, 64, 276, 38, 59, 179, 35,
/* 510 */ 285, 843, 1058, 96, 1057, 1055, 146, 160, 289, 1052,
/* 520 */ 264, 102, 262, 1051, 1049, 161, 865, 36, 33, 260,
/* 530 */ 39, 180, 832, 112, 830, 114, 115, 828, 827, 258,
/* 540 */ 234, 171, 825, 824, 823, 822, 821, 820, 174, 176,
/* 550 */ 817, 815, 813, 811, 809, 178, 255, 248, 73, 78,
/* 560 */ 41, 257, 985, 297, 298, 299, 300, 205, 302, 301,
/* 570 */ 226, 275, 303, 315, 786, 236, 237, 785, 91, 206,
/* 580 */ 199, 240, 92, 784, 239, 772, 771, 244, 249, 826,
/* 590 */ 270, 125, 164, 9, 866, 166, 162, 163, 165, 167,
/* 600 */ 168, 126, 819, 2, 127, 818, 4, 128, 810, 672,
/* 610 */ 76, 26, 251, 697, 150, 148, 139, 151, 79, 140,
/* 620 */ 80, 912, 700, 213, 259, 10, 704, 142, 27, 11,
/* 630 */ 748, 28, 7, 12, 22, 750, 23, 89, 272, 604,
/* 640 */ 600, 87, 598, 597, 596, 593, 566, 283, 32, 93,
/* 650 */ 97, 643, 60, 642, 639, 588, 586, 101, 578, 584,
/* 660 */ 580, 582, 576, 574, 607, 103, 606, 605, 603, 602,
/* 670 */ 601, 599, 595, 594, 61, 564, 532, 530, 790, 789,
/* 680 */ 789, 130, 789, 789, 789, 789, 789, 789, 789, 789,
/* 690 */ 131,
};
static const YYCODETYPE yy_lookahead[] = {
/* 0 */ 191, 1, 190, 191, 210, 191, 191, 191, 191, 9,
/* 10 */ 188, 189, 252, 13, 14, 191, 16, 17, 191, 252,
/* 20 */ 20, 21, 252, 23, 24, 25, 26, 27, 28, 262,
/* 30 */ 236, 261, 262, 33, 34, 252, 252, 37, 38, 39,
/* 40 */ 13, 14, 226, 16, 17, 261, 262, 20, 21, 1,
/* 50 */ 23, 24, 25, 26, 27, 28, 234, 9, 252, 232,
/* 60 */ 33, 34, 235, 254, 37, 38, 39, 14, 253, 16,
/* 70 */ 17, 249, 258, 20, 21, 258, 23, 24, 25, 26,
/* 80 */ 27, 28, 258, 5, 260, 191, 33, 34, 79, 67,
/* 0 */ 191, 1, 190, 191, 197, 252, 210, 234, 252, 9,
/* 10 */ 188, 189, 252, 13, 14, 191, 16, 17, 262, 263,
/* 20 */ 20, 21, 249, 23, 24, 25, 26, 27, 28, 0,
/* 30 */ 5, 252, 236, 33, 34, 252, 229, 37, 38, 39,
/* 40 */ 13, 14, 263, 16, 17, 262, 263, 20, 21, 1,
/* 50 */ 23, 24, 25, 26, 27, 28, 234, 9, 33, 34,
/* 60 */ 33, 34, 253, 191, 37, 38, 39, 14, 191, 16,
/* 70 */ 17, 249, 191, 20, 21, 252, 23, 24, 25, 26,
/* 80 */ 27, 28, 81, 259, 197, 261, 33, 34, 191, 67,
/* 90 */ 37, 38, 39, 45, 46, 47, 48, 49, 50, 51,
/* 100 */ 52, 53, 54, 55, 56, 57, 58, 1, 197, 61,
/* 110 */ 110, 33, 34, 13, 14, 9, 16, 17, 81, 210,
/* 120 */ 20, 21, 1, 23, 24, 25, 26, 27, 28, 235,
/* 130 */ 9, 76, 105, 33, 34, 252, 81, 37, 38, 39,
/* 140 */ 13, 14, 231, 16, 17, 236, 191, 20, 21, 135,
/* 150 */ 23, 24, 25, 26, 27, 28, 252, 143, 144, 137,
/* 100 */ 52, 53, 54, 55, 56, 57, 58, 1, 79, 61,
/* 110 */ 110, 191, 235, 13, 14, 9, 16, 17, 231, 210,
/* 120 */ 20, 21, 1, 23, 24, 25, 26, 27, 28, 257,
/* 130 */ 9, 259, 105, 33, 34, 254, 255, 37, 38, 39,
/* 140 */ 13, 14, 79, 16, 17, 236, 226, 20, 21, 135,
/* 150 */ 23, 24, 25, 26, 27, 28, 259, 143, 144, 137,
/* 160 */ 33, 34, 140, 141, 37, 38, 39, 88, 89, 90,
/* 170 */ 91, 92, 93, 94, 95, 96, 97, 98, 99, 100,
/* 180 */ 101, 102, 209, 191, 211, 212, 213, 214, 215, 216,
/* 190 */ 217, 218, 219, 220, 221, 222, 223, 224, 16, 17,
/* 200 */ 196, 252, 20, 21, 200, 23, 24, 25, 26, 27,
/* 210 */ 28, 256, 44, 258, 197, 33, 34, 109, 67, 37,
/* 210 */ 28, 67, 44, 210, 197, 33, 34, 198, 199, 37,
/* 220 */ 38, 39, 1, 2, 232, 104, 5, 235, 7, 61,
/* 230 */ 9, 210, 1, 2, 252, 67, 5, 0, 7, 131,
/* 240 */ 9, 73, 74, 75, 197, 228, 229, 230, 231, 37,
/* 250 */ 38, 39, 191, 104, 33, 34, 210, 236, 37, 191,
/* 260 */ 88, 112, 90, 91, 33, 34, 234, 95, 191, 97,
/* 270 */ 98, 99, 104, 101, 102, 209, 229, 252, 212, 213,
/* 280 */ 112, 249, 236, 217, 191, 219, 220, 221, 137, 223,
/* 290 */ 224, 140, 2, 232, 196, 5, 235, 7, 200, 9,
/* 300 */ 232, 37, 134, 235, 136, 25, 26, 27, 28, 232,
/* 310 */ 142, 15, 235, 33, 34, 191, 79, 37, 38, 39,
/* 320 */ 237, 62, 63, 33, 34, 104, 233, 68, 69, 70,
/* 330 */ 71, 72, 111, 250, 5, 104, 7, 78, 117, 191,
/* 340 */ 198, 199, 111, 62, 63, 5, 252, 7, 117, 68,
/* 350 */ 69, 70, 71, 72, 133, 105, 232, 252, 196, 235,
/* 360 */ 62, 63, 200, 113, 133, 60, 68, 69, 70, 71,
/* 370 */ 72, 33, 34, 194, 195, 37, 38, 39, 104, 115,
/* 380 */ 232, 1, 108, 235, 110, 109, 64, 65, 66, 124,
/* 390 */ 125, 105, 116, 105, 105, 109, 105, 109, 109, 105,
/* 400 */ 109, 111, 105, 109, 109, 252, 109, 111, 105, 104,
/* 410 */ 252, 105, 109, 252, 105, 109, 105, 37, 109, 105,
/* 420 */ 109, 252, 104, 109, 129, 107, 5, 104, 7, 106,
/* 430 */ 138, 139, 5, 252, 7, 76, 77, 138, 139, 138,
/* 440 */ 139, 252, 138, 139, 62, 63, 117, 252, 252, 252,
/* 450 */ 252, 236, 236, 227, 227, 227, 227, 117, 191, 227,
/* 460 */ 227, 227, 191, 191, 251, 259, 191, 259, 191, 234,
/* 470 */ 234, 60, 255, 191, 191, 234, 238, 192, 191, 255,
/* 480 */ 255, 103, 117, 239, 191, 255, 246, 248, 245, 247,
/* 490 */ 244, 191, 121, 191, 122, 126, 128, 243, 191, 191,
/* 500 */ 130, 191, 127, 191, 191, 120, 191, 191, 191, 119,
/* 510 */ 191, 191, 191, 118, 241, 191, 191, 191, 191, 191,
/* 520 */ 242, 191, 191, 191, 191, 191, 191, 191, 191, 132,
/* 530 */ 191, 87, 191, 191, 191, 191, 191, 191, 191, 191,
/* 230 */ 9, 210, 1, 2, 252, 67, 5, 109, 7, 236,
/* 240 */ 9, 73, 74, 75, 116, 228, 229, 230, 231, 194,
/* 250 */ 195, 5, 191, 7, 33, 34, 191, 236, 37, 191,
/* 260 */ 88, 76, 90, 91, 33, 34, 81, 95, 191, 97,
/* 270 */ 98, 99, 104, 101, 102, 209, 234, 37, 212, 213,
/* 280 */ 112, 137, 60, 217, 140, 219, 220, 221, 237, 223,
/* 290 */ 224, 249, 2, 232, 191, 5, 235, 7, 233, 9,
/* 300 */ 232, 250, 134, 235, 136, 25, 26, 27, 28, 232,
/* 310 */ 142, 15, 235, 33, 34, 191, 196, 37, 38, 39,
/* 320 */ 200, 62, 63, 33, 34, 104, 104, 68, 69, 70,
/* 330 */ 71, 72, 111, 104, 5, 104, 7, 78, 117, 191,
/* 340 */ 191, 112, 111, 62, 63, 37, 38, 39, 117, 68,
/* 350 */ 69, 70, 71, 72, 133, 115, 232, 124, 125, 235,
/* 360 */ 62, 63, 259, 117, 133, 105, 68, 69, 70, 71,
/* 370 */ 72, 33, 34, 113, 196, 37, 38, 39, 200, 105,
/* 380 */ 232, 232, 105, 235, 235, 1, 109, 113, 104, 64,
/* 390 */ 65, 66, 108, 105, 110, 109, 105, 109, 105, 105,
/* 400 */ 109, 111, 109, 109, 105, 105, 109, 111, 109, 109,
/* 410 */ 105, 105, 105, 252, 109, 109, 109, 131, 105, 252,
/* 420 */ 104, 37, 109, 107, 76, 77, 129, 138, 139, 252,
/* 430 */ 138, 139, 252, 138, 139, 104, 5, 106, 7, 138,
/* 440 */ 139, 5, 252, 7, 62, 63, 117, 252, 252, 252,
/* 450 */ 252, 252, 252, 252, 252, 252, 252, 227, 191, 236,
/* 460 */ 236, 227, 227, 227, 227, 227, 227, 191, 251, 191,
/* 470 */ 191, 260, 260, 191, 191, 234, 234, 60, 191, 234,
/* 480 */ 225, 238, 256, 256, 256, 117, 103, 87, 256, 239,
/* 490 */ 242, 244, 248, 191, 191, 191, 247, 246, 122, 128,
/* 500 */ 191, 191, 191, 191, 130, 191, 191, 127, 191, 191,
/* 510 */ 191, 191, 191, 191, 191, 191, 245, 191, 191, 191,
/* 520 */ 126, 191, 121, 191, 191, 191, 191, 191, 191, 120,
/* 530 */ 191, 191, 191, 191, 191, 191, 191, 191, 191, 119,
/* 540 */ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191,
/* 550 */ 86, 191, 191, 191, 50, 192, 192, 83, 192, 192,
/* 560 */ 85, 54, 84, 82, 79, 5, 192, 145, 192, 192,
/* 570 */ 5, 5, 5, 145, 5, 89, 192, 90, 197, 192,
/* 580 */ 197, 135, 113, 107, 104, 114, 109, 105, 105, 105,
/* 590 */ 192, 202, 104, 193, 208, 207, 204, 206, 205, 203,
/* 600 */ 201, 193, 192, 198, 225, 193, 192, 194, 193, 192,
/* 610 */ 109, 1, 104, 240, 104, 109, 105, 104, 123, 225,
/* 620 */ 123, 109, 105, 104, 104, 111, 104, 104, 107, 76,
/* 630 */ 9, 5, 108, 5, 5, 5, 5, 80, 15, 76,
/* 640 */ 109, 139, 139, 16, 139, 5, 5, 105, 5, 5,
/* 650 */ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
/* 660 */ 5, 5, 5, 5, 5, 109, 80, 60, 59, 0,
/* 670 */ 263, 263, 263, 263, 263, 263, 263, 263, 263, 263,
/* 680 */ 263, 21, 21, 263, 263, 263, 263, 263, 263, 263,
/* 690 */ 263, 263, 263, 263, 263, 263, 263, 263, 263, 263,
/* 700 */ 263, 263, 263, 263, 263, 263, 263, 263, 263, 263,
/* 710 */ 263, 263, 263, 263, 263, 263, 263, 263, 263, 263,
/* 720 */ 263, 263, 263, 263, 263, 263, 263, 263, 263, 263,
/* 730 */ 263, 263, 263, 263, 263, 263, 263, 263, 263, 263,
/* 740 */ 263, 263, 263, 263, 263, 263, 263, 263, 263, 263,
/* 750 */ 263, 263, 263, 263, 263, 263, 263, 263, 263, 263,
/* 760 */ 263, 263, 263, 263, 263, 263, 263, 263, 263, 263,
/* 770 */ 263, 263, 263, 263, 263, 263, 263, 263, 263, 263,
/* 780 */ 263, 263, 263, 263, 263, 263, 263, 263, 263, 263,
/* 790 */ 263, 263, 263, 263, 263, 263, 263, 263, 263, 263,
/* 800 */ 263, 263, 263, 263, 263, 263, 263, 263, 263, 263,
/* 810 */ 263, 263, 263, 263, 263, 263, 263, 263, 263, 263,
/* 820 */ 263, 263, 263, 263, 263, 263, 263, 263, 263, 263,
/* 830 */ 263, 263, 263, 263, 263, 263, 263, 263, 263, 263,
/* 840 */ 263, 263, 263, 263, 263, 263, 263, 263, 263, 263,
/* 850 */ 263, 263, 263, 263, 263, 263, 263, 263, 263, 263,
/* 860 */ 263, 263, 263, 263, 263, 263, 263, 263, 263, 263,
/* 550 */ 191, 191, 191, 191, 191, 191, 118, 192, 192, 192,
/* 560 */ 132, 192, 192, 86, 50, 83, 85, 192, 84, 54,
/* 570 */ 192, 192, 82, 79, 5, 145, 5, 5, 197, 192,
/* 580 */ 192, 5, 197, 5, 145, 90, 89, 135, 113, 192,
/* 590 */ 107, 193, 202, 104, 208, 203, 207, 206, 205, 204,
/* 600 */ 201, 193, 192, 198, 193, 192, 194, 193, 192, 105,
/* 610 */ 114, 104, 109, 105, 241, 243, 104, 240, 109, 109,
/* 620 */ 104, 225, 105, 1, 104, 123, 105, 104, 109, 123,
/* 630 */ 105, 109, 104, 104, 104, 111, 104, 76, 107, 9,
/* 640 */ 5, 108, 5, 5, 5, 5, 80, 15, 109, 76,
/* 650 */ 139, 5, 16, 5, 105, 5, 5, 139, 5, 5,
/* 660 */ 5, 5, 5, 5, 5, 139, 5, 5, 5, 5,
/* 670 */ 5, 5, 5, 5, 109, 80, 60, 59, 0, 264,
/* 680 */ 264, 21, 264, 264, 264, 264, 264, 264, 264, 264,
/* 690 */ 21, 264, 264, 264, 264, 264, 264, 264, 264, 264,
/* 700 */ 264, 264, 264, 264, 264, 264, 264, 264, 264, 264,
/* 710 */ 264, 264, 264, 264, 264, 264, 264, 264, 264, 264,
/* 720 */ 264, 264, 264, 264, 264, 264, 264, 264, 264, 264,
/* 730 */ 264, 264, 264, 264, 264, 264, 264, 264, 264, 264,
/* 740 */ 264, 264, 264, 264, 264, 264, 264, 264, 264, 264,
/* 750 */ 264, 264, 264, 264, 264, 264, 264, 264, 264, 264,
/* 760 */ 264, 264, 264, 264, 264, 264, 264, 264, 264, 264,
/* 770 */ 264, 264, 264, 264, 264, 264, 264, 264, 264, 264,
/* 780 */ 264, 264, 264, 264, 264, 264, 264, 264, 264, 264,
/* 790 */ 264, 264, 264, 264, 264, 264, 264, 264, 264, 264,
/* 800 */ 264, 264, 264, 264, 264, 264, 264, 264, 264, 264,
/* 810 */ 264, 264, 264, 264, 264, 264, 264, 264, 264, 264,
/* 820 */ 264, 264, 264, 264, 264, 264, 264, 264, 264, 264,
/* 830 */ 264, 264, 264, 264, 264, 264, 264, 264, 264, 264,
/* 840 */ 264, 264, 264, 264, 264, 264, 264, 264, 264, 264,
/* 850 */ 264, 264, 264, 264, 264, 264, 264, 264, 264, 264,
/* 860 */ 264, 264, 264, 264, 264, 264, 264, 264, 264, 264,
/* 870 */ 264, 264, 264, 264, 264, 264, 264, 264,
};
#define YY_SHIFT_COUNT (314)
#define YY_SHIFT_COUNT (320)
#define YY_SHIFT_MIN (0)
#define YY_SHIFT_MAX (669)
#define YY_SHIFT_MAX (678)
static const unsigned short int yy_shift_ofst[] = {
/* 0 */ 168, 79, 79, 172, 172, 9, 221, 231, 106, 106,
/* 10 */ 106, 106, 106, 106, 106, 106, 106, 0, 48, 231,
/* 20 */ 290, 290, 290, 290, 121, 149, 106, 106, 106, 237,
/* 30 */ 106, 106, 55, 9, 37, 37, 683, 683, 683, 231,
/* 0 */ 168, 79, 79, 172, 172, 63, 221, 231, 121, 106,
/* 10 */ 106, 106, 106, 106, 106, 106, 106, 106, 0, 48,
/* 20 */ 231, 290, 290, 290, 290, 229, 229, 106, 106, 106,
/* 30 */ 29, 106, 106, 185, 63, 1, 1, 691, 691, 691,
/* 40 */ 231, 231, 231, 231, 231, 231, 231, 231, 231, 231,
/* 50 */ 231, 231, 231, 231, 231, 231, 231, 231, 231, 290,
/* 60 */ 290, 78, 78, 78, 78, 78, 78, 78, 106, 106,
/* 70 */ 106, 264, 106, 149, 149, 106, 106, 106, 265, 265,
/* 80 */ 276, 149, 106, 106, 106, 106, 106, 106, 106, 106,
/* 50 */ 231, 231, 231, 231, 231, 231, 231, 231, 231, 231,
/* 60 */ 290, 290, 25, 25, 25, 25, 25, 25, 25, 106,
/* 70 */ 106, 106, 240, 106, 106, 106, 229, 229, 106, 106,
/* 80 */ 106, 233, 233, 128, 229, 106, 106, 106, 106, 106,
/* 90 */ 106, 106, 106, 106, 106, 106, 106, 106, 106, 106,
/* 100 */ 106, 106, 106, 106, 106, 106, 106, 106, 106, 106,
/* 110 */ 106, 106, 106, 106, 106, 106, 106, 106, 106, 106,
/* 120 */ 106, 106, 106, 106, 106, 106, 106, 106, 106, 106,
/* 130 */ 106, 106, 411, 411, 411, 365, 365, 365, 411, 365,
/* 140 */ 411, 368, 370, 375, 372, 369, 371, 385, 390, 395,
/* 150 */ 397, 411, 411, 411, 378, 9, 9, 411, 411, 444,
/* 160 */ 464, 504, 474, 475, 507, 478, 481, 378, 411, 485,
/* 170 */ 485, 411, 485, 411, 485, 411, 683, 683, 27, 100,
/* 180 */ 127, 100, 100, 53, 182, 280, 280, 280, 280, 259,
/* 190 */ 281, 298, 338, 338, 338, 338, 22, 14, 212, 212,
/* 200 */ 329, 340, 274, 151, 322, 286, 250, 288, 289, 291,
/* 210 */ 294, 297, 380, 305, 296, 108, 295, 303, 306, 309,
/* 220 */ 311, 314, 318, 292, 299, 301, 323, 304, 421, 427,
/* 230 */ 359, 382, 560, 422, 565, 566, 428, 567, 569, 487,
/* 240 */ 486, 446, 469, 476, 480, 471, 482, 477, 483, 488,
/* 250 */ 484, 501, 508, 610, 510, 511, 513, 506, 495, 512,
/* 260 */ 497, 517, 519, 514, 520, 476, 522, 521, 523, 524,
/* 270 */ 553, 621, 626, 628, 629, 630, 631, 557, 623, 563,
/* 280 */ 502, 531, 531, 627, 503, 505, 531, 640, 641, 542,
/* 290 */ 531, 643, 644, 645, 646, 647, 648, 649, 650, 651,
/* 300 */ 652, 653, 654, 655, 656, 657, 658, 659, 556, 586,
/* 310 */ 660, 661, 607, 609, 669,
/* 130 */ 106, 106, 106, 106, 106, 417, 417, 417, 368, 368,
/* 140 */ 368, 417, 368, 417, 371, 374, 380, 376, 394, 401,
/* 150 */ 409, 420, 438, 428, 417, 417, 417, 383, 63, 63,
/* 160 */ 417, 417, 400, 477, 514, 482, 481, 515, 484, 490,
/* 170 */ 383, 417, 494, 494, 417, 494, 417, 494, 417, 691,
/* 180 */ 691, 27, 100, 127, 100, 100, 53, 182, 280, 280,
/* 190 */ 280, 280, 259, 281, 298, 338, 338, 338, 338, 22,
/* 200 */ 14, 308, 308, 246, 329, 284, 144, 325, 277, 260,
/* 210 */ 274, 288, 291, 293, 294, 299, 384, 222, 296, 286,
/* 220 */ 297, 300, 305, 306, 307, 313, 316, 289, 292, 295,
/* 230 */ 331, 301, 431, 436, 348, 382, 569, 430, 571, 572,
/* 240 */ 439, 576, 578, 495, 497, 452, 475, 483, 489, 496,
/* 250 */ 504, 507, 503, 509, 508, 512, 517, 510, 516, 622,
/* 260 */ 520, 521, 523, 519, 502, 522, 506, 525, 528, 524,
/* 270 */ 529, 483, 530, 531, 532, 533, 561, 630, 635, 637,
/* 280 */ 638, 639, 640, 566, 632, 573, 511, 539, 539, 636,
/* 290 */ 518, 526, 539, 646, 648, 549, 539, 650, 651, 653,
/* 300 */ 654, 655, 656, 657, 658, 659, 661, 662, 663, 664,
/* 310 */ 665, 666, 667, 668, 565, 595, 660, 669, 616, 618,
/* 320 */ 678,
};
#define YY_REDUCE_COUNT (177)
#define YY_REDUCE_MIN (-240)
#define YY_REDUCE_MAX (417)
#define YY_REDUCE_COUNT (180)
#define YY_REDUCE_MIN (-247)
#define YY_REDUCE_MAX (416)
static const short yy_reduce_ofst[] = {
/* 0 */ -178, -27, -27, 66, 66, 17, -230, -216, -173, -176,
/* 10 */ -45, -8, 61, 68, 77, 124, 148, -185, -188, -233,
/* 20 */ -206, -91, 21, 46, -191, 32, -186, -183, 93, -89,
/* 30 */ -184, -106, 4, 47, 98, 162, 83, 142, 179, -240,
/* 40 */ -217, -194, -117, -96, -51, -18, 25, 94, 105, 153,
/* 50 */ 158, 161, 169, 181, 189, 195, 196, 197, 198, 215,
/* 60 */ 216, 226, 227, 228, 229, 232, 233, 234, 267, 271,
/* 70 */ 272, 213, 275, 235, 236, 277, 282, 283, 206, 208,
/* 80 */ 238, 241, 287, 293, 300, 302, 307, 308, 310, 312,
/* 90 */ 313, 315, 316, 317, 319, 320, 321, 324, 325, 326,
/* 100 */ 327, 328, 330, 331, 332, 333, 334, 335, 336, 337,
/* 110 */ 339, 341, 342, 343, 344, 345, 346, 347, 348, 349,
/* 120 */ 350, 351, 352, 353, 354, 355, 356, 357, 358, 360,
/* 130 */ 361, 362, 285, 363, 364, 217, 224, 225, 366, 230,
/* 140 */ 367, 239, 242, 240, 243, 246, 254, 278, 273, 373,
/* 150 */ 244, 374, 376, 377, 379, 381, 383, 384, 387, 386,
/* 160 */ 388, 391, 389, 393, 396, 392, 399, 394, 398, 400,
/* 170 */ 408, 410, 412, 414, 415, 417, 405, 413,
/* 0 */ -178, -27, -27, 66, 66, 17, -244, -217, -119, -8,
/* 10 */ -176, -128, 61, 68, 77, 124, 148, 149, -191, -188,
/* 20 */ -221, -204, -91, 3, 21, -227, 42, -103, 103, 65,
/* 30 */ -113, -80, -123, 4, -193, 120, 178, 51, 19, 55,
/* 40 */ -247, -240, -177, -51, -18, 161, 167, 177, 180, 190,
/* 50 */ 195, 196, 197, 198, 199, 200, 201, 202, 203, 204,
/* 60 */ 223, 224, 230, 234, 235, 236, 237, 238, 239, 267,
/* 70 */ 276, 278, 217, 279, 282, 283, 241, 242, 287, 302,
/* 80 */ 303, 211, 212, 243, 245, 304, 309, 310, 311, 312,
/* 90 */ 314, 315, 317, 318, 319, 320, 321, 322, 323, 324,
/* 100 */ 326, 327, 328, 330, 332, 333, 334, 335, 336, 337,
/* 110 */ 339, 340, 341, 342, 343, 344, 345, 346, 347, 349,
/* 120 */ 350, 351, 352, 353, 354, 355, 356, 357, 358, 359,
/* 130 */ 360, 361, 362, 363, 364, 365, 366, 367, 226, 227,
/* 140 */ 228, 369, 232, 370, 244, 249, 251, 271, 247, 372,
/* 150 */ 248, 373, 377, 250, 375, 378, 379, 255, 381, 385,
/* 160 */ 387, 388, 386, 389, 391, 390, 393, 392, 395, 399,
/* 170 */ 396, 397, 398, 408, 410, 411, 413, 414, 416, 405,
/* 180 */ 412,
};
static const YYACTIONTYPE yy_default[] = {
/* 0 */ 777, 889, 835, 901, 823, 832, 1032, 1032, 777, 777,
/* 10 */ 777, 777, 777, 777, 777, 777, 777, 948, 796, 1032,
/* 20 */ 777, 777, 777, 777, 777, 777, 777, 777, 777, 832,
/* 30 */ 777, 777, 838, 832, 838, 838, 943, 873, 891, 777,
/* 40 */ 777, 777, 777, 777, 777, 777, 777, 777, 777, 777,
/* 50 */ 777, 777, 777, 777, 777, 777, 777, 777, 777, 777,
/* 60 */ 777, 777, 777, 777, 777, 777, 777, 777, 777, 777,
/* 70 */ 777, 950, 953, 777, 777, 955, 777, 777, 975, 975,
/* 80 */ 941, 777, 777, 777, 777, 777, 777, 777, 777, 777,
/* 90 */ 777, 777, 777, 777, 777, 777, 777, 777, 777, 777,
/* 100 */ 777, 777, 777, 777, 777, 777, 777, 777, 777, 821,
/* 110 */ 777, 819, 777, 777, 777, 777, 777, 777, 777, 777,
/* 120 */ 777, 777, 777, 777, 777, 777, 806, 777, 777, 777,
/* 130 */ 777, 777, 798, 798, 798, 777, 777, 777, 798, 777,
/* 140 */ 798, 982, 986, 980, 968, 976, 967, 963, 961, 960,
/* 150 */ 990, 798, 798, 798, 836, 832, 832, 798, 798, 854,
/* 160 */ 852, 850, 842, 848, 844, 846, 840, 824, 798, 830,
/* 170 */ 830, 798, 830, 798, 830, 798, 873, 891, 777, 991,
/* 180 */ 777, 1031, 981, 1021, 1020, 1027, 1019, 1018, 1017, 777,
/* 190 */ 777, 777, 1013, 1014, 1016, 1015, 777, 777, 1023, 1022,
/* 200 */ 777, 777, 777, 777, 777, 777, 777, 777, 777, 777,
/* 210 */ 777, 777, 777, 993, 777, 987, 983, 777, 777, 777,
/* 220 */ 777, 777, 777, 777, 777, 777, 903, 777, 777, 777,
/* 230 */ 777, 777, 777, 777, 777, 777, 777, 777, 777, 777,
/* 240 */ 777, 777, 940, 777, 777, 777, 777, 951, 777, 777,
/* 250 */ 777, 777, 777, 777, 777, 777, 777, 977, 777, 969,
/* 260 */ 777, 777, 777, 777, 777, 915, 777, 777, 777, 777,
/* 270 */ 777, 777, 777, 777, 777, 777, 777, 777, 777, 777,
/* 280 */ 777, 1043, 1041, 777, 777, 777, 1037, 777, 777, 777,
/* 290 */ 1035, 777, 777, 777, 777, 777, 777, 777, 777, 777,
/* 300 */ 777, 777, 777, 777, 777, 777, 777, 777, 857, 777,
/* 310 */ 804, 802, 777, 794, 777,
/* 0 */ 787, 899, 845, 911, 833, 842, 1045, 1045, 787, 787,
/* 10 */ 787, 787, 787, 787, 787, 787, 787, 787, 958, 806,
/* 20 */ 1045, 787, 787, 787, 787, 787, 787, 787, 787, 787,
/* 30 */ 842, 787, 787, 848, 842, 848, 848, 953, 883, 901,
/* 40 */ 787, 787, 787, 787, 787, 787, 787, 787, 787, 787,
/* 50 */ 787, 787, 787, 787, 787, 787, 787, 787, 787, 787,
/* 60 */ 787, 787, 787, 787, 787, 787, 787, 787, 787, 787,
/* 70 */ 787, 787, 960, 966, 963, 787, 787, 787, 968, 787,
/* 80 */ 787, 988, 988, 951, 787, 787, 787, 787, 787, 787,
/* 90 */ 787, 787, 787, 787, 787, 787, 787, 787, 787, 787,
/* 100 */ 787, 787, 787, 787, 787, 787, 787, 787, 787, 787,
/* 110 */ 787, 787, 831, 787, 829, 787, 787, 787, 787, 787,
/* 120 */ 787, 787, 787, 787, 787, 787, 787, 787, 787, 816,
/* 130 */ 787, 787, 787, 787, 787, 808, 808, 808, 787, 787,
/* 140 */ 787, 808, 787, 808, 995, 999, 993, 981, 989, 980,
/* 150 */ 976, 974, 973, 1003, 808, 808, 808, 846, 842, 842,
/* 160 */ 808, 808, 864, 862, 860, 852, 858, 854, 856, 850,
/* 170 */ 834, 808, 840, 840, 808, 840, 808, 840, 808, 883,
/* 180 */ 901, 787, 1004, 787, 1044, 994, 1034, 1033, 1040, 1032,
/* 190 */ 1031, 1030, 787, 787, 787, 1026, 1027, 1029, 1028, 787,
/* 200 */ 787, 1036, 1035, 787, 787, 787, 787, 787, 787, 787,
/* 210 */ 787, 787, 787, 787, 787, 787, 787, 1006, 787, 1000,
/* 220 */ 996, 787, 787, 787, 787, 787, 787, 787, 787, 787,
/* 230 */ 913, 787, 787, 787, 787, 787, 787, 787, 787, 787,
/* 240 */ 787, 787, 787, 787, 787, 787, 950, 787, 787, 787,
/* 250 */ 787, 787, 962, 961, 787, 787, 787, 787, 787, 787,
/* 260 */ 787, 787, 787, 990, 787, 982, 787, 787, 787, 787,
/* 270 */ 787, 925, 787, 787, 787, 787, 787, 787, 787, 787,
/* 280 */ 787, 787, 787, 787, 787, 787, 787, 1056, 1054, 787,
/* 290 */ 787, 787, 1050, 787, 787, 787, 1048, 787, 787, 787,
/* 300 */ 787, 787, 787, 787, 787, 787, 787, 787, 787, 787,
/* 310 */ 787, 787, 787, 787, 867, 787, 814, 812, 787, 804,
/* 320 */ 787,
};
/********** End of lemon-generated parsing tables *****************************/
......@@ -1004,14 +1009,15 @@ static const char *const yyTokenName[] = {
/* 252 */ "expr",
/* 253 */ "as",
/* 254 */ "tablelist",
/* 255 */ "tmvar",
/* 256 */ "sortlist",
/* 257 */ "sortitem",
/* 258 */ "item",
/* 259 */ "sortorder",
/* 260 */ "grouplist",
/* 261 */ "exprlist",
/* 262 */ "expritem",
/* 255 */ "sub",
/* 256 */ "tmvar",
/* 257 */ "sortlist",
/* 258 */ "sortitem",
/* 259 */ "item",
/* 260 */ "sortorder",
/* 261 */ "grouplist",
/* 262 */ "exprlist",
/* 263 */ "expritem",
};
#endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */
......@@ -1191,103 +1197,106 @@ static const char *const yyRuleName[] = {
/* 169 */ "distinct ::= DISTINCT",
/* 170 */ "distinct ::=",
/* 171 */ "from ::= FROM tablelist",
/* 172 */ "from ::= FROM LP union RP",
/* 173 */ "tablelist ::= ids cpxName",
/* 174 */ "tablelist ::= ids cpxName ids",
/* 175 */ "tablelist ::= tablelist COMMA ids cpxName",
/* 176 */ "tablelist ::= tablelist COMMA ids cpxName ids",
/* 177 */ "tmvar ::= VARIABLE",
/* 178 */ "interval_opt ::= INTERVAL LP tmvar RP",
/* 179 */ "interval_opt ::= INTERVAL LP tmvar COMMA tmvar RP",
/* 180 */ "interval_opt ::=",
/* 181 */ "session_option ::=",
/* 182 */ "session_option ::= SESSION LP ids cpxName COMMA tmvar RP",
/* 183 */ "fill_opt ::=",
/* 184 */ "fill_opt ::= FILL LP ID COMMA tagitemlist RP",
/* 185 */ "fill_opt ::= FILL LP ID RP",
/* 186 */ "sliding_opt ::= SLIDING LP tmvar RP",
/* 187 */ "sliding_opt ::=",
/* 188 */ "orderby_opt ::=",
/* 189 */ "orderby_opt ::= ORDER BY sortlist",
/* 190 */ "sortlist ::= sortlist COMMA item sortorder",
/* 191 */ "sortlist ::= item sortorder",
/* 192 */ "item ::= ids cpxName",
/* 193 */ "sortorder ::= ASC",
/* 194 */ "sortorder ::= DESC",
/* 195 */ "sortorder ::=",
/* 196 */ "groupby_opt ::=",
/* 197 */ "groupby_opt ::= GROUP BY grouplist",
/* 198 */ "grouplist ::= grouplist COMMA item",
/* 199 */ "grouplist ::= item",
/* 200 */ "having_opt ::=",
/* 201 */ "having_opt ::= HAVING expr",
/* 202 */ "limit_opt ::=",
/* 203 */ "limit_opt ::= LIMIT signed",
/* 204 */ "limit_opt ::= LIMIT signed OFFSET signed",
/* 205 */ "limit_opt ::= LIMIT signed COMMA signed",
/* 206 */ "slimit_opt ::=",
/* 207 */ "slimit_opt ::= SLIMIT signed",
/* 208 */ "slimit_opt ::= SLIMIT signed SOFFSET signed",
/* 209 */ "slimit_opt ::= SLIMIT signed COMMA signed",
/* 210 */ "where_opt ::=",
/* 211 */ "where_opt ::= WHERE expr",
/* 212 */ "expr ::= LP expr RP",
/* 213 */ "expr ::= ID",
/* 214 */ "expr ::= ID DOT ID",
/* 215 */ "expr ::= ID DOT STAR",
/* 216 */ "expr ::= INTEGER",
/* 217 */ "expr ::= MINUS INTEGER",
/* 218 */ "expr ::= PLUS INTEGER",
/* 219 */ "expr ::= FLOAT",
/* 220 */ "expr ::= MINUS FLOAT",
/* 221 */ "expr ::= PLUS FLOAT",
/* 222 */ "expr ::= STRING",
/* 223 */ "expr ::= NOW",
/* 224 */ "expr ::= VARIABLE",
/* 225 */ "expr ::= PLUS VARIABLE",
/* 226 */ "expr ::= MINUS VARIABLE",
/* 227 */ "expr ::= BOOL",
/* 228 */ "expr ::= NULL",
/* 229 */ "expr ::= ID LP exprlist RP",
/* 230 */ "expr ::= ID LP STAR RP",
/* 231 */ "expr ::= expr IS NULL",
/* 232 */ "expr ::= expr IS NOT NULL",
/* 233 */ "expr ::= expr LT expr",
/* 234 */ "expr ::= expr GT expr",
/* 235 */ "expr ::= expr LE expr",
/* 236 */ "expr ::= expr GE expr",
/* 237 */ "expr ::= expr NE expr",
/* 238 */ "expr ::= expr EQ expr",
/* 239 */ "expr ::= expr BETWEEN expr AND expr",
/* 240 */ "expr ::= expr AND expr",
/* 241 */ "expr ::= expr OR expr",
/* 242 */ "expr ::= expr PLUS expr",
/* 243 */ "expr ::= expr MINUS expr",
/* 244 */ "expr ::= expr STAR expr",
/* 245 */ "expr ::= expr SLASH expr",
/* 246 */ "expr ::= expr REM expr",
/* 247 */ "expr ::= expr LIKE expr",
/* 248 */ "expr ::= expr IN LP exprlist RP",
/* 249 */ "exprlist ::= exprlist COMMA expritem",
/* 250 */ "exprlist ::= expritem",
/* 251 */ "expritem ::= expr",
/* 252 */ "expritem ::=",
/* 253 */ "cmd ::= RESET QUERY CACHE",
/* 254 */ "cmd ::= SYNCDB ids REPLICA",
/* 255 */ "cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist",
/* 256 */ "cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids",
/* 257 */ "cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist",
/* 258 */ "cmd ::= ALTER TABLE ids cpxName DROP TAG ids",
/* 259 */ "cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids",
/* 260 */ "cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem",
/* 261 */ "cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist",
/* 262 */ "cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids",
/* 263 */ "cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist",
/* 264 */ "cmd ::= ALTER STABLE ids cpxName DROP TAG ids",
/* 265 */ "cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids",
/* 266 */ "cmd ::= KILL CONNECTION INTEGER",
/* 267 */ "cmd ::= KILL STREAM INTEGER COLON INTEGER",
/* 268 */ "cmd ::= KILL QUERY INTEGER COLON INTEGER",
/* 172 */ "from ::= FROM sub",
/* 173 */ "sub ::= LP union RP",
/* 174 */ "sub ::= LP union RP ids",
/* 175 */ "sub ::= sub COMMA LP union RP ids",
/* 176 */ "tablelist ::= ids cpxName",
/* 177 */ "tablelist ::= ids cpxName ids",
/* 178 */ "tablelist ::= tablelist COMMA ids cpxName",
/* 179 */ "tablelist ::= tablelist COMMA ids cpxName ids",
/* 180 */ "tmvar ::= VARIABLE",
/* 181 */ "interval_opt ::= INTERVAL LP tmvar RP",
/* 182 */ "interval_opt ::= INTERVAL LP tmvar COMMA tmvar RP",
/* 183 */ "interval_opt ::=",
/* 184 */ "session_option ::=",
/* 185 */ "session_option ::= SESSION LP ids cpxName COMMA tmvar RP",
/* 186 */ "fill_opt ::=",
/* 187 */ "fill_opt ::= FILL LP ID COMMA tagitemlist RP",
/* 188 */ "fill_opt ::= FILL LP ID RP",
/* 189 */ "sliding_opt ::= SLIDING LP tmvar RP",
/* 190 */ "sliding_opt ::=",
/* 191 */ "orderby_opt ::=",
/* 192 */ "orderby_opt ::= ORDER BY sortlist",
/* 193 */ "sortlist ::= sortlist COMMA item sortorder",
/* 194 */ "sortlist ::= item sortorder",
/* 195 */ "item ::= ids cpxName",
/* 196 */ "sortorder ::= ASC",
/* 197 */ "sortorder ::= DESC",
/* 198 */ "sortorder ::=",
/* 199 */ "groupby_opt ::=",
/* 200 */ "groupby_opt ::= GROUP BY grouplist",
/* 201 */ "grouplist ::= grouplist COMMA item",
/* 202 */ "grouplist ::= item",
/* 203 */ "having_opt ::=",
/* 204 */ "having_opt ::= HAVING expr",
/* 205 */ "limit_opt ::=",
/* 206 */ "limit_opt ::= LIMIT signed",
/* 207 */ "limit_opt ::= LIMIT signed OFFSET signed",
/* 208 */ "limit_opt ::= LIMIT signed COMMA signed",
/* 209 */ "slimit_opt ::=",
/* 210 */ "slimit_opt ::= SLIMIT signed",
/* 211 */ "slimit_opt ::= SLIMIT signed SOFFSET signed",
/* 212 */ "slimit_opt ::= SLIMIT signed COMMA signed",
/* 213 */ "where_opt ::=",
/* 214 */ "where_opt ::= WHERE expr",
/* 215 */ "expr ::= LP expr RP",
/* 216 */ "expr ::= ID",
/* 217 */ "expr ::= ID DOT ID",
/* 218 */ "expr ::= ID DOT STAR",
/* 219 */ "expr ::= INTEGER",
/* 220 */ "expr ::= MINUS INTEGER",
/* 221 */ "expr ::= PLUS INTEGER",
/* 222 */ "expr ::= FLOAT",
/* 223 */ "expr ::= MINUS FLOAT",
/* 224 */ "expr ::= PLUS FLOAT",
/* 225 */ "expr ::= STRING",
/* 226 */ "expr ::= NOW",
/* 227 */ "expr ::= VARIABLE",
/* 228 */ "expr ::= PLUS VARIABLE",
/* 229 */ "expr ::= MINUS VARIABLE",
/* 230 */ "expr ::= BOOL",
/* 231 */ "expr ::= NULL",
/* 232 */ "expr ::= ID LP exprlist RP",
/* 233 */ "expr ::= ID LP STAR RP",
/* 234 */ "expr ::= expr IS NULL",
/* 235 */ "expr ::= expr IS NOT NULL",
/* 236 */ "expr ::= expr LT expr",
/* 237 */ "expr ::= expr GT expr",
/* 238 */ "expr ::= expr LE expr",
/* 239 */ "expr ::= expr GE expr",
/* 240 */ "expr ::= expr NE expr",
/* 241 */ "expr ::= expr EQ expr",
/* 242 */ "expr ::= expr BETWEEN expr AND expr",
/* 243 */ "expr ::= expr AND expr",
/* 244 */ "expr ::= expr OR expr",
/* 245 */ "expr ::= expr PLUS expr",
/* 246 */ "expr ::= expr MINUS expr",
/* 247 */ "expr ::= expr STAR expr",
/* 248 */ "expr ::= expr SLASH expr",
/* 249 */ "expr ::= expr REM expr",
/* 250 */ "expr ::= expr LIKE expr",
/* 251 */ "expr ::= expr IN LP exprlist RP",
/* 252 */ "exprlist ::= exprlist COMMA expritem",
/* 253 */ "exprlist ::= expritem",
/* 254 */ "expritem ::= expr",
/* 255 */ "expritem ::=",
/* 256 */ "cmd ::= RESET QUERY CACHE",
/* 257 */ "cmd ::= SYNCDB ids REPLICA",
/* 258 */ "cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist",
/* 259 */ "cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids",
/* 260 */ "cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist",
/* 261 */ "cmd ::= ALTER TABLE ids cpxName DROP TAG ids",
/* 262 */ "cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids",
/* 263 */ "cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem",
/* 264 */ "cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist",
/* 265 */ "cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids",
/* 266 */ "cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist",
/* 267 */ "cmd ::= ALTER STABLE ids cpxName DROP TAG ids",
/* 268 */ "cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids",
/* 269 */ "cmd ::= KILL CONNECTION INTEGER",
/* 270 */ "cmd ::= KILL STREAM INTEGER COLON INTEGER",
/* 271 */ "cmd ::= KILL QUERY INTEGER COLON INTEGER",
};
#endif /* NDEBUG */
......@@ -1415,51 +1424,52 @@ static void yy_destructor(
case 242: /* fill_opt */
case 244: /* groupby_opt */
case 245: /* orderby_opt */
case 256: /* sortlist */
case 260: /* grouplist */
case 257: /* sortlist */
case 261: /* grouplist */
{
taosArrayDestroy((yypminor->yy159));
taosArrayDestroy((yypminor->yy285));
}
break;
case 230: /* create_table_list */
{
destroyCreateTableSql((yypminor->yy14));
destroyCreateTableSql((yypminor->yy470));
}
break;
case 234: /* select */
{
destroySqlNode((yypminor->yy116));
destroySqlNode((yypminor->yy344));
}
break;
case 237: /* selcollist */
case 250: /* sclp */
case 261: /* exprlist */
case 262: /* exprlist */
{
tSqlExprListDestroy((yypminor->yy159));
tSqlExprListDestroy((yypminor->yy285));
}
break;
case 238: /* from */
case 254: /* tablelist */
case 255: /* sub */
{
destroyRelationInfo((yypminor->yy236));
destroyRelationInfo((yypminor->yy148));
}
break;
case 239: /* where_opt */
case 246: /* having_opt */
case 252: /* expr */
case 262: /* expritem */
case 263: /* expritem */
{
tSqlExprDestroy((yypminor->yy118));
tSqlExprDestroy((yypminor->yy178));
}
break;
case 249: /* union */
{
destroyAllSqlNode((yypminor->yy159));
destroyAllSqlNode((yypminor->yy285));
}
break;
case 257: /* sortitem */
case 258: /* sortitem */
{
tVariantDestroy(&(yypminor->yy488));
tVariantDestroy(&(yypminor->yy362));
}
break;
/********* End destructor definitions *****************************************/
......@@ -1925,103 +1935,106 @@ static const struct {
{ 251, -1 }, /* (169) distinct ::= DISTINCT */
{ 251, 0 }, /* (170) distinct ::= */
{ 238, -2 }, /* (171) from ::= FROM tablelist */
{ 238, -4 }, /* (172) from ::= FROM LP union RP */
{ 254, -2 }, /* (173) tablelist ::= ids cpxName */
{ 254, -3 }, /* (174) tablelist ::= ids cpxName ids */
{ 254, -4 }, /* (175) tablelist ::= tablelist COMMA ids cpxName */
{ 254, -5 }, /* (176) tablelist ::= tablelist COMMA ids cpxName ids */
{ 255, -1 }, /* (177) tmvar ::= VARIABLE */
{ 240, -4 }, /* (178) interval_opt ::= INTERVAL LP tmvar RP */
{ 240, -6 }, /* (179) interval_opt ::= INTERVAL LP tmvar COMMA tmvar RP */
{ 240, 0 }, /* (180) interval_opt ::= */
{ 241, 0 }, /* (181) session_option ::= */
{ 241, -7 }, /* (182) session_option ::= SESSION LP ids cpxName COMMA tmvar RP */
{ 242, 0 }, /* (183) fill_opt ::= */
{ 242, -6 }, /* (184) fill_opt ::= FILL LP ID COMMA tagitemlist RP */
{ 242, -4 }, /* (185) fill_opt ::= FILL LP ID RP */
{ 243, -4 }, /* (186) sliding_opt ::= SLIDING LP tmvar RP */
{ 243, 0 }, /* (187) sliding_opt ::= */
{ 245, 0 }, /* (188) orderby_opt ::= */
{ 245, -3 }, /* (189) orderby_opt ::= ORDER BY sortlist */
{ 256, -4 }, /* (190) sortlist ::= sortlist COMMA item sortorder */
{ 256, -2 }, /* (191) sortlist ::= item sortorder */
{ 258, -2 }, /* (192) item ::= ids cpxName */
{ 259, -1 }, /* (193) sortorder ::= ASC */
{ 259, -1 }, /* (194) sortorder ::= DESC */
{ 259, 0 }, /* (195) sortorder ::= */
{ 244, 0 }, /* (196) groupby_opt ::= */
{ 244, -3 }, /* (197) groupby_opt ::= GROUP BY grouplist */
{ 260, -3 }, /* (198) grouplist ::= grouplist COMMA item */
{ 260, -1 }, /* (199) grouplist ::= item */
{ 246, 0 }, /* (200) having_opt ::= */
{ 246, -2 }, /* (201) having_opt ::= HAVING expr */
{ 248, 0 }, /* (202) limit_opt ::= */
{ 248, -2 }, /* (203) limit_opt ::= LIMIT signed */
{ 248, -4 }, /* (204) limit_opt ::= LIMIT signed OFFSET signed */
{ 248, -4 }, /* (205) limit_opt ::= LIMIT signed COMMA signed */
{ 247, 0 }, /* (206) slimit_opt ::= */
{ 247, -2 }, /* (207) slimit_opt ::= SLIMIT signed */
{ 247, -4 }, /* (208) slimit_opt ::= SLIMIT signed SOFFSET signed */
{ 247, -4 }, /* (209) slimit_opt ::= SLIMIT signed COMMA signed */
{ 239, 0 }, /* (210) where_opt ::= */
{ 239, -2 }, /* (211) where_opt ::= WHERE expr */
{ 252, -3 }, /* (212) expr ::= LP expr RP */
{ 252, -1 }, /* (213) expr ::= ID */
{ 252, -3 }, /* (214) expr ::= ID DOT ID */
{ 252, -3 }, /* (215) expr ::= ID DOT STAR */
{ 252, -1 }, /* (216) expr ::= INTEGER */
{ 252, -2 }, /* (217) expr ::= MINUS INTEGER */
{ 252, -2 }, /* (218) expr ::= PLUS INTEGER */
{ 252, -1 }, /* (219) expr ::= FLOAT */
{ 252, -2 }, /* (220) expr ::= MINUS FLOAT */
{ 252, -2 }, /* (221) expr ::= PLUS FLOAT */
{ 252, -1 }, /* (222) expr ::= STRING */
{ 252, -1 }, /* (223) expr ::= NOW */
{ 252, -1 }, /* (224) expr ::= VARIABLE */
{ 252, -2 }, /* (225) expr ::= PLUS VARIABLE */
{ 252, -2 }, /* (226) expr ::= MINUS VARIABLE */
{ 252, -1 }, /* (227) expr ::= BOOL */
{ 252, -1 }, /* (228) expr ::= NULL */
{ 252, -4 }, /* (229) expr ::= ID LP exprlist RP */
{ 252, -4 }, /* (230) expr ::= ID LP STAR RP */
{ 252, -3 }, /* (231) expr ::= expr IS NULL */
{ 252, -4 }, /* (232) expr ::= expr IS NOT NULL */
{ 252, -3 }, /* (233) expr ::= expr LT expr */
{ 252, -3 }, /* (234) expr ::= expr GT expr */
{ 252, -3 }, /* (235) expr ::= expr LE expr */
{ 252, -3 }, /* (236) expr ::= expr GE expr */
{ 252, -3 }, /* (237) expr ::= expr NE expr */
{ 252, -3 }, /* (238) expr ::= expr EQ expr */
{ 252, -5 }, /* (239) expr ::= expr BETWEEN expr AND expr */
{ 252, -3 }, /* (240) expr ::= expr AND expr */
{ 252, -3 }, /* (241) expr ::= expr OR expr */
{ 252, -3 }, /* (242) expr ::= expr PLUS expr */
{ 252, -3 }, /* (243) expr ::= expr MINUS expr */
{ 252, -3 }, /* (244) expr ::= expr STAR expr */
{ 252, -3 }, /* (245) expr ::= expr SLASH expr */
{ 252, -3 }, /* (246) expr ::= expr REM expr */
{ 252, -3 }, /* (247) expr ::= expr LIKE expr */
{ 252, -5 }, /* (248) expr ::= expr IN LP exprlist RP */
{ 261, -3 }, /* (249) exprlist ::= exprlist COMMA expritem */
{ 261, -1 }, /* (250) exprlist ::= expritem */
{ 262, -1 }, /* (251) expritem ::= expr */
{ 262, 0 }, /* (252) expritem ::= */
{ 189, -3 }, /* (253) cmd ::= RESET QUERY CACHE */
{ 189, -3 }, /* (254) cmd ::= SYNCDB ids REPLICA */
{ 189, -7 }, /* (255) cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */
{ 189, -7 }, /* (256) cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */
{ 189, -7 }, /* (257) cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */
{ 189, -7 }, /* (258) cmd ::= ALTER TABLE ids cpxName DROP TAG ids */
{ 189, -8 }, /* (259) cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */
{ 189, -9 }, /* (260) cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */
{ 189, -7 }, /* (261) cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */
{ 189, -7 }, /* (262) cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */
{ 189, -7 }, /* (263) cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */
{ 189, -7 }, /* (264) cmd ::= ALTER STABLE ids cpxName DROP TAG ids */
{ 189, -8 }, /* (265) cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */
{ 189, -3 }, /* (266) cmd ::= KILL CONNECTION INTEGER */
{ 189, -5 }, /* (267) cmd ::= KILL STREAM INTEGER COLON INTEGER */
{ 189, -5 }, /* (268) cmd ::= KILL QUERY INTEGER COLON INTEGER */
{ 238, -2 }, /* (172) from ::= FROM sub */
{ 255, -3 }, /* (173) sub ::= LP union RP */
{ 255, -4 }, /* (174) sub ::= LP union RP ids */
{ 255, -6 }, /* (175) sub ::= sub COMMA LP union RP ids */
{ 254, -2 }, /* (176) tablelist ::= ids cpxName */
{ 254, -3 }, /* (177) tablelist ::= ids cpxName ids */
{ 254, -4 }, /* (178) tablelist ::= tablelist COMMA ids cpxName */
{ 254, -5 }, /* (179) tablelist ::= tablelist COMMA ids cpxName ids */
{ 256, -1 }, /* (180) tmvar ::= VARIABLE */
{ 240, -4 }, /* (181) interval_opt ::= INTERVAL LP tmvar RP */
{ 240, -6 }, /* (182) interval_opt ::= INTERVAL LP tmvar COMMA tmvar RP */
{ 240, 0 }, /* (183) interval_opt ::= */
{ 241, 0 }, /* (184) session_option ::= */
{ 241, -7 }, /* (185) session_option ::= SESSION LP ids cpxName COMMA tmvar RP */
{ 242, 0 }, /* (186) fill_opt ::= */
{ 242, -6 }, /* (187) fill_opt ::= FILL LP ID COMMA tagitemlist RP */
{ 242, -4 }, /* (188) fill_opt ::= FILL LP ID RP */
{ 243, -4 }, /* (189) sliding_opt ::= SLIDING LP tmvar RP */
{ 243, 0 }, /* (190) sliding_opt ::= */
{ 245, 0 }, /* (191) orderby_opt ::= */
{ 245, -3 }, /* (192) orderby_opt ::= ORDER BY sortlist */
{ 257, -4 }, /* (193) sortlist ::= sortlist COMMA item sortorder */
{ 257, -2 }, /* (194) sortlist ::= item sortorder */
{ 259, -2 }, /* (195) item ::= ids cpxName */
{ 260, -1 }, /* (196) sortorder ::= ASC */
{ 260, -1 }, /* (197) sortorder ::= DESC */
{ 260, 0 }, /* (198) sortorder ::= */
{ 244, 0 }, /* (199) groupby_opt ::= */
{ 244, -3 }, /* (200) groupby_opt ::= GROUP BY grouplist */
{ 261, -3 }, /* (201) grouplist ::= grouplist COMMA item */
{ 261, -1 }, /* (202) grouplist ::= item */
{ 246, 0 }, /* (203) having_opt ::= */
{ 246, -2 }, /* (204) having_opt ::= HAVING expr */
{ 248, 0 }, /* (205) limit_opt ::= */
{ 248, -2 }, /* (206) limit_opt ::= LIMIT signed */
{ 248, -4 }, /* (207) limit_opt ::= LIMIT signed OFFSET signed */
{ 248, -4 }, /* (208) limit_opt ::= LIMIT signed COMMA signed */
{ 247, 0 }, /* (209) slimit_opt ::= */
{ 247, -2 }, /* (210) slimit_opt ::= SLIMIT signed */
{ 247, -4 }, /* (211) slimit_opt ::= SLIMIT signed SOFFSET signed */
{ 247, -4 }, /* (212) slimit_opt ::= SLIMIT signed COMMA signed */
{ 239, 0 }, /* (213) where_opt ::= */
{ 239, -2 }, /* (214) where_opt ::= WHERE expr */
{ 252, -3 }, /* (215) expr ::= LP expr RP */
{ 252, -1 }, /* (216) expr ::= ID */
{ 252, -3 }, /* (217) expr ::= ID DOT ID */
{ 252, -3 }, /* (218) expr ::= ID DOT STAR */
{ 252, -1 }, /* (219) expr ::= INTEGER */
{ 252, -2 }, /* (220) expr ::= MINUS INTEGER */
{ 252, -2 }, /* (221) expr ::= PLUS INTEGER */
{ 252, -1 }, /* (222) expr ::= FLOAT */
{ 252, -2 }, /* (223) expr ::= MINUS FLOAT */
{ 252, -2 }, /* (224) expr ::= PLUS FLOAT */
{ 252, -1 }, /* (225) expr ::= STRING */
{ 252, -1 }, /* (226) expr ::= NOW */
{ 252, -1 }, /* (227) expr ::= VARIABLE */
{ 252, -2 }, /* (228) expr ::= PLUS VARIABLE */
{ 252, -2 }, /* (229) expr ::= MINUS VARIABLE */
{ 252, -1 }, /* (230) expr ::= BOOL */
{ 252, -1 }, /* (231) expr ::= NULL */
{ 252, -4 }, /* (232) expr ::= ID LP exprlist RP */
{ 252, -4 }, /* (233) expr ::= ID LP STAR RP */
{ 252, -3 }, /* (234) expr ::= expr IS NULL */
{ 252, -4 }, /* (235) expr ::= expr IS NOT NULL */
{ 252, -3 }, /* (236) expr ::= expr LT expr */
{ 252, -3 }, /* (237) expr ::= expr GT expr */
{ 252, -3 }, /* (238) expr ::= expr LE expr */
{ 252, -3 }, /* (239) expr ::= expr GE expr */
{ 252, -3 }, /* (240) expr ::= expr NE expr */
{ 252, -3 }, /* (241) expr ::= expr EQ expr */
{ 252, -5 }, /* (242) expr ::= expr BETWEEN expr AND expr */
{ 252, -3 }, /* (243) expr ::= expr AND expr */
{ 252, -3 }, /* (244) expr ::= expr OR expr */
{ 252, -3 }, /* (245) expr ::= expr PLUS expr */
{ 252, -3 }, /* (246) expr ::= expr MINUS expr */
{ 252, -3 }, /* (247) expr ::= expr STAR expr */
{ 252, -3 }, /* (248) expr ::= expr SLASH expr */
{ 252, -3 }, /* (249) expr ::= expr REM expr */
{ 252, -3 }, /* (250) expr ::= expr LIKE expr */
{ 252, -5 }, /* (251) expr ::= expr IN LP exprlist RP */
{ 262, -3 }, /* (252) exprlist ::= exprlist COMMA expritem */
{ 262, -1 }, /* (253) exprlist ::= expritem */
{ 263, -1 }, /* (254) expritem ::= expr */
{ 263, 0 }, /* (255) expritem ::= */
{ 189, -3 }, /* (256) cmd ::= RESET QUERY CACHE */
{ 189, -3 }, /* (257) cmd ::= SYNCDB ids REPLICA */
{ 189, -7 }, /* (258) cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */
{ 189, -7 }, /* (259) cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */
{ 189, -7 }, /* (260) cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */
{ 189, -7 }, /* (261) cmd ::= ALTER TABLE ids cpxName DROP TAG ids */
{ 189, -8 }, /* (262) cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */
{ 189, -9 }, /* (263) cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */
{ 189, -7 }, /* (264) cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */
{ 189, -7 }, /* (265) cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */
{ 189, -7 }, /* (266) cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */
{ 189, -7 }, /* (267) cmd ::= ALTER STABLE ids cpxName DROP TAG ids */
{ 189, -8 }, /* (268) cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */
{ 189, -3 }, /* (269) cmd ::= KILL CONNECTION INTEGER */
{ 189, -5 }, /* (270) cmd ::= KILL STREAM INTEGER COLON INTEGER */
{ 189, -5 }, /* (271) cmd ::= KILL QUERY INTEGER COLON INTEGER */
};
static void yy_accept(yyParser*); /* Forward Declaration */
......@@ -2268,13 +2281,13 @@ static void yy_reduce(
break;
case 43: /* cmd ::= ALTER DATABASE ids alter_db_optr */
case 44: /* cmd ::= ALTER TOPIC ids alter_topic_optr */ yytestcase(yyruleno==44);
{ SStrToken t = {0}; setCreateDbInfo(pInfo, TSDB_SQL_ALTER_DB, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy322, &t);}
{ SStrToken t = {0}; setCreateDbInfo(pInfo, TSDB_SQL_ALTER_DB, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy526, &t);}
break;
case 45: /* cmd ::= ALTER ACCOUNT ids acct_optr */
{ setCreateAcctSql(pInfo, TSDB_SQL_ALTER_ACCT, &yymsp[-1].minor.yy0, NULL, &yymsp[0].minor.yy351);}
{ setCreateAcctSql(pInfo, TSDB_SQL_ALTER_ACCT, &yymsp[-1].minor.yy0, NULL, &yymsp[0].minor.yy187);}
break;
case 46: /* cmd ::= ALTER ACCOUNT ids PASS ids acct_optr */
{ setCreateAcctSql(pInfo, TSDB_SQL_ALTER_ACCT, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy351);}
{ setCreateAcctSql(pInfo, TSDB_SQL_ALTER_ACCT, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy187);}
break;
case 47: /* ids ::= ID */
case 48: /* ids ::= STRING */ yytestcase(yyruleno==48);
......@@ -2296,11 +2309,11 @@ static void yy_reduce(
{ setDCLSqlElems(pInfo, TSDB_SQL_CREATE_DNODE, 1, &yymsp[0].minor.yy0);}
break;
case 54: /* cmd ::= CREATE ACCOUNT ids PASS ids acct_optr */
{ setCreateAcctSql(pInfo, TSDB_SQL_CREATE_ACCT, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy351);}
{ setCreateAcctSql(pInfo, TSDB_SQL_CREATE_ACCT, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy187);}
break;
case 55: /* cmd ::= CREATE DATABASE ifnotexists ids db_optr */
case 56: /* cmd ::= CREATE TOPIC ifnotexists ids topic_optr */ yytestcase(yyruleno==56);
{ setCreateDbInfo(pInfo, TSDB_SQL_CREATE_DB, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy322, &yymsp[-2].minor.yy0);}
{ setCreateDbInfo(pInfo, TSDB_SQL_CREATE_DB, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy526, &yymsp[-2].minor.yy0);}
break;
case 57: /* cmd ::= CREATE USER ids PASS ids */
{ setCreateUserSql(pInfo, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0);}
......@@ -2329,20 +2342,20 @@ static void yy_reduce(
break;
case 76: /* acct_optr ::= pps tseries storage streams qtime dbs users conns state */
{
yylhsminor.yy351.maxUsers = (yymsp[-2].minor.yy0.n>0)?atoi(yymsp[-2].minor.yy0.z):-1;
yylhsminor.yy351.maxDbs = (yymsp[-3].minor.yy0.n>0)?atoi(yymsp[-3].minor.yy0.z):-1;
yylhsminor.yy351.maxTimeSeries = (yymsp[-7].minor.yy0.n>0)?atoi(yymsp[-7].minor.yy0.z):-1;
yylhsminor.yy351.maxStreams = (yymsp[-5].minor.yy0.n>0)?atoi(yymsp[-5].minor.yy0.z):-1;
yylhsminor.yy351.maxPointsPerSecond = (yymsp[-8].minor.yy0.n>0)?atoi(yymsp[-8].minor.yy0.z):-1;
yylhsminor.yy351.maxStorage = (yymsp[-6].minor.yy0.n>0)?strtoll(yymsp[-6].minor.yy0.z, NULL, 10):-1;
yylhsminor.yy351.maxQueryTime = (yymsp[-4].minor.yy0.n>0)?strtoll(yymsp[-4].minor.yy0.z, NULL, 10):-1;
yylhsminor.yy351.maxConnections = (yymsp[-1].minor.yy0.n>0)?atoi(yymsp[-1].minor.yy0.z):-1;
yylhsminor.yy351.stat = yymsp[0].minor.yy0;
}
yymsp[-8].minor.yy351 = yylhsminor.yy351;
yylhsminor.yy187.maxUsers = (yymsp[-2].minor.yy0.n>0)?atoi(yymsp[-2].minor.yy0.z):-1;
yylhsminor.yy187.maxDbs = (yymsp[-3].minor.yy0.n>0)?atoi(yymsp[-3].minor.yy0.z):-1;
yylhsminor.yy187.maxTimeSeries = (yymsp[-7].minor.yy0.n>0)?atoi(yymsp[-7].minor.yy0.z):-1;
yylhsminor.yy187.maxStreams = (yymsp[-5].minor.yy0.n>0)?atoi(yymsp[-5].minor.yy0.z):-1;
yylhsminor.yy187.maxPointsPerSecond = (yymsp[-8].minor.yy0.n>0)?atoi(yymsp[-8].minor.yy0.z):-1;
yylhsminor.yy187.maxStorage = (yymsp[-6].minor.yy0.n>0)?strtoll(yymsp[-6].minor.yy0.z, NULL, 10):-1;
yylhsminor.yy187.maxQueryTime = (yymsp[-4].minor.yy0.n>0)?strtoll(yymsp[-4].minor.yy0.z, NULL, 10):-1;
yylhsminor.yy187.maxConnections = (yymsp[-1].minor.yy0.n>0)?atoi(yymsp[-1].minor.yy0.z):-1;
yylhsminor.yy187.stat = yymsp[0].minor.yy0;
}
yymsp[-8].minor.yy187 = yylhsminor.yy187;
break;
case 77: /* keep ::= KEEP tagitemlist */
{ yymsp[-1].minor.yy159 = yymsp[0].minor.yy159; }
{ yymsp[-1].minor.yy285 = yymsp[0].minor.yy285; }
break;
case 78: /* cache ::= CACHE INTEGER */
case 79: /* replica ::= REPLICA INTEGER */ yytestcase(yyruleno==79);
......@@ -2362,234 +2375,234 @@ static void yy_reduce(
{ yymsp[-1].minor.yy0 = yymsp[0].minor.yy0; }
break;
case 93: /* db_optr ::= */
{setDefaultCreateDbOption(&yymsp[1].minor.yy322); yymsp[1].minor.yy322.dbType = TSDB_DB_TYPE_DEFAULT;}
{setDefaultCreateDbOption(&yymsp[1].minor.yy526); yymsp[1].minor.yy526.dbType = TSDB_DB_TYPE_DEFAULT;}
break;
case 94: /* db_optr ::= db_optr cache */
{ yylhsminor.yy322 = yymsp[-1].minor.yy322; yylhsminor.yy322.cacheBlockSize = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
yymsp[-1].minor.yy322 = yylhsminor.yy322;
{ yylhsminor.yy526 = yymsp[-1].minor.yy526; yylhsminor.yy526.cacheBlockSize = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
yymsp[-1].minor.yy526 = yylhsminor.yy526;
break;
case 95: /* db_optr ::= db_optr replica */
case 112: /* alter_db_optr ::= alter_db_optr replica */ yytestcase(yyruleno==112);
{ yylhsminor.yy322 = yymsp[-1].minor.yy322; yylhsminor.yy322.replica = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
yymsp[-1].minor.yy322 = yylhsminor.yy322;
{ yylhsminor.yy526 = yymsp[-1].minor.yy526; yylhsminor.yy526.replica = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
yymsp[-1].minor.yy526 = yylhsminor.yy526;
break;
case 96: /* db_optr ::= db_optr quorum */
case 113: /* alter_db_optr ::= alter_db_optr quorum */ yytestcase(yyruleno==113);
{ yylhsminor.yy322 = yymsp[-1].minor.yy322; yylhsminor.yy322.quorum = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
yymsp[-1].minor.yy322 = yylhsminor.yy322;
{ yylhsminor.yy526 = yymsp[-1].minor.yy526; yylhsminor.yy526.quorum = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
yymsp[-1].minor.yy526 = yylhsminor.yy526;
break;
case 97: /* db_optr ::= db_optr days */
{ yylhsminor.yy322 = yymsp[-1].minor.yy322; yylhsminor.yy322.daysPerFile = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
yymsp[-1].minor.yy322 = yylhsminor.yy322;
{ yylhsminor.yy526 = yymsp[-1].minor.yy526; yylhsminor.yy526.daysPerFile = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
yymsp[-1].minor.yy526 = yylhsminor.yy526;
break;
case 98: /* db_optr ::= db_optr minrows */
{ yylhsminor.yy322 = yymsp[-1].minor.yy322; yylhsminor.yy322.minRowsPerBlock = strtod(yymsp[0].minor.yy0.z, NULL); }
yymsp[-1].minor.yy322 = yylhsminor.yy322;
{ yylhsminor.yy526 = yymsp[-1].minor.yy526; yylhsminor.yy526.minRowsPerBlock = strtod(yymsp[0].minor.yy0.z, NULL); }
yymsp[-1].minor.yy526 = yylhsminor.yy526;
break;
case 99: /* db_optr ::= db_optr maxrows */
{ yylhsminor.yy322 = yymsp[-1].minor.yy322; yylhsminor.yy322.maxRowsPerBlock = strtod(yymsp[0].minor.yy0.z, NULL); }
yymsp[-1].minor.yy322 = yylhsminor.yy322;
{ yylhsminor.yy526 = yymsp[-1].minor.yy526; yylhsminor.yy526.maxRowsPerBlock = strtod(yymsp[0].minor.yy0.z, NULL); }
yymsp[-1].minor.yy526 = yylhsminor.yy526;
break;
case 100: /* db_optr ::= db_optr blocks */
case 115: /* alter_db_optr ::= alter_db_optr blocks */ yytestcase(yyruleno==115);
{ yylhsminor.yy322 = yymsp[-1].minor.yy322; yylhsminor.yy322.numOfBlocks = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
yymsp[-1].minor.yy322 = yylhsminor.yy322;
{ yylhsminor.yy526 = yymsp[-1].minor.yy526; yylhsminor.yy526.numOfBlocks = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
yymsp[-1].minor.yy526 = yylhsminor.yy526;
break;
case 101: /* db_optr ::= db_optr ctime */
{ yylhsminor.yy322 = yymsp[-1].minor.yy322; yylhsminor.yy322.commitTime = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
yymsp[-1].minor.yy322 = yylhsminor.yy322;
{ yylhsminor.yy526 = yymsp[-1].minor.yy526; yylhsminor.yy526.commitTime = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
yymsp[-1].minor.yy526 = yylhsminor.yy526;
break;
case 102: /* db_optr ::= db_optr wal */
case 117: /* alter_db_optr ::= alter_db_optr wal */ yytestcase(yyruleno==117);
{ yylhsminor.yy322 = yymsp[-1].minor.yy322; yylhsminor.yy322.walLevel = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
yymsp[-1].minor.yy322 = yylhsminor.yy322;
{ yylhsminor.yy526 = yymsp[-1].minor.yy526; yylhsminor.yy526.walLevel = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
yymsp[-1].minor.yy526 = yylhsminor.yy526;
break;
case 103: /* db_optr ::= db_optr fsync */
case 118: /* alter_db_optr ::= alter_db_optr fsync */ yytestcase(yyruleno==118);
{ yylhsminor.yy322 = yymsp[-1].minor.yy322; yylhsminor.yy322.fsyncPeriod = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
yymsp[-1].minor.yy322 = yylhsminor.yy322;
{ yylhsminor.yy526 = yymsp[-1].minor.yy526; yylhsminor.yy526.fsyncPeriod = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
yymsp[-1].minor.yy526 = yylhsminor.yy526;
break;
case 104: /* db_optr ::= db_optr comp */
case 116: /* alter_db_optr ::= alter_db_optr comp */ yytestcase(yyruleno==116);
{ yylhsminor.yy322 = yymsp[-1].minor.yy322; yylhsminor.yy322.compressionLevel = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
yymsp[-1].minor.yy322 = yylhsminor.yy322;
{ yylhsminor.yy526 = yymsp[-1].minor.yy526; yylhsminor.yy526.compressionLevel = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
yymsp[-1].minor.yy526 = yylhsminor.yy526;
break;
case 105: /* db_optr ::= db_optr prec */
{ yylhsminor.yy322 = yymsp[-1].minor.yy322; yylhsminor.yy322.precision = yymsp[0].minor.yy0; }
yymsp[-1].minor.yy322 = yylhsminor.yy322;
{ yylhsminor.yy526 = yymsp[-1].minor.yy526; yylhsminor.yy526.precision = yymsp[0].minor.yy0; }
yymsp[-1].minor.yy526 = yylhsminor.yy526;
break;
case 106: /* db_optr ::= db_optr keep */
case 114: /* alter_db_optr ::= alter_db_optr keep */ yytestcase(yyruleno==114);
{ yylhsminor.yy322 = yymsp[-1].minor.yy322; yylhsminor.yy322.keep = yymsp[0].minor.yy159; }
yymsp[-1].minor.yy322 = yylhsminor.yy322;
{ yylhsminor.yy526 = yymsp[-1].minor.yy526; yylhsminor.yy526.keep = yymsp[0].minor.yy285; }
yymsp[-1].minor.yy526 = yylhsminor.yy526;
break;
case 107: /* db_optr ::= db_optr update */
case 119: /* alter_db_optr ::= alter_db_optr update */ yytestcase(yyruleno==119);
{ yylhsminor.yy322 = yymsp[-1].minor.yy322; yylhsminor.yy322.update = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
yymsp[-1].minor.yy322 = yylhsminor.yy322;
{ yylhsminor.yy526 = yymsp[-1].minor.yy526; yylhsminor.yy526.update = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
yymsp[-1].minor.yy526 = yylhsminor.yy526;
break;
case 108: /* db_optr ::= db_optr cachelast */
case 120: /* alter_db_optr ::= alter_db_optr cachelast */ yytestcase(yyruleno==120);
{ yylhsminor.yy322 = yymsp[-1].minor.yy322; yylhsminor.yy322.cachelast = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
yymsp[-1].minor.yy322 = yylhsminor.yy322;
{ yylhsminor.yy526 = yymsp[-1].minor.yy526; yylhsminor.yy526.cachelast = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
yymsp[-1].minor.yy526 = yylhsminor.yy526;
break;
case 109: /* topic_optr ::= db_optr */
case 121: /* alter_topic_optr ::= alter_db_optr */ yytestcase(yyruleno==121);
{ yylhsminor.yy322 = yymsp[0].minor.yy322; yylhsminor.yy322.dbType = TSDB_DB_TYPE_TOPIC; }
yymsp[0].minor.yy322 = yylhsminor.yy322;
{ yylhsminor.yy526 = yymsp[0].minor.yy526; yylhsminor.yy526.dbType = TSDB_DB_TYPE_TOPIC; }
yymsp[0].minor.yy526 = yylhsminor.yy526;
break;
case 110: /* topic_optr ::= topic_optr partitions */
case 122: /* alter_topic_optr ::= alter_topic_optr partitions */ yytestcase(yyruleno==122);
{ yylhsminor.yy322 = yymsp[-1].minor.yy322; yylhsminor.yy322.partitions = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
yymsp[-1].minor.yy322 = yylhsminor.yy322;
{ yylhsminor.yy526 = yymsp[-1].minor.yy526; yylhsminor.yy526.partitions = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
yymsp[-1].minor.yy526 = yylhsminor.yy526;
break;
case 111: /* alter_db_optr ::= */
{ setDefaultCreateDbOption(&yymsp[1].minor.yy322); yymsp[1].minor.yy322.dbType = TSDB_DB_TYPE_DEFAULT;}
{ setDefaultCreateDbOption(&yymsp[1].minor.yy526); yymsp[1].minor.yy526.dbType = TSDB_DB_TYPE_DEFAULT;}
break;
case 123: /* typename ::= ids */
{
yymsp[0].minor.yy0.type = 0;
tSetColumnType (&yylhsminor.yy407, &yymsp[0].minor.yy0);
tSetColumnType (&yylhsminor.yy295, &yymsp[0].minor.yy0);
}
yymsp[0].minor.yy407 = yylhsminor.yy407;
yymsp[0].minor.yy295 = yylhsminor.yy295;
break;
case 124: /* typename ::= ids LP signed RP */
{
if (yymsp[-1].minor.yy317 <= 0) {
if (yymsp[-1].minor.yy525 <= 0) {
yymsp[-3].minor.yy0.type = 0;
tSetColumnType(&yylhsminor.yy407, &yymsp[-3].minor.yy0);
tSetColumnType(&yylhsminor.yy295, &yymsp[-3].minor.yy0);
} else {
yymsp[-3].minor.yy0.type = -yymsp[-1].minor.yy317; // negative value of name length
tSetColumnType(&yylhsminor.yy407, &yymsp[-3].minor.yy0);
yymsp[-3].minor.yy0.type = -yymsp[-1].minor.yy525; // negative value of name length
tSetColumnType(&yylhsminor.yy295, &yymsp[-3].minor.yy0);
}
}
yymsp[-3].minor.yy407 = yylhsminor.yy407;
yymsp[-3].minor.yy295 = yylhsminor.yy295;
break;
case 125: /* typename ::= ids UNSIGNED */
{
yymsp[-1].minor.yy0.type = 0;
yymsp[-1].minor.yy0.n = ((yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z);
tSetColumnType (&yylhsminor.yy407, &yymsp[-1].minor.yy0);
tSetColumnType (&yylhsminor.yy295, &yymsp[-1].minor.yy0);
}
yymsp[-1].minor.yy407 = yylhsminor.yy407;
yymsp[-1].minor.yy295 = yylhsminor.yy295;
break;
case 126: /* signed ::= INTEGER */
{ yylhsminor.yy317 = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
yymsp[0].minor.yy317 = yylhsminor.yy317;
{ yylhsminor.yy525 = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
yymsp[0].minor.yy525 = yylhsminor.yy525;
break;
case 127: /* signed ::= PLUS INTEGER */
{ yymsp[-1].minor.yy317 = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
{ yymsp[-1].minor.yy525 = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
break;
case 128: /* signed ::= MINUS INTEGER */
{ yymsp[-1].minor.yy317 = -strtol(yymsp[0].minor.yy0.z, NULL, 10);}
{ yymsp[-1].minor.yy525 = -strtol(yymsp[0].minor.yy0.z, NULL, 10);}
break;
case 132: /* cmd ::= CREATE TABLE create_table_list */
{ pInfo->type = TSDB_SQL_CREATE_TABLE; pInfo->pCreateTableInfo = yymsp[0].minor.yy14;}
{ pInfo->type = TSDB_SQL_CREATE_TABLE; pInfo->pCreateTableInfo = yymsp[0].minor.yy470;}
break;
case 133: /* create_table_list ::= create_from_stable */
{
SCreateTableSql* pCreateTable = calloc(1, sizeof(SCreateTableSql));
pCreateTable->childTableInfo = taosArrayInit(4, sizeof(SCreatedTableInfo));
taosArrayPush(pCreateTable->childTableInfo, &yymsp[0].minor.yy206);
taosArrayPush(pCreateTable->childTableInfo, &yymsp[0].minor.yy96);
pCreateTable->type = TSQL_CREATE_TABLE_FROM_STABLE;
yylhsminor.yy14 = pCreateTable;
yylhsminor.yy470 = pCreateTable;
}
yymsp[0].minor.yy14 = yylhsminor.yy14;
yymsp[0].minor.yy470 = yylhsminor.yy470;
break;
case 134: /* create_table_list ::= create_table_list create_from_stable */
{
taosArrayPush(yymsp[-1].minor.yy14->childTableInfo, &yymsp[0].minor.yy206);
yylhsminor.yy14 = yymsp[-1].minor.yy14;
taosArrayPush(yymsp[-1].minor.yy470->childTableInfo, &yymsp[0].minor.yy96);
yylhsminor.yy470 = yymsp[-1].minor.yy470;
}
yymsp[-1].minor.yy14 = yylhsminor.yy14;
yymsp[-1].minor.yy470 = yylhsminor.yy470;
break;
case 135: /* create_table_args ::= ifnotexists ids cpxName LP columnlist RP */
{
yylhsminor.yy14 = tSetCreateTableInfo(yymsp[-1].minor.yy159, NULL, NULL, TSQL_CREATE_TABLE);
setSqlInfo(pInfo, yylhsminor.yy14, NULL, TSDB_SQL_CREATE_TABLE);
yylhsminor.yy470 = tSetCreateTableInfo(yymsp[-1].minor.yy285, NULL, NULL, TSQL_CREATE_TABLE);
setSqlInfo(pInfo, yylhsminor.yy470, NULL, TSDB_SQL_CREATE_TABLE);
yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n;
setCreatedTableName(pInfo, &yymsp[-4].minor.yy0, &yymsp[-5].minor.yy0);
}
yymsp[-5].minor.yy14 = yylhsminor.yy14;
yymsp[-5].minor.yy470 = yylhsminor.yy470;
break;
case 136: /* create_stable_args ::= ifnotexists ids cpxName LP columnlist RP TAGS LP columnlist RP */
{
yylhsminor.yy14 = tSetCreateTableInfo(yymsp[-5].minor.yy159, yymsp[-1].minor.yy159, NULL, TSQL_CREATE_STABLE);
setSqlInfo(pInfo, yylhsminor.yy14, NULL, TSDB_SQL_CREATE_TABLE);
yylhsminor.yy470 = tSetCreateTableInfo(yymsp[-5].minor.yy285, yymsp[-1].minor.yy285, NULL, TSQL_CREATE_STABLE);
setSqlInfo(pInfo, yylhsminor.yy470, NULL, TSDB_SQL_CREATE_TABLE);
yymsp[-8].minor.yy0.n += yymsp[-7].minor.yy0.n;
setCreatedTableName(pInfo, &yymsp[-8].minor.yy0, &yymsp[-9].minor.yy0);
}
yymsp[-9].minor.yy14 = yylhsminor.yy14;
yymsp[-9].minor.yy470 = yylhsminor.yy470;
break;
case 137: /* create_from_stable ::= ifnotexists ids cpxName USING ids cpxName TAGS LP tagitemlist RP */
{
yymsp[-5].minor.yy0.n += yymsp[-4].minor.yy0.n;
yymsp[-8].minor.yy0.n += yymsp[-7].minor.yy0.n;
yylhsminor.yy206 = createNewChildTableInfo(&yymsp[-5].minor.yy0, NULL, yymsp[-1].minor.yy159, &yymsp[-8].minor.yy0, &yymsp[-9].minor.yy0);
yylhsminor.yy96 = createNewChildTableInfo(&yymsp[-5].minor.yy0, NULL, yymsp[-1].minor.yy285, &yymsp[-8].minor.yy0, &yymsp[-9].minor.yy0);
}
yymsp[-9].minor.yy206 = yylhsminor.yy206;
yymsp[-9].minor.yy96 = yylhsminor.yy96;
break;
case 138: /* create_from_stable ::= ifnotexists ids cpxName USING ids cpxName LP tagNamelist RP TAGS LP tagitemlist RP */
{
yymsp[-8].minor.yy0.n += yymsp[-7].minor.yy0.n;
yymsp[-11].minor.yy0.n += yymsp[-10].minor.yy0.n;
yylhsminor.yy206 = createNewChildTableInfo(&yymsp[-8].minor.yy0, yymsp[-5].minor.yy159, yymsp[-1].minor.yy159, &yymsp[-11].minor.yy0, &yymsp[-12].minor.yy0);
yylhsminor.yy96 = createNewChildTableInfo(&yymsp[-8].minor.yy0, yymsp[-5].minor.yy285, yymsp[-1].minor.yy285, &yymsp[-11].minor.yy0, &yymsp[-12].minor.yy0);
}
yymsp[-12].minor.yy206 = yylhsminor.yy206;
yymsp[-12].minor.yy96 = yylhsminor.yy96;
break;
case 139: /* tagNamelist ::= tagNamelist COMMA ids */
{taosArrayPush(yymsp[-2].minor.yy159, &yymsp[0].minor.yy0); yylhsminor.yy159 = yymsp[-2].minor.yy159; }
yymsp[-2].minor.yy159 = yylhsminor.yy159;
{taosArrayPush(yymsp[-2].minor.yy285, &yymsp[0].minor.yy0); yylhsminor.yy285 = yymsp[-2].minor.yy285; }
yymsp[-2].minor.yy285 = yylhsminor.yy285;
break;
case 140: /* tagNamelist ::= ids */
{yylhsminor.yy159 = taosArrayInit(4, sizeof(SStrToken)); taosArrayPush(yylhsminor.yy159, &yymsp[0].minor.yy0);}
yymsp[0].minor.yy159 = yylhsminor.yy159;
{yylhsminor.yy285 = taosArrayInit(4, sizeof(SStrToken)); taosArrayPush(yylhsminor.yy285, &yymsp[0].minor.yy0);}
yymsp[0].minor.yy285 = yylhsminor.yy285;
break;
case 141: /* create_table_args ::= ifnotexists ids cpxName AS select */
{
yylhsminor.yy14 = tSetCreateTableInfo(NULL, NULL, yymsp[0].minor.yy116, TSQL_CREATE_STREAM);
setSqlInfo(pInfo, yylhsminor.yy14, NULL, TSDB_SQL_CREATE_TABLE);
yylhsminor.yy470 = tSetCreateTableInfo(NULL, NULL, yymsp[0].minor.yy344, TSQL_CREATE_STREAM);
setSqlInfo(pInfo, yylhsminor.yy470, NULL, TSDB_SQL_CREATE_TABLE);
yymsp[-3].minor.yy0.n += yymsp[-2].minor.yy0.n;
setCreatedTableName(pInfo, &yymsp[-3].minor.yy0, &yymsp[-4].minor.yy0);
}
yymsp[-4].minor.yy14 = yylhsminor.yy14;
yymsp[-4].minor.yy470 = yylhsminor.yy470;
break;
case 142: /* columnlist ::= columnlist COMMA column */
{taosArrayPush(yymsp[-2].minor.yy159, &yymsp[0].minor.yy407); yylhsminor.yy159 = yymsp[-2].minor.yy159; }
yymsp[-2].minor.yy159 = yylhsminor.yy159;
{taosArrayPush(yymsp[-2].minor.yy285, &yymsp[0].minor.yy295); yylhsminor.yy285 = yymsp[-2].minor.yy285; }
yymsp[-2].minor.yy285 = yylhsminor.yy285;
break;
case 143: /* columnlist ::= column */
{yylhsminor.yy159 = taosArrayInit(4, sizeof(TAOS_FIELD)); taosArrayPush(yylhsminor.yy159, &yymsp[0].minor.yy407);}
yymsp[0].minor.yy159 = yylhsminor.yy159;
{yylhsminor.yy285 = taosArrayInit(4, sizeof(TAOS_FIELD)); taosArrayPush(yylhsminor.yy285, &yymsp[0].minor.yy295);}
yymsp[0].minor.yy285 = yylhsminor.yy285;
break;
case 144: /* column ::= ids typename */
{
tSetColumnInfo(&yylhsminor.yy407, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy407);
tSetColumnInfo(&yylhsminor.yy295, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy295);
}
yymsp[-1].minor.yy407 = yylhsminor.yy407;
yymsp[-1].minor.yy295 = yylhsminor.yy295;
break;
case 145: /* tagitemlist ::= tagitemlist COMMA tagitem */
{ yylhsminor.yy159 = tVariantListAppend(yymsp[-2].minor.yy159, &yymsp[0].minor.yy488, -1); }
yymsp[-2].minor.yy159 = yylhsminor.yy159;
{ yylhsminor.yy285 = tVariantListAppend(yymsp[-2].minor.yy285, &yymsp[0].minor.yy362, -1); }
yymsp[-2].minor.yy285 = yylhsminor.yy285;
break;
case 146: /* tagitemlist ::= tagitem */
{ yylhsminor.yy159 = tVariantListAppend(NULL, &yymsp[0].minor.yy488, -1); }
yymsp[0].minor.yy159 = yylhsminor.yy159;
{ yylhsminor.yy285 = tVariantListAppend(NULL, &yymsp[0].minor.yy362, -1); }
yymsp[0].minor.yy285 = yylhsminor.yy285;
break;
case 147: /* tagitem ::= INTEGER */
case 148: /* tagitem ::= FLOAT */ yytestcase(yyruleno==148);
case 149: /* tagitem ::= STRING */ yytestcase(yyruleno==149);
case 150: /* tagitem ::= BOOL */ yytestcase(yyruleno==150);
{ toTSDBType(yymsp[0].minor.yy0.type); tVariantCreate(&yylhsminor.yy488, &yymsp[0].minor.yy0); }
yymsp[0].minor.yy488 = yylhsminor.yy488;
{ toTSDBType(yymsp[0].minor.yy0.type); tVariantCreate(&yylhsminor.yy362, &yymsp[0].minor.yy0); }
yymsp[0].minor.yy362 = yylhsminor.yy362;
break;
case 151: /* tagitem ::= NULL */
{ yymsp[0].minor.yy0.type = 0; tVariantCreate(&yylhsminor.yy488, &yymsp[0].minor.yy0); }
yymsp[0].minor.yy488 = yylhsminor.yy488;
{ yymsp[0].minor.yy0.type = 0; tVariantCreate(&yylhsminor.yy362, &yymsp[0].minor.yy0); }
yymsp[0].minor.yy362 = yylhsminor.yy362;
break;
case 152: /* tagitem ::= MINUS INTEGER */
case 153: /* tagitem ::= MINUS FLOAT */ yytestcase(yyruleno==153);
......@@ -2599,56 +2612,56 @@ static void yy_reduce(
yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n;
yymsp[-1].minor.yy0.type = yymsp[0].minor.yy0.type;
toTSDBType(yymsp[-1].minor.yy0.type);
tVariantCreate(&yylhsminor.yy488, &yymsp[-1].minor.yy0);
tVariantCreate(&yylhsminor.yy362, &yymsp[-1].minor.yy0);
}
yymsp[-1].minor.yy488 = yylhsminor.yy488;
yymsp[-1].minor.yy362 = yylhsminor.yy362;
break;
case 156: /* select ::= SELECT selcollist from where_opt interval_opt session_option fill_opt sliding_opt groupby_opt orderby_opt having_opt slimit_opt limit_opt */
{
yylhsminor.yy116 = tSetQuerySqlNode(&yymsp[-12].minor.yy0, yymsp[-11].minor.yy159, yymsp[-10].minor.yy236, yymsp[-9].minor.yy118, yymsp[-4].minor.yy159, yymsp[-3].minor.yy159, &yymsp[-8].minor.yy184, &yymsp[-7].minor.yy249, &yymsp[-5].minor.yy0, yymsp[-6].minor.yy159, &yymsp[0].minor.yy440, &yymsp[-1].minor.yy440, yymsp[-2].minor.yy118);
yylhsminor.yy344 = tSetQuerySqlNode(&yymsp[-12].minor.yy0, yymsp[-11].minor.yy285, yymsp[-10].minor.yy148, yymsp[-9].minor.yy178, yymsp[-4].minor.yy285, yymsp[-3].minor.yy285, &yymsp[-8].minor.yy376, &yymsp[-7].minor.yy523, &yymsp[-5].minor.yy0, yymsp[-6].minor.yy285, &yymsp[0].minor.yy438, &yymsp[-1].minor.yy438, yymsp[-2].minor.yy178);
}
yymsp[-12].minor.yy116 = yylhsminor.yy116;
yymsp[-12].minor.yy344 = yylhsminor.yy344;
break;
case 157: /* select ::= LP select RP */
{yymsp[-2].minor.yy116 = yymsp[-1].minor.yy116;}
{yymsp[-2].minor.yy344 = yymsp[-1].minor.yy344;}
break;
case 158: /* union ::= select */
{ yylhsminor.yy159 = setSubclause(NULL, yymsp[0].minor.yy116); }
yymsp[0].minor.yy159 = yylhsminor.yy159;
{ yylhsminor.yy285 = setSubclause(NULL, yymsp[0].minor.yy344); }
yymsp[0].minor.yy285 = yylhsminor.yy285;
break;
case 159: /* union ::= union UNION ALL select */
{ yylhsminor.yy159 = appendSelectClause(yymsp[-3].minor.yy159, yymsp[0].minor.yy116); }
yymsp[-3].minor.yy159 = yylhsminor.yy159;
{ yylhsminor.yy285 = appendSelectClause(yymsp[-3].minor.yy285, yymsp[0].minor.yy344); }
yymsp[-3].minor.yy285 = yylhsminor.yy285;
break;
case 160: /* cmd ::= union */
{ setSqlInfo(pInfo, yymsp[0].minor.yy159, NULL, TSDB_SQL_SELECT); }
{ setSqlInfo(pInfo, yymsp[0].minor.yy285, NULL, TSDB_SQL_SELECT); }
break;
case 161: /* select ::= SELECT selcollist */
{
yylhsminor.yy116 = tSetQuerySqlNode(&yymsp[-1].minor.yy0, yymsp[0].minor.yy159, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
yylhsminor.yy344 = tSetQuerySqlNode(&yymsp[-1].minor.yy0, yymsp[0].minor.yy285, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
}
yymsp[-1].minor.yy116 = yylhsminor.yy116;
yymsp[-1].minor.yy344 = yylhsminor.yy344;
break;
case 162: /* sclp ::= selcollist COMMA */
{yylhsminor.yy159 = yymsp[-1].minor.yy159;}
yymsp[-1].minor.yy159 = yylhsminor.yy159;
{yylhsminor.yy285 = yymsp[-1].minor.yy285;}
yymsp[-1].minor.yy285 = yylhsminor.yy285;
break;
case 163: /* sclp ::= */
case 188: /* orderby_opt ::= */ yytestcase(yyruleno==188);
{yymsp[1].minor.yy159 = 0;}
case 191: /* orderby_opt ::= */ yytestcase(yyruleno==191);
{yymsp[1].minor.yy285 = 0;}
break;
case 164: /* selcollist ::= sclp distinct expr as */
{
yylhsminor.yy159 = tSqlExprListAppend(yymsp[-3].minor.yy159, yymsp[-1].minor.yy118, yymsp[-2].minor.yy0.n? &yymsp[-2].minor.yy0:0, yymsp[0].minor.yy0.n?&yymsp[0].minor.yy0:0);
yylhsminor.yy285 = tSqlExprListAppend(yymsp[-3].minor.yy285, yymsp[-1].minor.yy178, yymsp[-2].minor.yy0.n? &yymsp[-2].minor.yy0:0, yymsp[0].minor.yy0.n?&yymsp[0].minor.yy0:0);
}
yymsp[-3].minor.yy159 = yylhsminor.yy159;
yymsp[-3].minor.yy285 = yylhsminor.yy285;
break;
case 165: /* selcollist ::= sclp STAR */
{
tSqlExpr *pNode = tSqlExprCreateIdValue(NULL, TK_ALL);
yylhsminor.yy159 = tSqlExprListAppend(yymsp[-1].minor.yy159, pNode, 0, 0);
yylhsminor.yy285 = tSqlExprListAppend(yymsp[-1].minor.yy285, pNode, 0, 0);
}
yymsp[-1].minor.yy159 = yylhsminor.yy159;
yymsp[-1].minor.yy285 = yylhsminor.yy285;
break;
case 166: /* as ::= AS ids */
{ yymsp[-1].minor.yy0 = yymsp[0].minor.yy0; }
......@@ -2665,332 +2678,340 @@ static void yy_reduce(
yymsp[0].minor.yy0 = yylhsminor.yy0;
break;
case 171: /* from ::= FROM tablelist */
{yymsp[-1].minor.yy236 = yymsp[0].minor.yy236;}
case 172: /* from ::= FROM sub */ yytestcase(yyruleno==172);
{yymsp[-1].minor.yy148 = yymsp[0].minor.yy148;}
break;
case 172: /* from ::= FROM LP union RP */
{yymsp[-3].minor.yy236 = setSubquery(NULL, yymsp[-1].minor.yy159);}
case 173: /* sub ::= LP union RP */
{yymsp[-2].minor.yy148 = addSubqueryElem(NULL, yymsp[-1].minor.yy285, NULL);}
break;
case 173: /* tablelist ::= ids cpxName */
case 174: /* sub ::= LP union RP ids */
{yymsp[-3].minor.yy148 = addSubqueryElem(NULL, yymsp[-2].minor.yy285, &yymsp[0].minor.yy0);}
break;
case 175: /* sub ::= sub COMMA LP union RP ids */
{yylhsminor.yy148 = addSubqueryElem(yymsp[-5].minor.yy148, yymsp[-2].minor.yy285, &yymsp[0].minor.yy0);}
yymsp[-5].minor.yy148 = yylhsminor.yy148;
break;
case 176: /* tablelist ::= ids cpxName */
{
yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n;
yylhsminor.yy236 = setTableNameList(NULL, &yymsp[-1].minor.yy0, NULL);
yylhsminor.yy148 = setTableNameList(NULL, &yymsp[-1].minor.yy0, NULL);
}
yymsp[-1].minor.yy236 = yylhsminor.yy236;
yymsp[-1].minor.yy148 = yylhsminor.yy148;
break;
case 174: /* tablelist ::= ids cpxName ids */
case 177: /* tablelist ::= ids cpxName ids */
{
yymsp[-2].minor.yy0.n += yymsp[-1].minor.yy0.n;
yylhsminor.yy236 = setTableNameList(NULL, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0);
yylhsminor.yy148 = setTableNameList(NULL, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0);
}
yymsp[-2].minor.yy236 = yylhsminor.yy236;
yymsp[-2].minor.yy148 = yylhsminor.yy148;
break;
case 175: /* tablelist ::= tablelist COMMA ids cpxName */
case 178: /* tablelist ::= tablelist COMMA ids cpxName */
{
yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n;
yylhsminor.yy236 = setTableNameList(yymsp[-3].minor.yy236, &yymsp[-1].minor.yy0, NULL);
yylhsminor.yy148 = setTableNameList(yymsp[-3].minor.yy148, &yymsp[-1].minor.yy0, NULL);
}
yymsp[-3].minor.yy236 = yylhsminor.yy236;
yymsp[-3].minor.yy148 = yylhsminor.yy148;
break;
case 176: /* tablelist ::= tablelist COMMA ids cpxName ids */
case 179: /* tablelist ::= tablelist COMMA ids cpxName ids */
{
yymsp[-2].minor.yy0.n += yymsp[-1].minor.yy0.n;
yylhsminor.yy236 = setTableNameList(yymsp[-4].minor.yy236, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0);
yylhsminor.yy148 = setTableNameList(yymsp[-4].minor.yy148, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0);
}
yymsp[-4].minor.yy236 = yylhsminor.yy236;
yymsp[-4].minor.yy148 = yylhsminor.yy148;
break;
case 177: /* tmvar ::= VARIABLE */
case 180: /* tmvar ::= VARIABLE */
{yylhsminor.yy0 = yymsp[0].minor.yy0;}
yymsp[0].minor.yy0 = yylhsminor.yy0;
break;
case 178: /* interval_opt ::= INTERVAL LP tmvar RP */
{yymsp[-3].minor.yy184.interval = yymsp[-1].minor.yy0; yymsp[-3].minor.yy184.offset.n = 0;}
case 181: /* interval_opt ::= INTERVAL LP tmvar RP */
{yymsp[-3].minor.yy376.interval = yymsp[-1].minor.yy0; yymsp[-3].minor.yy376.offset.n = 0;}
break;
case 179: /* interval_opt ::= INTERVAL LP tmvar COMMA tmvar RP */
{yymsp[-5].minor.yy184.interval = yymsp[-3].minor.yy0; yymsp[-5].minor.yy184.offset = yymsp[-1].minor.yy0;}
case 182: /* interval_opt ::= INTERVAL LP tmvar COMMA tmvar RP */
{yymsp[-5].minor.yy376.interval = yymsp[-3].minor.yy0; yymsp[-5].minor.yy376.offset = yymsp[-1].minor.yy0;}
break;
case 180: /* interval_opt ::= */
{memset(&yymsp[1].minor.yy184, 0, sizeof(yymsp[1].minor.yy184));}
case 183: /* interval_opt ::= */
{memset(&yymsp[1].minor.yy376, 0, sizeof(yymsp[1].minor.yy376));}
break;
case 181: /* session_option ::= */
{yymsp[1].minor.yy249.col.n = 0; yymsp[1].minor.yy249.gap.n = 0;}
case 184: /* session_option ::= */
{yymsp[1].minor.yy523.col.n = 0; yymsp[1].minor.yy523.gap.n = 0;}
break;
case 182: /* session_option ::= SESSION LP ids cpxName COMMA tmvar RP */
case 185: /* session_option ::= SESSION LP ids cpxName COMMA tmvar RP */
{
yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n;
yymsp[-6].minor.yy249.col = yymsp[-4].minor.yy0;
yymsp[-6].minor.yy249.gap = yymsp[-1].minor.yy0;
yymsp[-6].minor.yy523.col = yymsp[-4].minor.yy0;
yymsp[-6].minor.yy523.gap = yymsp[-1].minor.yy0;
}
break;
case 183: /* fill_opt ::= */
{ yymsp[1].minor.yy159 = 0; }
case 186: /* fill_opt ::= */
{ yymsp[1].minor.yy285 = 0; }
break;
case 184: /* fill_opt ::= FILL LP ID COMMA tagitemlist RP */
case 187: /* fill_opt ::= FILL LP ID COMMA tagitemlist RP */
{
tVariant A = {0};
toTSDBType(yymsp[-3].minor.yy0.type);
tVariantCreate(&A, &yymsp[-3].minor.yy0);
tVariantListInsert(yymsp[-1].minor.yy159, &A, -1, 0);
yymsp[-5].minor.yy159 = yymsp[-1].minor.yy159;
tVariantListInsert(yymsp[-1].minor.yy285, &A, -1, 0);
yymsp[-5].minor.yy285 = yymsp[-1].minor.yy285;
}
break;
case 185: /* fill_opt ::= FILL LP ID RP */
case 188: /* fill_opt ::= FILL LP ID RP */
{
toTSDBType(yymsp[-1].minor.yy0.type);
yymsp[-3].minor.yy159 = tVariantListAppendToken(NULL, &yymsp[-1].minor.yy0, -1);
yymsp[-3].minor.yy285 = tVariantListAppendToken(NULL, &yymsp[-1].minor.yy0, -1);
}
break;
case 186: /* sliding_opt ::= SLIDING LP tmvar RP */
case 189: /* sliding_opt ::= SLIDING LP tmvar RP */
{yymsp[-3].minor.yy0 = yymsp[-1].minor.yy0; }
break;
case 187: /* sliding_opt ::= */
case 190: /* sliding_opt ::= */
{yymsp[1].minor.yy0.n = 0; yymsp[1].minor.yy0.z = NULL; yymsp[1].minor.yy0.type = 0; }
break;
case 189: /* orderby_opt ::= ORDER BY sortlist */
{yymsp[-2].minor.yy159 = yymsp[0].minor.yy159;}
case 192: /* orderby_opt ::= ORDER BY sortlist */
{yymsp[-2].minor.yy285 = yymsp[0].minor.yy285;}
break;
case 190: /* sortlist ::= sortlist COMMA item sortorder */
case 193: /* sortlist ::= sortlist COMMA item sortorder */
{
yylhsminor.yy159 = tVariantListAppend(yymsp[-3].minor.yy159, &yymsp[-1].minor.yy488, yymsp[0].minor.yy20);
yylhsminor.yy285 = tVariantListAppend(yymsp[-3].minor.yy285, &yymsp[-1].minor.yy362, yymsp[0].minor.yy460);
}
yymsp[-3].minor.yy159 = yylhsminor.yy159;
yymsp[-3].minor.yy285 = yylhsminor.yy285;
break;
case 191: /* sortlist ::= item sortorder */
case 194: /* sortlist ::= item sortorder */
{
yylhsminor.yy159 = tVariantListAppend(NULL, &yymsp[-1].minor.yy488, yymsp[0].minor.yy20);
yylhsminor.yy285 = tVariantListAppend(NULL, &yymsp[-1].minor.yy362, yymsp[0].minor.yy460);
}
yymsp[-1].minor.yy159 = yylhsminor.yy159;
yymsp[-1].minor.yy285 = yylhsminor.yy285;
break;
case 192: /* item ::= ids cpxName */
case 195: /* item ::= ids cpxName */
{
toTSDBType(yymsp[-1].minor.yy0.type);
yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n;
tVariantCreate(&yylhsminor.yy488, &yymsp[-1].minor.yy0);
tVariantCreate(&yylhsminor.yy362, &yymsp[-1].minor.yy0);
}
yymsp[-1].minor.yy488 = yylhsminor.yy488;
yymsp[-1].minor.yy362 = yylhsminor.yy362;
break;
case 193: /* sortorder ::= ASC */
{ yymsp[0].minor.yy20 = TSDB_ORDER_ASC; }
case 196: /* sortorder ::= ASC */
{ yymsp[0].minor.yy460 = TSDB_ORDER_ASC; }
break;
case 194: /* sortorder ::= DESC */
{ yymsp[0].minor.yy20 = TSDB_ORDER_DESC;}
case 197: /* sortorder ::= DESC */
{ yymsp[0].minor.yy460 = TSDB_ORDER_DESC;}
break;
case 195: /* sortorder ::= */
{ yymsp[1].minor.yy20 = TSDB_ORDER_ASC; }
case 198: /* sortorder ::= */
{ yymsp[1].minor.yy460 = TSDB_ORDER_ASC; }
break;
case 196: /* groupby_opt ::= */
{ yymsp[1].minor.yy159 = 0;}
case 199: /* groupby_opt ::= */
{ yymsp[1].minor.yy285 = 0;}
break;
case 197: /* groupby_opt ::= GROUP BY grouplist */
{ yymsp[-2].minor.yy159 = yymsp[0].minor.yy159;}
case 200: /* groupby_opt ::= GROUP BY grouplist */
{ yymsp[-2].minor.yy285 = yymsp[0].minor.yy285;}
break;
case 198: /* grouplist ::= grouplist COMMA item */
case 201: /* grouplist ::= grouplist COMMA item */
{
yylhsminor.yy159 = tVariantListAppend(yymsp[-2].minor.yy159, &yymsp[0].minor.yy488, -1);
yylhsminor.yy285 = tVariantListAppend(yymsp[-2].minor.yy285, &yymsp[0].minor.yy362, -1);
}
yymsp[-2].minor.yy159 = yylhsminor.yy159;
yymsp[-2].minor.yy285 = yylhsminor.yy285;
break;
case 199: /* grouplist ::= item */
case 202: /* grouplist ::= item */
{
yylhsminor.yy159 = tVariantListAppend(NULL, &yymsp[0].minor.yy488, -1);
yylhsminor.yy285 = tVariantListAppend(NULL, &yymsp[0].minor.yy362, -1);
}
yymsp[0].minor.yy159 = yylhsminor.yy159;
yymsp[0].minor.yy285 = yylhsminor.yy285;
break;
case 200: /* having_opt ::= */
case 210: /* where_opt ::= */ yytestcase(yyruleno==210);
case 252: /* expritem ::= */ yytestcase(yyruleno==252);
{yymsp[1].minor.yy118 = 0;}
case 203: /* having_opt ::= */
case 213: /* where_opt ::= */ yytestcase(yyruleno==213);
case 255: /* expritem ::= */ yytestcase(yyruleno==255);
{yymsp[1].minor.yy178 = 0;}
break;
case 201: /* having_opt ::= HAVING expr */
case 211: /* where_opt ::= WHERE expr */ yytestcase(yyruleno==211);
{yymsp[-1].minor.yy118 = yymsp[0].minor.yy118;}
case 204: /* having_opt ::= HAVING expr */
case 214: /* where_opt ::= WHERE expr */ yytestcase(yyruleno==214);
{yymsp[-1].minor.yy178 = yymsp[0].minor.yy178;}
break;
case 202: /* limit_opt ::= */
case 206: /* slimit_opt ::= */ yytestcase(yyruleno==206);
{yymsp[1].minor.yy440.limit = -1; yymsp[1].minor.yy440.offset = 0;}
case 205: /* limit_opt ::= */
case 209: /* slimit_opt ::= */ yytestcase(yyruleno==209);
{yymsp[1].minor.yy438.limit = -1; yymsp[1].minor.yy438.offset = 0;}
break;
case 203: /* limit_opt ::= LIMIT signed */
case 207: /* slimit_opt ::= SLIMIT signed */ yytestcase(yyruleno==207);
{yymsp[-1].minor.yy440.limit = yymsp[0].minor.yy317; yymsp[-1].minor.yy440.offset = 0;}
case 206: /* limit_opt ::= LIMIT signed */
case 210: /* slimit_opt ::= SLIMIT signed */ yytestcase(yyruleno==210);
{yymsp[-1].minor.yy438.limit = yymsp[0].minor.yy525; yymsp[-1].minor.yy438.offset = 0;}
break;
case 204: /* limit_opt ::= LIMIT signed OFFSET signed */
{ yymsp[-3].minor.yy440.limit = yymsp[-2].minor.yy317; yymsp[-3].minor.yy440.offset = yymsp[0].minor.yy317;}
case 207: /* limit_opt ::= LIMIT signed OFFSET signed */
{ yymsp[-3].minor.yy438.limit = yymsp[-2].minor.yy525; yymsp[-3].minor.yy438.offset = yymsp[0].minor.yy525;}
break;
case 205: /* limit_opt ::= LIMIT signed COMMA signed */
{ yymsp[-3].minor.yy440.limit = yymsp[0].minor.yy317; yymsp[-3].minor.yy440.offset = yymsp[-2].minor.yy317;}
case 208: /* limit_opt ::= LIMIT signed COMMA signed */
{ yymsp[-3].minor.yy438.limit = yymsp[0].minor.yy525; yymsp[-3].minor.yy438.offset = yymsp[-2].minor.yy525;}
break;
case 208: /* slimit_opt ::= SLIMIT signed SOFFSET signed */
{yymsp[-3].minor.yy440.limit = yymsp[-2].minor.yy317; yymsp[-3].minor.yy440.offset = yymsp[0].minor.yy317;}
case 211: /* slimit_opt ::= SLIMIT signed SOFFSET signed */
{yymsp[-3].minor.yy438.limit = yymsp[-2].minor.yy525; yymsp[-3].minor.yy438.offset = yymsp[0].minor.yy525;}
break;
case 209: /* slimit_opt ::= SLIMIT signed COMMA signed */
{yymsp[-3].minor.yy440.limit = yymsp[0].minor.yy317; yymsp[-3].minor.yy440.offset = yymsp[-2].minor.yy317;}
case 212: /* slimit_opt ::= SLIMIT signed COMMA signed */
{yymsp[-3].minor.yy438.limit = yymsp[0].minor.yy525; yymsp[-3].minor.yy438.offset = yymsp[-2].minor.yy525;}
break;
case 212: /* expr ::= LP expr RP */
{yylhsminor.yy118 = yymsp[-1].minor.yy118; yylhsminor.yy118->token.z = yymsp[-2].minor.yy0.z; yylhsminor.yy118->token.n = (yymsp[0].minor.yy0.z - yymsp[-2].minor.yy0.z + 1);}
yymsp[-2].minor.yy118 = yylhsminor.yy118;
case 215: /* expr ::= LP expr RP */
{yylhsminor.yy178 = yymsp[-1].minor.yy178; yylhsminor.yy178->token.z = yymsp[-2].minor.yy0.z; yylhsminor.yy178->token.n = (yymsp[0].minor.yy0.z - yymsp[-2].minor.yy0.z + 1);}
yymsp[-2].minor.yy178 = yylhsminor.yy178;
break;
case 213: /* expr ::= ID */
{ yylhsminor.yy118 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_ID);}
yymsp[0].minor.yy118 = yylhsminor.yy118;
case 216: /* expr ::= ID */
{ yylhsminor.yy178 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_ID);}
yymsp[0].minor.yy178 = yylhsminor.yy178;
break;
case 214: /* expr ::= ID DOT ID */
{ yymsp[-2].minor.yy0.n += (1+yymsp[0].minor.yy0.n); yylhsminor.yy118 = tSqlExprCreateIdValue(&yymsp[-2].minor.yy0, TK_ID);}
yymsp[-2].minor.yy118 = yylhsminor.yy118;
case 217: /* expr ::= ID DOT ID */
{ yymsp[-2].minor.yy0.n += (1+yymsp[0].minor.yy0.n); yylhsminor.yy178 = tSqlExprCreateIdValue(&yymsp[-2].minor.yy0, TK_ID);}
yymsp[-2].minor.yy178 = yylhsminor.yy178;
break;
case 215: /* expr ::= ID DOT STAR */
{ yymsp[-2].minor.yy0.n += (1+yymsp[0].minor.yy0.n); yylhsminor.yy118 = tSqlExprCreateIdValue(&yymsp[-2].minor.yy0, TK_ALL);}
yymsp[-2].minor.yy118 = yylhsminor.yy118;
case 218: /* expr ::= ID DOT STAR */
{ yymsp[-2].minor.yy0.n += (1+yymsp[0].minor.yy0.n); yylhsminor.yy178 = tSqlExprCreateIdValue(&yymsp[-2].minor.yy0, TK_ALL);}
yymsp[-2].minor.yy178 = yylhsminor.yy178;
break;
case 216: /* expr ::= INTEGER */
{ yylhsminor.yy118 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_INTEGER);}
yymsp[0].minor.yy118 = yylhsminor.yy118;
case 219: /* expr ::= INTEGER */
{ yylhsminor.yy178 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_INTEGER);}
yymsp[0].minor.yy178 = yylhsminor.yy178;
break;
case 217: /* expr ::= MINUS INTEGER */
case 218: /* expr ::= PLUS INTEGER */ yytestcase(yyruleno==218);
{ yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yymsp[-1].minor.yy0.type = TK_INTEGER; yylhsminor.yy118 = tSqlExprCreateIdValue(&yymsp[-1].minor.yy0, TK_INTEGER);}
yymsp[-1].minor.yy118 = yylhsminor.yy118;
case 220: /* expr ::= MINUS INTEGER */
case 221: /* expr ::= PLUS INTEGER */ yytestcase(yyruleno==221);
{ yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yymsp[-1].minor.yy0.type = TK_INTEGER; yylhsminor.yy178 = tSqlExprCreateIdValue(&yymsp[-1].minor.yy0, TK_INTEGER);}
yymsp[-1].minor.yy178 = yylhsminor.yy178;
break;
case 219: /* expr ::= FLOAT */
{ yylhsminor.yy118 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_FLOAT);}
yymsp[0].minor.yy118 = yylhsminor.yy118;
case 222: /* expr ::= FLOAT */
{ yylhsminor.yy178 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_FLOAT);}
yymsp[0].minor.yy178 = yylhsminor.yy178;
break;
case 220: /* expr ::= MINUS FLOAT */
case 221: /* expr ::= PLUS FLOAT */ yytestcase(yyruleno==221);
{ yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yymsp[-1].minor.yy0.type = TK_FLOAT; yylhsminor.yy118 = tSqlExprCreateIdValue(&yymsp[-1].minor.yy0, TK_FLOAT);}
yymsp[-1].minor.yy118 = yylhsminor.yy118;
case 223: /* expr ::= MINUS FLOAT */
case 224: /* expr ::= PLUS FLOAT */ yytestcase(yyruleno==224);
{ yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yymsp[-1].minor.yy0.type = TK_FLOAT; yylhsminor.yy178 = tSqlExprCreateIdValue(&yymsp[-1].minor.yy0, TK_FLOAT);}
yymsp[-1].minor.yy178 = yylhsminor.yy178;
break;
case 222: /* expr ::= STRING */
{ yylhsminor.yy118 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_STRING);}
yymsp[0].minor.yy118 = yylhsminor.yy118;
case 225: /* expr ::= STRING */
{ yylhsminor.yy178 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_STRING);}
yymsp[0].minor.yy178 = yylhsminor.yy178;
break;
case 223: /* expr ::= NOW */
{ yylhsminor.yy118 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_NOW); }
yymsp[0].minor.yy118 = yylhsminor.yy118;
case 226: /* expr ::= NOW */
{ yylhsminor.yy178 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_NOW); }
yymsp[0].minor.yy178 = yylhsminor.yy178;
break;
case 224: /* expr ::= VARIABLE */
{ yylhsminor.yy118 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_VARIABLE);}
yymsp[0].minor.yy118 = yylhsminor.yy118;
case 227: /* expr ::= VARIABLE */
{ yylhsminor.yy178 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_VARIABLE);}
yymsp[0].minor.yy178 = yylhsminor.yy178;
break;
case 225: /* expr ::= PLUS VARIABLE */
case 226: /* expr ::= MINUS VARIABLE */ yytestcase(yyruleno==226);
{ yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yymsp[-1].minor.yy0.type = TK_VARIABLE; yylhsminor.yy118 = tSqlExprCreateIdValue(&yymsp[-1].minor.yy0, TK_VARIABLE);}
yymsp[-1].minor.yy118 = yylhsminor.yy118;
case 228: /* expr ::= PLUS VARIABLE */
case 229: /* expr ::= MINUS VARIABLE */ yytestcase(yyruleno==229);
{ yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yymsp[-1].minor.yy0.type = TK_VARIABLE; yylhsminor.yy178 = tSqlExprCreateIdValue(&yymsp[-1].minor.yy0, TK_VARIABLE);}
yymsp[-1].minor.yy178 = yylhsminor.yy178;
break;
case 227: /* expr ::= BOOL */
{ yylhsminor.yy118 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_BOOL);}
yymsp[0].minor.yy118 = yylhsminor.yy118;
case 230: /* expr ::= BOOL */
{ yylhsminor.yy178 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_BOOL);}
yymsp[0].minor.yy178 = yylhsminor.yy178;
break;
case 228: /* expr ::= NULL */
{ yylhsminor.yy118 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_NULL);}
yymsp[0].minor.yy118 = yylhsminor.yy118;
case 231: /* expr ::= NULL */
{ yylhsminor.yy178 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_NULL);}
yymsp[0].minor.yy178 = yylhsminor.yy178;
break;
case 229: /* expr ::= ID LP exprlist RP */
{ yylhsminor.yy118 = tSqlExprCreateFunction(yymsp[-1].minor.yy159, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, yymsp[-3].minor.yy0.type); }
yymsp[-3].minor.yy118 = yylhsminor.yy118;
case 232: /* expr ::= ID LP exprlist RP */
{ yylhsminor.yy178 = tSqlExprCreateFunction(yymsp[-1].minor.yy285, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, yymsp[-3].minor.yy0.type); }
yymsp[-3].minor.yy178 = yylhsminor.yy178;
break;
case 230: /* expr ::= ID LP STAR RP */
{ yylhsminor.yy118 = tSqlExprCreateFunction(NULL, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, yymsp[-3].minor.yy0.type); }
yymsp[-3].minor.yy118 = yylhsminor.yy118;
case 233: /* expr ::= ID LP STAR RP */
{ yylhsminor.yy178 = tSqlExprCreateFunction(NULL, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, yymsp[-3].minor.yy0.type); }
yymsp[-3].minor.yy178 = yylhsminor.yy178;
break;
case 231: /* expr ::= expr IS NULL */
{yylhsminor.yy118 = tSqlExprCreate(yymsp[-2].minor.yy118, NULL, TK_ISNULL);}
yymsp[-2].minor.yy118 = yylhsminor.yy118;
case 234: /* expr ::= expr IS NULL */
{yylhsminor.yy178 = tSqlExprCreate(yymsp[-2].minor.yy178, NULL, TK_ISNULL);}
yymsp[-2].minor.yy178 = yylhsminor.yy178;
break;
case 232: /* expr ::= expr IS NOT NULL */
{yylhsminor.yy118 = tSqlExprCreate(yymsp[-3].minor.yy118, NULL, TK_NOTNULL);}
yymsp[-3].minor.yy118 = yylhsminor.yy118;
case 235: /* expr ::= expr IS NOT NULL */
{yylhsminor.yy178 = tSqlExprCreate(yymsp[-3].minor.yy178, NULL, TK_NOTNULL);}
yymsp[-3].minor.yy178 = yylhsminor.yy178;
break;
case 233: /* expr ::= expr LT expr */
{yylhsminor.yy118 = tSqlExprCreate(yymsp[-2].minor.yy118, yymsp[0].minor.yy118, TK_LT);}
yymsp[-2].minor.yy118 = yylhsminor.yy118;
case 236: /* expr ::= expr LT expr */
{yylhsminor.yy178 = tSqlExprCreate(yymsp[-2].minor.yy178, yymsp[0].minor.yy178, TK_LT);}
yymsp[-2].minor.yy178 = yylhsminor.yy178;
break;
case 234: /* expr ::= expr GT expr */
{yylhsminor.yy118 = tSqlExprCreate(yymsp[-2].minor.yy118, yymsp[0].minor.yy118, TK_GT);}
yymsp[-2].minor.yy118 = yylhsminor.yy118;
case 237: /* expr ::= expr GT expr */
{yylhsminor.yy178 = tSqlExprCreate(yymsp[-2].minor.yy178, yymsp[0].minor.yy178, TK_GT);}
yymsp[-2].minor.yy178 = yylhsminor.yy178;
break;
case 235: /* expr ::= expr LE expr */
{yylhsminor.yy118 = tSqlExprCreate(yymsp[-2].minor.yy118, yymsp[0].minor.yy118, TK_LE);}
yymsp[-2].minor.yy118 = yylhsminor.yy118;
case 238: /* expr ::= expr LE expr */
{yylhsminor.yy178 = tSqlExprCreate(yymsp[-2].minor.yy178, yymsp[0].minor.yy178, TK_LE);}
yymsp[-2].minor.yy178 = yylhsminor.yy178;
break;
case 236: /* expr ::= expr GE expr */
{yylhsminor.yy118 = tSqlExprCreate(yymsp[-2].minor.yy118, yymsp[0].minor.yy118, TK_GE);}
yymsp[-2].minor.yy118 = yylhsminor.yy118;
case 239: /* expr ::= expr GE expr */
{yylhsminor.yy178 = tSqlExprCreate(yymsp[-2].minor.yy178, yymsp[0].minor.yy178, TK_GE);}
yymsp[-2].minor.yy178 = yylhsminor.yy178;
break;
case 237: /* expr ::= expr NE expr */
{yylhsminor.yy118 = tSqlExprCreate(yymsp[-2].minor.yy118, yymsp[0].minor.yy118, TK_NE);}
yymsp[-2].minor.yy118 = yylhsminor.yy118;
case 240: /* expr ::= expr NE expr */
{yylhsminor.yy178 = tSqlExprCreate(yymsp[-2].minor.yy178, yymsp[0].minor.yy178, TK_NE);}
yymsp[-2].minor.yy178 = yylhsminor.yy178;
break;
case 238: /* expr ::= expr EQ expr */
{yylhsminor.yy118 = tSqlExprCreate(yymsp[-2].minor.yy118, yymsp[0].minor.yy118, TK_EQ);}
yymsp[-2].minor.yy118 = yylhsminor.yy118;
case 241: /* expr ::= expr EQ expr */
{yylhsminor.yy178 = tSqlExprCreate(yymsp[-2].minor.yy178, yymsp[0].minor.yy178, TK_EQ);}
yymsp[-2].minor.yy178 = yylhsminor.yy178;
break;
case 239: /* expr ::= expr BETWEEN expr AND expr */
{ tSqlExpr* X2 = tSqlExprClone(yymsp[-4].minor.yy118); yylhsminor.yy118 = tSqlExprCreate(tSqlExprCreate(yymsp[-4].minor.yy118, yymsp[-2].minor.yy118, TK_GE), tSqlExprCreate(X2, yymsp[0].minor.yy118, TK_LE), TK_AND);}
yymsp[-4].minor.yy118 = yylhsminor.yy118;
case 242: /* expr ::= expr BETWEEN expr AND expr */
{ tSqlExpr* X2 = tSqlExprClone(yymsp[-4].minor.yy178); yylhsminor.yy178 = tSqlExprCreate(tSqlExprCreate(yymsp[-4].minor.yy178, yymsp[-2].minor.yy178, TK_GE), tSqlExprCreate(X2, yymsp[0].minor.yy178, TK_LE), TK_AND);}
yymsp[-4].minor.yy178 = yylhsminor.yy178;
break;
case 240: /* expr ::= expr AND expr */
{yylhsminor.yy118 = tSqlExprCreate(yymsp[-2].minor.yy118, yymsp[0].minor.yy118, TK_AND);}
yymsp[-2].minor.yy118 = yylhsminor.yy118;
case 243: /* expr ::= expr AND expr */
{yylhsminor.yy178 = tSqlExprCreate(yymsp[-2].minor.yy178, yymsp[0].minor.yy178, TK_AND);}
yymsp[-2].minor.yy178 = yylhsminor.yy178;
break;
case 241: /* expr ::= expr OR expr */
{yylhsminor.yy118 = tSqlExprCreate(yymsp[-2].minor.yy118, yymsp[0].minor.yy118, TK_OR); }
yymsp[-2].minor.yy118 = yylhsminor.yy118;
case 244: /* expr ::= expr OR expr */
{yylhsminor.yy178 = tSqlExprCreate(yymsp[-2].minor.yy178, yymsp[0].minor.yy178, TK_OR); }
yymsp[-2].minor.yy178 = yylhsminor.yy178;
break;
case 242: /* expr ::= expr PLUS expr */
{yylhsminor.yy118 = tSqlExprCreate(yymsp[-2].minor.yy118, yymsp[0].minor.yy118, TK_PLUS); }
yymsp[-2].minor.yy118 = yylhsminor.yy118;
case 245: /* expr ::= expr PLUS expr */
{yylhsminor.yy178 = tSqlExprCreate(yymsp[-2].minor.yy178, yymsp[0].minor.yy178, TK_PLUS); }
yymsp[-2].minor.yy178 = yylhsminor.yy178;
break;
case 243: /* expr ::= expr MINUS expr */
{yylhsminor.yy118 = tSqlExprCreate(yymsp[-2].minor.yy118, yymsp[0].minor.yy118, TK_MINUS); }
yymsp[-2].minor.yy118 = yylhsminor.yy118;
case 246: /* expr ::= expr MINUS expr */
{yylhsminor.yy178 = tSqlExprCreate(yymsp[-2].minor.yy178, yymsp[0].minor.yy178, TK_MINUS); }
yymsp[-2].minor.yy178 = yylhsminor.yy178;
break;
case 244: /* expr ::= expr STAR expr */
{yylhsminor.yy118 = tSqlExprCreate(yymsp[-2].minor.yy118, yymsp[0].minor.yy118, TK_STAR); }
yymsp[-2].minor.yy118 = yylhsminor.yy118;
case 247: /* expr ::= expr STAR expr */
{yylhsminor.yy178 = tSqlExprCreate(yymsp[-2].minor.yy178, yymsp[0].minor.yy178, TK_STAR); }
yymsp[-2].minor.yy178 = yylhsminor.yy178;
break;
case 245: /* expr ::= expr SLASH expr */
{yylhsminor.yy118 = tSqlExprCreate(yymsp[-2].minor.yy118, yymsp[0].minor.yy118, TK_DIVIDE);}
yymsp[-2].minor.yy118 = yylhsminor.yy118;
case 248: /* expr ::= expr SLASH expr */
{yylhsminor.yy178 = tSqlExprCreate(yymsp[-2].minor.yy178, yymsp[0].minor.yy178, TK_DIVIDE);}
yymsp[-2].minor.yy178 = yylhsminor.yy178;
break;
case 246: /* expr ::= expr REM expr */
{yylhsminor.yy118 = tSqlExprCreate(yymsp[-2].minor.yy118, yymsp[0].minor.yy118, TK_REM); }
yymsp[-2].minor.yy118 = yylhsminor.yy118;
case 249: /* expr ::= expr REM expr */
{yylhsminor.yy178 = tSqlExprCreate(yymsp[-2].minor.yy178, yymsp[0].minor.yy178, TK_REM); }
yymsp[-2].minor.yy178 = yylhsminor.yy178;
break;
case 247: /* expr ::= expr LIKE expr */
{yylhsminor.yy118 = tSqlExprCreate(yymsp[-2].minor.yy118, yymsp[0].minor.yy118, TK_LIKE); }
yymsp[-2].minor.yy118 = yylhsminor.yy118;
case 250: /* expr ::= expr LIKE expr */
{yylhsminor.yy178 = tSqlExprCreate(yymsp[-2].minor.yy178, yymsp[0].minor.yy178, TK_LIKE); }
yymsp[-2].minor.yy178 = yylhsminor.yy178;
break;
case 248: /* expr ::= expr IN LP exprlist RP */
{yylhsminor.yy118 = tSqlExprCreate(yymsp[-4].minor.yy118, (tSqlExpr*)yymsp[-1].minor.yy159, TK_IN); }
yymsp[-4].minor.yy118 = yylhsminor.yy118;
case 251: /* expr ::= expr IN LP exprlist RP */
{yylhsminor.yy178 = tSqlExprCreate(yymsp[-4].minor.yy178, (tSqlExpr*)yymsp[-1].minor.yy285, TK_IN); }
yymsp[-4].minor.yy178 = yylhsminor.yy178;
break;
case 249: /* exprlist ::= exprlist COMMA expritem */
{yylhsminor.yy159 = tSqlExprListAppend(yymsp[-2].minor.yy159,yymsp[0].minor.yy118,0, 0);}
yymsp[-2].minor.yy159 = yylhsminor.yy159;
case 252: /* exprlist ::= exprlist COMMA expritem */
{yylhsminor.yy285 = tSqlExprListAppend(yymsp[-2].minor.yy285,yymsp[0].minor.yy178,0, 0);}
yymsp[-2].minor.yy285 = yylhsminor.yy285;
break;
case 250: /* exprlist ::= expritem */
{yylhsminor.yy159 = tSqlExprListAppend(0,yymsp[0].minor.yy118,0, 0);}
yymsp[0].minor.yy159 = yylhsminor.yy159;
case 253: /* exprlist ::= expritem */
{yylhsminor.yy285 = tSqlExprListAppend(0,yymsp[0].minor.yy178,0, 0);}
yymsp[0].minor.yy285 = yylhsminor.yy285;
break;
case 251: /* expritem ::= expr */
{yylhsminor.yy118 = yymsp[0].minor.yy118;}
yymsp[0].minor.yy118 = yylhsminor.yy118;
case 254: /* expritem ::= expr */
{yylhsminor.yy178 = yymsp[0].minor.yy178;}
yymsp[0].minor.yy178 = yylhsminor.yy178;
break;
case 253: /* cmd ::= RESET QUERY CACHE */
case 256: /* cmd ::= RESET QUERY CACHE */
{ setDCLSqlElems(pInfo, TSDB_SQL_RESET_CACHE, 0);}
break;
case 254: /* cmd ::= SYNCDB ids REPLICA */
case 257: /* cmd ::= SYNCDB ids REPLICA */
{ setDCLSqlElems(pInfo, TSDB_SQL_SYNC_DB_REPLICA, 1, &yymsp[-1].minor.yy0);}
break;
case 255: /* cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */
case 258: /* cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */
{
yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n;
SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy159, NULL, TSDB_ALTER_TABLE_ADD_COLUMN, -1);
SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy285, NULL, TSDB_ALTER_TABLE_ADD_COLUMN, -1);
setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE);
}
break;
case 256: /* cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */
case 259: /* cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */
{
yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n;
......@@ -3001,14 +3022,14 @@ static void yy_reduce(
setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE);
}
break;
case 257: /* cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */
case 260: /* cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */
{
yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n;
SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy159, NULL, TSDB_ALTER_TABLE_ADD_TAG_COLUMN, -1);
SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy285, NULL, TSDB_ALTER_TABLE_ADD_TAG_COLUMN, -1);
setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE);
}
break;
case 258: /* cmd ::= ALTER TABLE ids cpxName DROP TAG ids */
case 261: /* cmd ::= ALTER TABLE ids cpxName DROP TAG ids */
{
yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n;
......@@ -3019,7 +3040,7 @@ static void yy_reduce(
setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE);
}
break;
case 259: /* cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */
case 262: /* cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */
{
yymsp[-5].minor.yy0.n += yymsp[-4].minor.yy0.n;
......@@ -3033,26 +3054,26 @@ static void yy_reduce(
setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE);
}
break;
case 260: /* cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */
case 263: /* cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */
{
yymsp[-6].minor.yy0.n += yymsp[-5].minor.yy0.n;
toTSDBType(yymsp[-2].minor.yy0.type);
SArray* A = tVariantListAppendToken(NULL, &yymsp[-2].minor.yy0, -1);
A = tVariantListAppend(A, &yymsp[0].minor.yy488, -1);
A = tVariantListAppend(A, &yymsp[0].minor.yy362, -1);
SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-6].minor.yy0, NULL, A, TSDB_ALTER_TABLE_UPDATE_TAG_VAL, -1);
setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE);
}
break;
case 261: /* cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */
case 264: /* cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */
{
yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n;
SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy159, NULL, TSDB_ALTER_TABLE_ADD_COLUMN, TSDB_SUPER_TABLE);
SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy285, NULL, TSDB_ALTER_TABLE_ADD_COLUMN, TSDB_SUPER_TABLE);
setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE);
}
break;
case 262: /* cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */
case 265: /* cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */
{
yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n;
......@@ -3063,14 +3084,14 @@ static void yy_reduce(
setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE);
}
break;
case 263: /* cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */
case 266: /* cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */
{
yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n;
SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy159, NULL, TSDB_ALTER_TABLE_ADD_TAG_COLUMN, TSDB_SUPER_TABLE);
SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy285, NULL, TSDB_ALTER_TABLE_ADD_TAG_COLUMN, TSDB_SUPER_TABLE);
setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE);
}
break;
case 264: /* cmd ::= ALTER STABLE ids cpxName DROP TAG ids */
case 267: /* cmd ::= ALTER STABLE ids cpxName DROP TAG ids */
{
yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n;
......@@ -3081,7 +3102,7 @@ static void yy_reduce(
setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE);
}
break;
case 265: /* cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */
case 268: /* cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */
{
yymsp[-5].minor.yy0.n += yymsp[-4].minor.yy0.n;
......@@ -3095,13 +3116,13 @@ static void yy_reduce(
setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE);
}
break;
case 266: /* cmd ::= KILL CONNECTION INTEGER */
case 269: /* cmd ::= KILL CONNECTION INTEGER */
{setKillSql(pInfo, TSDB_SQL_KILL_CONNECTION, &yymsp[0].minor.yy0);}
break;
case 267: /* cmd ::= KILL STREAM INTEGER COLON INTEGER */
case 270: /* cmd ::= KILL STREAM INTEGER COLON INTEGER */
{yymsp[-2].minor.yy0.n += (yymsp[-1].minor.yy0.n + yymsp[0].minor.yy0.n); setKillSql(pInfo, TSDB_SQL_KILL_STREAM, &yymsp[-2].minor.yy0);}
break;
case 268: /* cmd ::= KILL QUERY INTEGER COLON INTEGER */
case 271: /* cmd ::= KILL QUERY INTEGER COLON INTEGER */
{yymsp[-2].minor.yy0.n += (yymsp[-1].minor.yy0.n + yymsp[0].minor.yy0.n); setKillSql(pInfo, TSDB_SQL_KILL_QUERY, &yymsp[-2].minor.yy0);}
break;
default:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册