提交 54e15db2 编写于 作者: X Xiaoyu Wang

TD-13747 show mnodes

上级 8fcf2cc6
...@@ -87,7 +87,7 @@ tests/comparisonTest/opentsdb/opentsdbtest/.settings/ ...@@ -87,7 +87,7 @@ tests/comparisonTest/opentsdb/opentsdbtest/.settings/
tests/examples/JDBC/JDBCDemo/.classpath tests/examples/JDBC/JDBCDemo/.classpath
tests/examples/JDBC/JDBCDemo/.project tests/examples/JDBC/JDBCDemo/.project
tests/examples/JDBC/JDBCDemo/.settings/ tests/examples/JDBC/JDBCDemo/.settings/
source/libs/parser/inc/new_sql.* source/libs/parser/inc/sql.*
# Emacs # Emacs
# -*- mode: gitignore; -*- # -*- mode: gitignore; -*-
......
...@@ -101,54 +101,55 @@ ...@@ -101,54 +101,55 @@
#define TK_VARBINARY 83 #define TK_VARBINARY 83
#define TK_DECIMAL 84 #define TK_DECIMAL 84
#define TK_SMA 85 #define TK_SMA 85
#define TK_NK_FLOAT 86 #define TK_MNODES 86
#define TK_NK_BOOL 87 #define TK_NK_FLOAT 87
#define TK_NK_VARIABLE 88 #define TK_NK_BOOL 88
#define TK_BETWEEN 89 #define TK_NK_VARIABLE 89
#define TK_IS 90 #define TK_BETWEEN 90
#define TK_NULL 91 #define TK_IS 91
#define TK_NK_LT 92 #define TK_NULL 92
#define TK_NK_GT 93 #define TK_NK_LT 93
#define TK_NK_LE 94 #define TK_NK_GT 94
#define TK_NK_GE 95 #define TK_NK_LE 95
#define TK_NK_NE 96 #define TK_NK_GE 96
#define TK_NK_EQ 97 #define TK_NK_NE 97
#define TK_LIKE 98 #define TK_NK_EQ 98
#define TK_MATCH 99 #define TK_LIKE 99
#define TK_NMATCH 100 #define TK_MATCH 100
#define TK_IN 101 #define TK_NMATCH 101
#define TK_FROM 102 #define TK_IN 102
#define TK_AS 103 #define TK_FROM 103
#define TK_JOIN 104 #define TK_AS 104
#define TK_ON 105 #define TK_JOIN 105
#define TK_INNER 106 #define TK_ON 106
#define TK_SELECT 107 #define TK_INNER 107
#define TK_DISTINCT 108 #define TK_SELECT 108
#define TK_WHERE 109 #define TK_DISTINCT 109
#define TK_PARTITION 110 #define TK_WHERE 110
#define TK_BY 111 #define TK_PARTITION 111
#define TK_SESSION 112 #define TK_BY 112
#define TK_STATE_WINDOW 113 #define TK_SESSION 113
#define TK_INTERVAL 114 #define TK_STATE_WINDOW 114
#define TK_SLIDING 115 #define TK_INTERVAL 115
#define TK_FILL 116 #define TK_SLIDING 116
#define TK_VALUE 117 #define TK_FILL 117
#define TK_NONE 118 #define TK_VALUE 118
#define TK_PREV 119 #define TK_NONE 119
#define TK_LINEAR 120 #define TK_PREV 120
#define TK_NEXT 121 #define TK_LINEAR 121
#define TK_GROUP 122 #define TK_NEXT 122
#define TK_HAVING 123 #define TK_GROUP 123
#define TK_ORDER 124 #define TK_HAVING 124
#define TK_SLIMIT 125 #define TK_ORDER 125
#define TK_SOFFSET 126 #define TK_SLIMIT 126
#define TK_LIMIT 127 #define TK_SOFFSET 127
#define TK_OFFSET 128 #define TK_LIMIT 128
#define TK_ASC 129 #define TK_OFFSET 129
#define TK_DESC 130 #define TK_ASC 130
#define TK_NULLS 131 #define TK_DESC 131
#define TK_FIRST 132 #define TK_NULLS 132
#define TK_LAST 133 #define TK_FIRST 133
#define TK_LAST 134
#define TK_NK_SPACE 300 #define TK_NK_SPACE 300
#define TK_NK_COMMENT 301 #define TK_NK_COMMENT 301
......
...@@ -92,6 +92,7 @@ typedef enum ENodeType { ...@@ -92,6 +92,7 @@ typedef enum ENodeType {
QUERY_NODE_DROP_DNODE_STMT, QUERY_NODE_DROP_DNODE_STMT,
QUERY_NODE_SHOW_DNODES_STMT, QUERY_NODE_SHOW_DNODES_STMT,
QUERY_NODE_SHOW_VGROUPS_STMT, QUERY_NODE_SHOW_VGROUPS_STMT,
QUERY_NODE_SHOW_MNODES_STMT,
// logic plan node // logic plan node
QUERY_NODE_LOGIC_PLAN_SCAN, QUERY_NODE_LOGIC_PLAN_SCAN,
......
...@@ -120,6 +120,7 @@ SNodeptr nodesMakeNode(ENodeType type) { ...@@ -120,6 +120,7 @@ SNodeptr nodesMakeNode(ENodeType type) {
case QUERY_NODE_SHOW_DNODES_STMT: case QUERY_NODE_SHOW_DNODES_STMT:
return makeNode(type, sizeof(SShowStmt)); return makeNode(type, sizeof(SShowStmt));
case QUERY_NODE_SHOW_VGROUPS_STMT: case QUERY_NODE_SHOW_VGROUPS_STMT:
case QUERY_NODE_SHOW_MNODES_STMT:
return makeNode(type, sizeof(SShowStmt)); return makeNode(type, sizeof(SShowStmt));
case QUERY_NODE_LOGIC_PLAN_SCAN: case QUERY_NODE_LOGIC_PLAN_SCAN:
return makeNode(type, sizeof(SScanLogicNode)); return makeNode(type, sizeof(SScanLogicNode));
......
...@@ -198,6 +198,9 @@ col_name(A) ::= column_name(B). ...@@ -198,6 +198,9 @@ col_name(A) ::= column_name(B).
cmd ::= SHOW VGROUPS. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, NULL); } cmd ::= SHOW VGROUPS. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, NULL); }
cmd ::= SHOW db_name(B) NK_DOT VGROUPS. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, &B); } cmd ::= SHOW db_name(B) NK_DOT VGROUPS. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, &B); }
/************************************************ show vgroups ********************************************************/
cmd ::= SHOW MNODES. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MNODES_STMT, NULL); }
/************************************************ select **************************************************************/ /************************************************ select **************************************************************/
cmd ::= query_expression(A). { pCxt->pRootNode = A; } cmd ::= query_expression(A). { pCxt->pRootNode = A; }
......
...@@ -81,6 +81,7 @@ static SKeyword keywordTable[] = { ...@@ -81,6 +81,7 @@ static SKeyword keywordTable[] = {
{"MAXROWS", TK_MAXROWS}, {"MAXROWS", TK_MAXROWS},
{"MINROWS", TK_MINROWS}, {"MINROWS", TK_MINROWS},
{"MINUS", TK_MINUS}, {"MINUS", TK_MINUS},
{"MNODES", TK_MNODES},
{"NCHAR", TK_NCHAR}, {"NCHAR", TK_NCHAR},
{"NMATCH", TK_NMATCH}, {"NMATCH", TK_NMATCH},
{"NONE", TK_NONE}, {"NONE", TK_NONE},
...@@ -153,7 +154,6 @@ static SKeyword keywordTable[] = { ...@@ -153,7 +154,6 @@ static SKeyword keywordTable[] = {
// {"UMINUS", TK_UMINUS}, // {"UMINUS", TK_UMINUS},
// {"UPLUS", TK_UPLUS}, // {"UPLUS", TK_UPLUS},
// {"BITNOT", TK_BITNOT}, // {"BITNOT", TK_BITNOT},
// {"MNODES", TK_MNODES},
// {"ACCOUNTS", TK_ACCOUNTS}, // {"ACCOUNTS", TK_ACCOUNTS},
// {"MODULES", TK_MODULES}, // {"MODULES", TK_MODULES},
// {"QUERIES", TK_QUERIES}, // {"QUERIES", TK_QUERIES},
......
...@@ -1062,6 +1062,8 @@ static int32_t nodeTypeToShowType(ENodeType nt) { ...@@ -1062,6 +1062,8 @@ static int32_t nodeTypeToShowType(ENodeType nt) {
return TSDB_MGMT_TABLE_DNODE; return TSDB_MGMT_TABLE_DNODE;
case QUERY_NODE_SHOW_VGROUPS_STMT: case QUERY_NODE_SHOW_VGROUPS_STMT:
return TSDB_MGMT_TABLE_VGROUP; return TSDB_MGMT_TABLE_VGROUP;
case QUERY_NODE_SHOW_MNODES_STMT:
return TSDB_MGMT_TABLE_MNODE;
default: default:
break; break;
} }
...@@ -1169,6 +1171,7 @@ static int32_t translateQuery(STranslateContext* pCxt, SNode* pNode) { ...@@ -1169,6 +1171,7 @@ static int32_t translateQuery(STranslateContext* pCxt, SNode* pNode) {
case QUERY_NODE_SHOW_USERS_STMT: case QUERY_NODE_SHOW_USERS_STMT:
case QUERY_NODE_SHOW_DNODES_STMT: case QUERY_NODE_SHOW_DNODES_STMT:
case QUERY_NODE_SHOW_VGROUPS_STMT: case QUERY_NODE_SHOW_VGROUPS_STMT:
case QUERY_NODE_SHOW_MNODES_STMT:
code = translateShow(pCxt, (SShowStmt*)pNode); code = translateShow(pCxt, (SShowStmt*)pNode);
break; break;
case QUERY_NODE_SHOW_TABLES_STMT: case QUERY_NODE_SHOW_TABLES_STMT:
......
...@@ -99,24 +99,24 @@ ...@@ -99,24 +99,24 @@
#endif #endif
/************* Begin control #defines *****************************************/ /************* Begin control #defines *****************************************/
#define YYCODETYPE unsigned char #define YYCODETYPE unsigned char
#define YYNOCODE 208 #define YYNOCODE 209
#define YYACTIONTYPE unsigned short int #define YYACTIONTYPE unsigned short int
#define ParseTOKENTYPE SToken #define ParseTOKENTYPE SToken
typedef union { typedef union {
int yyinit; int yyinit;
ParseTOKENTYPE yy0; ParseTOKENTYPE yy0;
ENullOrder yy9; SNodeList* yy46;
SDatabaseOptions* yy103; SDataType yy70;
SToken yy161; SToken yy129;
EOrder yy162; ENullOrder yy147;
EFillMode yy166; bool yy185;
SNodeList* yy184; EOrder yy202;
EOperatorType yy220; SNode* yy256;
SDataType yy240; EJoinType yy266;
EJoinType yy308; EOperatorType yy326;
STableOptions* yy334; STableOptions* yy340;
bool yy377; EFillMode yy360;
SNode* yy392; SDatabaseOptions* yy391;
} YYMINORTYPE; } YYMINORTYPE;
#ifndef YYSTACKDEPTH #ifndef YYSTACKDEPTH
#define YYSTACKDEPTH 100 #define YYSTACKDEPTH 100
...@@ -131,17 +131,17 @@ typedef union { ...@@ -131,17 +131,17 @@ typedef union {
#define ParseCTX_PARAM #define ParseCTX_PARAM
#define ParseCTX_FETCH #define ParseCTX_FETCH
#define ParseCTX_STORE #define ParseCTX_STORE
#define YYNSTATE 278 #define YYNSTATE 279
#define YYNRULE 236 #define YYNRULE 237
#define YYNTOKEN 134 #define YYNTOKEN 135
#define YY_MAX_SHIFT 277 #define YY_MAX_SHIFT 278
#define YY_MIN_SHIFTREDUCE 438 #define YY_MIN_SHIFTREDUCE 439
#define YY_MAX_SHIFTREDUCE 673 #define YY_MAX_SHIFTREDUCE 675
#define YY_ERROR_ACTION 674 #define YY_ERROR_ACTION 676
#define YY_ACCEPT_ACTION 675 #define YY_ACCEPT_ACTION 677
#define YY_NO_ACTION 676 #define YY_NO_ACTION 678
#define YY_MIN_REDUCE 677 #define YY_MIN_REDUCE 679
#define YY_MAX_REDUCE 912 #define YY_MAX_REDUCE 915
/************* End control #defines *******************************************/ /************* End control #defines *******************************************/
#define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0]))) #define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0])))
...@@ -208,285 +208,285 @@ typedef union { ...@@ -208,285 +208,285 @@ typedef union {
** yy_default[] Default action for each state. ** yy_default[] Default action for each state.
** **
*********** Begin parsing tables **********************************************/ *********** Begin parsing tables **********************************************/
#define YY_ACTTAB_COUNT (903) #define YY_ACTTAB_COUNT (905)
static const YYACTIONTYPE yy_action[] = { static const YYACTIONTYPE yy_action[] = {
/* 0 */ 137, 149, 23, 95, 770, 719, 768, 246, 150, 781, /* 0 */ 137, 149, 23, 95, 772, 721, 770, 247, 150, 784,
/* 10 */ 779, 148, 30, 28, 26, 25, 24, 781, 779, 194, /* 10 */ 782, 148, 30, 28, 26, 25, 24, 784, 782, 194,
/* 20 */ 177, 805, 96, 733, 66, 30, 28, 26, 25, 24, /* 20 */ 177, 808, 201, 735, 66, 30, 28, 26, 25, 24,
/* 30 */ 690, 166, 194, 221, 805, 60, 207, 132, 790, 779, /* 30 */ 692, 166, 194, 222, 808, 60, 208, 132, 793, 782,
/* 40 */ 195, 208, 221, 54, 791, 728, 794, 830, 731, 58, /* 40 */ 195, 209, 222, 54, 794, 730, 797, 833, 733, 58,
/* 50 */ 132, 139, 826, 903, 19, 782, 779, 731, 556, 73, /* 50 */ 132, 139, 829, 906, 19, 785, 782, 733, 558, 73,
/* 60 */ 837, 838, 864, 842, 30, 28, 26, 25, 24, 270, /* 60 */ 840, 841, 867, 845, 30, 28, 26, 25, 24, 271,
/* 70 */ 269, 268, 267, 266, 265, 264, 263, 262, 261, 260, /* 70 */ 270, 269, 268, 267, 266, 265, 264, 263, 262, 261,
/* 80 */ 259, 258, 257, 256, 255, 254, 26, 25, 24, 22, /* 80 */ 260, 259, 258, 257, 256, 255, 26, 25, 24, 550,
/* 90 */ 141, 171, 574, 575, 576, 577, 578, 579, 580, 582, /* 90 */ 22, 141, 171, 576, 577, 578, 579, 580, 581, 582,
/* 100 */ 583, 584, 22, 141, 152, 574, 575, 576, 577, 578, /* 100 */ 584, 585, 586, 22, 141, 617, 576, 577, 578, 579,
/* 110 */ 579, 580, 582, 583, 584, 220, 733, 66, 498, 244, /* 110 */ 580, 581, 582, 584, 585, 586, 275, 274, 499, 245,
/* 120 */ 243, 242, 502, 241, 504, 505, 240, 507, 237, 41, /* 120 */ 244, 243, 503, 242, 505, 506, 241, 508, 238, 41,
/* 130 */ 513, 234, 515, 516, 231, 228, 194, 194, 805, 805, /* 130 */ 514, 235, 516, 517, 232, 229, 194, 194, 808, 808,
/* 140 */ 727, 184, 790, 779, 195, 220, 220, 53, 791, 170, /* 140 */ 729, 184, 793, 782, 195, 77, 45, 53, 794, 170,
/* 150 */ 794, 830, 194, 77, 805, 131, 826, 206, 790, 779, /* 150 */ 797, 833, 194, 719, 808, 131, 829, 726, 793, 782,
/* 160 */ 195, 205, 544, 67, 791, 204, 794, 891, 180, 623, /* 160 */ 195, 104, 93, 125, 794, 145, 797, 894, 153, 78,
/* 170 */ 805, 10, 10, 548, 790, 779, 195, 274, 273, 54, /* 170 */ 221, 772, 180, 770, 808, 103, 736, 66, 793, 782,
/* 180 */ 791, 76, 794, 830, 201, 889, 546, 139, 826, 71, /* 180 */ 195, 76, 209, 54, 794, 892, 797, 833, 194, 254,
/* 190 */ 208, 203, 202, 30, 28, 26, 25, 24, 194, 546, /* 190 */ 808, 139, 829, 71, 793, 782, 195, 221, 42, 54,
/* 200 */ 805, 94, 185, 904, 790, 779, 195, 156, 857, 125, /* 200 */ 794, 101, 797, 833, 772, 94, 771, 139, 829, 906,
/* 210 */ 791, 145, 794, 180, 20, 805, 172, 167, 165, 790, /* 210 */ 616, 156, 860, 894, 180, 254, 808, 551, 890, 50,
/* 220 */ 779, 195, 77, 581, 54, 791, 585, 794, 830, 194, /* 220 */ 793, 782, 195, 10, 47, 54, 794, 893, 797, 833,
/* 230 */ 253, 805, 139, 826, 71, 790, 779, 195, 29, 27, /* 230 */ 194, 892, 808, 139, 829, 71, 793, 782, 195, 29,
/* 240 */ 54, 791, 247, 794, 830, 93, 200, 537, 139, 826, /* 240 */ 27, 54, 794, 677, 797, 833, 41, 187, 539, 139,
/* 250 */ 903, 734, 66, 858, 194, 535, 805, 146, 844, 887, /* 250 */ 829, 906, 114, 61, 861, 763, 537, 728, 146, 221,
/* 260 */ 790, 779, 195, 11, 891, 54, 791, 163, 794, 830, /* 260 */ 851, 29, 27, 618, 11, 194, 182, 808, 196, 548,
/* 270 */ 29, 27, 616, 139, 826, 903, 841, 114, 890, 537, /* 270 */ 539, 793, 782, 195, 77, 639, 121, 794, 537, 797,
/* 280 */ 761, 188, 889, 1, 848, 50, 194, 535, 805, 146, /* 280 */ 146, 194, 56, 808, 1, 10, 11, 793, 782, 195,
/* 290 */ 47, 184, 790, 779, 195, 11, 153, 119, 791, 770, /* 290 */ 79, 51, 55, 794, 894, 797, 833, 9, 8, 62,
/* 300 */ 794, 768, 222, 221, 9, 8, 218, 29, 27, 154, /* 300 */ 832, 829, 725, 223, 222, 449, 1, 219, 76, 173,
/* 310 */ 29, 27, 536, 538, 541, 1, 537, 891, 731, 537, /* 310 */ 248, 152, 892, 212, 538, 540, 543, 720, 191, 733,
/* 320 */ 844, 733, 66, 717, 535, 221, 146, 535, 219, 146, /* 320 */ 194, 573, 808, 735, 66, 223, 793, 782, 195, 6,
/* 330 */ 41, 76, 11, 77, 222, 889, 615, 61, 840, 844, /* 330 */ 613, 125, 794, 157, 797, 77, 538, 540, 543, 194,
/* 340 */ 731, 726, 189, 448, 536, 538, 541, 30, 28, 26, /* 340 */ 222, 808, 96, 220, 184, 793, 782, 195, 29, 27,
/* 350 */ 25, 24, 1, 449, 450, 7, 194, 839, 805, 253, /* 350 */ 119, 794, 163, 797, 594, 733, 847, 539, 172, 167,
/* 360 */ 549, 592, 790, 779, 195, 21, 178, 125, 791, 157, /* 360 */ 165, 88, 29, 27, 251, 537, 188, 146, 250, 186,
/* 370 */ 794, 222, 6, 611, 222, 30, 28, 26, 25, 24, /* 370 */ 894, 539, 222, 11, 844, 109, 847, 177, 852, 537,
/* 380 */ 187, 536, 538, 541, 536, 538, 541, 194, 221, 805, /* 380 */ 613, 146, 192, 252, 76, 863, 154, 733, 892, 194,
/* 390 */ 770, 109, 769, 790, 779, 195, 177, 88, 55, 791, /* 390 */ 177, 808, 60, 1, 843, 793, 782, 195, 735, 66,
/* 400 */ 860, 794, 830, 731, 448, 77, 829, 826, 194, 177, /* 400 */ 55, 794, 249, 797, 833, 60, 58, 7, 181, 829,
/* 410 */ 805, 60, 211, 98, 790, 779, 195, 191, 221, 55, /* 410 */ 184, 449, 223, 9, 8, 179, 72, 840, 841, 58,
/* 420 */ 791, 155, 794, 830, 60, 58, 2, 181, 826, 184, /* 420 */ 845, 450, 451, 538, 540, 543, 223, 85, 189, 91,
/* 430 */ 45, 182, 79, 731, 179, 72, 837, 838, 58, 842, /* 430 */ 840, 176, 625, 175, 82, 847, 894, 538, 540, 543,
/* 440 */ 614, 724, 29, 27, 183, 51, 806, 637, 91, 837, /* 440 */ 178, 98, 29, 27, 183, 222, 29, 27, 155, 548,
/* 450 */ 176, 537, 175, 62, 56, 891, 723, 29, 27, 535, /* 450 */ 76, 539, 809, 842, 892, 539, 674, 675, 77, 537,
/* 460 */ 85, 146, 29, 27, 669, 670, 537, 82, 849, 76, /* 460 */ 733, 146, 194, 537, 808, 146, 20, 2, 793, 782,
/* 470 */ 611, 537, 210, 889, 535, 586, 146, 672, 673, 535, /* 470 */ 195, 29, 27, 55, 794, 583, 797, 833, 587, 211,
/* 480 */ 192, 146, 31, 675, 194, 571, 805, 7, 549, 861, /* 480 */ 539, 217, 830, 551, 215, 642, 539, 7, 537, 588,
/* 490 */ 790, 779, 195, 9, 8, 55, 791, 216, 794, 830, /* 490 */ 146, 1, 864, 194, 537, 808, 31, 164, 161, 793,
/* 500 */ 214, 186, 1, 786, 827, 130, 222, 7, 196, 217, /* 500 */ 782, 195, 555, 874, 68, 794, 223, 797, 80, 31,
/* 510 */ 784, 127, 68, 164, 871, 80, 536, 538, 541, 161, /* 510 */ 223, 162, 640, 641, 643, 644, 7, 538, 540, 543,
/* 520 */ 537, 222, 100, 553, 541, 851, 222, 159, 535, 160, /* 520 */ 789, 538, 540, 543, 106, 543, 194, 787, 808, 492,
/* 530 */ 31, 536, 538, 541, 891, 870, 536, 538, 541, 194, /* 530 */ 159, 63, 793, 782, 195, 223, 64, 125, 794, 140,
/* 540 */ 138, 805, 106, 84, 5, 790, 779, 195, 76, 63, /* 540 */ 797, 223, 873, 185, 907, 718, 538, 540, 543, 194,
/* 550 */ 121, 791, 889, 794, 194, 174, 805, 158, 87, 70, /* 550 */ 160, 808, 538, 540, 543, 793, 782, 195, 487, 84,
/* 560 */ 790, 779, 195, 4, 491, 125, 791, 140, 794, 89, /* 560 */ 68, 794, 138, 797, 194, 56, 808, 5, 854, 174,
/* 570 */ 194, 64, 805, 611, 545, 222, 790, 779, 195, 59, /* 570 */ 793, 782, 195, 520, 70, 120, 794, 524, 797, 194,
/* 580 */ 548, 67, 791, 173, 794, 536, 538, 541, 30, 28, /* 580 */ 227, 808, 4, 87, 63, 793, 782, 195, 158, 613,
/* 590 */ 26, 25, 24, 194, 77, 805, 486, 845, 32, 790, /* 590 */ 122, 794, 251, 797, 89, 194, 250, 808, 529, 547,
/* 600 */ 779, 195, 90, 56, 120, 791, 194, 794, 805, 519, /* 600 */ 908, 793, 782, 195, 59, 64, 117, 794, 65, 797,
/* 610 */ 16, 142, 790, 779, 195, 104, 226, 122, 791, 906, /* 610 */ 194, 252, 808, 550, 848, 63, 793, 782, 195, 32,
/* 620 */ 794, 905, 193, 78, 194, 718, 805, 812, 190, 103, /* 620 */ 16, 123, 794, 142, 797, 194, 815, 808, 90, 909,
/* 630 */ 790, 779, 195, 888, 556, 117, 791, 523, 794, 194, /* 630 */ 249, 793, 782, 195, 193, 891, 118, 794, 194, 797,
/* 640 */ 544, 805, 528, 97, 63, 790, 779, 195, 197, 64, /* 640 */ 808, 97, 546, 190, 793, 782, 195, 197, 210, 124,
/* 650 */ 123, 791, 42, 794, 194, 101, 805, 40, 209, 102, /* 650 */ 794, 194, 797, 808, 40, 102, 552, 793, 782, 195,
/* 660 */ 790, 779, 195, 65, 550, 118, 791, 113, 794, 212, /* 660 */ 734, 213, 805, 794, 147, 797, 194, 46, 808, 113,
/* 670 */ 63, 194, 250, 805, 147, 44, 249, 790, 779, 195, /* 670 */ 44, 225, 793, 782, 195, 115, 110, 804, 794, 194,
/* 680 */ 732, 46, 124, 791, 115, 794, 194, 277, 805, 128, /* 680 */ 797, 808, 278, 3, 128, 793, 782, 195, 129, 116,
/* 690 */ 224, 251, 790, 779, 195, 110, 116, 802, 791, 129, /* 690 */ 803, 794, 31, 797, 194, 14, 808, 81, 636, 83,
/* 700 */ 794, 194, 14, 805, 3, 31, 81, 790, 779, 195, /* 700 */ 793, 782, 195, 35, 638, 135, 794, 194, 797, 808,
/* 710 */ 248, 634, 801, 791, 83, 794, 194, 35, 805, 716, /* 710 */ 69, 86, 37, 793, 782, 195, 632, 631, 134, 794,
/* 720 */ 636, 69, 790, 779, 195, 86, 37, 800, 791, 630, /* 720 */ 194, 797, 808, 168, 38, 169, 793, 782, 195, 787,
/* 730 */ 794, 194, 629, 805, 168, 169, 784, 790, 779, 195, /* 730 */ 610, 136, 794, 18, 797, 194, 15, 808, 609, 92,
/* 740 */ 38, 18, 135, 791, 608, 794, 15, 607, 194, 92, /* 740 */ 207, 793, 782, 195, 206, 546, 133, 794, 205, 797,
/* 750 */ 805, 33, 34, 8, 790, 779, 195, 75, 572, 134, /* 750 */ 33, 194, 34, 808, 75, 8, 574, 793, 782, 195,
/* 760 */ 791, 194, 794, 805, 554, 663, 250, 790, 779, 195, /* 760 */ 556, 665, 126, 794, 17, 797, 177, 202, 12, 39,
/* 770 */ 249, 177, 136, 791, 17, 794, 194, 12, 805, 39, /* 770 */ 660, 659, 143, 664, 204, 203, 30, 28, 26, 25,
/* 780 */ 99, 658, 790, 779, 195, 251, 60, 133, 791, 640, /* 780 */ 24, 60, 99, 663, 130, 144, 13, 776, 218, 695,
/* 790 */ 794, 194, 657, 805, 143, 662, 661, 790, 779, 195, /* 790 */ 127, 67, 775, 774, 112, 58, 200, 773, 199, 724,
/* 800 */ 58, 144, 126, 791, 248, 794, 13, 773, 693, 772, /* 800 */ 198, 100, 57, 21, 723, 74, 840, 841, 111, 845,
/* 810 */ 74, 837, 838, 112, 842, 162, 638, 639, 641, 642, /* 810 */ 694, 688, 683, 30, 28, 26, 25, 24, 30, 28,
/* 820 */ 199, 57, 198, 771, 722, 721, 692, 111, 686, 681, /* 820 */ 26, 25, 24, 722, 458, 693, 30, 28, 26, 25,
/* 830 */ 720, 457, 691, 685, 684, 680, 679, 213, 678, 215, /* 830 */ 24, 52, 687, 686, 107, 682, 681, 214, 680, 216,
/* 840 */ 105, 43, 47, 783, 36, 108, 223, 520, 539, 225, /* 840 */ 105, 43, 47, 786, 226, 108, 224, 541, 36, 151,
/* 850 */ 52, 151, 227, 107, 517, 230, 512, 514, 233, 236, /* 850 */ 513, 230, 521, 228, 512, 511, 518, 231, 233, 236,
/* 860 */ 229, 508, 506, 239, 511, 497, 232, 48, 235, 238, /* 860 */ 515, 509, 234, 239, 558, 237, 510, 507, 498, 528,
/* 870 */ 510, 245, 49, 525, 527, 509, 526, 476, 475, 455, /* 870 */ 240, 527, 526, 246, 77, 456, 48, 477, 253, 476,
/* 880 */ 252, 469, 474, 473, 472, 471, 470, 468, 467, 683, /* 880 */ 470, 49, 475, 474, 473, 472, 471, 469, 685, 468,
/* 890 */ 466, 465, 464, 463, 462, 461, 460, 271, 272, 682, /* 890 */ 467, 466, 465, 464, 671, 672, 463, 462, 461, 272,
/* 900 */ 677, 275, 276, /* 900 */ 273, 684, 679, 276, 277,
}; };
static const YYCODETYPE yy_lookahead[] = { static const YYCODETYPE yy_lookahead[] = {
/* 0 */ 151, 153, 170, 171, 156, 0, 158, 157, 151, 160, /* 0 */ 152, 154, 171, 172, 157, 0, 159, 158, 152, 161,
/* 10 */ 161, 143, 12, 13, 14, 15, 16, 160, 161, 154, /* 10 */ 162, 144, 12, 13, 14, 15, 16, 161, 162, 155,
/* 20 */ 139, 156, 206, 155, 156, 12, 13, 14, 15, 16, /* 20 */ 140, 157, 140, 156, 157, 12, 13, 14, 15, 16,
/* 30 */ 0, 166, 154, 139, 156, 154, 142, 37, 160, 161, /* 30 */ 0, 167, 155, 140, 157, 155, 143, 37, 161, 162,
/* 40 */ 162, 36, 139, 165, 166, 142, 168, 169, 154, 168, /* 40 */ 163, 36, 140, 166, 167, 143, 169, 170, 155, 169,
/* 50 */ 37, 173, 174, 175, 2, 160, 161, 154, 58, 178, /* 50 */ 37, 174, 175, 176, 2, 161, 162, 155, 58, 179,
/* 60 */ 179, 180, 184, 182, 12, 13, 14, 15, 16, 39, /* 60 */ 180, 181, 185, 183, 12, 13, 14, 15, 16, 39,
/* 70 */ 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, /* 70 */ 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
/* 80 */ 50, 51, 52, 53, 54, 55, 14, 15, 16, 89, /* 80 */ 50, 51, 52, 53, 54, 55, 14, 15, 16, 31,
/* 90 */ 90, 31, 92, 93, 94, 95, 96, 97, 98, 99, /* 90 */ 90, 91, 31, 93, 94, 95, 96, 97, 98, 99,
/* 100 */ 100, 101, 89, 90, 143, 92, 93, 94, 95, 96, /* 100 */ 100, 101, 102, 90, 91, 4, 93, 94, 95, 96,
/* 110 */ 97, 98, 99, 100, 101, 31, 155, 156, 67, 68, /* 110 */ 97, 98, 99, 100, 101, 102, 137, 138, 67, 68,
/* 120 */ 69, 70, 71, 72, 73, 74, 75, 76, 77, 141, /* 120 */ 69, 70, 71, 72, 73, 74, 75, 76, 77, 142,
/* 130 */ 79, 80, 81, 82, 83, 84, 154, 154, 156, 156, /* 130 */ 79, 80, 81, 82, 83, 84, 155, 155, 157, 157,
/* 140 */ 152, 159, 160, 161, 162, 31, 31, 165, 166, 166, /* 140 */ 153, 160, 161, 162, 163, 108, 139, 166, 167, 167,
/* 150 */ 168, 169, 154, 107, 156, 173, 174, 26, 160, 161, /* 150 */ 169, 170, 155, 0, 157, 174, 175, 150, 161, 162,
/* 160 */ 162, 30, 31, 165, 166, 34, 168, 185, 154, 14, /* 160 */ 163, 19, 104, 166, 167, 168, 169, 186, 154, 27,
/* 170 */ 156, 57, 57, 31, 160, 161, 162, 136, 137, 165, /* 170 */ 31, 157, 155, 159, 157, 33, 156, 157, 161, 162,
/* 180 */ 166, 199, 168, 169, 53, 203, 31, 173, 174, 175, /* 180 */ 163, 200, 36, 166, 167, 204, 169, 170, 155, 36,
/* 190 */ 36, 60, 61, 12, 13, 14, 15, 16, 154, 31, /* 190 */ 157, 174, 175, 176, 161, 162, 163, 31, 56, 166,
/* 200 */ 156, 187, 204, 205, 160, 161, 162, 193, 194, 165, /* 200 */ 167, 59, 169, 170, 157, 188, 159, 174, 175, 176,
/* 210 */ 166, 167, 168, 154, 89, 156, 112, 113, 114, 160, /* 210 */ 109, 194, 195, 186, 155, 36, 157, 31, 185, 57,
/* 220 */ 161, 162, 107, 98, 165, 166, 101, 168, 169, 154, /* 220 */ 161, 162, 163, 57, 62, 166, 167, 200, 169, 170,
/* 230 */ 36, 156, 173, 174, 175, 160, 161, 162, 12, 13, /* 230 */ 155, 204, 157, 174, 175, 176, 161, 162, 163, 12,
/* 240 */ 165, 166, 63, 168, 169, 103, 139, 21, 173, 174, /* 240 */ 13, 166, 167, 135, 169, 170, 142, 3, 21, 174,
/* 250 */ 175, 155, 156, 194, 154, 29, 156, 31, 163, 184, /* 250 */ 175, 176, 145, 149, 195, 148, 29, 153, 31, 31,
/* 260 */ 160, 161, 162, 37, 185, 165, 166, 197, 168, 169, /* 260 */ 185, 12, 13, 14, 37, 155, 37, 157, 160, 31,
/* 270 */ 12, 13, 14, 173, 174, 175, 181, 144, 199, 21, /* 270 */ 21, 161, 162, 163, 108, 58, 166, 167, 29, 169,
/* 280 */ 147, 65, 203, 57, 184, 57, 154, 29, 156, 31, /* 280 */ 31, 155, 65, 157, 57, 57, 37, 161, 162, 163,
/* 290 */ 62, 159, 160, 161, 162, 37, 153, 165, 166, 156, /* 290 */ 104, 139, 166, 167, 186, 169, 170, 1, 2, 147,
/* 300 */ 168, 158, 76, 139, 1, 2, 142, 12, 13, 143, /* 300 */ 174, 175, 150, 76, 140, 21, 57, 143, 200, 199,
/* 310 */ 12, 13, 86, 87, 88, 57, 21, 185, 154, 21, /* 310 */ 63, 144, 204, 29, 87, 88, 89, 0, 65, 155,
/* 320 */ 163, 155, 156, 0, 29, 139, 31, 29, 142, 31, /* 320 */ 155, 92, 157, 156, 157, 76, 161, 162, 163, 106,
/* 330 */ 141, 199, 37, 107, 76, 203, 4, 148, 181, 163, /* 330 */ 107, 166, 167, 168, 169, 108, 87, 88, 89, 155,
/* 340 */ 154, 152, 126, 21, 86, 87, 88, 12, 13, 14, /* 340 */ 140, 157, 207, 143, 160, 161, 162, 163, 12, 13,
/* 350 */ 15, 16, 57, 31, 32, 57, 154, 181, 156, 36, /* 350 */ 166, 167, 198, 169, 58, 155, 164, 21, 113, 114,
/* 360 */ 31, 58, 160, 161, 162, 2, 183, 165, 166, 167, /* 360 */ 115, 191, 12, 13, 47, 29, 65, 31, 51, 125,
/* 370 */ 168, 76, 105, 106, 76, 12, 13, 14, 15, 16, /* 370 */ 186, 21, 140, 37, 182, 143, 164, 140, 105, 29,
/* 380 */ 3, 86, 87, 88, 86, 87, 88, 154, 139, 156, /* 380 */ 107, 31, 129, 66, 200, 165, 144, 155, 204, 155,
/* 390 */ 156, 142, 158, 160, 161, 162, 139, 190, 165, 166, /* 390 */ 140, 157, 155, 57, 182, 161, 162, 163, 156, 157,
/* 400 */ 164, 168, 169, 154, 21, 107, 173, 174, 154, 139, /* 400 */ 166, 167, 85, 169, 170, 155, 169, 57, 174, 175,
/* 410 */ 156, 154, 29, 200, 160, 161, 162, 65, 139, 165, /* 410 */ 160, 21, 76, 1, 2, 178, 179, 180, 181, 169,
/* 420 */ 166, 142, 168, 169, 154, 168, 186, 173, 174, 159, /* 420 */ 183, 31, 32, 87, 88, 89, 76, 58, 127, 179,
/* 430 */ 138, 37, 103, 154, 177, 178, 179, 180, 168, 182, /* 430 */ 180, 181, 14, 183, 65, 164, 186, 87, 88, 89,
/* 440 */ 108, 149, 12, 13, 14, 138, 156, 58, 178, 179, /* 440 */ 184, 201, 12, 13, 14, 140, 12, 13, 143, 31,
/* 450 */ 180, 21, 182, 146, 65, 185, 149, 12, 13, 29, /* 450 */ 200, 21, 157, 182, 204, 21, 133, 134, 108, 29,
/* 460 */ 58, 31, 12, 13, 129, 130, 21, 65, 104, 199, /* 460 */ 155, 31, 155, 29, 157, 31, 90, 187, 161, 162,
/* 470 */ 106, 21, 136, 203, 29, 58, 31, 132, 133, 29, /* 470 */ 163, 12, 13, 166, 167, 99, 169, 170, 102, 137,
/* 480 */ 128, 31, 65, 134, 154, 91, 156, 57, 31, 164, /* 480 */ 21, 20, 175, 31, 23, 92, 21, 57, 29, 58,
/* 490 */ 160, 161, 162, 1, 2, 165, 166, 20, 168, 169, /* 490 */ 31, 57, 165, 155, 29, 157, 65, 117, 116, 161,
/* 500 */ 23, 124, 57, 57, 174, 18, 76, 57, 159, 22, /* 500 */ 162, 163, 58, 197, 166, 167, 76, 169, 196, 65,
/* 510 */ 64, 24, 25, 116, 196, 195, 86, 87, 88, 115, /* 510 */ 76, 118, 119, 120, 121, 122, 57, 87, 88, 89,
/* 520 */ 21, 76, 35, 58, 88, 192, 76, 161, 29, 161, /* 520 */ 57, 87, 88, 89, 58, 89, 155, 64, 157, 58,
/* 530 */ 65, 86, 87, 88, 185, 196, 86, 87, 88, 154, /* 530 */ 162, 65, 161, 162, 163, 76, 65, 166, 167, 168,
/* 540 */ 161, 156, 58, 195, 123, 160, 161, 162, 199, 65, /* 540 */ 169, 76, 197, 205, 206, 0, 87, 88, 89, 155,
/* 550 */ 165, 166, 203, 168, 154, 122, 156, 110, 191, 189, /* 550 */ 162, 157, 87, 88, 89, 161, 162, 163, 58, 196,
/* 560 */ 160, 161, 162, 109, 58, 165, 166, 167, 168, 188, /* 560 */ 166, 167, 162, 169, 155, 65, 157, 124, 193, 123,
/* 570 */ 154, 65, 156, 106, 31, 76, 160, 161, 162, 154, /* 570 */ 161, 162, 163, 58, 190, 166, 167, 58, 169, 155,
/* 580 */ 31, 165, 166, 198, 168, 86, 87, 88, 12, 13, /* 580 */ 65, 157, 110, 192, 65, 161, 162, 163, 111, 107,
/* 590 */ 14, 15, 16, 154, 107, 156, 58, 163, 102, 160, /* 590 */ 166, 167, 47, 169, 189, 155, 51, 157, 58, 31,
/* 600 */ 161, 162, 176, 65, 165, 166, 154, 168, 156, 58, /* 600 */ 206, 161, 162, 163, 155, 65, 166, 167, 58, 169,
/* 610 */ 57, 131, 160, 161, 162, 19, 65, 165, 166, 207, /* 610 */ 155, 66, 157, 31, 164, 65, 161, 162, 163, 103,
/* 620 */ 168, 205, 127, 27, 154, 0, 156, 172, 125, 33, /* 620 */ 57, 166, 167, 132, 169, 155, 173, 157, 177, 208,
/* 630 */ 160, 161, 162, 202, 58, 165, 166, 58, 168, 154, /* 630 */ 85, 161, 162, 163, 128, 203, 166, 167, 155, 169,
/* 640 */ 31, 156, 58, 201, 65, 160, 161, 162, 139, 65, /* 640 */ 157, 202, 31, 126, 161, 162, 163, 140, 140, 166,
/* 650 */ 165, 166, 56, 168, 154, 59, 156, 141, 139, 141, /* 650 */ 167, 155, 169, 157, 142, 142, 31, 161, 162, 163,
/* 660 */ 160, 161, 162, 58, 31, 165, 166, 147, 168, 135, /* 660 */ 155, 136, 166, 167, 136, 169, 155, 57, 157, 148,
/* 670 */ 65, 154, 47, 156, 135, 138, 51, 160, 161, 162, /* 670 */ 139, 151, 161, 162, 163, 140, 139, 166, 167, 155,
/* 680 */ 154, 57, 165, 166, 139, 168, 154, 135, 156, 145, /* 680 */ 169, 157, 136, 65, 146, 161, 162, 163, 146, 141,
/* 690 */ 150, 66, 160, 161, 162, 138, 140, 165, 166, 145, /* 690 */ 166, 167, 65, 169, 155, 112, 157, 58, 58, 57,
/* 700 */ 168, 154, 111, 156, 65, 65, 58, 160, 161, 162, /* 700 */ 161, 162, 163, 65, 58, 166, 167, 155, 169, 157,
/* 710 */ 85, 58, 165, 166, 57, 168, 154, 65, 156, 0, /* 710 */ 57, 57, 57, 161, 162, 163, 58, 58, 166, 167,
/* 720 */ 58, 57, 160, 161, 162, 57, 57, 165, 166, 58, /* 720 */ 155, 169, 157, 29, 57, 65, 161, 162, 163, 64,
/* 730 */ 168, 154, 58, 156, 29, 65, 64, 160, 161, 162, /* 730 */ 58, 166, 167, 65, 169, 155, 112, 157, 58, 64,
/* 740 */ 57, 65, 165, 166, 58, 168, 111, 58, 154, 64, /* 740 */ 26, 161, 162, 163, 30, 31, 166, 167, 34, 169,
/* 750 */ 156, 104, 65, 2, 160, 161, 162, 64, 91, 165, /* 750 */ 105, 155, 65, 157, 64, 2, 92, 161, 162, 163,
/* 760 */ 166, 154, 168, 156, 58, 58, 47, 160, 161, 162, /* 760 */ 58, 58, 166, 167, 65, 169, 140, 53, 112, 4,
/* 770 */ 51, 139, 165, 166, 65, 168, 154, 111, 156, 4, /* 770 */ 29, 29, 29, 29, 60, 61, 12, 13, 14, 15,
/* 780 */ 64, 29, 160, 161, 162, 66, 154, 165, 166, 91, /* 780 */ 16, 155, 64, 29, 18, 29, 57, 0, 22, 0,
/* 790 */ 168, 154, 29, 156, 29, 29, 29, 160, 161, 162, /* 790 */ 24, 25, 0, 0, 19, 169, 64, 0, 53, 0,
/* 800 */ 168, 29, 165, 166, 85, 168, 57, 0, 0, 0, /* 800 */ 86, 35, 27, 2, 0, 179, 180, 181, 33, 183,
/* 810 */ 178, 179, 180, 19, 182, 117, 118, 119, 120, 121, /* 810 */ 0, 0, 0, 12, 13, 14, 15, 16, 12, 13,
/* 820 */ 64, 27, 53, 0, 0, 0, 0, 33, 0, 0, /* 820 */ 14, 15, 16, 0, 38, 0, 12, 13, 14, 15,
/* 830 */ 0, 38, 0, 0, 0, 0, 0, 21, 0, 21, /* 830 */ 16, 56, 0, 0, 59, 0, 0, 21, 0, 21,
/* 840 */ 19, 57, 62, 64, 57, 64, 63, 58, 21, 29, /* 840 */ 19, 57, 62, 64, 29, 64, 63, 21, 57, 29,
/* 850 */ 56, 29, 57, 59, 58, 57, 78, 58, 57, 57, /* 850 */ 78, 29, 58, 57, 78, 78, 58, 57, 29, 29,
/* 860 */ 29, 58, 58, 57, 78, 21, 29, 57, 29, 29, /* 860 */ 58, 58, 57, 29, 58, 57, 78, 58, 21, 29,
/* 870 */ 78, 66, 57, 21, 29, 78, 29, 29, 29, 38, /* 870 */ 57, 29, 21, 66, 108, 38, 57, 29, 37, 29,
/* 880 */ 37, 21, 29, 29, 29, 29, 29, 29, 29, 0, /* 880 */ 21, 57, 29, 29, 29, 29, 29, 29, 0, 29,
/* 890 */ 29, 29, 29, 29, 29, 29, 29, 29, 28, 0, /* 890 */ 29, 29, 29, 29, 130, 131, 29, 29, 29, 29,
/* 900 */ 0, 21, 20, 208, 208, 208, 208, 208, 208, 208, /* 900 */ 28, 0, 0, 21, 20, 209, 209, 209, 209, 209,
/* 910 */ 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, /* 910 */ 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
/* 920 */ 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, /* 920 */ 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
/* 930 */ 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, /* 930 */ 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
/* 940 */ 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, /* 940 */ 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
/* 950 */ 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, /* 950 */ 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
/* 960 */ 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, /* 960 */ 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
/* 970 */ 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, /* 970 */ 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
/* 980 */ 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, /* 980 */ 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
/* 990 */ 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, /* 990 */ 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
/* 1000 */ 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, /* 1000 */ 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
/* 1010 */ 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, /* 1010 */ 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
/* 1020 */ 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, /* 1020 */ 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
/* 1030 */ 208, 208, 208, 208, 208, 208, 208, /* 1030 */ 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
}; };
#define YY_SHIFT_COUNT (277) #define YY_SHIFT_COUNT (278)
#define YY_SHIFT_MIN (0) #define YY_SHIFT_MIN (0)
#define YY_SHIFT_MAX (900) #define YY_SHIFT_MAX (902)
static const unsigned short int yy_shift_ofst[] = { static const unsigned short int yy_shift_ofst[] = {
/* 0 */ 487, 226, 258, 295, 295, 295, 295, 298, 295, 295, /* 0 */ 766, 227, 249, 336, 336, 336, 336, 350, 336, 336,
/* 10 */ 115, 445, 450, 430, 450, 450, 450, 450, 450, 450, /* 10 */ 166, 434, 459, 430, 459, 459, 459, 459, 459, 459,
/* 20 */ 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, /* 20 */ 459, 459, 459, 459, 459, 459, 459, 459, 459, 459,
/* 30 */ 450, 450, 114, 114, 114, 499, 499, 60, 60, 46, /* 30 */ 459, 459, 228, 228, 228, 465, 465, 61, 61, 37,
/* 40 */ 84, 84, 154, 168, 84, 84, 168, 84, 168, 168, /* 40 */ 139, 139, 146, 238, 139, 139, 238, 139, 238, 238,
/* 50 */ 168, 84, 194, 0, 13, 13, 499, 322, 142, 142, /* 50 */ 238, 139, 179, 0, 13, 13, 465, 390, 58, 58,
/* 60 */ 142, 5, 323, 168, 168, 179, 51, 335, 131, 698, /* 60 */ 58, 5, 153, 238, 238, 247, 51, 714, 764, 393,
/* 70 */ 104, 329, 364, 267, 364, 155, 377, 332, 383, 457, /* 70 */ 245, 186, 273, 223, 273, 418, 244, 101, 284, 452,
/* 80 */ 397, 404, 436, 436, 397, 404, 436, 421, 433, 447, /* 80 */ 380, 382, 436, 436, 380, 382, 436, 443, 446, 477,
/* 90 */ 454, 467, 543, 549, 496, 553, 480, 495, 503, 168, /* 90 */ 472, 482, 568, 582, 516, 563, 491, 506, 517, 238,
/* 100 */ 609, 154, 609, 154, 633, 633, 179, 194, 543, 624, /* 100 */ 611, 146, 611, 146, 625, 625, 247, 179, 568, 610,
/* 110 */ 609, 194, 633, 903, 903, 903, 30, 52, 363, 576, /* 110 */ 611, 179, 625, 905, 905, 905, 30, 52, 801, 806,
/* 120 */ 181, 181, 181, 181, 181, 181, 181, 596, 625, 719, /* 120 */ 814, 814, 814, 814, 814, 814, 814, 142, 317, 545,
/* 130 */ 794, 303, 125, 72, 72, 72, 72, 389, 402, 492, /* 130 */ 775, 296, 376, 72, 72, 72, 72, 217, 369, 412,
/* 140 */ 417, 394, 345, 216, 352, 465, 446, 477, 484, 506, /* 140 */ 431, 229, 323, 301, 253, 444, 463, 461, 466, 471,
/* 150 */ 538, 551, 579, 584, 605, 228, 639, 640, 591, 648, /* 150 */ 500, 515, 519, 540, 550, 162, 618, 627, 583, 639,
/* 160 */ 653, 657, 652, 662, 664, 668, 671, 669, 674, 705, /* 160 */ 640, 642, 638, 646, 653, 654, 658, 655, 659, 694,
/* 170 */ 670, 672, 683, 676, 635, 686, 689, 685, 647, 687, /* 170 */ 660, 665, 667, 668, 624, 672, 680, 675, 645, 687,
/* 180 */ 693, 751, 667, 706, 707, 709, 666, 775, 752, 763, /* 180 */ 690, 753, 664, 702, 703, 699, 656, 765, 741, 742,
/* 190 */ 765, 766, 767, 772, 716, 749, 807, 808, 809, 769, /* 190 */ 743, 744, 754, 756, 718, 729, 787, 789, 792, 793,
/* 200 */ 756, 823, 824, 825, 826, 828, 829, 830, 793, 832, /* 200 */ 745, 732, 797, 799, 804, 810, 811, 812, 823, 786,
/* 210 */ 833, 834, 835, 836, 816, 838, 818, 821, 784, 780, /* 210 */ 825, 832, 833, 835, 836, 816, 838, 818, 821, 784,
/* 220 */ 779, 781, 827, 787, 783, 789, 820, 822, 795, 796, /* 220 */ 780, 779, 781, 826, 791, 783, 794, 815, 820, 796,
/* 230 */ 831, 798, 799, 837, 801, 803, 839, 802, 804, 840, /* 230 */ 798, 822, 800, 802, 829, 805, 803, 830, 808, 809,
/* 240 */ 806, 778, 786, 792, 797, 844, 805, 810, 815, 845, /* 240 */ 834, 813, 772, 776, 777, 788, 847, 807, 819, 824,
/* 250 */ 847, 852, 841, 843, 848, 849, 853, 854, 855, 856, /* 250 */ 840, 842, 851, 837, 841, 848, 850, 853, 854, 855,
/* 260 */ 857, 860, 858, 859, 861, 862, 863, 864, 865, 866, /* 260 */ 856, 857, 859, 858, 860, 861, 862, 863, 864, 867,
/* 270 */ 867, 889, 868, 870, 899, 900, 880, 882, /* 270 */ 868, 869, 888, 870, 872, 901, 902, 882, 884,
}; };
#define YY_REDUCE_COUNT (115) #define YY_REDUCE_COUNT (115)
#define YY_REDUCE_MIN (-184) #define YY_REDUCE_MIN (-169)
#define YY_REDUCE_MAX (637) #define YY_REDUCE_MAX (626)
static const short yy_reduce_ofst[] = { static const short yy_reduce_ofst[] = {
/* 0 */ 349, -18, 14, 59, -122, 75, 100, 132, 233, 254, /* 0 */ 108, -19, 17, 59, -123, 33, 75, 184, 126, 234,
/* 10 */ 270, 330, -2, 44, 202, 385, 400, 416, 439, 452, /* 10 */ 250, 307, 338, -3, 165, 110, 371, 394, 409, 424,
/* 20 */ 470, 485, 500, 517, 532, 547, 562, 577, 594, 607, /* 20 */ 440, 455, 470, 483, 496, 511, 524, 539, 552, 565,
/* 30 */ 622, 637, 257, -119, 632, -151, -143, -135, -17, 79, /* 30 */ 580, 596, 237, -120, 626, -152, -144, -136, -18, 27,
/* 40 */ -106, -97, 189, -132, 164, 186, -152, 249, -39, 143, /* 40 */ -107, -98, 104, -133, 164, 200, -153, 232, 167, 14,
/* 50 */ 166, 279, 307, -168, -168, -168, -105, 41, 95, 157, /* 50 */ 242, 305, 152, -169, -169, -169, -106, -21, 192, 212,
/* 60 */ 176, -12, 292, 96, 234, 133, -150, -184, 107, 70, /* 60 */ 271, -13, 7, 20, 47, 107, -151, -118, 135, 154,
/* 70 */ 207, 236, 183, 183, 183, 290, 213, 240, 336, 325, /* 70 */ 170, 220, 256, 256, 256, 295, 240, 280, 342, 327,
/* 80 */ 318, 320, 366, 368, 339, 348, 379, 333, 367, 370, /* 80 */ 306, 312, 368, 388, 345, 363, 400, 375, 391, 384,
/* 90 */ 381, 183, 425, 434, 426, 455, 412, 431, 442, 290, /* 90 */ 405, 256, 449, 450, 451, 453, 421, 432, 439, 295,
/* 100 */ 509, 516, 519, 518, 534, 539, 520, 537, 526, 540, /* 100 */ 507, 512, 508, 513, 525, 528, 521, 531, 505, 520,
/* 110 */ 545, 557, 552, 544, 554, 556, /* 110 */ 535, 537, 546, 538, 542, 548,
}; };
static const YYACTIONTYPE yy_default[] = { static const YYACTIONTYPE yy_default[] = {
/* 0 */ 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, /* 0 */ 676, 676, 676, 676, 676, 676, 676, 676, 676, 676,
/* 10 */ 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, /* 10 */ 676, 676, 676, 676, 676, 676, 676, 676, 676, 676,
/* 20 */ 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, /* 20 */ 676, 676, 676, 676, 676, 676, 676, 676, 676, 676,
/* 30 */ 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, /* 30 */ 676, 676, 676, 676, 676, 676, 676, 676, 676, 676,
/* 40 */ 674, 674, 697, 674, 674, 674, 674, 674, 674, 674, /* 40 */ 676, 676, 699, 676, 676, 676, 676, 676, 676, 676,
/* 50 */ 674, 674, 695, 674, 832, 674, 674, 674, 843, 843, /* 50 */ 676, 676, 697, 676, 835, 676, 676, 676, 846, 846,
/* 60 */ 843, 697, 695, 674, 674, 760, 674, 907, 674, 674, /* 60 */ 846, 699, 697, 676, 676, 762, 676, 676, 910, 676,
/* 70 */ 867, 859, 835, 849, 836, 674, 892, 852, 674, 674, /* 70 */ 870, 862, 838, 852, 839, 676, 895, 855, 676, 676,
/* 80 */ 874, 872, 674, 674, 874, 872, 674, 886, 882, 865, /* 80 */ 877, 875, 676, 676, 877, 875, 676, 889, 885, 868,
/* 90 */ 863, 849, 674, 674, 674, 674, 910, 898, 894, 674, /* 90 */ 866, 852, 676, 676, 676, 676, 913, 901, 897, 676,
/* 100 */ 674, 697, 674, 697, 674, 674, 674, 695, 674, 729, /* 100 */ 676, 699, 676, 699, 676, 676, 676, 697, 676, 731,
/* 110 */ 674, 695, 674, 763, 763, 698, 674, 674, 674, 674, /* 110 */ 676, 697, 676, 765, 765, 700, 676, 676, 676, 676,
/* 120 */ 885, 884, 809, 808, 807, 803, 804, 674, 674, 674, /* 120 */ 888, 887, 812, 811, 810, 806, 807, 676, 676, 676,
/* 130 */ 674, 674, 674, 798, 799, 797, 796, 674, 674, 833, /* 130 */ 676, 676, 676, 801, 802, 800, 799, 676, 676, 836,
/* 140 */ 674, 674, 674, 895, 899, 674, 785, 674, 674, 674, /* 140 */ 676, 676, 676, 898, 902, 676, 788, 676, 676, 676,
/* 150 */ 674, 674, 674, 674, 674, 674, 856, 866, 674, 674, /* 150 */ 676, 676, 676, 676, 676, 676, 859, 869, 676, 676,
/* 160 */ 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, /* 160 */ 676, 676, 676, 676, 676, 676, 676, 676, 676, 676,
/* 170 */ 674, 785, 674, 883, 674, 842, 838, 674, 674, 834, /* 170 */ 676, 788, 676, 886, 676, 845, 841, 676, 676, 837,
/* 180 */ 674, 828, 674, 674, 674, 893, 674, 674, 674, 674, /* 180 */ 676, 831, 676, 676, 676, 896, 676, 676, 676, 676,
/* 190 */ 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, /* 190 */ 676, 676, 676, 676, 676, 676, 676, 676, 676, 676,
/* 200 */ 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, /* 200 */ 676, 676, 676, 676, 676, 676, 676, 676, 676, 676,
/* 210 */ 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, /* 210 */ 676, 676, 676, 676, 676, 676, 676, 676, 676, 676,
/* 220 */ 784, 674, 674, 674, 674, 674, 674, 674, 757, 674, /* 220 */ 676, 787, 676, 676, 676, 676, 676, 676, 676, 759,
/* 230 */ 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, /* 230 */ 676, 676, 676, 676, 676, 676, 676, 676, 676, 676,
/* 240 */ 674, 742, 740, 739, 738, 674, 735, 674, 674, 674, /* 240 */ 676, 676, 744, 742, 741, 740, 676, 737, 676, 676,
/* 250 */ 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, /* 250 */ 676, 676, 676, 676, 676, 676, 676, 676, 676, 676,
/* 260 */ 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, /* 260 */ 676, 676, 676, 676, 676, 676, 676, 676, 676, 676,
/* 270 */ 674, 674, 674, 674, 674, 674, 674, 674, /* 270 */ 676, 676, 676, 676, 676, 676, 676, 676, 676,
}; };
/********** End of lemon-generated parsing tables *****************************/ /********** End of lemon-generated parsing tables *****************************/
...@@ -679,128 +679,129 @@ static const char *const yyTokenName[] = { ...@@ -679,128 +679,129 @@ static const char *const yyTokenName[] = {
/* 83 */ "VARBINARY", /* 83 */ "VARBINARY",
/* 84 */ "DECIMAL", /* 84 */ "DECIMAL",
/* 85 */ "SMA", /* 85 */ "SMA",
/* 86 */ "NK_FLOAT", /* 86 */ "MNODES",
/* 87 */ "NK_BOOL", /* 87 */ "NK_FLOAT",
/* 88 */ "NK_VARIABLE", /* 88 */ "NK_BOOL",
/* 89 */ "BETWEEN", /* 89 */ "NK_VARIABLE",
/* 90 */ "IS", /* 90 */ "BETWEEN",
/* 91 */ "NULL", /* 91 */ "IS",
/* 92 */ "NK_LT", /* 92 */ "NULL",
/* 93 */ "NK_GT", /* 93 */ "NK_LT",
/* 94 */ "NK_LE", /* 94 */ "NK_GT",
/* 95 */ "NK_GE", /* 95 */ "NK_LE",
/* 96 */ "NK_NE", /* 96 */ "NK_GE",
/* 97 */ "NK_EQ", /* 97 */ "NK_NE",
/* 98 */ "LIKE", /* 98 */ "NK_EQ",
/* 99 */ "MATCH", /* 99 */ "LIKE",
/* 100 */ "NMATCH", /* 100 */ "MATCH",
/* 101 */ "IN", /* 101 */ "NMATCH",
/* 102 */ "FROM", /* 102 */ "IN",
/* 103 */ "AS", /* 103 */ "FROM",
/* 104 */ "JOIN", /* 104 */ "AS",
/* 105 */ "ON", /* 105 */ "JOIN",
/* 106 */ "INNER", /* 106 */ "ON",
/* 107 */ "SELECT", /* 107 */ "INNER",
/* 108 */ "DISTINCT", /* 108 */ "SELECT",
/* 109 */ "WHERE", /* 109 */ "DISTINCT",
/* 110 */ "PARTITION", /* 110 */ "WHERE",
/* 111 */ "BY", /* 111 */ "PARTITION",
/* 112 */ "SESSION", /* 112 */ "BY",
/* 113 */ "STATE_WINDOW", /* 113 */ "SESSION",
/* 114 */ "INTERVAL", /* 114 */ "STATE_WINDOW",
/* 115 */ "SLIDING", /* 115 */ "INTERVAL",
/* 116 */ "FILL", /* 116 */ "SLIDING",
/* 117 */ "VALUE", /* 117 */ "FILL",
/* 118 */ "NONE", /* 118 */ "VALUE",
/* 119 */ "PREV", /* 119 */ "NONE",
/* 120 */ "LINEAR", /* 120 */ "PREV",
/* 121 */ "NEXT", /* 121 */ "LINEAR",
/* 122 */ "GROUP", /* 122 */ "NEXT",
/* 123 */ "HAVING", /* 123 */ "GROUP",
/* 124 */ "ORDER", /* 124 */ "HAVING",
/* 125 */ "SLIMIT", /* 125 */ "ORDER",
/* 126 */ "SOFFSET", /* 126 */ "SLIMIT",
/* 127 */ "LIMIT", /* 127 */ "SOFFSET",
/* 128 */ "OFFSET", /* 128 */ "LIMIT",
/* 129 */ "ASC", /* 129 */ "OFFSET",
/* 130 */ "DESC", /* 130 */ "ASC",
/* 131 */ "NULLS", /* 131 */ "DESC",
/* 132 */ "FIRST", /* 132 */ "NULLS",
/* 133 */ "LAST", /* 133 */ "FIRST",
/* 134 */ "cmd", /* 134 */ "LAST",
/* 135 */ "user_name", /* 135 */ "cmd",
/* 136 */ "dnode_endpoint", /* 136 */ "user_name",
/* 137 */ "dnode_host_name", /* 137 */ "dnode_endpoint",
/* 138 */ "not_exists_opt", /* 138 */ "dnode_host_name",
/* 139 */ "db_name", /* 139 */ "not_exists_opt",
/* 140 */ "db_options", /* 140 */ "db_name",
/* 141 */ "exists_opt", /* 141 */ "db_options",
/* 142 */ "full_table_name", /* 142 */ "exists_opt",
/* 143 */ "column_def_list", /* 143 */ "full_table_name",
/* 144 */ "tags_def_opt", /* 144 */ "column_def_list",
/* 145 */ "table_options", /* 145 */ "tags_def_opt",
/* 146 */ "multi_create_clause", /* 146 */ "table_options",
/* 147 */ "tags_def", /* 147 */ "multi_create_clause",
/* 148 */ "multi_drop_clause", /* 148 */ "tags_def",
/* 149 */ "create_subtable_clause", /* 149 */ "multi_drop_clause",
/* 150 */ "specific_tags_opt", /* 150 */ "create_subtable_clause",
/* 151 */ "literal_list", /* 151 */ "specific_tags_opt",
/* 152 */ "drop_table_clause", /* 152 */ "literal_list",
/* 153 */ "col_name_list", /* 153 */ "drop_table_clause",
/* 154 */ "table_name", /* 154 */ "col_name_list",
/* 155 */ "column_def", /* 155 */ "table_name",
/* 156 */ "column_name", /* 156 */ "column_def",
/* 157 */ "type_name", /* 157 */ "column_name",
/* 158 */ "col_name", /* 158 */ "type_name",
/* 159 */ "query_expression", /* 159 */ "col_name",
/* 160 */ "literal", /* 160 */ "query_expression",
/* 161 */ "duration_literal", /* 161 */ "literal",
/* 162 */ "function_name", /* 162 */ "duration_literal",
/* 163 */ "table_alias", /* 163 */ "function_name",
/* 164 */ "column_alias", /* 164 */ "table_alias",
/* 165 */ "expression", /* 165 */ "column_alias",
/* 166 */ "column_reference", /* 166 */ "expression",
/* 167 */ "expression_list", /* 167 */ "column_reference",
/* 168 */ "subquery", /* 168 */ "expression_list",
/* 169 */ "predicate", /* 169 */ "subquery",
/* 170 */ "compare_op", /* 170 */ "predicate",
/* 171 */ "in_op", /* 171 */ "compare_op",
/* 172 */ "in_predicate_value", /* 172 */ "in_op",
/* 173 */ "boolean_value_expression", /* 173 */ "in_predicate_value",
/* 174 */ "boolean_primary", /* 174 */ "boolean_value_expression",
/* 175 */ "common_expression", /* 175 */ "boolean_primary",
/* 176 */ "from_clause", /* 176 */ "common_expression",
/* 177 */ "table_reference_list", /* 177 */ "from_clause",
/* 178 */ "table_reference", /* 178 */ "table_reference_list",
/* 179 */ "table_primary", /* 179 */ "table_reference",
/* 180 */ "joined_table", /* 180 */ "table_primary",
/* 181 */ "alias_opt", /* 181 */ "joined_table",
/* 182 */ "parenthesized_joined_table", /* 182 */ "alias_opt",
/* 183 */ "join_type", /* 183 */ "parenthesized_joined_table",
/* 184 */ "search_condition", /* 184 */ "join_type",
/* 185 */ "query_specification", /* 185 */ "search_condition",
/* 186 */ "set_quantifier_opt", /* 186 */ "query_specification",
/* 187 */ "select_list", /* 187 */ "set_quantifier_opt",
/* 188 */ "where_clause_opt", /* 188 */ "select_list",
/* 189 */ "partition_by_clause_opt", /* 189 */ "where_clause_opt",
/* 190 */ "twindow_clause_opt", /* 190 */ "partition_by_clause_opt",
/* 191 */ "group_by_clause_opt", /* 191 */ "twindow_clause_opt",
/* 192 */ "having_clause_opt", /* 192 */ "group_by_clause_opt",
/* 193 */ "select_sublist", /* 193 */ "having_clause_opt",
/* 194 */ "select_item", /* 194 */ "select_sublist",
/* 195 */ "sliding_opt", /* 195 */ "select_item",
/* 196 */ "fill_opt", /* 196 */ "sliding_opt",
/* 197 */ "fill_mode", /* 197 */ "fill_opt",
/* 198 */ "group_by_list", /* 198 */ "fill_mode",
/* 199 */ "query_expression_body", /* 199 */ "group_by_list",
/* 200 */ "order_by_clause_opt", /* 200 */ "query_expression_body",
/* 201 */ "slimit_clause_opt", /* 201 */ "order_by_clause_opt",
/* 202 */ "limit_clause_opt", /* 202 */ "slimit_clause_opt",
/* 203 */ "query_primary", /* 203 */ "limit_clause_opt",
/* 204 */ "sort_specification_list", /* 204 */ "query_primary",
/* 205 */ "sort_specification", /* 205 */ "sort_specification_list",
/* 206 */ "ordering_specification_opt", /* 206 */ "sort_specification",
/* 207 */ "null_ordering_opt", /* 207 */ "ordering_specification_opt",
/* 208 */ "null_ordering_opt",
}; };
#endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */ #endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */
...@@ -904,146 +905,147 @@ static const char *const yyRuleName[] = { ...@@ -904,146 +905,147 @@ static const char *const yyRuleName[] = {
/* 93 */ "col_name ::= column_name", /* 93 */ "col_name ::= column_name",
/* 94 */ "cmd ::= SHOW VGROUPS", /* 94 */ "cmd ::= SHOW VGROUPS",
/* 95 */ "cmd ::= SHOW db_name NK_DOT VGROUPS", /* 95 */ "cmd ::= SHOW db_name NK_DOT VGROUPS",
/* 96 */ "cmd ::= query_expression", /* 96 */ "cmd ::= SHOW MNODES",
/* 97 */ "literal ::= NK_INTEGER", /* 97 */ "cmd ::= query_expression",
/* 98 */ "literal ::= NK_FLOAT", /* 98 */ "literal ::= NK_INTEGER",
/* 99 */ "literal ::= NK_STRING", /* 99 */ "literal ::= NK_FLOAT",
/* 100 */ "literal ::= NK_BOOL", /* 100 */ "literal ::= NK_STRING",
/* 101 */ "literal ::= TIMESTAMP NK_STRING", /* 101 */ "literal ::= NK_BOOL",
/* 102 */ "literal ::= duration_literal", /* 102 */ "literal ::= TIMESTAMP NK_STRING",
/* 103 */ "duration_literal ::= NK_VARIABLE", /* 103 */ "literal ::= duration_literal",
/* 104 */ "literal_list ::= literal", /* 104 */ "duration_literal ::= NK_VARIABLE",
/* 105 */ "literal_list ::= literal_list NK_COMMA literal", /* 105 */ "literal_list ::= literal",
/* 106 */ "db_name ::= NK_ID", /* 106 */ "literal_list ::= literal_list NK_COMMA literal",
/* 107 */ "table_name ::= NK_ID", /* 107 */ "db_name ::= NK_ID",
/* 108 */ "column_name ::= NK_ID", /* 108 */ "table_name ::= NK_ID",
/* 109 */ "function_name ::= NK_ID", /* 109 */ "column_name ::= NK_ID",
/* 110 */ "table_alias ::= NK_ID", /* 110 */ "function_name ::= NK_ID",
/* 111 */ "column_alias ::= NK_ID", /* 111 */ "table_alias ::= NK_ID",
/* 112 */ "user_name ::= NK_ID", /* 112 */ "column_alias ::= NK_ID",
/* 113 */ "expression ::= literal", /* 113 */ "user_name ::= NK_ID",
/* 114 */ "expression ::= column_reference", /* 114 */ "expression ::= literal",
/* 115 */ "expression ::= function_name NK_LP expression_list NK_RP", /* 115 */ "expression ::= column_reference",
/* 116 */ "expression ::= function_name NK_LP NK_STAR NK_RP", /* 116 */ "expression ::= function_name NK_LP expression_list NK_RP",
/* 117 */ "expression ::= subquery", /* 117 */ "expression ::= function_name NK_LP NK_STAR NK_RP",
/* 118 */ "expression ::= NK_LP expression NK_RP", /* 118 */ "expression ::= subquery",
/* 119 */ "expression ::= NK_PLUS expression", /* 119 */ "expression ::= NK_LP expression NK_RP",
/* 120 */ "expression ::= NK_MINUS expression", /* 120 */ "expression ::= NK_PLUS expression",
/* 121 */ "expression ::= expression NK_PLUS expression", /* 121 */ "expression ::= NK_MINUS expression",
/* 122 */ "expression ::= expression NK_MINUS expression", /* 122 */ "expression ::= expression NK_PLUS expression",
/* 123 */ "expression ::= expression NK_STAR expression", /* 123 */ "expression ::= expression NK_MINUS expression",
/* 124 */ "expression ::= expression NK_SLASH expression", /* 124 */ "expression ::= expression NK_STAR expression",
/* 125 */ "expression ::= expression NK_REM expression", /* 125 */ "expression ::= expression NK_SLASH expression",
/* 126 */ "expression_list ::= expression", /* 126 */ "expression ::= expression NK_REM expression",
/* 127 */ "expression_list ::= expression_list NK_COMMA expression", /* 127 */ "expression_list ::= expression",
/* 128 */ "column_reference ::= column_name", /* 128 */ "expression_list ::= expression_list NK_COMMA expression",
/* 129 */ "column_reference ::= table_name NK_DOT column_name", /* 129 */ "column_reference ::= column_name",
/* 130 */ "predicate ::= expression compare_op expression", /* 130 */ "column_reference ::= table_name NK_DOT column_name",
/* 131 */ "predicate ::= expression BETWEEN expression AND expression", /* 131 */ "predicate ::= expression compare_op expression",
/* 132 */ "predicate ::= expression NOT BETWEEN expression AND expression", /* 132 */ "predicate ::= expression BETWEEN expression AND expression",
/* 133 */ "predicate ::= expression IS NULL", /* 133 */ "predicate ::= expression NOT BETWEEN expression AND expression",
/* 134 */ "predicate ::= expression IS NOT NULL", /* 134 */ "predicate ::= expression IS NULL",
/* 135 */ "predicate ::= expression in_op in_predicate_value", /* 135 */ "predicate ::= expression IS NOT NULL",
/* 136 */ "compare_op ::= NK_LT", /* 136 */ "predicate ::= expression in_op in_predicate_value",
/* 137 */ "compare_op ::= NK_GT", /* 137 */ "compare_op ::= NK_LT",
/* 138 */ "compare_op ::= NK_LE", /* 138 */ "compare_op ::= NK_GT",
/* 139 */ "compare_op ::= NK_GE", /* 139 */ "compare_op ::= NK_LE",
/* 140 */ "compare_op ::= NK_NE", /* 140 */ "compare_op ::= NK_GE",
/* 141 */ "compare_op ::= NK_EQ", /* 141 */ "compare_op ::= NK_NE",
/* 142 */ "compare_op ::= LIKE", /* 142 */ "compare_op ::= NK_EQ",
/* 143 */ "compare_op ::= NOT LIKE", /* 143 */ "compare_op ::= LIKE",
/* 144 */ "compare_op ::= MATCH", /* 144 */ "compare_op ::= NOT LIKE",
/* 145 */ "compare_op ::= NMATCH", /* 145 */ "compare_op ::= MATCH",
/* 146 */ "in_op ::= IN", /* 146 */ "compare_op ::= NMATCH",
/* 147 */ "in_op ::= NOT IN", /* 147 */ "in_op ::= IN",
/* 148 */ "in_predicate_value ::= NK_LP expression_list NK_RP", /* 148 */ "in_op ::= NOT IN",
/* 149 */ "boolean_value_expression ::= boolean_primary", /* 149 */ "in_predicate_value ::= NK_LP expression_list NK_RP",
/* 150 */ "boolean_value_expression ::= NOT boolean_primary", /* 150 */ "boolean_value_expression ::= boolean_primary",
/* 151 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression", /* 151 */ "boolean_value_expression ::= NOT boolean_primary",
/* 152 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression", /* 152 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression",
/* 153 */ "boolean_primary ::= predicate", /* 153 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression",
/* 154 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP", /* 154 */ "boolean_primary ::= predicate",
/* 155 */ "common_expression ::= expression", /* 155 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP",
/* 156 */ "common_expression ::= boolean_value_expression", /* 156 */ "common_expression ::= expression",
/* 157 */ "from_clause ::= FROM table_reference_list", /* 157 */ "common_expression ::= boolean_value_expression",
/* 158 */ "table_reference_list ::= table_reference", /* 158 */ "from_clause ::= FROM table_reference_list",
/* 159 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference", /* 159 */ "table_reference_list ::= table_reference",
/* 160 */ "table_reference ::= table_primary", /* 160 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference",
/* 161 */ "table_reference ::= joined_table", /* 161 */ "table_reference ::= table_primary",
/* 162 */ "table_primary ::= table_name alias_opt", /* 162 */ "table_reference ::= joined_table",
/* 163 */ "table_primary ::= db_name NK_DOT table_name alias_opt", /* 163 */ "table_primary ::= table_name alias_opt",
/* 164 */ "table_primary ::= subquery alias_opt", /* 164 */ "table_primary ::= db_name NK_DOT table_name alias_opt",
/* 165 */ "table_primary ::= parenthesized_joined_table", /* 165 */ "table_primary ::= subquery alias_opt",
/* 166 */ "alias_opt ::=", /* 166 */ "table_primary ::= parenthesized_joined_table",
/* 167 */ "alias_opt ::= table_alias", /* 167 */ "alias_opt ::=",
/* 168 */ "alias_opt ::= AS table_alias", /* 168 */ "alias_opt ::= table_alias",
/* 169 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP", /* 169 */ "alias_opt ::= AS table_alias",
/* 170 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP", /* 170 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP",
/* 171 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition", /* 171 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP",
/* 172 */ "join_type ::=", /* 172 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition",
/* 173 */ "join_type ::= INNER", /* 173 */ "join_type ::=",
/* 174 */ "query_specification ::= SELECT set_quantifier_opt select_list from_clause where_clause_opt partition_by_clause_opt twindow_clause_opt group_by_clause_opt having_clause_opt", /* 174 */ "join_type ::= INNER",
/* 175 */ "set_quantifier_opt ::=", /* 175 */ "query_specification ::= SELECT set_quantifier_opt select_list from_clause where_clause_opt partition_by_clause_opt twindow_clause_opt group_by_clause_opt having_clause_opt",
/* 176 */ "set_quantifier_opt ::= DISTINCT", /* 176 */ "set_quantifier_opt ::=",
/* 177 */ "set_quantifier_opt ::= ALL", /* 177 */ "set_quantifier_opt ::= DISTINCT",
/* 178 */ "select_list ::= NK_STAR", /* 178 */ "set_quantifier_opt ::= ALL",
/* 179 */ "select_list ::= select_sublist", /* 179 */ "select_list ::= NK_STAR",
/* 180 */ "select_sublist ::= select_item", /* 180 */ "select_list ::= select_sublist",
/* 181 */ "select_sublist ::= select_sublist NK_COMMA select_item", /* 181 */ "select_sublist ::= select_item",
/* 182 */ "select_item ::= common_expression", /* 182 */ "select_sublist ::= select_sublist NK_COMMA select_item",
/* 183 */ "select_item ::= common_expression column_alias", /* 183 */ "select_item ::= common_expression",
/* 184 */ "select_item ::= common_expression AS column_alias", /* 184 */ "select_item ::= common_expression column_alias",
/* 185 */ "select_item ::= table_name NK_DOT NK_STAR", /* 185 */ "select_item ::= common_expression AS column_alias",
/* 186 */ "where_clause_opt ::=", /* 186 */ "select_item ::= table_name NK_DOT NK_STAR",
/* 187 */ "where_clause_opt ::= WHERE search_condition", /* 187 */ "where_clause_opt ::=",
/* 188 */ "partition_by_clause_opt ::=", /* 188 */ "where_clause_opt ::= WHERE search_condition",
/* 189 */ "partition_by_clause_opt ::= PARTITION BY expression_list", /* 189 */ "partition_by_clause_opt ::=",
/* 190 */ "twindow_clause_opt ::=", /* 190 */ "partition_by_clause_opt ::= PARTITION BY expression_list",
/* 191 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA NK_INTEGER NK_RP", /* 191 */ "twindow_clause_opt ::=",
/* 192 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP column_reference NK_RP", /* 192 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA NK_INTEGER NK_RP",
/* 193 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt", /* 193 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP column_reference NK_RP",
/* 194 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt", /* 194 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt",
/* 195 */ "sliding_opt ::=", /* 195 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt",
/* 196 */ "sliding_opt ::= SLIDING NK_LP duration_literal NK_RP", /* 196 */ "sliding_opt ::=",
/* 197 */ "fill_opt ::=", /* 197 */ "sliding_opt ::= SLIDING NK_LP duration_literal NK_RP",
/* 198 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", /* 198 */ "fill_opt ::=",
/* 199 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP", /* 199 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP",
/* 200 */ "fill_mode ::= NONE", /* 200 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP",
/* 201 */ "fill_mode ::= PREV", /* 201 */ "fill_mode ::= NONE",
/* 202 */ "fill_mode ::= NULL", /* 202 */ "fill_mode ::= PREV",
/* 203 */ "fill_mode ::= LINEAR", /* 203 */ "fill_mode ::= NULL",
/* 204 */ "fill_mode ::= NEXT", /* 204 */ "fill_mode ::= LINEAR",
/* 205 */ "group_by_clause_opt ::=", /* 205 */ "fill_mode ::= NEXT",
/* 206 */ "group_by_clause_opt ::= GROUP BY group_by_list", /* 206 */ "group_by_clause_opt ::=",
/* 207 */ "group_by_list ::= expression", /* 207 */ "group_by_clause_opt ::= GROUP BY group_by_list",
/* 208 */ "group_by_list ::= group_by_list NK_COMMA expression", /* 208 */ "group_by_list ::= expression",
/* 209 */ "having_clause_opt ::=", /* 209 */ "group_by_list ::= group_by_list NK_COMMA expression",
/* 210 */ "having_clause_opt ::= HAVING search_condition", /* 210 */ "having_clause_opt ::=",
/* 211 */ "query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt", /* 211 */ "having_clause_opt ::= HAVING search_condition",
/* 212 */ "query_expression_body ::= query_primary", /* 212 */ "query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt",
/* 213 */ "query_expression_body ::= query_expression_body UNION ALL query_expression_body", /* 213 */ "query_expression_body ::= query_primary",
/* 214 */ "query_primary ::= query_specification", /* 214 */ "query_expression_body ::= query_expression_body UNION ALL query_expression_body",
/* 215 */ "order_by_clause_opt ::=", /* 215 */ "query_primary ::= query_specification",
/* 216 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", /* 216 */ "order_by_clause_opt ::=",
/* 217 */ "slimit_clause_opt ::=", /* 217 */ "order_by_clause_opt ::= ORDER BY sort_specification_list",
/* 218 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", /* 218 */ "slimit_clause_opt ::=",
/* 219 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", /* 219 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER",
/* 220 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", /* 220 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER",
/* 221 */ "limit_clause_opt ::=", /* 221 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER",
/* 222 */ "limit_clause_opt ::= LIMIT NK_INTEGER", /* 222 */ "limit_clause_opt ::=",
/* 223 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", /* 223 */ "limit_clause_opt ::= LIMIT NK_INTEGER",
/* 224 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", /* 224 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER",
/* 225 */ "subquery ::= NK_LP query_expression NK_RP", /* 225 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER",
/* 226 */ "search_condition ::= common_expression", /* 226 */ "subquery ::= NK_LP query_expression NK_RP",
/* 227 */ "sort_specification_list ::= sort_specification", /* 227 */ "search_condition ::= common_expression",
/* 228 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", /* 228 */ "sort_specification_list ::= sort_specification",
/* 229 */ "sort_specification ::= expression ordering_specification_opt null_ordering_opt", /* 229 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification",
/* 230 */ "ordering_specification_opt ::=", /* 230 */ "sort_specification ::= expression ordering_specification_opt null_ordering_opt",
/* 231 */ "ordering_specification_opt ::= ASC", /* 231 */ "ordering_specification_opt ::=",
/* 232 */ "ordering_specification_opt ::= DESC", /* 232 */ "ordering_specification_opt ::= ASC",
/* 233 */ "null_ordering_opt ::=", /* 233 */ "ordering_specification_opt ::= DESC",
/* 234 */ "null_ordering_opt ::= NULLS FIRST", /* 234 */ "null_ordering_opt ::=",
/* 235 */ "null_ordering_opt ::= NULLS LAST", /* 235 */ "null_ordering_opt ::= NULLS FIRST",
/* 236 */ "null_ordering_opt ::= NULLS LAST",
}; };
#endif /* NDEBUG */ #endif /* NDEBUG */
...@@ -1170,124 +1172,124 @@ static void yy_destructor( ...@@ -1170,124 +1172,124 @@ static void yy_destructor(
*/ */
/********* Begin destructor definitions ***************************************/ /********* Begin destructor definitions ***************************************/
/* Default NON-TERMINAL Destructor */ /* Default NON-TERMINAL Destructor */
case 134: /* cmd */ case 135: /* cmd */
case 142: /* full_table_name */ case 143: /* full_table_name */
case 149: /* create_subtable_clause */ case 150: /* create_subtable_clause */
case 152: /* drop_table_clause */ case 153: /* drop_table_clause */
case 155: /* column_def */ case 156: /* column_def */
case 158: /* col_name */ case 159: /* col_name */
case 159: /* query_expression */ case 160: /* query_expression */
case 160: /* literal */ case 161: /* literal */
case 161: /* duration_literal */ case 162: /* duration_literal */
case 165: /* expression */ case 166: /* expression */
case 166: /* column_reference */ case 167: /* column_reference */
case 168: /* subquery */ case 169: /* subquery */
case 169: /* predicate */ case 170: /* predicate */
case 172: /* in_predicate_value */ case 173: /* in_predicate_value */
case 173: /* boolean_value_expression */ case 174: /* boolean_value_expression */
case 174: /* boolean_primary */ case 175: /* boolean_primary */
case 175: /* common_expression */ case 176: /* common_expression */
case 176: /* from_clause */ case 177: /* from_clause */
case 177: /* table_reference_list */ case 178: /* table_reference_list */
case 178: /* table_reference */ case 179: /* table_reference */
case 179: /* table_primary */ case 180: /* table_primary */
case 180: /* joined_table */ case 181: /* joined_table */
case 182: /* parenthesized_joined_table */ case 183: /* parenthesized_joined_table */
case 184: /* search_condition */ case 185: /* search_condition */
case 185: /* query_specification */ case 186: /* query_specification */
case 188: /* where_clause_opt */ case 189: /* where_clause_opt */
case 190: /* twindow_clause_opt */ case 191: /* twindow_clause_opt */
case 192: /* having_clause_opt */ case 193: /* having_clause_opt */
case 194: /* select_item */ case 195: /* select_item */
case 195: /* sliding_opt */ case 196: /* sliding_opt */
case 196: /* fill_opt */ case 197: /* fill_opt */
case 199: /* query_expression_body */ case 200: /* query_expression_body */
case 201: /* slimit_clause_opt */ case 202: /* slimit_clause_opt */
case 202: /* limit_clause_opt */ case 203: /* limit_clause_opt */
case 203: /* query_primary */ case 204: /* query_primary */
case 205: /* sort_specification */ case 206: /* sort_specification */
{ {
nodesDestroyNode((yypminor->yy392)); nodesDestroyNode((yypminor->yy256));
} }
break; break;
case 135: /* user_name */ case 136: /* user_name */
case 136: /* dnode_endpoint */ case 137: /* dnode_endpoint */
case 137: /* dnode_host_name */ case 138: /* dnode_host_name */
case 139: /* db_name */ case 140: /* db_name */
case 154: /* table_name */ case 155: /* table_name */
case 156: /* column_name */ case 157: /* column_name */
case 162: /* function_name */ case 163: /* function_name */
case 163: /* table_alias */ case 164: /* table_alias */
case 164: /* column_alias */ case 165: /* column_alias */
case 181: /* alias_opt */ case 182: /* alias_opt */
{ {
} }
break; break;
case 138: /* not_exists_opt */ case 139: /* not_exists_opt */
case 141: /* exists_opt */ case 142: /* exists_opt */
case 186: /* set_quantifier_opt */ case 187: /* set_quantifier_opt */
{ {
} }
break; break;
case 140: /* db_options */ case 141: /* db_options */
{ {
tfree((yypminor->yy103)); tfree((yypminor->yy391));
} }
break; break;
case 143: /* column_def_list */ case 144: /* column_def_list */
case 144: /* tags_def_opt */ case 145: /* tags_def_opt */
case 146: /* multi_create_clause */ case 147: /* multi_create_clause */
case 147: /* tags_def */ case 148: /* tags_def */
case 148: /* multi_drop_clause */ case 149: /* multi_drop_clause */
case 150: /* specific_tags_opt */ case 151: /* specific_tags_opt */
case 151: /* literal_list */ case 152: /* literal_list */
case 153: /* col_name_list */ case 154: /* col_name_list */
case 167: /* expression_list */ case 168: /* expression_list */
case 187: /* select_list */ case 188: /* select_list */
case 189: /* partition_by_clause_opt */ case 190: /* partition_by_clause_opt */
case 191: /* group_by_clause_opt */ case 192: /* group_by_clause_opt */
case 193: /* select_sublist */ case 194: /* select_sublist */
case 198: /* group_by_list */ case 199: /* group_by_list */
case 200: /* order_by_clause_opt */ case 201: /* order_by_clause_opt */
case 204: /* sort_specification_list */ case 205: /* sort_specification_list */
{ {
nodesDestroyList((yypminor->yy184)); nodesDestroyList((yypminor->yy46));
} }
break; break;
case 145: /* table_options */ case 146: /* table_options */
{ {
tfree((yypminor->yy334)); tfree((yypminor->yy340));
} }
break; break;
case 157: /* type_name */ case 158: /* type_name */
{ {
} }
break; break;
case 170: /* compare_op */ case 171: /* compare_op */
case 171: /* in_op */ case 172: /* in_op */
{ {
} }
break; break;
case 183: /* join_type */ case 184: /* join_type */
{ {
} }
break; break;
case 197: /* fill_mode */ case 198: /* fill_mode */
{ {
} }
break; break;
case 206: /* ordering_specification_opt */ case 207: /* ordering_specification_opt */
{ {
} }
break; break;
case 207: /* null_ordering_opt */ case 208: /* null_ordering_opt */
{ {
} }
...@@ -1586,242 +1588,243 @@ static const struct { ...@@ -1586,242 +1588,243 @@ static const struct {
YYCODETYPE lhs; /* Symbol on the left-hand side of the rule */ YYCODETYPE lhs; /* Symbol on the left-hand side of the rule */
signed char nrhs; /* Negative of the number of RHS symbols in the rule */ signed char nrhs; /* Negative of the number of RHS symbols in the rule */
} yyRuleInfo[] = { } yyRuleInfo[] = {
{ 134, -5 }, /* (0) cmd ::= CREATE USER user_name PASS NK_STRING */ { 135, -5 }, /* (0) cmd ::= CREATE USER user_name PASS NK_STRING */
{ 134, -5 }, /* (1) cmd ::= ALTER USER user_name PASS NK_STRING */ { 135, -5 }, /* (1) cmd ::= ALTER USER user_name PASS NK_STRING */
{ 134, -5 }, /* (2) cmd ::= ALTER USER user_name PRIVILEGE NK_STRING */ { 135, -5 }, /* (2) cmd ::= ALTER USER user_name PRIVILEGE NK_STRING */
{ 134, -3 }, /* (3) cmd ::= DROP USER user_name */ { 135, -3 }, /* (3) cmd ::= DROP USER user_name */
{ 134, -2 }, /* (4) cmd ::= SHOW USERS */ { 135, -2 }, /* (4) cmd ::= SHOW USERS */
{ 134, -3 }, /* (5) cmd ::= CREATE DNODE dnode_endpoint */ { 135, -3 }, /* (5) cmd ::= CREATE DNODE dnode_endpoint */
{ 134, -5 }, /* (6) cmd ::= CREATE DNODE dnode_host_name PORT NK_INTEGER */ { 135, -5 }, /* (6) cmd ::= CREATE DNODE dnode_host_name PORT NK_INTEGER */
{ 134, -3 }, /* (7) cmd ::= DROP DNODE NK_INTEGER */ { 135, -3 }, /* (7) cmd ::= DROP DNODE NK_INTEGER */
{ 134, -3 }, /* (8) cmd ::= DROP DNODE dnode_endpoint */ { 135, -3 }, /* (8) cmd ::= DROP DNODE dnode_endpoint */
{ 134, -2 }, /* (9) cmd ::= SHOW DNODES */ { 135, -2 }, /* (9) cmd ::= SHOW DNODES */
{ 136, -1 }, /* (10) dnode_endpoint ::= NK_STRING */ { 137, -1 }, /* (10) dnode_endpoint ::= NK_STRING */
{ 137, -1 }, /* (11) dnode_host_name ::= NK_ID */ { 138, -1 }, /* (11) dnode_host_name ::= NK_ID */
{ 137, -1 }, /* (12) dnode_host_name ::= NK_IPTOKEN */ { 138, -1 }, /* (12) dnode_host_name ::= NK_IPTOKEN */
{ 134, -5 }, /* (13) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ { 135, -5 }, /* (13) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */
{ 134, -4 }, /* (14) cmd ::= DROP DATABASE exists_opt db_name */ { 135, -4 }, /* (14) cmd ::= DROP DATABASE exists_opt db_name */
{ 134, -2 }, /* (15) cmd ::= SHOW DATABASES */ { 135, -2 }, /* (15) cmd ::= SHOW DATABASES */
{ 134, -2 }, /* (16) cmd ::= USE db_name */ { 135, -2 }, /* (16) cmd ::= USE db_name */
{ 138, -3 }, /* (17) not_exists_opt ::= IF NOT EXISTS */ { 139, -3 }, /* (17) not_exists_opt ::= IF NOT EXISTS */
{ 138, 0 }, /* (18) not_exists_opt ::= */ { 139, 0 }, /* (18) not_exists_opt ::= */
{ 141, -2 }, /* (19) exists_opt ::= IF EXISTS */ { 142, -2 }, /* (19) exists_opt ::= IF EXISTS */
{ 141, 0 }, /* (20) exists_opt ::= */ { 142, 0 }, /* (20) exists_opt ::= */
{ 140, 0 }, /* (21) db_options ::= */ { 141, 0 }, /* (21) db_options ::= */
{ 140, -3 }, /* (22) db_options ::= db_options BLOCKS NK_INTEGER */ { 141, -3 }, /* (22) db_options ::= db_options BLOCKS NK_INTEGER */
{ 140, -3 }, /* (23) db_options ::= db_options CACHE NK_INTEGER */ { 141, -3 }, /* (23) db_options ::= db_options CACHE NK_INTEGER */
{ 140, -3 }, /* (24) db_options ::= db_options CACHELAST NK_INTEGER */ { 141, -3 }, /* (24) db_options ::= db_options CACHELAST NK_INTEGER */
{ 140, -3 }, /* (25) db_options ::= db_options COMP NK_INTEGER */ { 141, -3 }, /* (25) db_options ::= db_options COMP NK_INTEGER */
{ 140, -3 }, /* (26) db_options ::= db_options DAYS NK_INTEGER */ { 141, -3 }, /* (26) db_options ::= db_options DAYS NK_INTEGER */
{ 140, -3 }, /* (27) db_options ::= db_options FSYNC NK_INTEGER */ { 141, -3 }, /* (27) db_options ::= db_options FSYNC NK_INTEGER */
{ 140, -3 }, /* (28) db_options ::= db_options MAXROWS NK_INTEGER */ { 141, -3 }, /* (28) db_options ::= db_options MAXROWS NK_INTEGER */
{ 140, -3 }, /* (29) db_options ::= db_options MINROWS NK_INTEGER */ { 141, -3 }, /* (29) db_options ::= db_options MINROWS NK_INTEGER */
{ 140, -3 }, /* (30) db_options ::= db_options KEEP NK_INTEGER */ { 141, -3 }, /* (30) db_options ::= db_options KEEP NK_INTEGER */
{ 140, -3 }, /* (31) db_options ::= db_options PRECISION NK_STRING */ { 141, -3 }, /* (31) db_options ::= db_options PRECISION NK_STRING */
{ 140, -3 }, /* (32) db_options ::= db_options QUORUM NK_INTEGER */ { 141, -3 }, /* (32) db_options ::= db_options QUORUM NK_INTEGER */
{ 140, -3 }, /* (33) db_options ::= db_options REPLICA NK_INTEGER */ { 141, -3 }, /* (33) db_options ::= db_options REPLICA NK_INTEGER */
{ 140, -3 }, /* (34) db_options ::= db_options TTL NK_INTEGER */ { 141, -3 }, /* (34) db_options ::= db_options TTL NK_INTEGER */
{ 140, -3 }, /* (35) db_options ::= db_options WAL NK_INTEGER */ { 141, -3 }, /* (35) db_options ::= db_options WAL NK_INTEGER */
{ 140, -3 }, /* (36) db_options ::= db_options VGROUPS NK_INTEGER */ { 141, -3 }, /* (36) db_options ::= db_options VGROUPS NK_INTEGER */
{ 140, -3 }, /* (37) db_options ::= db_options SINGLE_STABLE NK_INTEGER */ { 141, -3 }, /* (37) db_options ::= db_options SINGLE_STABLE NK_INTEGER */
{ 140, -3 }, /* (38) db_options ::= db_options STREAM_MODE NK_INTEGER */ { 141, -3 }, /* (38) db_options ::= db_options STREAM_MODE NK_INTEGER */
{ 134, -9 }, /* (39) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ { 135, -9 }, /* (39) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */
{ 134, -3 }, /* (40) cmd ::= CREATE TABLE multi_create_clause */ { 135, -3 }, /* (40) cmd ::= CREATE TABLE multi_create_clause */
{ 134, -9 }, /* (41) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ { 135, -9 }, /* (41) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */
{ 134, -3 }, /* (42) cmd ::= DROP TABLE multi_drop_clause */ { 135, -3 }, /* (42) cmd ::= DROP TABLE multi_drop_clause */
{ 134, -4 }, /* (43) cmd ::= DROP STABLE exists_opt full_table_name */ { 135, -4 }, /* (43) cmd ::= DROP STABLE exists_opt full_table_name */
{ 134, -2 }, /* (44) cmd ::= SHOW TABLES */ { 135, -2 }, /* (44) cmd ::= SHOW TABLES */
{ 134, -2 }, /* (45) cmd ::= SHOW STABLES */ { 135, -2 }, /* (45) cmd ::= SHOW STABLES */
{ 146, -1 }, /* (46) multi_create_clause ::= create_subtable_clause */ { 147, -1 }, /* (46) multi_create_clause ::= create_subtable_clause */
{ 146, -2 }, /* (47) multi_create_clause ::= multi_create_clause create_subtable_clause */ { 147, -2 }, /* (47) multi_create_clause ::= multi_create_clause create_subtable_clause */
{ 149, -9 }, /* (48) create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_tags_opt TAGS NK_LP literal_list NK_RP */ { 150, -9 }, /* (48) create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_tags_opt TAGS NK_LP literal_list NK_RP */
{ 148, -1 }, /* (49) multi_drop_clause ::= drop_table_clause */ { 149, -1 }, /* (49) multi_drop_clause ::= drop_table_clause */
{ 148, -2 }, /* (50) multi_drop_clause ::= multi_drop_clause drop_table_clause */ { 149, -2 }, /* (50) multi_drop_clause ::= multi_drop_clause drop_table_clause */
{ 152, -2 }, /* (51) drop_table_clause ::= exists_opt full_table_name */ { 153, -2 }, /* (51) drop_table_clause ::= exists_opt full_table_name */
{ 150, 0 }, /* (52) specific_tags_opt ::= */ { 151, 0 }, /* (52) specific_tags_opt ::= */
{ 150, -3 }, /* (53) specific_tags_opt ::= NK_LP col_name_list NK_RP */ { 151, -3 }, /* (53) specific_tags_opt ::= NK_LP col_name_list NK_RP */
{ 142, -1 }, /* (54) full_table_name ::= table_name */ { 143, -1 }, /* (54) full_table_name ::= table_name */
{ 142, -3 }, /* (55) full_table_name ::= db_name NK_DOT table_name */ { 143, -3 }, /* (55) full_table_name ::= db_name NK_DOT table_name */
{ 143, -1 }, /* (56) column_def_list ::= column_def */ { 144, -1 }, /* (56) column_def_list ::= column_def */
{ 143, -3 }, /* (57) column_def_list ::= column_def_list NK_COMMA column_def */ { 144, -3 }, /* (57) column_def_list ::= column_def_list NK_COMMA column_def */
{ 155, -2 }, /* (58) column_def ::= column_name type_name */ { 156, -2 }, /* (58) column_def ::= column_name type_name */
{ 155, -4 }, /* (59) column_def ::= column_name type_name COMMENT NK_STRING */ { 156, -4 }, /* (59) column_def ::= column_name type_name COMMENT NK_STRING */
{ 157, -1 }, /* (60) type_name ::= BOOL */ { 158, -1 }, /* (60) type_name ::= BOOL */
{ 157, -1 }, /* (61) type_name ::= TINYINT */ { 158, -1 }, /* (61) type_name ::= TINYINT */
{ 157, -1 }, /* (62) type_name ::= SMALLINT */ { 158, -1 }, /* (62) type_name ::= SMALLINT */
{ 157, -1 }, /* (63) type_name ::= INT */ { 158, -1 }, /* (63) type_name ::= INT */
{ 157, -1 }, /* (64) type_name ::= INTEGER */ { 158, -1 }, /* (64) type_name ::= INTEGER */
{ 157, -1 }, /* (65) type_name ::= BIGINT */ { 158, -1 }, /* (65) type_name ::= BIGINT */
{ 157, -1 }, /* (66) type_name ::= FLOAT */ { 158, -1 }, /* (66) type_name ::= FLOAT */
{ 157, -1 }, /* (67) type_name ::= DOUBLE */ { 158, -1 }, /* (67) type_name ::= DOUBLE */
{ 157, -4 }, /* (68) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ { 158, -4 }, /* (68) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */
{ 157, -1 }, /* (69) type_name ::= TIMESTAMP */ { 158, -1 }, /* (69) type_name ::= TIMESTAMP */
{ 157, -4 }, /* (70) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ { 158, -4 }, /* (70) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */
{ 157, -2 }, /* (71) type_name ::= TINYINT UNSIGNED */ { 158, -2 }, /* (71) type_name ::= TINYINT UNSIGNED */
{ 157, -2 }, /* (72) type_name ::= SMALLINT UNSIGNED */ { 158, -2 }, /* (72) type_name ::= SMALLINT UNSIGNED */
{ 157, -2 }, /* (73) type_name ::= INT UNSIGNED */ { 158, -2 }, /* (73) type_name ::= INT UNSIGNED */
{ 157, -2 }, /* (74) type_name ::= BIGINT UNSIGNED */ { 158, -2 }, /* (74) type_name ::= BIGINT UNSIGNED */
{ 157, -1 }, /* (75) type_name ::= JSON */ { 158, -1 }, /* (75) type_name ::= JSON */
{ 157, -4 }, /* (76) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ { 158, -4 }, /* (76) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */
{ 157, -1 }, /* (77) type_name ::= MEDIUMBLOB */ { 158, -1 }, /* (77) type_name ::= MEDIUMBLOB */
{ 157, -1 }, /* (78) type_name ::= BLOB */ { 158, -1 }, /* (78) type_name ::= BLOB */
{ 157, -4 }, /* (79) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ { 158, -4 }, /* (79) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */
{ 157, -1 }, /* (80) type_name ::= DECIMAL */ { 158, -1 }, /* (80) type_name ::= DECIMAL */
{ 157, -4 }, /* (81) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ { 158, -4 }, /* (81) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */
{ 157, -6 }, /* (82) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ { 158, -6 }, /* (82) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */
{ 144, 0 }, /* (83) tags_def_opt ::= */ { 145, 0 }, /* (83) tags_def_opt ::= */
{ 144, -1 }, /* (84) tags_def_opt ::= tags_def */ { 145, -1 }, /* (84) tags_def_opt ::= tags_def */
{ 147, -4 }, /* (85) tags_def ::= TAGS NK_LP column_def_list NK_RP */ { 148, -4 }, /* (85) tags_def ::= TAGS NK_LP column_def_list NK_RP */
{ 145, 0 }, /* (86) table_options ::= */ { 146, 0 }, /* (86) table_options ::= */
{ 145, -3 }, /* (87) table_options ::= table_options COMMENT NK_STRING */ { 146, -3 }, /* (87) table_options ::= table_options COMMENT NK_STRING */
{ 145, -3 }, /* (88) table_options ::= table_options KEEP NK_INTEGER */ { 146, -3 }, /* (88) table_options ::= table_options KEEP NK_INTEGER */
{ 145, -3 }, /* (89) table_options ::= table_options TTL NK_INTEGER */ { 146, -3 }, /* (89) table_options ::= table_options TTL NK_INTEGER */
{ 145, -5 }, /* (90) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ { 146, -5 }, /* (90) table_options ::= table_options SMA NK_LP col_name_list NK_RP */
{ 153, -1 }, /* (91) col_name_list ::= col_name */ { 154, -1 }, /* (91) col_name_list ::= col_name */
{ 153, -3 }, /* (92) col_name_list ::= col_name_list NK_COMMA col_name */ { 154, -3 }, /* (92) col_name_list ::= col_name_list NK_COMMA col_name */
{ 158, -1 }, /* (93) col_name ::= column_name */ { 159, -1 }, /* (93) col_name ::= column_name */
{ 134, -2 }, /* (94) cmd ::= SHOW VGROUPS */ { 135, -2 }, /* (94) cmd ::= SHOW VGROUPS */
{ 134, -4 }, /* (95) cmd ::= SHOW db_name NK_DOT VGROUPS */ { 135, -4 }, /* (95) cmd ::= SHOW db_name NK_DOT VGROUPS */
{ 134, -1 }, /* (96) cmd ::= query_expression */ { 135, -2 }, /* (96) cmd ::= SHOW MNODES */
{ 160, -1 }, /* (97) literal ::= NK_INTEGER */ { 135, -1 }, /* (97) cmd ::= query_expression */
{ 160, -1 }, /* (98) literal ::= NK_FLOAT */ { 161, -1 }, /* (98) literal ::= NK_INTEGER */
{ 160, -1 }, /* (99) literal ::= NK_STRING */ { 161, -1 }, /* (99) literal ::= NK_FLOAT */
{ 160, -1 }, /* (100) literal ::= NK_BOOL */ { 161, -1 }, /* (100) literal ::= NK_STRING */
{ 160, -2 }, /* (101) literal ::= TIMESTAMP NK_STRING */ { 161, -1 }, /* (101) literal ::= NK_BOOL */
{ 160, -1 }, /* (102) literal ::= duration_literal */ { 161, -2 }, /* (102) literal ::= TIMESTAMP NK_STRING */
{ 161, -1 }, /* (103) duration_literal ::= NK_VARIABLE */ { 161, -1 }, /* (103) literal ::= duration_literal */
{ 151, -1 }, /* (104) literal_list ::= literal */ { 162, -1 }, /* (104) duration_literal ::= NK_VARIABLE */
{ 151, -3 }, /* (105) literal_list ::= literal_list NK_COMMA literal */ { 152, -1 }, /* (105) literal_list ::= literal */
{ 139, -1 }, /* (106) db_name ::= NK_ID */ { 152, -3 }, /* (106) literal_list ::= literal_list NK_COMMA literal */
{ 154, -1 }, /* (107) table_name ::= NK_ID */ { 140, -1 }, /* (107) db_name ::= NK_ID */
{ 156, -1 }, /* (108) column_name ::= NK_ID */ { 155, -1 }, /* (108) table_name ::= NK_ID */
{ 162, -1 }, /* (109) function_name ::= NK_ID */ { 157, -1 }, /* (109) column_name ::= NK_ID */
{ 163, -1 }, /* (110) table_alias ::= NK_ID */ { 163, -1 }, /* (110) function_name ::= NK_ID */
{ 164, -1 }, /* (111) column_alias ::= NK_ID */ { 164, -1 }, /* (111) table_alias ::= NK_ID */
{ 135, -1 }, /* (112) user_name ::= NK_ID */ { 165, -1 }, /* (112) column_alias ::= NK_ID */
{ 165, -1 }, /* (113) expression ::= literal */ { 136, -1 }, /* (113) user_name ::= NK_ID */
{ 165, -1 }, /* (114) expression ::= column_reference */ { 166, -1 }, /* (114) expression ::= literal */
{ 165, -4 }, /* (115) expression ::= function_name NK_LP expression_list NK_RP */ { 166, -1 }, /* (115) expression ::= column_reference */
{ 165, -4 }, /* (116) expression ::= function_name NK_LP NK_STAR NK_RP */ { 166, -4 }, /* (116) expression ::= function_name NK_LP expression_list NK_RP */
{ 165, -1 }, /* (117) expression ::= subquery */ { 166, -4 }, /* (117) expression ::= function_name NK_LP NK_STAR NK_RP */
{ 165, -3 }, /* (118) expression ::= NK_LP expression NK_RP */ { 166, -1 }, /* (118) expression ::= subquery */
{ 165, -2 }, /* (119) expression ::= NK_PLUS expression */ { 166, -3 }, /* (119) expression ::= NK_LP expression NK_RP */
{ 165, -2 }, /* (120) expression ::= NK_MINUS expression */ { 166, -2 }, /* (120) expression ::= NK_PLUS expression */
{ 165, -3 }, /* (121) expression ::= expression NK_PLUS expression */ { 166, -2 }, /* (121) expression ::= NK_MINUS expression */
{ 165, -3 }, /* (122) expression ::= expression NK_MINUS expression */ { 166, -3 }, /* (122) expression ::= expression NK_PLUS expression */
{ 165, -3 }, /* (123) expression ::= expression NK_STAR expression */ { 166, -3 }, /* (123) expression ::= expression NK_MINUS expression */
{ 165, -3 }, /* (124) expression ::= expression NK_SLASH expression */ { 166, -3 }, /* (124) expression ::= expression NK_STAR expression */
{ 165, -3 }, /* (125) expression ::= expression NK_REM expression */ { 166, -3 }, /* (125) expression ::= expression NK_SLASH expression */
{ 167, -1 }, /* (126) expression_list ::= expression */ { 166, -3 }, /* (126) expression ::= expression NK_REM expression */
{ 167, -3 }, /* (127) expression_list ::= expression_list NK_COMMA expression */ { 168, -1 }, /* (127) expression_list ::= expression */
{ 166, -1 }, /* (128) column_reference ::= column_name */ { 168, -3 }, /* (128) expression_list ::= expression_list NK_COMMA expression */
{ 166, -3 }, /* (129) column_reference ::= table_name NK_DOT column_name */ { 167, -1 }, /* (129) column_reference ::= column_name */
{ 169, -3 }, /* (130) predicate ::= expression compare_op expression */ { 167, -3 }, /* (130) column_reference ::= table_name NK_DOT column_name */
{ 169, -5 }, /* (131) predicate ::= expression BETWEEN expression AND expression */ { 170, -3 }, /* (131) predicate ::= expression compare_op expression */
{ 169, -6 }, /* (132) predicate ::= expression NOT BETWEEN expression AND expression */ { 170, -5 }, /* (132) predicate ::= expression BETWEEN expression AND expression */
{ 169, -3 }, /* (133) predicate ::= expression IS NULL */ { 170, -6 }, /* (133) predicate ::= expression NOT BETWEEN expression AND expression */
{ 169, -4 }, /* (134) predicate ::= expression IS NOT NULL */ { 170, -3 }, /* (134) predicate ::= expression IS NULL */
{ 169, -3 }, /* (135) predicate ::= expression in_op in_predicate_value */ { 170, -4 }, /* (135) predicate ::= expression IS NOT NULL */
{ 170, -1 }, /* (136) compare_op ::= NK_LT */ { 170, -3 }, /* (136) predicate ::= expression in_op in_predicate_value */
{ 170, -1 }, /* (137) compare_op ::= NK_GT */ { 171, -1 }, /* (137) compare_op ::= NK_LT */
{ 170, -1 }, /* (138) compare_op ::= NK_LE */ { 171, -1 }, /* (138) compare_op ::= NK_GT */
{ 170, -1 }, /* (139) compare_op ::= NK_GE */ { 171, -1 }, /* (139) compare_op ::= NK_LE */
{ 170, -1 }, /* (140) compare_op ::= NK_NE */ { 171, -1 }, /* (140) compare_op ::= NK_GE */
{ 170, -1 }, /* (141) compare_op ::= NK_EQ */ { 171, -1 }, /* (141) compare_op ::= NK_NE */
{ 170, -1 }, /* (142) compare_op ::= LIKE */ { 171, -1 }, /* (142) compare_op ::= NK_EQ */
{ 170, -2 }, /* (143) compare_op ::= NOT LIKE */ { 171, -1 }, /* (143) compare_op ::= LIKE */
{ 170, -1 }, /* (144) compare_op ::= MATCH */ { 171, -2 }, /* (144) compare_op ::= NOT LIKE */
{ 170, -1 }, /* (145) compare_op ::= NMATCH */ { 171, -1 }, /* (145) compare_op ::= MATCH */
{ 171, -1 }, /* (146) in_op ::= IN */ { 171, -1 }, /* (146) compare_op ::= NMATCH */
{ 171, -2 }, /* (147) in_op ::= NOT IN */ { 172, -1 }, /* (147) in_op ::= IN */
{ 172, -3 }, /* (148) in_predicate_value ::= NK_LP expression_list NK_RP */ { 172, -2 }, /* (148) in_op ::= NOT IN */
{ 173, -1 }, /* (149) boolean_value_expression ::= boolean_primary */ { 173, -3 }, /* (149) in_predicate_value ::= NK_LP expression_list NK_RP */
{ 173, -2 }, /* (150) boolean_value_expression ::= NOT boolean_primary */ { 174, -1 }, /* (150) boolean_value_expression ::= boolean_primary */
{ 173, -3 }, /* (151) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ { 174, -2 }, /* (151) boolean_value_expression ::= NOT boolean_primary */
{ 173, -3 }, /* (152) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ { 174, -3 }, /* (152) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */
{ 174, -1 }, /* (153) boolean_primary ::= predicate */ { 174, -3 }, /* (153) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */
{ 174, -3 }, /* (154) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ { 175, -1 }, /* (154) boolean_primary ::= predicate */
{ 175, -1 }, /* (155) common_expression ::= expression */ { 175, -3 }, /* (155) boolean_primary ::= NK_LP boolean_value_expression NK_RP */
{ 175, -1 }, /* (156) common_expression ::= boolean_value_expression */ { 176, -1 }, /* (156) common_expression ::= expression */
{ 176, -2 }, /* (157) from_clause ::= FROM table_reference_list */ { 176, -1 }, /* (157) common_expression ::= boolean_value_expression */
{ 177, -1 }, /* (158) table_reference_list ::= table_reference */ { 177, -2 }, /* (158) from_clause ::= FROM table_reference_list */
{ 177, -3 }, /* (159) table_reference_list ::= table_reference_list NK_COMMA table_reference */ { 178, -1 }, /* (159) table_reference_list ::= table_reference */
{ 178, -1 }, /* (160) table_reference ::= table_primary */ { 178, -3 }, /* (160) table_reference_list ::= table_reference_list NK_COMMA table_reference */
{ 178, -1 }, /* (161) table_reference ::= joined_table */ { 179, -1 }, /* (161) table_reference ::= table_primary */
{ 179, -2 }, /* (162) table_primary ::= table_name alias_opt */ { 179, -1 }, /* (162) table_reference ::= joined_table */
{ 179, -4 }, /* (163) table_primary ::= db_name NK_DOT table_name alias_opt */ { 180, -2 }, /* (163) table_primary ::= table_name alias_opt */
{ 179, -2 }, /* (164) table_primary ::= subquery alias_opt */ { 180, -4 }, /* (164) table_primary ::= db_name NK_DOT table_name alias_opt */
{ 179, -1 }, /* (165) table_primary ::= parenthesized_joined_table */ { 180, -2 }, /* (165) table_primary ::= subquery alias_opt */
{ 181, 0 }, /* (166) alias_opt ::= */ { 180, -1 }, /* (166) table_primary ::= parenthesized_joined_table */
{ 181, -1 }, /* (167) alias_opt ::= table_alias */ { 182, 0 }, /* (167) alias_opt ::= */
{ 181, -2 }, /* (168) alias_opt ::= AS table_alias */ { 182, -1 }, /* (168) alias_opt ::= table_alias */
{ 182, -3 }, /* (169) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ { 182, -2 }, /* (169) alias_opt ::= AS table_alias */
{ 182, -3 }, /* (170) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ { 183, -3 }, /* (170) parenthesized_joined_table ::= NK_LP joined_table NK_RP */
{ 180, -6 }, /* (171) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ { 183, -3 }, /* (171) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */
{ 183, 0 }, /* (172) join_type ::= */ { 181, -6 }, /* (172) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */
{ 183, -1 }, /* (173) join_type ::= INNER */ { 184, 0 }, /* (173) join_type ::= */
{ 185, -9 }, /* (174) query_specification ::= SELECT set_quantifier_opt select_list from_clause where_clause_opt partition_by_clause_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ { 184, -1 }, /* (174) join_type ::= INNER */
{ 186, 0 }, /* (175) set_quantifier_opt ::= */ { 186, -9 }, /* (175) query_specification ::= SELECT set_quantifier_opt select_list from_clause where_clause_opt partition_by_clause_opt twindow_clause_opt group_by_clause_opt having_clause_opt */
{ 186, -1 }, /* (176) set_quantifier_opt ::= DISTINCT */ { 187, 0 }, /* (176) set_quantifier_opt ::= */
{ 186, -1 }, /* (177) set_quantifier_opt ::= ALL */ { 187, -1 }, /* (177) set_quantifier_opt ::= DISTINCT */
{ 187, -1 }, /* (178) select_list ::= NK_STAR */ { 187, -1 }, /* (178) set_quantifier_opt ::= ALL */
{ 187, -1 }, /* (179) select_list ::= select_sublist */ { 188, -1 }, /* (179) select_list ::= NK_STAR */
{ 193, -1 }, /* (180) select_sublist ::= select_item */ { 188, -1 }, /* (180) select_list ::= select_sublist */
{ 193, -3 }, /* (181) select_sublist ::= select_sublist NK_COMMA select_item */ { 194, -1 }, /* (181) select_sublist ::= select_item */
{ 194, -1 }, /* (182) select_item ::= common_expression */ { 194, -3 }, /* (182) select_sublist ::= select_sublist NK_COMMA select_item */
{ 194, -2 }, /* (183) select_item ::= common_expression column_alias */ { 195, -1 }, /* (183) select_item ::= common_expression */
{ 194, -3 }, /* (184) select_item ::= common_expression AS column_alias */ { 195, -2 }, /* (184) select_item ::= common_expression column_alias */
{ 194, -3 }, /* (185) select_item ::= table_name NK_DOT NK_STAR */ { 195, -3 }, /* (185) select_item ::= common_expression AS column_alias */
{ 188, 0 }, /* (186) where_clause_opt ::= */ { 195, -3 }, /* (186) select_item ::= table_name NK_DOT NK_STAR */
{ 188, -2 }, /* (187) where_clause_opt ::= WHERE search_condition */ { 189, 0 }, /* (187) where_clause_opt ::= */
{ 189, 0 }, /* (188) partition_by_clause_opt ::= */ { 189, -2 }, /* (188) where_clause_opt ::= WHERE search_condition */
{ 189, -3 }, /* (189) partition_by_clause_opt ::= PARTITION BY expression_list */ { 190, 0 }, /* (189) partition_by_clause_opt ::= */
{ 190, 0 }, /* (190) twindow_clause_opt ::= */ { 190, -3 }, /* (190) partition_by_clause_opt ::= PARTITION BY expression_list */
{ 190, -6 }, /* (191) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA NK_INTEGER NK_RP */ { 191, 0 }, /* (191) twindow_clause_opt ::= */
{ 190, -4 }, /* (192) twindow_clause_opt ::= STATE_WINDOW NK_LP column_reference NK_RP */ { 191, -6 }, /* (192) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA NK_INTEGER NK_RP */
{ 190, -6 }, /* (193) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ { 191, -4 }, /* (193) twindow_clause_opt ::= STATE_WINDOW NK_LP column_reference NK_RP */
{ 190, -8 }, /* (194) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ { 191, -6 }, /* (194) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */
{ 195, 0 }, /* (195) sliding_opt ::= */ { 191, -8 }, /* (195) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */
{ 195, -4 }, /* (196) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ { 196, 0 }, /* (196) sliding_opt ::= */
{ 196, 0 }, /* (197) fill_opt ::= */ { 196, -4 }, /* (197) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */
{ 196, -4 }, /* (198) fill_opt ::= FILL NK_LP fill_mode NK_RP */ { 197, 0 }, /* (198) fill_opt ::= */
{ 196, -6 }, /* (199) fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ { 197, -4 }, /* (199) fill_opt ::= FILL NK_LP fill_mode NK_RP */
{ 197, -1 }, /* (200) fill_mode ::= NONE */ { 197, -6 }, /* (200) fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */
{ 197, -1 }, /* (201) fill_mode ::= PREV */ { 198, -1 }, /* (201) fill_mode ::= NONE */
{ 197, -1 }, /* (202) fill_mode ::= NULL */ { 198, -1 }, /* (202) fill_mode ::= PREV */
{ 197, -1 }, /* (203) fill_mode ::= LINEAR */ { 198, -1 }, /* (203) fill_mode ::= NULL */
{ 197, -1 }, /* (204) fill_mode ::= NEXT */ { 198, -1 }, /* (204) fill_mode ::= LINEAR */
{ 191, 0 }, /* (205) group_by_clause_opt ::= */ { 198, -1 }, /* (205) fill_mode ::= NEXT */
{ 191, -3 }, /* (206) group_by_clause_opt ::= GROUP BY group_by_list */ { 192, 0 }, /* (206) group_by_clause_opt ::= */
{ 198, -1 }, /* (207) group_by_list ::= expression */ { 192, -3 }, /* (207) group_by_clause_opt ::= GROUP BY group_by_list */
{ 198, -3 }, /* (208) group_by_list ::= group_by_list NK_COMMA expression */ { 199, -1 }, /* (208) group_by_list ::= expression */
{ 192, 0 }, /* (209) having_clause_opt ::= */ { 199, -3 }, /* (209) group_by_list ::= group_by_list NK_COMMA expression */
{ 192, -2 }, /* (210) having_clause_opt ::= HAVING search_condition */ { 193, 0 }, /* (210) having_clause_opt ::= */
{ 159, -4 }, /* (211) query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt */ { 193, -2 }, /* (211) having_clause_opt ::= HAVING search_condition */
{ 199, -1 }, /* (212) query_expression_body ::= query_primary */ { 160, -4 }, /* (212) query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt */
{ 199, -4 }, /* (213) query_expression_body ::= query_expression_body UNION ALL query_expression_body */ { 200, -1 }, /* (213) query_expression_body ::= query_primary */
{ 203, -1 }, /* (214) query_primary ::= query_specification */ { 200, -4 }, /* (214) query_expression_body ::= query_expression_body UNION ALL query_expression_body */
{ 200, 0 }, /* (215) order_by_clause_opt ::= */ { 204, -1 }, /* (215) query_primary ::= query_specification */
{ 200, -3 }, /* (216) order_by_clause_opt ::= ORDER BY sort_specification_list */ { 201, 0 }, /* (216) order_by_clause_opt ::= */
{ 201, 0 }, /* (217) slimit_clause_opt ::= */ { 201, -3 }, /* (217) order_by_clause_opt ::= ORDER BY sort_specification_list */
{ 201, -2 }, /* (218) slimit_clause_opt ::= SLIMIT NK_INTEGER */ { 202, 0 }, /* (218) slimit_clause_opt ::= */
{ 201, -4 }, /* (219) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ { 202, -2 }, /* (219) slimit_clause_opt ::= SLIMIT NK_INTEGER */
{ 201, -4 }, /* (220) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ { 202, -4 }, /* (220) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */
{ 202, 0 }, /* (221) limit_clause_opt ::= */ { 202, -4 }, /* (221) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */
{ 202, -2 }, /* (222) limit_clause_opt ::= LIMIT NK_INTEGER */ { 203, 0 }, /* (222) limit_clause_opt ::= */
{ 202, -4 }, /* (223) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ { 203, -2 }, /* (223) limit_clause_opt ::= LIMIT NK_INTEGER */
{ 202, -4 }, /* (224) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ { 203, -4 }, /* (224) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */
{ 168, -3 }, /* (225) subquery ::= NK_LP query_expression NK_RP */ { 203, -4 }, /* (225) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */
{ 184, -1 }, /* (226) search_condition ::= common_expression */ { 169, -3 }, /* (226) subquery ::= NK_LP query_expression NK_RP */
{ 204, -1 }, /* (227) sort_specification_list ::= sort_specification */ { 185, -1 }, /* (227) search_condition ::= common_expression */
{ 204, -3 }, /* (228) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ { 205, -1 }, /* (228) sort_specification_list ::= sort_specification */
{ 205, -3 }, /* (229) sort_specification ::= expression ordering_specification_opt null_ordering_opt */ { 205, -3 }, /* (229) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */
{ 206, 0 }, /* (230) ordering_specification_opt ::= */ { 206, -3 }, /* (230) sort_specification ::= expression ordering_specification_opt null_ordering_opt */
{ 206, -1 }, /* (231) ordering_specification_opt ::= ASC */ { 207, 0 }, /* (231) ordering_specification_opt ::= */
{ 206, -1 }, /* (232) ordering_specification_opt ::= DESC */ { 207, -1 }, /* (232) ordering_specification_opt ::= ASC */
{ 207, 0 }, /* (233) null_ordering_opt ::= */ { 207, -1 }, /* (233) ordering_specification_opt ::= DESC */
{ 207, -2 }, /* (234) null_ordering_opt ::= NULLS FIRST */ { 208, 0 }, /* (234) null_ordering_opt ::= */
{ 207, -2 }, /* (235) null_ordering_opt ::= NULLS LAST */ { 208, -2 }, /* (235) null_ordering_opt ::= NULLS FIRST */
{ 208, -2 }, /* (236) null_ordering_opt ::= NULLS LAST */
}; };
static void yy_accept(yyParser*); /* Forward Declaration */ static void yy_accept(yyParser*); /* Forward Declaration */
...@@ -1909,31 +1912,31 @@ static YYACTIONTYPE yy_reduce( ...@@ -1909,31 +1912,31 @@ static YYACTIONTYPE yy_reduce(
/********** Begin reduce actions **********************************************/ /********** Begin reduce actions **********************************************/
YYMINORTYPE yylhsminor; YYMINORTYPE yylhsminor;
case 0: /* cmd ::= CREATE USER user_name PASS NK_STRING */ case 0: /* cmd ::= CREATE USER user_name PASS NK_STRING */
{ pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-2].minor.yy161, &yymsp[0].minor.yy0);} { pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-2].minor.yy129, &yymsp[0].minor.yy0);}
break; break;
case 1: /* cmd ::= ALTER USER user_name PASS NK_STRING */ case 1: /* cmd ::= ALTER USER user_name PASS NK_STRING */
{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy161, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0);} { pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy129, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0);}
break; break;
case 2: /* cmd ::= ALTER USER user_name PRIVILEGE NK_STRING */ case 2: /* cmd ::= ALTER USER user_name PRIVILEGE NK_STRING */
{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy161, TSDB_ALTER_USER_PRIVILEGES, &yymsp[0].minor.yy0);} { pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy129, TSDB_ALTER_USER_PRIVILEGES, &yymsp[0].minor.yy0);}
break; break;
case 3: /* cmd ::= DROP USER user_name */ case 3: /* cmd ::= DROP USER user_name */
{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy161); } { pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy129); }
break; break;
case 4: /* cmd ::= SHOW USERS */ case 4: /* cmd ::= SHOW USERS */
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_USERS_STMT, NULL); } { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_USERS_STMT, NULL); }
break; break;
case 5: /* cmd ::= CREATE DNODE dnode_endpoint */ case 5: /* cmd ::= CREATE DNODE dnode_endpoint */
{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy161, NULL);} { pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy129, NULL);}
break; break;
case 6: /* cmd ::= CREATE DNODE dnode_host_name PORT NK_INTEGER */ case 6: /* cmd ::= CREATE DNODE dnode_host_name PORT NK_INTEGER */
{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy161, &yymsp[0].minor.yy0);} { pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy129, &yymsp[0].minor.yy0);}
break; break;
case 7: /* cmd ::= DROP DNODE NK_INTEGER */ case 7: /* cmd ::= DROP DNODE NK_INTEGER */
{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[0].minor.yy0);} { pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[0].minor.yy0);}
break; break;
case 8: /* cmd ::= DROP DNODE dnode_endpoint */ case 8: /* cmd ::= DROP DNODE dnode_endpoint */
{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[0].minor.yy161);} { pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[0].minor.yy129);}
break; break;
case 9: /* cmd ::= SHOW DNODES */ case 9: /* cmd ::= SHOW DNODES */
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DNODES_STMT, NULL); } { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DNODES_STMT, NULL); }
...@@ -1941,122 +1944,122 @@ static YYACTIONTYPE yy_reduce( ...@@ -1941,122 +1944,122 @@ static YYACTIONTYPE yy_reduce(
case 10: /* dnode_endpoint ::= NK_STRING */ case 10: /* dnode_endpoint ::= NK_STRING */
case 11: /* dnode_host_name ::= NK_ID */ yytestcase(yyruleno==11); case 11: /* dnode_host_name ::= NK_ID */ yytestcase(yyruleno==11);
case 12: /* dnode_host_name ::= NK_IPTOKEN */ yytestcase(yyruleno==12); case 12: /* dnode_host_name ::= NK_IPTOKEN */ yytestcase(yyruleno==12);
case 106: /* db_name ::= NK_ID */ yytestcase(yyruleno==106); case 107: /* db_name ::= NK_ID */ yytestcase(yyruleno==107);
case 107: /* table_name ::= NK_ID */ yytestcase(yyruleno==107); case 108: /* table_name ::= NK_ID */ yytestcase(yyruleno==108);
case 108: /* column_name ::= NK_ID */ yytestcase(yyruleno==108); case 109: /* column_name ::= NK_ID */ yytestcase(yyruleno==109);
case 109: /* function_name ::= NK_ID */ yytestcase(yyruleno==109); case 110: /* function_name ::= NK_ID */ yytestcase(yyruleno==110);
case 110: /* table_alias ::= NK_ID */ yytestcase(yyruleno==110); case 111: /* table_alias ::= NK_ID */ yytestcase(yyruleno==111);
case 111: /* column_alias ::= NK_ID */ yytestcase(yyruleno==111); case 112: /* column_alias ::= NK_ID */ yytestcase(yyruleno==112);
case 112: /* user_name ::= NK_ID */ yytestcase(yyruleno==112); case 113: /* user_name ::= NK_ID */ yytestcase(yyruleno==113);
{ yylhsminor.yy161 = yymsp[0].minor.yy0; } { yylhsminor.yy129 = yymsp[0].minor.yy0; }
yymsp[0].minor.yy161 = yylhsminor.yy161; yymsp[0].minor.yy129 = yylhsminor.yy129;
break; break;
case 13: /* cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ case 13: /* cmd ::= CREATE DATABASE not_exists_opt db_name db_options */
{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy377, &yymsp[-1].minor.yy161, yymsp[0].minor.yy103);} { pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy185, &yymsp[-1].minor.yy129, yymsp[0].minor.yy391);}
break; break;
case 14: /* cmd ::= DROP DATABASE exists_opt db_name */ case 14: /* cmd ::= DROP DATABASE exists_opt db_name */
{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy377, &yymsp[0].minor.yy161); } { pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy185, &yymsp[0].minor.yy129); }
break; break;
case 15: /* cmd ::= SHOW DATABASES */ case 15: /* cmd ::= SHOW DATABASES */
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DATABASES_STMT, NULL); } { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DATABASES_STMT, NULL); }
break; break;
case 16: /* cmd ::= USE db_name */ case 16: /* cmd ::= USE db_name */
{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy161);} { pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy129);}
break; break;
case 17: /* not_exists_opt ::= IF NOT EXISTS */ case 17: /* not_exists_opt ::= IF NOT EXISTS */
{ yymsp[-2].minor.yy377 = true; } { yymsp[-2].minor.yy185 = true; }
break; break;
case 18: /* not_exists_opt ::= */ case 18: /* not_exists_opt ::= */
case 20: /* exists_opt ::= */ yytestcase(yyruleno==20); case 20: /* exists_opt ::= */ yytestcase(yyruleno==20);
case 175: /* set_quantifier_opt ::= */ yytestcase(yyruleno==175); case 176: /* set_quantifier_opt ::= */ yytestcase(yyruleno==176);
{ yymsp[1].minor.yy377 = false; } { yymsp[1].minor.yy185 = false; }
break; break;
case 19: /* exists_opt ::= IF EXISTS */ case 19: /* exists_opt ::= IF EXISTS */
{ yymsp[-1].minor.yy377 = true; } { yymsp[-1].minor.yy185 = true; }
break; break;
case 21: /* db_options ::= */ case 21: /* db_options ::= */
{ yymsp[1].minor.yy103 = createDefaultDatabaseOptions(pCxt); } { yymsp[1].minor.yy391 = createDefaultDatabaseOptions(pCxt); }
break; break;
case 22: /* db_options ::= db_options BLOCKS NK_INTEGER */ case 22: /* db_options ::= db_options BLOCKS NK_INTEGER */
{ yylhsminor.yy103 = setDatabaseOption(pCxt, yymsp[-2].minor.yy103, DB_OPTION_BLOCKS, &yymsp[0].minor.yy0); } { yylhsminor.yy391 = setDatabaseOption(pCxt, yymsp[-2].minor.yy391, DB_OPTION_BLOCKS, &yymsp[0].minor.yy0); }
yymsp[-2].minor.yy103 = yylhsminor.yy103; yymsp[-2].minor.yy391 = yylhsminor.yy391;
break; break;
case 23: /* db_options ::= db_options CACHE NK_INTEGER */ case 23: /* db_options ::= db_options CACHE NK_INTEGER */
{ yylhsminor.yy103 = setDatabaseOption(pCxt, yymsp[-2].minor.yy103, DB_OPTION_CACHE, &yymsp[0].minor.yy0); } { yylhsminor.yy391 = setDatabaseOption(pCxt, yymsp[-2].minor.yy391, DB_OPTION_CACHE, &yymsp[0].minor.yy0); }
yymsp[-2].minor.yy103 = yylhsminor.yy103; yymsp[-2].minor.yy391 = yylhsminor.yy391;
break; break;
case 24: /* db_options ::= db_options CACHELAST NK_INTEGER */ case 24: /* db_options ::= db_options CACHELAST NK_INTEGER */
{ yylhsminor.yy103 = setDatabaseOption(pCxt, yymsp[-2].minor.yy103, DB_OPTION_CACHELAST, &yymsp[0].minor.yy0); } { yylhsminor.yy391 = setDatabaseOption(pCxt, yymsp[-2].minor.yy391, DB_OPTION_CACHELAST, &yymsp[0].minor.yy0); }
yymsp[-2].minor.yy103 = yylhsminor.yy103; yymsp[-2].minor.yy391 = yylhsminor.yy391;
break; break;
case 25: /* db_options ::= db_options COMP NK_INTEGER */ case 25: /* db_options ::= db_options COMP NK_INTEGER */
{ yylhsminor.yy103 = setDatabaseOption(pCxt, yymsp[-2].minor.yy103, DB_OPTION_COMP, &yymsp[0].minor.yy0); } { yylhsminor.yy391 = setDatabaseOption(pCxt, yymsp[-2].minor.yy391, DB_OPTION_COMP, &yymsp[0].minor.yy0); }
yymsp[-2].minor.yy103 = yylhsminor.yy103; yymsp[-2].minor.yy391 = yylhsminor.yy391;
break; break;
case 26: /* db_options ::= db_options DAYS NK_INTEGER */ case 26: /* db_options ::= db_options DAYS NK_INTEGER */
{ yylhsminor.yy103 = setDatabaseOption(pCxt, yymsp[-2].minor.yy103, DB_OPTION_DAYS, &yymsp[0].minor.yy0); } { yylhsminor.yy391 = setDatabaseOption(pCxt, yymsp[-2].minor.yy391, DB_OPTION_DAYS, &yymsp[0].minor.yy0); }
yymsp[-2].minor.yy103 = yylhsminor.yy103; yymsp[-2].minor.yy391 = yylhsminor.yy391;
break; break;
case 27: /* db_options ::= db_options FSYNC NK_INTEGER */ case 27: /* db_options ::= db_options FSYNC NK_INTEGER */
{ yylhsminor.yy103 = setDatabaseOption(pCxt, yymsp[-2].minor.yy103, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); } { yylhsminor.yy391 = setDatabaseOption(pCxt, yymsp[-2].minor.yy391, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); }
yymsp[-2].minor.yy103 = yylhsminor.yy103; yymsp[-2].minor.yy391 = yylhsminor.yy391;
break; break;
case 28: /* db_options ::= db_options MAXROWS NK_INTEGER */ case 28: /* db_options ::= db_options MAXROWS NK_INTEGER */
{ yylhsminor.yy103 = setDatabaseOption(pCxt, yymsp[-2].minor.yy103, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); } { yylhsminor.yy391 = setDatabaseOption(pCxt, yymsp[-2].minor.yy391, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); }
yymsp[-2].minor.yy103 = yylhsminor.yy103; yymsp[-2].minor.yy391 = yylhsminor.yy391;
break; break;
case 29: /* db_options ::= db_options MINROWS NK_INTEGER */ case 29: /* db_options ::= db_options MINROWS NK_INTEGER */
{ yylhsminor.yy103 = setDatabaseOption(pCxt, yymsp[-2].minor.yy103, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); } { yylhsminor.yy391 = setDatabaseOption(pCxt, yymsp[-2].minor.yy391, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); }
yymsp[-2].minor.yy103 = yylhsminor.yy103; yymsp[-2].minor.yy391 = yylhsminor.yy391;
break; break;
case 30: /* db_options ::= db_options KEEP NK_INTEGER */ case 30: /* db_options ::= db_options KEEP NK_INTEGER */
{ yylhsminor.yy103 = setDatabaseOption(pCxt, yymsp[-2].minor.yy103, DB_OPTION_KEEP, &yymsp[0].minor.yy0); } { yylhsminor.yy391 = setDatabaseOption(pCxt, yymsp[-2].minor.yy391, DB_OPTION_KEEP, &yymsp[0].minor.yy0); }
yymsp[-2].minor.yy103 = yylhsminor.yy103; yymsp[-2].minor.yy391 = yylhsminor.yy391;
break; break;
case 31: /* db_options ::= db_options PRECISION NK_STRING */ case 31: /* db_options ::= db_options PRECISION NK_STRING */
{ yylhsminor.yy103 = setDatabaseOption(pCxt, yymsp[-2].minor.yy103, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); } { yylhsminor.yy391 = setDatabaseOption(pCxt, yymsp[-2].minor.yy391, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); }
yymsp[-2].minor.yy103 = yylhsminor.yy103; yymsp[-2].minor.yy391 = yylhsminor.yy391;
break; break;
case 32: /* db_options ::= db_options QUORUM NK_INTEGER */ case 32: /* db_options ::= db_options QUORUM NK_INTEGER */
{ yylhsminor.yy103 = setDatabaseOption(pCxt, yymsp[-2].minor.yy103, DB_OPTION_QUORUM, &yymsp[0].minor.yy0); } { yylhsminor.yy391 = setDatabaseOption(pCxt, yymsp[-2].minor.yy391, DB_OPTION_QUORUM, &yymsp[0].minor.yy0); }
yymsp[-2].minor.yy103 = yylhsminor.yy103; yymsp[-2].minor.yy391 = yylhsminor.yy391;
break; break;
case 33: /* db_options ::= db_options REPLICA NK_INTEGER */ case 33: /* db_options ::= db_options REPLICA NK_INTEGER */
{ yylhsminor.yy103 = setDatabaseOption(pCxt, yymsp[-2].minor.yy103, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); } { yylhsminor.yy391 = setDatabaseOption(pCxt, yymsp[-2].minor.yy391, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); }
yymsp[-2].minor.yy103 = yylhsminor.yy103; yymsp[-2].minor.yy391 = yylhsminor.yy391;
break; break;
case 34: /* db_options ::= db_options TTL NK_INTEGER */ case 34: /* db_options ::= db_options TTL NK_INTEGER */
{ yylhsminor.yy103 = setDatabaseOption(pCxt, yymsp[-2].minor.yy103, DB_OPTION_TTL, &yymsp[0].minor.yy0); } { yylhsminor.yy391 = setDatabaseOption(pCxt, yymsp[-2].minor.yy391, DB_OPTION_TTL, &yymsp[0].minor.yy0); }
yymsp[-2].minor.yy103 = yylhsminor.yy103; yymsp[-2].minor.yy391 = yylhsminor.yy391;
break; break;
case 35: /* db_options ::= db_options WAL NK_INTEGER */ case 35: /* db_options ::= db_options WAL NK_INTEGER */
{ yylhsminor.yy103 = setDatabaseOption(pCxt, yymsp[-2].minor.yy103, DB_OPTION_WAL, &yymsp[0].minor.yy0); } { yylhsminor.yy391 = setDatabaseOption(pCxt, yymsp[-2].minor.yy391, DB_OPTION_WAL, &yymsp[0].minor.yy0); }
yymsp[-2].minor.yy103 = yylhsminor.yy103; yymsp[-2].minor.yy391 = yylhsminor.yy391;
break; break;
case 36: /* db_options ::= db_options VGROUPS NK_INTEGER */ case 36: /* db_options ::= db_options VGROUPS NK_INTEGER */
{ yylhsminor.yy103 = setDatabaseOption(pCxt, yymsp[-2].minor.yy103, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); } { yylhsminor.yy391 = setDatabaseOption(pCxt, yymsp[-2].minor.yy391, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); }
yymsp[-2].minor.yy103 = yylhsminor.yy103; yymsp[-2].minor.yy391 = yylhsminor.yy391;
break; break;
case 37: /* db_options ::= db_options SINGLE_STABLE NK_INTEGER */ case 37: /* db_options ::= db_options SINGLE_STABLE NK_INTEGER */
{ yylhsminor.yy103 = setDatabaseOption(pCxt, yymsp[-2].minor.yy103, DB_OPTION_SINGLESTABLE, &yymsp[0].minor.yy0); } { yylhsminor.yy391 = setDatabaseOption(pCxt, yymsp[-2].minor.yy391, DB_OPTION_SINGLESTABLE, &yymsp[0].minor.yy0); }
yymsp[-2].minor.yy103 = yylhsminor.yy103; yymsp[-2].minor.yy391 = yylhsminor.yy391;
break; break;
case 38: /* db_options ::= db_options STREAM_MODE NK_INTEGER */ case 38: /* db_options ::= db_options STREAM_MODE NK_INTEGER */
{ yylhsminor.yy103 = setDatabaseOption(pCxt, yymsp[-2].minor.yy103, DB_OPTION_STREAMMODE, &yymsp[0].minor.yy0); } { yylhsminor.yy391 = setDatabaseOption(pCxt, yymsp[-2].minor.yy391, DB_OPTION_STREAMMODE, &yymsp[0].minor.yy0); }
yymsp[-2].minor.yy103 = yylhsminor.yy103; yymsp[-2].minor.yy391 = yylhsminor.yy391;
break; break;
case 39: /* cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ case 39: /* cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */
case 41: /* cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ yytestcase(yyruleno==41); case 41: /* cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ yytestcase(yyruleno==41);
{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy377, yymsp[-5].minor.yy392, yymsp[-3].minor.yy184, yymsp[-1].minor.yy184, yymsp[0].minor.yy334);} { pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy185, yymsp[-5].minor.yy256, yymsp[-3].minor.yy46, yymsp[-1].minor.yy46, yymsp[0].minor.yy340);}
break; break;
case 40: /* cmd ::= CREATE TABLE multi_create_clause */ case 40: /* cmd ::= CREATE TABLE multi_create_clause */
{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy184);} { pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy46);}
break; break;
case 42: /* cmd ::= DROP TABLE multi_drop_clause */ case 42: /* cmd ::= DROP TABLE multi_drop_clause */
{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy184); } { pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy46); }
break; break;
case 43: /* cmd ::= DROP STABLE exists_opt full_table_name */ case 43: /* cmd ::= DROP STABLE exists_opt full_table_name */
{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy377, yymsp[0].minor.yy392); } { pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy185, yymsp[0].minor.yy256); }
break; break;
case 44: /* cmd ::= SHOW TABLES */ case 44: /* cmd ::= SHOW TABLES */
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TABLES_STMT, NULL); } { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TABLES_STMT, NULL); }
...@@ -2068,586 +2071,589 @@ static YYACTIONTYPE yy_reduce( ...@@ -2068,586 +2071,589 @@ static YYACTIONTYPE yy_reduce(
case 49: /* multi_drop_clause ::= drop_table_clause */ yytestcase(yyruleno==49); case 49: /* multi_drop_clause ::= drop_table_clause */ yytestcase(yyruleno==49);
case 56: /* column_def_list ::= column_def */ yytestcase(yyruleno==56); case 56: /* column_def_list ::= column_def */ yytestcase(yyruleno==56);
case 91: /* col_name_list ::= col_name */ yytestcase(yyruleno==91); case 91: /* col_name_list ::= col_name */ yytestcase(yyruleno==91);
case 180: /* select_sublist ::= select_item */ yytestcase(yyruleno==180); case 181: /* select_sublist ::= select_item */ yytestcase(yyruleno==181);
case 227: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==227); case 228: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==228);
{ yylhsminor.yy184 = createNodeList(pCxt, yymsp[0].minor.yy392); } { yylhsminor.yy46 = createNodeList(pCxt, yymsp[0].minor.yy256); }
yymsp[0].minor.yy184 = yylhsminor.yy184; yymsp[0].minor.yy46 = yylhsminor.yy46;
break; break;
case 47: /* multi_create_clause ::= multi_create_clause create_subtable_clause */ case 47: /* multi_create_clause ::= multi_create_clause create_subtable_clause */
case 50: /* multi_drop_clause ::= multi_drop_clause drop_table_clause */ yytestcase(yyruleno==50); case 50: /* multi_drop_clause ::= multi_drop_clause drop_table_clause */ yytestcase(yyruleno==50);
{ yylhsminor.yy184 = addNodeToList(pCxt, yymsp[-1].minor.yy184, yymsp[0].minor.yy392); } { yylhsminor.yy46 = addNodeToList(pCxt, yymsp[-1].minor.yy46, yymsp[0].minor.yy256); }
yymsp[-1].minor.yy184 = yylhsminor.yy184; yymsp[-1].minor.yy46 = yylhsminor.yy46;
break; break;
case 48: /* create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_tags_opt TAGS NK_LP literal_list NK_RP */ case 48: /* create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_tags_opt TAGS NK_LP literal_list NK_RP */
{ yylhsminor.yy392 = createCreateSubTableClause(pCxt, yymsp[-8].minor.yy377, yymsp[-7].minor.yy392, yymsp[-5].minor.yy392, yymsp[-4].minor.yy184, yymsp[-1].minor.yy184); } { yylhsminor.yy256 = createCreateSubTableClause(pCxt, yymsp[-8].minor.yy185, yymsp[-7].minor.yy256, yymsp[-5].minor.yy256, yymsp[-4].minor.yy46, yymsp[-1].minor.yy46); }
yymsp[-8].minor.yy392 = yylhsminor.yy392; yymsp[-8].minor.yy256 = yylhsminor.yy256;
break; break;
case 51: /* drop_table_clause ::= exists_opt full_table_name */ case 51: /* drop_table_clause ::= exists_opt full_table_name */
{ yylhsminor.yy392 = createDropTableClause(pCxt, yymsp[-1].minor.yy377, yymsp[0].minor.yy392); } { yylhsminor.yy256 = createDropTableClause(pCxt, yymsp[-1].minor.yy185, yymsp[0].minor.yy256); }
yymsp[-1].minor.yy392 = yylhsminor.yy392; yymsp[-1].minor.yy256 = yylhsminor.yy256;
break; break;
case 52: /* specific_tags_opt ::= */ case 52: /* specific_tags_opt ::= */
case 83: /* tags_def_opt ::= */ yytestcase(yyruleno==83); case 83: /* tags_def_opt ::= */ yytestcase(yyruleno==83);
case 188: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==188); case 189: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==189);
case 205: /* group_by_clause_opt ::= */ yytestcase(yyruleno==205); case 206: /* group_by_clause_opt ::= */ yytestcase(yyruleno==206);
case 215: /* order_by_clause_opt ::= */ yytestcase(yyruleno==215); case 216: /* order_by_clause_opt ::= */ yytestcase(yyruleno==216);
{ yymsp[1].minor.yy184 = NULL; } { yymsp[1].minor.yy46 = NULL; }
break; break;
case 53: /* specific_tags_opt ::= NK_LP col_name_list NK_RP */ case 53: /* specific_tags_opt ::= NK_LP col_name_list NK_RP */
{ yymsp[-2].minor.yy184 = yymsp[-1].minor.yy184; } { yymsp[-2].minor.yy46 = yymsp[-1].minor.yy46; }
break; break;
case 54: /* full_table_name ::= table_name */ case 54: /* full_table_name ::= table_name */
{ yylhsminor.yy392 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy161, NULL); } { yylhsminor.yy256 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy129, NULL); }
yymsp[0].minor.yy392 = yylhsminor.yy392; yymsp[0].minor.yy256 = yylhsminor.yy256;
break; break;
case 55: /* full_table_name ::= db_name NK_DOT table_name */ case 55: /* full_table_name ::= db_name NK_DOT table_name */
{ yylhsminor.yy392 = createRealTableNode(pCxt, &yymsp[-2].minor.yy161, &yymsp[0].minor.yy161, NULL); } { yylhsminor.yy256 = createRealTableNode(pCxt, &yymsp[-2].minor.yy129, &yymsp[0].minor.yy129, NULL); }
yymsp[-2].minor.yy392 = yylhsminor.yy392; yymsp[-2].minor.yy256 = yylhsminor.yy256;
break; break;
case 57: /* column_def_list ::= column_def_list NK_COMMA column_def */ case 57: /* column_def_list ::= column_def_list NK_COMMA column_def */
case 92: /* col_name_list ::= col_name_list NK_COMMA col_name */ yytestcase(yyruleno==92); case 92: /* col_name_list ::= col_name_list NK_COMMA col_name */ yytestcase(yyruleno==92);
case 181: /* select_sublist ::= select_sublist NK_COMMA select_item */ yytestcase(yyruleno==181); case 182: /* select_sublist ::= select_sublist NK_COMMA select_item */ yytestcase(yyruleno==182);
case 228: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==228); case 229: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==229);
{ yylhsminor.yy184 = addNodeToList(pCxt, yymsp[-2].minor.yy184, yymsp[0].minor.yy392); } { yylhsminor.yy46 = addNodeToList(pCxt, yymsp[-2].minor.yy46, yymsp[0].minor.yy256); }
yymsp[-2].minor.yy184 = yylhsminor.yy184; yymsp[-2].minor.yy46 = yylhsminor.yy46;
break; break;
case 58: /* column_def ::= column_name type_name */ case 58: /* column_def ::= column_name type_name */
{ yylhsminor.yy392 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy161, yymsp[0].minor.yy240, NULL); } { yylhsminor.yy256 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy129, yymsp[0].minor.yy70, NULL); }
yymsp[-1].minor.yy392 = yylhsminor.yy392; yymsp[-1].minor.yy256 = yylhsminor.yy256;
break; break;
case 59: /* column_def ::= column_name type_name COMMENT NK_STRING */ case 59: /* column_def ::= column_name type_name COMMENT NK_STRING */
{ yylhsminor.yy392 = createColumnDefNode(pCxt, &yymsp[-3].minor.yy161, yymsp[-2].minor.yy240, &yymsp[0].minor.yy0); } { yylhsminor.yy256 = createColumnDefNode(pCxt, &yymsp[-3].minor.yy129, yymsp[-2].minor.yy70, &yymsp[0].minor.yy0); }
yymsp[-3].minor.yy392 = yylhsminor.yy392; yymsp[-3].minor.yy256 = yylhsminor.yy256;
break; break;
case 60: /* type_name ::= BOOL */ case 60: /* type_name ::= BOOL */
{ yymsp[0].minor.yy240 = createDataType(TSDB_DATA_TYPE_BOOL); } { yymsp[0].minor.yy70 = createDataType(TSDB_DATA_TYPE_BOOL); }
break; break;
case 61: /* type_name ::= TINYINT */ case 61: /* type_name ::= TINYINT */
{ yymsp[0].minor.yy240 = createDataType(TSDB_DATA_TYPE_TINYINT); } { yymsp[0].minor.yy70 = createDataType(TSDB_DATA_TYPE_TINYINT); }
break; break;
case 62: /* type_name ::= SMALLINT */ case 62: /* type_name ::= SMALLINT */
{ yymsp[0].minor.yy240 = createDataType(TSDB_DATA_TYPE_SMALLINT); } { yymsp[0].minor.yy70 = createDataType(TSDB_DATA_TYPE_SMALLINT); }
break; break;
case 63: /* type_name ::= INT */ case 63: /* type_name ::= INT */
case 64: /* type_name ::= INTEGER */ yytestcase(yyruleno==64); case 64: /* type_name ::= INTEGER */ yytestcase(yyruleno==64);
{ yymsp[0].minor.yy240 = createDataType(TSDB_DATA_TYPE_INT); } { yymsp[0].minor.yy70 = createDataType(TSDB_DATA_TYPE_INT); }
break; break;
case 65: /* type_name ::= BIGINT */ case 65: /* type_name ::= BIGINT */
{ yymsp[0].minor.yy240 = createDataType(TSDB_DATA_TYPE_BIGINT); } { yymsp[0].minor.yy70 = createDataType(TSDB_DATA_TYPE_BIGINT); }
break; break;
case 66: /* type_name ::= FLOAT */ case 66: /* type_name ::= FLOAT */
{ yymsp[0].minor.yy240 = createDataType(TSDB_DATA_TYPE_FLOAT); } { yymsp[0].minor.yy70 = createDataType(TSDB_DATA_TYPE_FLOAT); }
break; break;
case 67: /* type_name ::= DOUBLE */ case 67: /* type_name ::= DOUBLE */
{ yymsp[0].minor.yy240 = createDataType(TSDB_DATA_TYPE_DOUBLE); } { yymsp[0].minor.yy70 = createDataType(TSDB_DATA_TYPE_DOUBLE); }
break; break;
case 68: /* type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ case 68: /* type_name ::= BINARY NK_LP NK_INTEGER NK_RP */
{ yymsp[-3].minor.yy240 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); } { yymsp[-3].minor.yy70 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); }
break; break;
case 69: /* type_name ::= TIMESTAMP */ case 69: /* type_name ::= TIMESTAMP */
{ yymsp[0].minor.yy240 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); } { yymsp[0].minor.yy70 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); }
break; break;
case 70: /* type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ case 70: /* type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */
{ yymsp[-3].minor.yy240 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); } { yymsp[-3].minor.yy70 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); }
break; break;
case 71: /* type_name ::= TINYINT UNSIGNED */ case 71: /* type_name ::= TINYINT UNSIGNED */
{ yymsp[-1].minor.yy240 = createDataType(TSDB_DATA_TYPE_UTINYINT); } { yymsp[-1].minor.yy70 = createDataType(TSDB_DATA_TYPE_UTINYINT); }
break; break;
case 72: /* type_name ::= SMALLINT UNSIGNED */ case 72: /* type_name ::= SMALLINT UNSIGNED */
{ yymsp[-1].minor.yy240 = createDataType(TSDB_DATA_TYPE_USMALLINT); } { yymsp[-1].minor.yy70 = createDataType(TSDB_DATA_TYPE_USMALLINT); }
break; break;
case 73: /* type_name ::= INT UNSIGNED */ case 73: /* type_name ::= INT UNSIGNED */
{ yymsp[-1].minor.yy240 = createDataType(TSDB_DATA_TYPE_UINT); } { yymsp[-1].minor.yy70 = createDataType(TSDB_DATA_TYPE_UINT); }
break; break;
case 74: /* type_name ::= BIGINT UNSIGNED */ case 74: /* type_name ::= BIGINT UNSIGNED */
{ yymsp[-1].minor.yy240 = createDataType(TSDB_DATA_TYPE_UBIGINT); } { yymsp[-1].minor.yy70 = createDataType(TSDB_DATA_TYPE_UBIGINT); }
break; break;
case 75: /* type_name ::= JSON */ case 75: /* type_name ::= JSON */
{ yymsp[0].minor.yy240 = createDataType(TSDB_DATA_TYPE_JSON); } { yymsp[0].minor.yy70 = createDataType(TSDB_DATA_TYPE_JSON); }
break; break;
case 76: /* type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ case 76: /* type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */
{ yymsp[-3].minor.yy240 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); } { yymsp[-3].minor.yy70 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); }
break; break;
case 77: /* type_name ::= MEDIUMBLOB */ case 77: /* type_name ::= MEDIUMBLOB */
{ yymsp[0].minor.yy240 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); } { yymsp[0].minor.yy70 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); }
break; break;
case 78: /* type_name ::= BLOB */ case 78: /* type_name ::= BLOB */
{ yymsp[0].minor.yy240 = createDataType(TSDB_DATA_TYPE_BLOB); } { yymsp[0].minor.yy70 = createDataType(TSDB_DATA_TYPE_BLOB); }
break; break;
case 79: /* type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ case 79: /* type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */
{ yymsp[-3].minor.yy240 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); } { yymsp[-3].minor.yy70 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); }
break; break;
case 80: /* type_name ::= DECIMAL */ case 80: /* type_name ::= DECIMAL */
{ yymsp[0].minor.yy240 = createDataType(TSDB_DATA_TYPE_DECIMAL); } { yymsp[0].minor.yy70 = createDataType(TSDB_DATA_TYPE_DECIMAL); }
break; break;
case 81: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ case 81: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */
{ yymsp[-3].minor.yy240 = createDataType(TSDB_DATA_TYPE_DECIMAL); } { yymsp[-3].minor.yy70 = createDataType(TSDB_DATA_TYPE_DECIMAL); }
break; break;
case 82: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ case 82: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */
{ yymsp[-5].minor.yy240 = createDataType(TSDB_DATA_TYPE_DECIMAL); } { yymsp[-5].minor.yy70 = createDataType(TSDB_DATA_TYPE_DECIMAL); }
break; break;
case 84: /* tags_def_opt ::= tags_def */ case 84: /* tags_def_opt ::= tags_def */
case 179: /* select_list ::= select_sublist */ yytestcase(yyruleno==179); case 180: /* select_list ::= select_sublist */ yytestcase(yyruleno==180);
{ yylhsminor.yy184 = yymsp[0].minor.yy184; } { yylhsminor.yy46 = yymsp[0].minor.yy46; }
yymsp[0].minor.yy184 = yylhsminor.yy184; yymsp[0].minor.yy46 = yylhsminor.yy46;
break; break;
case 85: /* tags_def ::= TAGS NK_LP column_def_list NK_RP */ case 85: /* tags_def ::= TAGS NK_LP column_def_list NK_RP */
{ yymsp[-3].minor.yy184 = yymsp[-1].minor.yy184; } { yymsp[-3].minor.yy46 = yymsp[-1].minor.yy46; }
break; break;
case 86: /* table_options ::= */ case 86: /* table_options ::= */
{ yymsp[1].minor.yy334 = createDefaultTableOptions(pCxt);} { yymsp[1].minor.yy340 = createDefaultTableOptions(pCxt);}
break; break;
case 87: /* table_options ::= table_options COMMENT NK_STRING */ case 87: /* table_options ::= table_options COMMENT NK_STRING */
{ yylhsminor.yy334 = setTableOption(pCxt, yymsp[-2].minor.yy334, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); } { yylhsminor.yy340 = setTableOption(pCxt, yymsp[-2].minor.yy340, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); }
yymsp[-2].minor.yy334 = yylhsminor.yy334; yymsp[-2].minor.yy340 = yylhsminor.yy340;
break; break;
case 88: /* table_options ::= table_options KEEP NK_INTEGER */ case 88: /* table_options ::= table_options KEEP NK_INTEGER */
{ yylhsminor.yy334 = setTableOption(pCxt, yymsp[-2].minor.yy334, TABLE_OPTION_KEEP, &yymsp[0].minor.yy0); } { yylhsminor.yy340 = setTableOption(pCxt, yymsp[-2].minor.yy340, TABLE_OPTION_KEEP, &yymsp[0].minor.yy0); }
yymsp[-2].minor.yy334 = yylhsminor.yy334; yymsp[-2].minor.yy340 = yylhsminor.yy340;
break; break;
case 89: /* table_options ::= table_options TTL NK_INTEGER */ case 89: /* table_options ::= table_options TTL NK_INTEGER */
{ yylhsminor.yy334 = setTableOption(pCxt, yymsp[-2].minor.yy334, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); } { yylhsminor.yy340 = setTableOption(pCxt, yymsp[-2].minor.yy340, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); }
yymsp[-2].minor.yy334 = yylhsminor.yy334; yymsp[-2].minor.yy340 = yylhsminor.yy340;
break; break;
case 90: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */ case 90: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */
{ yylhsminor.yy334 = setTableSmaOption(pCxt, yymsp[-4].minor.yy334, yymsp[-1].minor.yy184); } { yylhsminor.yy340 = setTableSmaOption(pCxt, yymsp[-4].minor.yy340, yymsp[-1].minor.yy46); }
yymsp[-4].minor.yy334 = yylhsminor.yy334; yymsp[-4].minor.yy340 = yylhsminor.yy340;
break; break;
case 93: /* col_name ::= column_name */ case 93: /* col_name ::= column_name */
{ yylhsminor.yy392 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy161); } { yylhsminor.yy256 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy129); }
yymsp[0].minor.yy392 = yylhsminor.yy392; yymsp[0].minor.yy256 = yylhsminor.yy256;
break; break;
case 94: /* cmd ::= SHOW VGROUPS */ case 94: /* cmd ::= SHOW VGROUPS */
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, NULL); } { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, NULL); }
break; break;
case 95: /* cmd ::= SHOW db_name NK_DOT VGROUPS */ case 95: /* cmd ::= SHOW db_name NK_DOT VGROUPS */
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, &yymsp[-2].minor.yy161); } { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, &yymsp[-2].minor.yy129); }
break; break;
case 96: /* cmd ::= query_expression */ case 96: /* cmd ::= SHOW MNODES */
{ pCxt->pRootNode = yymsp[0].minor.yy392; } { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MNODES_STMT, NULL); }
break; break;
case 97: /* literal ::= NK_INTEGER */ case 97: /* cmd ::= query_expression */
{ yylhsminor.yy392 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } { pCxt->pRootNode = yymsp[0].minor.yy256; }
yymsp[0].minor.yy392 = yylhsminor.yy392; break;
break; case 98: /* literal ::= NK_INTEGER */
case 98: /* literal ::= NK_FLOAT */ { yylhsminor.yy256 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); }
{ yylhsminor.yy392 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy256 = yylhsminor.yy256;
yymsp[0].minor.yy392 = yylhsminor.yy392; break;
break; case 99: /* literal ::= NK_FLOAT */
case 99: /* literal ::= NK_STRING */ { yylhsminor.yy256 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); }
{ yylhsminor.yy392 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy256 = yylhsminor.yy256;
yymsp[0].minor.yy392 = yylhsminor.yy392; break;
break; case 100: /* literal ::= NK_STRING */
case 100: /* literal ::= NK_BOOL */ { yylhsminor.yy256 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); }
{ yylhsminor.yy392 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy256 = yylhsminor.yy256;
yymsp[0].minor.yy392 = yylhsminor.yy392; break;
break; case 101: /* literal ::= NK_BOOL */
case 101: /* literal ::= TIMESTAMP NK_STRING */ { yylhsminor.yy256 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); }
{ yylhsminor.yy392 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy256 = yylhsminor.yy256;
yymsp[-1].minor.yy392 = yylhsminor.yy392; break;
break; case 102: /* literal ::= TIMESTAMP NK_STRING */
case 102: /* literal ::= duration_literal */ { yylhsminor.yy256 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); }
case 113: /* expression ::= literal */ yytestcase(yyruleno==113); yymsp[-1].minor.yy256 = yylhsminor.yy256;
case 114: /* expression ::= column_reference */ yytestcase(yyruleno==114); break;
case 117: /* expression ::= subquery */ yytestcase(yyruleno==117); case 103: /* literal ::= duration_literal */
case 149: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==149); case 114: /* expression ::= literal */ yytestcase(yyruleno==114);
case 153: /* boolean_primary ::= predicate */ yytestcase(yyruleno==153); case 115: /* expression ::= column_reference */ yytestcase(yyruleno==115);
case 155: /* common_expression ::= expression */ yytestcase(yyruleno==155); case 118: /* expression ::= subquery */ yytestcase(yyruleno==118);
case 156: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==156); case 150: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==150);
case 158: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==158); case 154: /* boolean_primary ::= predicate */ yytestcase(yyruleno==154);
case 160: /* table_reference ::= table_primary */ yytestcase(yyruleno==160); case 156: /* common_expression ::= expression */ yytestcase(yyruleno==156);
case 161: /* table_reference ::= joined_table */ yytestcase(yyruleno==161); case 157: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==157);
case 165: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==165); case 159: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==159);
case 212: /* query_expression_body ::= query_primary */ yytestcase(yyruleno==212); case 161: /* table_reference ::= table_primary */ yytestcase(yyruleno==161);
case 214: /* query_primary ::= query_specification */ yytestcase(yyruleno==214); case 162: /* table_reference ::= joined_table */ yytestcase(yyruleno==162);
{ yylhsminor.yy392 = yymsp[0].minor.yy392; } case 166: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==166);
yymsp[0].minor.yy392 = yylhsminor.yy392; case 213: /* query_expression_body ::= query_primary */ yytestcase(yyruleno==213);
break; case 215: /* query_primary ::= query_specification */ yytestcase(yyruleno==215);
case 103: /* duration_literal ::= NK_VARIABLE */ { yylhsminor.yy256 = yymsp[0].minor.yy256; }
{ yylhsminor.yy392 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy256 = yylhsminor.yy256;
yymsp[0].minor.yy392 = yylhsminor.yy392; break;
break; case 104: /* duration_literal ::= NK_VARIABLE */
case 104: /* literal_list ::= literal */ { yylhsminor.yy256 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); }
case 126: /* expression_list ::= expression */ yytestcase(yyruleno==126); yymsp[0].minor.yy256 = yylhsminor.yy256;
{ yylhsminor.yy184 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy392)); } break;
yymsp[0].minor.yy184 = yylhsminor.yy184; case 105: /* literal_list ::= literal */
break; case 127: /* expression_list ::= expression */ yytestcase(yyruleno==127);
case 105: /* literal_list ::= literal_list NK_COMMA literal */ { yylhsminor.yy46 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy256)); }
case 127: /* expression_list ::= expression_list NK_COMMA expression */ yytestcase(yyruleno==127); yymsp[0].minor.yy46 = yylhsminor.yy46;
{ yylhsminor.yy184 = addNodeToList(pCxt, yymsp[-2].minor.yy184, releaseRawExprNode(pCxt, yymsp[0].minor.yy392)); } break;
yymsp[-2].minor.yy184 = yylhsminor.yy184; case 106: /* literal_list ::= literal_list NK_COMMA literal */
break; case 128: /* expression_list ::= expression_list NK_COMMA expression */ yytestcase(yyruleno==128);
case 115: /* expression ::= function_name NK_LP expression_list NK_RP */ { yylhsminor.yy46 = addNodeToList(pCxt, yymsp[-2].minor.yy46, releaseRawExprNode(pCxt, yymsp[0].minor.yy256)); }
{ yylhsminor.yy392 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy161, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy161, yymsp[-1].minor.yy184)); } yymsp[-2].minor.yy46 = yylhsminor.yy46;
yymsp[-3].minor.yy392 = yylhsminor.yy392; break;
break; case 116: /* expression ::= function_name NK_LP expression_list NK_RP */
case 116: /* expression ::= function_name NK_LP NK_STAR NK_RP */ { yylhsminor.yy256 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy129, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy129, yymsp[-1].minor.yy46)); }
{ yylhsminor.yy392 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy161, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy161, createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[-1].minor.yy0)))); } yymsp[-3].minor.yy256 = yylhsminor.yy256;
yymsp[-3].minor.yy392 = yylhsminor.yy392; break;
break; case 117: /* expression ::= function_name NK_LP NK_STAR NK_RP */
case 118: /* expression ::= NK_LP expression NK_RP */ { yylhsminor.yy256 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy129, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy129, createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[-1].minor.yy0)))); }
case 154: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==154); yymsp[-3].minor.yy256 = yylhsminor.yy256;
{ yylhsminor.yy392 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy392)); } break;
yymsp[-2].minor.yy392 = yylhsminor.yy392; case 119: /* expression ::= NK_LP expression NK_RP */
break; case 155: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==155);
case 119: /* expression ::= NK_PLUS expression */ { yylhsminor.yy256 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy256)); }
yymsp[-2].minor.yy256 = yylhsminor.yy256;
break;
case 120: /* expression ::= NK_PLUS expression */
{ {
SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy392); SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy256);
yylhsminor.yy392 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy392)); yylhsminor.yy256 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy256));
} }
yymsp[-1].minor.yy392 = yylhsminor.yy392; yymsp[-1].minor.yy256 = yylhsminor.yy256;
break; break;
case 120: /* expression ::= NK_MINUS expression */ case 121: /* expression ::= NK_MINUS expression */
{ {
SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy392); SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy256);
yylhsminor.yy392 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[0].minor.yy392), NULL)); yylhsminor.yy256 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[0].minor.yy256), NULL));
} }
yymsp[-1].minor.yy392 = yylhsminor.yy392; yymsp[-1].minor.yy256 = yylhsminor.yy256;
break; break;
case 121: /* expression ::= expression NK_PLUS expression */ case 122: /* expression ::= expression NK_PLUS expression */
{ {
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy392); SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy256);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy392); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy256);
yylhsminor.yy392 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy392), releaseRawExprNode(pCxt, yymsp[0].minor.yy392))); yylhsminor.yy256 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy256), releaseRawExprNode(pCxt, yymsp[0].minor.yy256)));
} }
yymsp[-2].minor.yy392 = yylhsminor.yy392; yymsp[-2].minor.yy256 = yylhsminor.yy256;
break; break;
case 122: /* expression ::= expression NK_MINUS expression */ case 123: /* expression ::= expression NK_MINUS expression */
{ {
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy392); SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy256);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy392); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy256);
yylhsminor.yy392 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy392), releaseRawExprNode(pCxt, yymsp[0].minor.yy392))); yylhsminor.yy256 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy256), releaseRawExprNode(pCxt, yymsp[0].minor.yy256)));
} }
yymsp[-2].minor.yy392 = yylhsminor.yy392; yymsp[-2].minor.yy256 = yylhsminor.yy256;
break; break;
case 123: /* expression ::= expression NK_STAR expression */ case 124: /* expression ::= expression NK_STAR expression */
{ {
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy392); SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy256);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy392); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy256);
yylhsminor.yy392 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy392), releaseRawExprNode(pCxt, yymsp[0].minor.yy392))); yylhsminor.yy256 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy256), releaseRawExprNode(pCxt, yymsp[0].minor.yy256)));
} }
yymsp[-2].minor.yy392 = yylhsminor.yy392; yymsp[-2].minor.yy256 = yylhsminor.yy256;
break; break;
case 124: /* expression ::= expression NK_SLASH expression */ case 125: /* expression ::= expression NK_SLASH expression */
{ {
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy392); SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy256);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy392); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy256);
yylhsminor.yy392 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy392), releaseRawExprNode(pCxt, yymsp[0].minor.yy392))); yylhsminor.yy256 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy256), releaseRawExprNode(pCxt, yymsp[0].minor.yy256)));
} }
yymsp[-2].minor.yy392 = yylhsminor.yy392; yymsp[-2].minor.yy256 = yylhsminor.yy256;
break; break;
case 125: /* expression ::= expression NK_REM expression */ case 126: /* expression ::= expression NK_REM expression */
{ {
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy392); SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy256);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy392); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy256);
yylhsminor.yy392 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MOD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy392), releaseRawExprNode(pCxt, yymsp[0].minor.yy392))); yylhsminor.yy256 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MOD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy256), releaseRawExprNode(pCxt, yymsp[0].minor.yy256)));
} }
yymsp[-2].minor.yy392 = yylhsminor.yy392; yymsp[-2].minor.yy256 = yylhsminor.yy256;
break; break;
case 128: /* column_reference ::= column_name */ case 129: /* column_reference ::= column_name */
{ yylhsminor.yy392 = createRawExprNode(pCxt, &yymsp[0].minor.yy161, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy161)); } { yylhsminor.yy256 = createRawExprNode(pCxt, &yymsp[0].minor.yy129, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy129)); }
yymsp[0].minor.yy392 = yylhsminor.yy392; yymsp[0].minor.yy256 = yylhsminor.yy256;
break; break;
case 129: /* column_reference ::= table_name NK_DOT column_name */ case 130: /* column_reference ::= table_name NK_DOT column_name */
{ yylhsminor.yy392 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy161, &yymsp[0].minor.yy161, createColumnNode(pCxt, &yymsp[-2].minor.yy161, &yymsp[0].minor.yy161)); } { yylhsminor.yy256 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy129, &yymsp[0].minor.yy129, createColumnNode(pCxt, &yymsp[-2].minor.yy129, &yymsp[0].minor.yy129)); }
yymsp[-2].minor.yy392 = yylhsminor.yy392; yymsp[-2].minor.yy256 = yylhsminor.yy256;
break; break;
case 130: /* predicate ::= expression compare_op expression */ case 131: /* predicate ::= expression compare_op expression */
case 135: /* predicate ::= expression in_op in_predicate_value */ yytestcase(yyruleno==135); case 136: /* predicate ::= expression in_op in_predicate_value */ yytestcase(yyruleno==136);
{ {
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy392); SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy256);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy392); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy256);
yylhsminor.yy392 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy220, releaseRawExprNode(pCxt, yymsp[-2].minor.yy392), releaseRawExprNode(pCxt, yymsp[0].minor.yy392))); yylhsminor.yy256 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy326, releaseRawExprNode(pCxt, yymsp[-2].minor.yy256), releaseRawExprNode(pCxt, yymsp[0].minor.yy256)));
} }
yymsp[-2].minor.yy392 = yylhsminor.yy392; yymsp[-2].minor.yy256 = yylhsminor.yy256;
break; break;
case 131: /* predicate ::= expression BETWEEN expression AND expression */ case 132: /* predicate ::= expression BETWEEN expression AND expression */
{ {
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy392); SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy256);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy392); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy256);
yylhsminor.yy392 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy392), releaseRawExprNode(pCxt, yymsp[-2].minor.yy392), releaseRawExprNode(pCxt, yymsp[0].minor.yy392))); yylhsminor.yy256 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy256), releaseRawExprNode(pCxt, yymsp[-2].minor.yy256), releaseRawExprNode(pCxt, yymsp[0].minor.yy256)));
} }
yymsp[-4].minor.yy392 = yylhsminor.yy392; yymsp[-4].minor.yy256 = yylhsminor.yy256;
break; break;
case 132: /* predicate ::= expression NOT BETWEEN expression AND expression */ case 133: /* predicate ::= expression NOT BETWEEN expression AND expression */
{ {
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy392); SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy256);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy392); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy256);
yylhsminor.yy392 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy392), releaseRawExprNode(pCxt, yymsp[-5].minor.yy392), releaseRawExprNode(pCxt, yymsp[0].minor.yy392))); yylhsminor.yy256 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy256), releaseRawExprNode(pCxt, yymsp[-5].minor.yy256), releaseRawExprNode(pCxt, yymsp[0].minor.yy256)));
} }
yymsp[-5].minor.yy392 = yylhsminor.yy392; yymsp[-5].minor.yy256 = yylhsminor.yy256;
break; break;
case 133: /* predicate ::= expression IS NULL */ case 134: /* predicate ::= expression IS NULL */
{ {
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy392); SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy256);
yylhsminor.yy392 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy392), NULL)); yylhsminor.yy256 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy256), NULL));
} }
yymsp[-2].minor.yy392 = yylhsminor.yy392; yymsp[-2].minor.yy256 = yylhsminor.yy256;
break; break;
case 134: /* predicate ::= expression IS NOT NULL */ case 135: /* predicate ::= expression IS NOT NULL */
{ {
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy392); SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy256);
yylhsminor.yy392 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy392), NULL)); yylhsminor.yy256 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy256), NULL));
} }
yymsp[-3].minor.yy392 = yylhsminor.yy392; yymsp[-3].minor.yy256 = yylhsminor.yy256;
break; break;
case 136: /* compare_op ::= NK_LT */ case 137: /* compare_op ::= NK_LT */
{ yymsp[0].minor.yy220 = OP_TYPE_LOWER_THAN; } { yymsp[0].minor.yy326 = OP_TYPE_LOWER_THAN; }
break; break;
case 137: /* compare_op ::= NK_GT */ case 138: /* compare_op ::= NK_GT */
{ yymsp[0].minor.yy220 = OP_TYPE_GREATER_THAN; } { yymsp[0].minor.yy326 = OP_TYPE_GREATER_THAN; }
break; break;
case 138: /* compare_op ::= NK_LE */ case 139: /* compare_op ::= NK_LE */
{ yymsp[0].minor.yy220 = OP_TYPE_LOWER_EQUAL; } { yymsp[0].minor.yy326 = OP_TYPE_LOWER_EQUAL; }
break; break;
case 139: /* compare_op ::= NK_GE */ case 140: /* compare_op ::= NK_GE */
{ yymsp[0].minor.yy220 = OP_TYPE_GREATER_EQUAL; } { yymsp[0].minor.yy326 = OP_TYPE_GREATER_EQUAL; }
break; break;
case 140: /* compare_op ::= NK_NE */ case 141: /* compare_op ::= NK_NE */
{ yymsp[0].minor.yy220 = OP_TYPE_NOT_EQUAL; } { yymsp[0].minor.yy326 = OP_TYPE_NOT_EQUAL; }
break; break;
case 141: /* compare_op ::= NK_EQ */ case 142: /* compare_op ::= NK_EQ */
{ yymsp[0].minor.yy220 = OP_TYPE_EQUAL; } { yymsp[0].minor.yy326 = OP_TYPE_EQUAL; }
break; break;
case 142: /* compare_op ::= LIKE */ case 143: /* compare_op ::= LIKE */
{ yymsp[0].minor.yy220 = OP_TYPE_LIKE; } { yymsp[0].minor.yy326 = OP_TYPE_LIKE; }
break; break;
case 143: /* compare_op ::= NOT LIKE */ case 144: /* compare_op ::= NOT LIKE */
{ yymsp[-1].minor.yy220 = OP_TYPE_NOT_LIKE; } { yymsp[-1].minor.yy326 = OP_TYPE_NOT_LIKE; }
break; break;
case 144: /* compare_op ::= MATCH */ case 145: /* compare_op ::= MATCH */
{ yymsp[0].minor.yy220 = OP_TYPE_MATCH; } { yymsp[0].minor.yy326 = OP_TYPE_MATCH; }
break; break;
case 145: /* compare_op ::= NMATCH */ case 146: /* compare_op ::= NMATCH */
{ yymsp[0].minor.yy220 = OP_TYPE_NMATCH; } { yymsp[0].minor.yy326 = OP_TYPE_NMATCH; }
break; break;
case 146: /* in_op ::= IN */ case 147: /* in_op ::= IN */
{ yymsp[0].minor.yy220 = OP_TYPE_IN; } { yymsp[0].minor.yy326 = OP_TYPE_IN; }
break; break;
case 147: /* in_op ::= NOT IN */ case 148: /* in_op ::= NOT IN */
{ yymsp[-1].minor.yy220 = OP_TYPE_NOT_IN; } { yymsp[-1].minor.yy326 = OP_TYPE_NOT_IN; }
break; break;
case 148: /* in_predicate_value ::= NK_LP expression_list NK_RP */ case 149: /* in_predicate_value ::= NK_LP expression_list NK_RP */
{ yylhsminor.yy392 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy184)); } { yylhsminor.yy256 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy46)); }
yymsp[-2].minor.yy392 = yylhsminor.yy392; yymsp[-2].minor.yy256 = yylhsminor.yy256;
break; break;
case 150: /* boolean_value_expression ::= NOT boolean_primary */ case 151: /* boolean_value_expression ::= NOT boolean_primary */
{ {
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy392); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy256);
yylhsminor.yy392 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy392), NULL)); yylhsminor.yy256 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy256), NULL));
} }
yymsp[-1].minor.yy392 = yylhsminor.yy392; yymsp[-1].minor.yy256 = yylhsminor.yy256;
break; break;
case 151: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ case 152: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */
{ {
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy392); SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy256);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy392); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy256);
yylhsminor.yy392 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy392), releaseRawExprNode(pCxt, yymsp[0].minor.yy392))); yylhsminor.yy256 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy256), releaseRawExprNode(pCxt, yymsp[0].minor.yy256)));
} }
yymsp[-2].minor.yy392 = yylhsminor.yy392; yymsp[-2].minor.yy256 = yylhsminor.yy256;
break; break;
case 152: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ case 153: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */
{ {
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy392); SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy256);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy392); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy256);
yylhsminor.yy392 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy392), releaseRawExprNode(pCxt, yymsp[0].minor.yy392))); yylhsminor.yy256 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy256), releaseRawExprNode(pCxt, yymsp[0].minor.yy256)));
} }
yymsp[-2].minor.yy392 = yylhsminor.yy392; yymsp[-2].minor.yy256 = yylhsminor.yy256;
break; break;
case 157: /* from_clause ::= FROM table_reference_list */ case 158: /* from_clause ::= FROM table_reference_list */
case 187: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==187); case 188: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==188);
case 210: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==210); case 211: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==211);
{ yymsp[-1].minor.yy392 = yymsp[0].minor.yy392; } { yymsp[-1].minor.yy256 = yymsp[0].minor.yy256; }
break; break;
case 159: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ case 160: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */
{ yylhsminor.yy392 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy392, yymsp[0].minor.yy392, NULL); } { yylhsminor.yy256 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy256, yymsp[0].minor.yy256, NULL); }
yymsp[-2].minor.yy392 = yylhsminor.yy392; yymsp[-2].minor.yy256 = yylhsminor.yy256;
break; break;
case 162: /* table_primary ::= table_name alias_opt */ case 163: /* table_primary ::= table_name alias_opt */
{ yylhsminor.yy392 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy161, &yymsp[0].minor.yy161); } { yylhsminor.yy256 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy129, &yymsp[0].minor.yy129); }
yymsp[-1].minor.yy392 = yylhsminor.yy392; yymsp[-1].minor.yy256 = yylhsminor.yy256;
break; break;
case 163: /* table_primary ::= db_name NK_DOT table_name alias_opt */ case 164: /* table_primary ::= db_name NK_DOT table_name alias_opt */
{ yylhsminor.yy392 = createRealTableNode(pCxt, &yymsp[-3].minor.yy161, &yymsp[-1].minor.yy161, &yymsp[0].minor.yy161); } { yylhsminor.yy256 = createRealTableNode(pCxt, &yymsp[-3].minor.yy129, &yymsp[-1].minor.yy129, &yymsp[0].minor.yy129); }
yymsp[-3].minor.yy392 = yylhsminor.yy392; yymsp[-3].minor.yy256 = yylhsminor.yy256;
break; break;
case 164: /* table_primary ::= subquery alias_opt */ case 165: /* table_primary ::= subquery alias_opt */
{ yylhsminor.yy392 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy392), &yymsp[0].minor.yy161); } { yylhsminor.yy256 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy256), &yymsp[0].minor.yy129); }
yymsp[-1].minor.yy392 = yylhsminor.yy392; yymsp[-1].minor.yy256 = yylhsminor.yy256;
break; break;
case 166: /* alias_opt ::= */ case 167: /* alias_opt ::= */
{ yymsp[1].minor.yy161 = nil_token; } { yymsp[1].minor.yy129 = nil_token; }
break; break;
case 167: /* alias_opt ::= table_alias */ case 168: /* alias_opt ::= table_alias */
{ yylhsminor.yy161 = yymsp[0].minor.yy161; } { yylhsminor.yy129 = yymsp[0].minor.yy129; }
yymsp[0].minor.yy161 = yylhsminor.yy161; yymsp[0].minor.yy129 = yylhsminor.yy129;
break; break;
case 168: /* alias_opt ::= AS table_alias */ case 169: /* alias_opt ::= AS table_alias */
{ yymsp[-1].minor.yy161 = yymsp[0].minor.yy161; } { yymsp[-1].minor.yy129 = yymsp[0].minor.yy129; }
break; break;
case 169: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ case 170: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */
case 170: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==170); case 171: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==171);
{ yymsp[-2].minor.yy392 = yymsp[-1].minor.yy392; } { yymsp[-2].minor.yy256 = yymsp[-1].minor.yy256; }
break; break;
case 171: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ case 172: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */
{ yylhsminor.yy392 = createJoinTableNode(pCxt, yymsp[-4].minor.yy308, yymsp[-5].minor.yy392, yymsp[-2].minor.yy392, yymsp[0].minor.yy392); } { yylhsminor.yy256 = createJoinTableNode(pCxt, yymsp[-4].minor.yy266, yymsp[-5].minor.yy256, yymsp[-2].minor.yy256, yymsp[0].minor.yy256); }
yymsp[-5].minor.yy392 = yylhsminor.yy392; yymsp[-5].minor.yy256 = yylhsminor.yy256;
break; break;
case 172: /* join_type ::= */ case 173: /* join_type ::= */
{ yymsp[1].minor.yy308 = JOIN_TYPE_INNER; } { yymsp[1].minor.yy266 = JOIN_TYPE_INNER; }
break; break;
case 173: /* join_type ::= INNER */ case 174: /* join_type ::= INNER */
{ yymsp[0].minor.yy308 = JOIN_TYPE_INNER; } { yymsp[0].minor.yy266 = JOIN_TYPE_INNER; }
break; break;
case 174: /* query_specification ::= SELECT set_quantifier_opt select_list from_clause where_clause_opt partition_by_clause_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ case 175: /* query_specification ::= SELECT set_quantifier_opt select_list from_clause where_clause_opt partition_by_clause_opt twindow_clause_opt group_by_clause_opt having_clause_opt */
{ {
yymsp[-8].minor.yy392 = createSelectStmt(pCxt, yymsp[-7].minor.yy377, yymsp[-6].minor.yy184, yymsp[-5].minor.yy392); yymsp[-8].minor.yy256 = createSelectStmt(pCxt, yymsp[-7].minor.yy185, yymsp[-6].minor.yy46, yymsp[-5].minor.yy256);
yymsp[-8].minor.yy392 = addWhereClause(pCxt, yymsp[-8].minor.yy392, yymsp[-4].minor.yy392); yymsp[-8].minor.yy256 = addWhereClause(pCxt, yymsp[-8].minor.yy256, yymsp[-4].minor.yy256);
yymsp[-8].minor.yy392 = addPartitionByClause(pCxt, yymsp[-8].minor.yy392, yymsp[-3].minor.yy184); yymsp[-8].minor.yy256 = addPartitionByClause(pCxt, yymsp[-8].minor.yy256, yymsp[-3].minor.yy46);
yymsp[-8].minor.yy392 = addWindowClauseClause(pCxt, yymsp[-8].minor.yy392, yymsp[-2].minor.yy392); yymsp[-8].minor.yy256 = addWindowClauseClause(pCxt, yymsp[-8].minor.yy256, yymsp[-2].minor.yy256);
yymsp[-8].minor.yy392 = addGroupByClause(pCxt, yymsp[-8].minor.yy392, yymsp[-1].minor.yy184); yymsp[-8].minor.yy256 = addGroupByClause(pCxt, yymsp[-8].minor.yy256, yymsp[-1].minor.yy46);
yymsp[-8].minor.yy392 = addHavingClause(pCxt, yymsp[-8].minor.yy392, yymsp[0].minor.yy392); yymsp[-8].minor.yy256 = addHavingClause(pCxt, yymsp[-8].minor.yy256, yymsp[0].minor.yy256);
} }
break; break;
case 176: /* set_quantifier_opt ::= DISTINCT */ case 177: /* set_quantifier_opt ::= DISTINCT */
{ yymsp[0].minor.yy377 = true; } { yymsp[0].minor.yy185 = true; }
break; break;
case 177: /* set_quantifier_opt ::= ALL */ case 178: /* set_quantifier_opt ::= ALL */
{ yymsp[0].minor.yy377 = false; } { yymsp[0].minor.yy185 = false; }
break; break;
case 178: /* select_list ::= NK_STAR */ case 179: /* select_list ::= NK_STAR */
{ yymsp[0].minor.yy184 = NULL; } { yymsp[0].minor.yy46 = NULL; }
break; break;
case 182: /* select_item ::= common_expression */ case 183: /* select_item ::= common_expression */
{ {
SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy392); SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy256);
yylhsminor.yy392 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy392), &t); yylhsminor.yy256 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy256), &t);
} }
yymsp[0].minor.yy392 = yylhsminor.yy392; yymsp[0].minor.yy256 = yylhsminor.yy256;
break; break;
case 183: /* select_item ::= common_expression column_alias */ case 184: /* select_item ::= common_expression column_alias */
{ yylhsminor.yy392 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy392), &yymsp[0].minor.yy161); } { yylhsminor.yy256 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy256), &yymsp[0].minor.yy129); }
yymsp[-1].minor.yy392 = yylhsminor.yy392; yymsp[-1].minor.yy256 = yylhsminor.yy256;
break; break;
case 184: /* select_item ::= common_expression AS column_alias */ case 185: /* select_item ::= common_expression AS column_alias */
{ yylhsminor.yy392 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy392), &yymsp[0].minor.yy161); } { yylhsminor.yy256 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy256), &yymsp[0].minor.yy129); }
yymsp[-2].minor.yy392 = yylhsminor.yy392; yymsp[-2].minor.yy256 = yylhsminor.yy256;
break; break;
case 185: /* select_item ::= table_name NK_DOT NK_STAR */ case 186: /* select_item ::= table_name NK_DOT NK_STAR */
{ yylhsminor.yy392 = createColumnNode(pCxt, &yymsp[-2].minor.yy161, &yymsp[0].minor.yy0); } { yylhsminor.yy256 = createColumnNode(pCxt, &yymsp[-2].minor.yy129, &yymsp[0].minor.yy0); }
yymsp[-2].minor.yy392 = yylhsminor.yy392; yymsp[-2].minor.yy256 = yylhsminor.yy256;
break; break;
case 186: /* where_clause_opt ::= */ case 187: /* where_clause_opt ::= */
case 190: /* twindow_clause_opt ::= */ yytestcase(yyruleno==190); case 191: /* twindow_clause_opt ::= */ yytestcase(yyruleno==191);
case 195: /* sliding_opt ::= */ yytestcase(yyruleno==195); case 196: /* sliding_opt ::= */ yytestcase(yyruleno==196);
case 197: /* fill_opt ::= */ yytestcase(yyruleno==197); case 198: /* fill_opt ::= */ yytestcase(yyruleno==198);
case 209: /* having_clause_opt ::= */ yytestcase(yyruleno==209); case 210: /* having_clause_opt ::= */ yytestcase(yyruleno==210);
case 217: /* slimit_clause_opt ::= */ yytestcase(yyruleno==217); case 218: /* slimit_clause_opt ::= */ yytestcase(yyruleno==218);
case 221: /* limit_clause_opt ::= */ yytestcase(yyruleno==221); case 222: /* limit_clause_opt ::= */ yytestcase(yyruleno==222);
{ yymsp[1].minor.yy392 = NULL; } { yymsp[1].minor.yy256 = NULL; }
break; break;
case 189: /* partition_by_clause_opt ::= PARTITION BY expression_list */ case 190: /* partition_by_clause_opt ::= PARTITION BY expression_list */
case 206: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==206); case 207: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==207);
case 216: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==216); case 217: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==217);
{ yymsp[-2].minor.yy184 = yymsp[0].minor.yy184; } { yymsp[-2].minor.yy46 = yymsp[0].minor.yy46; }
break; break;
case 191: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA NK_INTEGER NK_RP */ case 192: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA NK_INTEGER NK_RP */
{ yymsp[-5].minor.yy392 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy392), &yymsp[-1].minor.yy0); } { yymsp[-5].minor.yy256 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy256), &yymsp[-1].minor.yy0); }
break; break;
case 192: /* twindow_clause_opt ::= STATE_WINDOW NK_LP column_reference NK_RP */ case 193: /* twindow_clause_opt ::= STATE_WINDOW NK_LP column_reference NK_RP */
{ yymsp[-3].minor.yy392 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy392)); } { yymsp[-3].minor.yy256 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy256)); }
break; break;
case 193: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ case 194: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */
{ yymsp[-5].minor.yy392 = createIntervalWindowNode(pCxt, yymsp[-3].minor.yy392, NULL, yymsp[-1].minor.yy392, yymsp[0].minor.yy392); } { yymsp[-5].minor.yy256 = createIntervalWindowNode(pCxt, yymsp[-3].minor.yy256, NULL, yymsp[-1].minor.yy256, yymsp[0].minor.yy256); }
break; break;
case 194: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ case 195: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */
{ yymsp[-7].minor.yy392 = createIntervalWindowNode(pCxt, yymsp[-5].minor.yy392, yymsp[-3].minor.yy392, yymsp[-1].minor.yy392, yymsp[0].minor.yy392); } { yymsp[-7].minor.yy256 = createIntervalWindowNode(pCxt, yymsp[-5].minor.yy256, yymsp[-3].minor.yy256, yymsp[-1].minor.yy256, yymsp[0].minor.yy256); }
break; break;
case 196: /* sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ case 197: /* sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */
{ yymsp[-3].minor.yy392 = yymsp[-1].minor.yy392; } { yymsp[-3].minor.yy256 = yymsp[-1].minor.yy256; }
break; break;
case 198: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ case 199: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */
{ yymsp[-3].minor.yy392 = createFillNode(pCxt, yymsp[-1].minor.yy166, NULL); } { yymsp[-3].minor.yy256 = createFillNode(pCxt, yymsp[-1].minor.yy360, NULL); }
break; break;
case 199: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ case 200: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */
{ yymsp[-5].minor.yy392 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy184)); } { yymsp[-5].minor.yy256 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy46)); }
break; break;
case 200: /* fill_mode ::= NONE */ case 201: /* fill_mode ::= NONE */
{ yymsp[0].minor.yy166 = FILL_MODE_NONE; } { yymsp[0].minor.yy360 = FILL_MODE_NONE; }
break; break;
case 201: /* fill_mode ::= PREV */ case 202: /* fill_mode ::= PREV */
{ yymsp[0].minor.yy166 = FILL_MODE_PREV; } { yymsp[0].minor.yy360 = FILL_MODE_PREV; }
break; break;
case 202: /* fill_mode ::= NULL */ case 203: /* fill_mode ::= NULL */
{ yymsp[0].minor.yy166 = FILL_MODE_NULL; } { yymsp[0].minor.yy360 = FILL_MODE_NULL; }
break; break;
case 203: /* fill_mode ::= LINEAR */ case 204: /* fill_mode ::= LINEAR */
{ yymsp[0].minor.yy166 = FILL_MODE_LINEAR; } { yymsp[0].minor.yy360 = FILL_MODE_LINEAR; }
break; break;
case 204: /* fill_mode ::= NEXT */ case 205: /* fill_mode ::= NEXT */
{ yymsp[0].minor.yy166 = FILL_MODE_NEXT; } { yymsp[0].minor.yy360 = FILL_MODE_NEXT; }
break; break;
case 207: /* group_by_list ::= expression */ case 208: /* group_by_list ::= expression */
{ yylhsminor.yy184 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy392))); } { yylhsminor.yy46 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy256))); }
yymsp[0].minor.yy184 = yylhsminor.yy184; yymsp[0].minor.yy46 = yylhsminor.yy46;
break; break;
case 208: /* group_by_list ::= group_by_list NK_COMMA expression */ case 209: /* group_by_list ::= group_by_list NK_COMMA expression */
{ yylhsminor.yy184 = addNodeToList(pCxt, yymsp[-2].minor.yy184, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy392))); } { yylhsminor.yy46 = addNodeToList(pCxt, yymsp[-2].minor.yy46, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy256))); }
yymsp[-2].minor.yy184 = yylhsminor.yy184; yymsp[-2].minor.yy46 = yylhsminor.yy46;
break; break;
case 211: /* query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt */ case 212: /* query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt */
{ {
yylhsminor.yy392 = addOrderByClause(pCxt, yymsp[-3].minor.yy392, yymsp[-2].minor.yy184); yylhsminor.yy256 = addOrderByClause(pCxt, yymsp[-3].minor.yy256, yymsp[-2].minor.yy46);
yylhsminor.yy392 = addSlimitClause(pCxt, yylhsminor.yy392, yymsp[-1].minor.yy392); yylhsminor.yy256 = addSlimitClause(pCxt, yylhsminor.yy256, yymsp[-1].minor.yy256);
yylhsminor.yy392 = addLimitClause(pCxt, yylhsminor.yy392, yymsp[0].minor.yy392); yylhsminor.yy256 = addLimitClause(pCxt, yylhsminor.yy256, yymsp[0].minor.yy256);
} }
yymsp[-3].minor.yy392 = yylhsminor.yy392; yymsp[-3].minor.yy256 = yylhsminor.yy256;
break; break;
case 213: /* query_expression_body ::= query_expression_body UNION ALL query_expression_body */ case 214: /* query_expression_body ::= query_expression_body UNION ALL query_expression_body */
{ yylhsminor.yy392 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy392, yymsp[0].minor.yy392); } { yylhsminor.yy256 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy256, yymsp[0].minor.yy256); }
yymsp[-3].minor.yy392 = yylhsminor.yy392; yymsp[-3].minor.yy256 = yylhsminor.yy256;
break; break;
case 218: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ case 219: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */
case 222: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==222); case 223: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==223);
{ yymsp[-1].minor.yy392 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } { yymsp[-1].minor.yy256 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); }
break; break;
case 219: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ case 220: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */
case 223: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==223); case 224: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==224);
{ yymsp[-3].minor.yy392 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } { yymsp[-3].minor.yy256 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); }
break; break;
case 220: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ case 221: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */
case 224: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==224); case 225: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==225);
{ yymsp[-3].minor.yy392 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } { yymsp[-3].minor.yy256 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); }
break; break;
case 225: /* subquery ::= NK_LP query_expression NK_RP */ case 226: /* subquery ::= NK_LP query_expression NK_RP */
{ yylhsminor.yy392 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy392); } { yylhsminor.yy256 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy256); }
yymsp[-2].minor.yy392 = yylhsminor.yy392; yymsp[-2].minor.yy256 = yylhsminor.yy256;
break; break;
case 226: /* search_condition ::= common_expression */ case 227: /* search_condition ::= common_expression */
{ yylhsminor.yy392 = releaseRawExprNode(pCxt, yymsp[0].minor.yy392); } { yylhsminor.yy256 = releaseRawExprNode(pCxt, yymsp[0].minor.yy256); }
yymsp[0].minor.yy392 = yylhsminor.yy392; yymsp[0].minor.yy256 = yylhsminor.yy256;
break; break;
case 229: /* sort_specification ::= expression ordering_specification_opt null_ordering_opt */ case 230: /* sort_specification ::= expression ordering_specification_opt null_ordering_opt */
{ yylhsminor.yy392 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy392), yymsp[-1].minor.yy162, yymsp[0].minor.yy9); } { yylhsminor.yy256 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy256), yymsp[-1].minor.yy202, yymsp[0].minor.yy147); }
yymsp[-2].minor.yy392 = yylhsminor.yy392; yymsp[-2].minor.yy256 = yylhsminor.yy256;
break; break;
case 230: /* ordering_specification_opt ::= */ case 231: /* ordering_specification_opt ::= */
{ yymsp[1].minor.yy162 = ORDER_ASC; } { yymsp[1].minor.yy202 = ORDER_ASC; }
break; break;
case 231: /* ordering_specification_opt ::= ASC */ case 232: /* ordering_specification_opt ::= ASC */
{ yymsp[0].minor.yy162 = ORDER_ASC; } { yymsp[0].minor.yy202 = ORDER_ASC; }
break; break;
case 232: /* ordering_specification_opt ::= DESC */ case 233: /* ordering_specification_opt ::= DESC */
{ yymsp[0].minor.yy162 = ORDER_DESC; } { yymsp[0].minor.yy202 = ORDER_DESC; }
break; break;
case 233: /* null_ordering_opt ::= */ case 234: /* null_ordering_opt ::= */
{ yymsp[1].minor.yy9 = NULL_ORDER_DEFAULT; } { yymsp[1].minor.yy147 = NULL_ORDER_DEFAULT; }
break; break;
case 234: /* null_ordering_opt ::= NULLS FIRST */ case 235: /* null_ordering_opt ::= NULLS FIRST */
{ yymsp[-1].minor.yy9 = NULL_ORDER_FIRST; } { yymsp[-1].minor.yy147 = NULL_ORDER_FIRST; }
break; break;
case 235: /* null_ordering_opt ::= NULLS LAST */ case 236: /* null_ordering_opt ::= NULLS LAST */
{ yymsp[-1].minor.yy9 = NULL_ORDER_LAST; } { yymsp[-1].minor.yy147 = NULL_ORDER_LAST; }
break; break;
default: default:
break; break;
......
...@@ -48,6 +48,13 @@ extern "C" { ...@@ -48,6 +48,13 @@ extern "C" {
} \ } \
} while (0) } while (0)
#define planFatal(param, ...) qFatal("PLAN: " param, __VA_ARGS__)
#define planError(param, ...) qError("PLAN: " param, __VA_ARGS__)
#define planWarn(param, ...) qWarn("PLAN: " param, __VA_ARGS__)
#define planInfo(param, ...) qInfo("PLAN: " param, __VA_ARGS__)
#define planDebug(param, ...) qDebug("PLAN: " param, __VA_ARGS__)
#define planTrace(param, ...) qTrace("PLAN: " param, __VA_ARGS__)
int32_t createLogicPlan(SPlanContext* pCxt, SLogicNode** pLogicNode); int32_t createLogicPlan(SPlanContext* pCxt, SLogicNode** pLogicNode);
int32_t optimize(SPlanContext* pCxt, SLogicNode* pLogicNode); int32_t optimize(SPlanContext* pCxt, SLogicNode* pLogicNode);
int32_t applySplitRule(SSubLogicPlan* pSubplan); int32_t applySplitRule(SSubLogicPlan* pSubplan);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册