提交 659b4d08 编写于 作者: X Xiaoyu Wang

TD-13338 SELECT statement translate code

上级 2c395cf0
......@@ -113,13 +113,13 @@ typedef enum ELogicConditionType {
} ELogicConditionType;
typedef struct SLogicConditionNode {
ENodeType type; // QUERY_NODE_LOGIC_CONDITION
SExprNode node; // QUERY_NODE_LOGIC_CONDITION
ELogicConditionType condType;
SNodeList* pParameterList;
} SLogicConditionNode;
typedef struct SIsNullCondNode {
ENodeType type; // QUERY_NODE_IS_NULL_CONDITION
SExprNode node; // QUERY_NODE_IS_NULL_CONDITION
SNode* pExpr;
bool isNull;
} SIsNullCondNode;
......
......@@ -55,6 +55,7 @@
%left OR.
%left AND.
//%right NOT.
%left UNION ALL MINUS EXCEPT INTERSECT.
//%left BITAND BITOR LSHIFT RSHIFT.
%left NK_PLUS NK_MINUS.
......@@ -169,13 +170,41 @@ column_reference(A) ::= table_name(B) NK_DOT column_name(C).
//pseudo_column(A) ::= NK_NOW. { PARSER_TRACE; A = createFunctionNode(pCxt, NULL, NULL); }
/************************************************ predicate ***********************************************************/
predicate(A) ::= expression(B) compare_op(C) expression(D). { PARSER_TRACE; A = createOperatorNode(pCxt, C, releaseRawExprNode(pCxt, B), releaseRawExprNode(pCxt, D)); }
predicate(A) ::= expression(B) compare_op(C) expression(D). {
PARSER_TRACE;
SToken s = getTokenFromRawExprNode(pCxt, B);
SToken e = getTokenFromRawExprNode(pCxt, D);
A = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, C, releaseRawExprNode(pCxt, B), releaseRawExprNode(pCxt, D)));
}
//predicate(A) ::= expression(B) compare_op sub_type expression(B).
predicate(A) ::= expression(B) BETWEEN expression(C) AND expression(D). { PARSER_TRACE; A = createBetweenAnd(pCxt, releaseRawExprNode(pCxt, B), releaseRawExprNode(pCxt, C), releaseRawExprNode(pCxt, D)); }
predicate(A) ::= expression(B) NOT BETWEEN expression(C) AND expression(D). { PARSER_TRACE; A = createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, C), releaseRawExprNode(pCxt, B), releaseRawExprNode(pCxt, D)); }
predicate(A) ::= expression(B) IS NULL. { PARSER_TRACE; A = createIsNullCondNode(pCxt, releaseRawExprNode(pCxt, B), true); }
predicate(A) ::= expression(B) IS NOT NULL. { PARSER_TRACE; A = createIsNullCondNode(pCxt, releaseRawExprNode(pCxt, B), false); }
predicate(A) ::= expression(B) in_op(C) in_predicate_value(D). { PARSER_TRACE; A = createOperatorNode(pCxt, C, releaseRawExprNode(pCxt, B), D); }
predicate(A) ::= expression(B) BETWEEN expression(C) AND expression(D). {
PARSER_TRACE;
SToken s = getTokenFromRawExprNode(pCxt, B);
SToken e = getTokenFromRawExprNode(pCxt, D);
A = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, B), releaseRawExprNode(pCxt, C), releaseRawExprNode(pCxt, D)));
}
predicate(A) ::= expression(B) NOT BETWEEN expression(C) AND expression(D). {
PARSER_TRACE;
SToken s = getTokenFromRawExprNode(pCxt, B);
SToken e = getTokenFromRawExprNode(pCxt, D);
A = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, C), releaseRawExprNode(pCxt, B), releaseRawExprNode(pCxt, D)));
}
predicate(A) ::= expression(B) IS NULL(C). {
PARSER_TRACE;
SToken s = getTokenFromRawExprNode(pCxt, B);
A = createRawExprNodeExt(pCxt, &s, &C, createIsNullCondNode(pCxt, releaseRawExprNode(pCxt, B), true));
}
predicate(A) ::= expression(B) IS NOT NULL(C). {
PARSER_TRACE;
SToken s = getTokenFromRawExprNode(pCxt, B);
A = createRawExprNodeExt(pCxt, &s, &C, createIsNullCondNode(pCxt, releaseRawExprNode(pCxt, B), false));
}
predicate(A) ::= expression(B) in_op(C) in_predicate_value(D). {
PARSER_TRACE;
SToken s = getTokenFromRawExprNode(pCxt, B);
SToken e = getTokenFromRawExprNode(pCxt, D);
A = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, C, releaseRawExprNode(pCxt, B), releaseRawExprNode(pCxt, D)));
}
%type compare_op { EOperatorType }
%destructor compare_op { PARSER_DESTRUCTOR_TRACE; }
......@@ -195,18 +224,36 @@ compare_op(A) ::= NMATCH.
in_op(A) ::= IN. { PARSER_TRACE; A = OP_TYPE_IN; }
in_op(A) ::= NOT IN. { PARSER_TRACE; A = OP_TYPE_NOT_IN; }
in_predicate_value(A) ::= NK_LP expression_list(B) NK_RP. { PARSER_TRACE; A = createNodeListNode(pCxt, B); }
in_predicate_value(A) ::= NK_LP(C) expression_list(B) NK_RP(D). { PARSER_TRACE; A = createRawExprNodeExt(pCxt, &C, &D, createNodeListNode(pCxt, B)); }
/************************************************ boolean_value_expression ********************************************/
boolean_value_expression(A) ::= boolean_primary(B). { PARSER_TRACE; A = B; }
boolean_value_expression(A) ::= NOT boolean_primary(B). { PARSER_TRACE; A = createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, B, NULL); }
boolean_value_expression(A) ::= NOT(C) boolean_primary(B). {
PARSER_TRACE;
SToken e = getTokenFromRawExprNode(pCxt, B);
A = createRawExprNodeExt(pCxt, &C, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, B), NULL));
}
boolean_value_expression(A) ::=
boolean_value_expression(B) OR boolean_value_expression(C). { PARSER_TRACE; A = createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, B, C); }
boolean_value_expression(B) OR boolean_value_expression(C). {
PARSER_TRACE;
SToken s = getTokenFromRawExprNode(pCxt, B);
SToken e = getTokenFromRawExprNode(pCxt, C);
A = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, B), releaseRawExprNode(pCxt, C)));
}
boolean_value_expression(A) ::=
boolean_value_expression(B) AND boolean_value_expression(C). { PARSER_TRACE; A = createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, B, C); }
boolean_value_expression(B) AND boolean_value_expression(C). {
PARSER_TRACE;
SToken s = getTokenFromRawExprNode(pCxt, B);
SToken e = getTokenFromRawExprNode(pCxt, C);
A = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, B), releaseRawExprNode(pCxt, C)));
}
boolean_primary(A) ::= predicate(B). { PARSER_TRACE; A = B; }
boolean_primary(A) ::= NK_LP boolean_value_expression(B) NK_RP. { PARSER_TRACE; A = B; }
boolean_primary(A) ::= NK_LP(C) boolean_value_expression(B) NK_RP(D). { PARSER_TRACE; A = createRawExprNodeExt(pCxt, &C, &D, releaseRawExprNode(pCxt, B)); }
/************************************************ common_expression ********************************************/
common_expression(A) ::= expression(B). { A = B; }
common_expression(A) ::= boolean_value_expression(B). { A = B; }
/************************************************ from_clause *********************************************************/
from_clause(A) ::= FROM table_reference_list(B). { PARSER_TRACE; A = B; }
......@@ -271,13 +318,13 @@ select_list(A) ::= select_sublist(B).
select_sublist(A) ::= select_item(B). { PARSER_TRACE; A = createNodeList(pCxt, B); }
select_sublist(A) ::= select_sublist(B) NK_COMMA select_item(C). { PARSER_TRACE; A = addNodeToList(pCxt, B, C); }
select_item(A) ::= expression(B). {
select_item(A) ::= common_expression(B). {
PARSER_TRACE;
SToken t = getTokenFromRawExprNode(pCxt, B);
A = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, B), &t);
}
select_item(A) ::= expression(B) column_alias(C). { PARSER_TRACE; A = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, B), &C); }
select_item(A) ::= expression(B) AS column_alias(C). { PARSER_TRACE; A = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, B), &C); }
select_item(A) ::= common_expression(B) column_alias(C). { PARSER_TRACE; A = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, B), &C); }
select_item(A) ::= common_expression(B) AS column_alias(C). { PARSER_TRACE; A = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, B), &C); }
select_item(A) ::= table_name(B) NK_DOT NK_STAR(C). { PARSER_TRACE; A = createColumnNode(pCxt, &B, &C); }
where_clause_opt(A) ::= . { PARSER_TRACE; A = NULL; }
......@@ -364,7 +411,7 @@ limit_clause_opt(A) ::= LIMIT NK_INTEGER(C) NK_COMMA NK_INTEGER(B).
subquery(A) ::= NK_LP(B) query_expression(C) NK_RP(D). { PARSER_TRACE; A = createRawExprNodeExt(pCxt, &B, &D, C); }
/************************************************ search_condition ****************************************************/
search_condition(A) ::= boolean_value_expression(B). { PARSER_TRACE; A = B; }
search_condition(A) ::= common_expression(B). { PARSER_TRACE; A = releaseRawExprNode(pCxt, B); }
/************************************************ sort_specification_list *********************************************/
%type sort_specification_list { SNodeList* }
......
......@@ -109,21 +109,21 @@
#endif
/************* Begin control #defines *****************************************/
#define YYCODETYPE unsigned char
#define YYNOCODE 125
#define YYNOCODE 126
#define YYACTIONTYPE unsigned short int
#define NewParseTOKENTYPE SToken
typedef union {
int yyinit;
NewParseTOKENTYPE yy0;
EOperatorType yy40;
EFillMode yy44;
SToken yy79;
ENullOrder yy107;
EJoinType yy162;
SNodeList* yy174;
EOrder yy188;
SNode* yy212;
bool yy237;
EFillMode yy18;
SToken yy29;
EJoinType yy36;
SNode* yy56;
ENullOrder yy109;
EOperatorType yy128;
bool yy173;
SNodeList* yy208;
EOrder yy218;
} YYMINORTYPE;
#ifndef YYSTACKDEPTH
#define YYSTACKDEPTH 100
......@@ -138,17 +138,17 @@ typedef union {
#define NewParseCTX_PARAM
#define NewParseCTX_FETCH
#define NewParseCTX_STORE
#define YYNSTATE 147
#define YYNRULE 138
#define YYNSTATE 148
#define YYNRULE 140
#define YYNTOKEN 72
#define YY_MAX_SHIFT 146
#define YY_MIN_SHIFTREDUCE 243
#define YY_MAX_SHIFTREDUCE 380
#define YY_ERROR_ACTION 381
#define YY_ACCEPT_ACTION 382
#define YY_NO_ACTION 383
#define YY_MIN_REDUCE 384
#define YY_MAX_REDUCE 521
#define YY_MAX_SHIFT 147
#define YY_MIN_SHIFTREDUCE 245
#define YY_MAX_SHIFTREDUCE 384
#define YY_ERROR_ACTION 385
#define YY_ACCEPT_ACTION 386
#define YY_NO_ACTION 387
#define YY_MIN_REDUCE 388
#define YY_MAX_REDUCE 527
/************* End control #defines *******************************************/
#define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0])))
......@@ -215,208 +215,215 @@ typedef union {
** yy_default[] Default action for each state.
**
*********** Begin parsing tables **********************************************/
#define YY_ACTTAB_COUNT (737)
#define YY_ACTTAB_COUNT (750)
static const YYACTIONTYPE yy_action[] = {
/* 0 */ 393, 391, 92, 23, 66, 394, 391, 469, 30, 28,
/* 10 */ 26, 25, 24, 401, 391, 141, 416, 141, 416, 142,
/* 20 */ 72, 112, 46, 402, 265, 405, 22, 87, 96, 117,
/* 30 */ 283, 284, 285, 286, 287, 288, 289, 291, 292, 293,
/* 40 */ 30, 28, 26, 25, 24, 401, 391, 141, 416, 141,
/* 50 */ 416, 142, 146, 116, 46, 402, 54, 405, 22, 87,
/* 60 */ 96, 514, 283, 284, 285, 286, 287, 288, 289, 291,
/* 70 */ 292, 293, 131, 401, 391, 128, 9, 141, 416, 142,
/* 80 */ 4, 318, 39, 402, 54, 405, 441, 109, 29, 27,
/* 90 */ 86, 437, 132, 513, 63, 245, 246, 247, 248, 143,
/* 100 */ 251, 500, 101, 1, 118, 113, 111, 10, 245, 246,
/* 110 */ 247, 248, 143, 251, 500, 53, 453, 401, 391, 498,
/* 120 */ 258, 141, 416, 142, 126, 54, 40, 402, 499, 405,
/* 130 */ 441, 453, 498, 450, 94, 437, 453, 401, 391, 69,
/* 140 */ 330, 141, 416, 142, 473, 417, 40, 402, 449, 405,
/* 150 */ 441, 134, 256, 448, 94, 437, 41, 401, 391, 344,
/* 160 */ 8, 141, 416, 142, 496, 74, 40, 402, 347, 405,
/* 170 */ 441, 458, 110, 318, 94, 437, 131, 401, 391, 107,
/* 180 */ 322, 141, 416, 142, 457, 57, 78, 402, 60, 405,
/* 190 */ 128, 9, 29, 27, 108, 345, 346, 348, 349, 245,
/* 200 */ 246, 247, 248, 143, 251, 500, 101, 1, 19, 31,
/* 210 */ 133, 10, 295, 54, 30, 28, 26, 25, 24, 53,
/* 220 */ 29, 27, 321, 498, 26, 25, 24, 245, 246, 247,
/* 230 */ 248, 143, 251, 480, 101, 5, 401, 391, 7, 6,
/* 240 */ 141, 416, 142, 7, 6, 40, 402, 251, 405, 441,
/* 250 */ 122, 138, 280, 440, 437, 55, 398, 54, 396, 401,
/* 260 */ 391, 301, 105, 141, 416, 142, 379, 380, 40, 402,
/* 270 */ 106, 405, 441, 29, 27, 323, 121, 437, 479, 59,
/* 280 */ 245, 246, 247, 248, 143, 251, 93, 101, 5, 30,
/* 290 */ 28, 26, 25, 24, 401, 391, 139, 131, 129, 416,
/* 300 */ 142, 125, 44, 45, 402, 265, 405, 3, 460, 135,
/* 310 */ 42, 120, 20, 30, 28, 26, 25, 24, 62, 67,
/* 320 */ 446, 124, 290, 123, 70, 294, 500, 259, 104, 21,
/* 330 */ 102, 466, 48, 64, 2, 30, 28, 26, 25, 24,
/* 340 */ 53, 16, 31, 423, 498, 262, 71, 318, 255, 29,
/* 350 */ 27, 130, 136, 43, 258, 454, 245, 246, 247, 248,
/* 360 */ 143, 251, 32, 101, 5, 29, 27, 30, 28, 26,
/* 370 */ 25, 24, 245, 246, 247, 248, 143, 251, 65, 101,
/* 380 */ 1, 401, 391, 259, 470, 141, 416, 142, 97, 140,
/* 390 */ 40, 402, 515, 405, 441, 29, 27, 497, 137, 438,
/* 400 */ 73, 256, 245, 246, 247, 248, 143, 251, 56, 101,
/* 410 */ 5, 13, 30, 28, 26, 25, 24, 31, 14, 401,
/* 420 */ 391, 341, 58, 141, 416, 142, 376, 377, 84, 402,
/* 430 */ 100, 405, 401, 391, 35, 343, 129, 416, 142, 47,
/* 440 */ 61, 45, 402, 337, 405, 36, 114, 401, 391, 382,
/* 450 */ 144, 141, 416, 142, 336, 37, 84, 402, 103, 405,
/* 460 */ 115, 396, 401, 391, 18, 315, 141, 416, 142, 467,
/* 470 */ 6, 80, 402, 15, 405, 281, 314, 401, 391, 500,
/* 480 */ 68, 141, 416, 142, 33, 34, 84, 402, 95, 405,
/* 490 */ 395, 52, 17, 53, 263, 401, 391, 498, 370, 141,
/* 500 */ 416, 142, 11, 119, 79, 402, 38, 405, 401, 391,
/* 510 */ 365, 75, 141, 416, 142, 364, 98, 81, 402, 369,
/* 520 */ 405, 368, 401, 391, 385, 99, 141, 416, 142, 249,
/* 530 */ 12, 76, 402, 384, 405, 145, 383, 401, 391, 383,
/* 540 */ 383, 141, 416, 142, 383, 383, 82, 402, 383, 405,
/* 550 */ 383, 383, 401, 391, 383, 383, 141, 416, 142, 383,
/* 560 */ 383, 77, 402, 383, 405, 383, 383, 383, 383, 383,
/* 570 */ 401, 391, 383, 383, 141, 416, 142, 383, 383, 83,
/* 580 */ 402, 383, 405, 401, 391, 383, 383, 141, 416, 142,
/* 590 */ 383, 383, 413, 402, 383, 405, 383, 401, 391, 383,
/* 600 */ 383, 141, 416, 142, 383, 383, 412, 402, 383, 405,
/* 610 */ 383, 383, 401, 391, 383, 383, 141, 416, 142, 383,
/* 620 */ 383, 411, 402, 383, 405, 383, 383, 401, 391, 383,
/* 630 */ 383, 141, 416, 142, 383, 383, 90, 402, 383, 405,
/* 640 */ 383, 383, 383, 383, 383, 401, 391, 383, 383, 141,
/* 650 */ 416, 142, 383, 383, 89, 402, 383, 405, 401, 391,
/* 660 */ 383, 383, 141, 416, 142, 383, 383, 91, 402, 383,
/* 670 */ 405, 383, 401, 391, 383, 383, 141, 416, 142, 383,
/* 680 */ 383, 88, 402, 383, 405, 125, 44, 401, 391, 383,
/* 690 */ 383, 141, 416, 142, 42, 383, 85, 402, 383, 405,
/* 700 */ 125, 44, 127, 49, 446, 447, 383, 451, 383, 42,
/* 710 */ 383, 383, 383, 383, 125, 44, 383, 383, 50, 446,
/* 720 */ 447, 383, 451, 42, 383, 383, 383, 383, 383, 383,
/* 730 */ 383, 383, 51, 446, 447, 383, 451,
/* 0 */ 397, 395, 93, 23, 72, 398, 395, 73, 30, 28,
/* 10 */ 26, 25, 24, 405, 395, 142, 420, 142, 420, 143,
/* 20 */ 110, 113, 80, 406, 267, 409, 22, 88, 97, 147,
/* 30 */ 285, 286, 287, 288, 289, 290, 291, 293, 294, 295,
/* 40 */ 30, 28, 26, 25, 24, 405, 395, 142, 420, 142,
/* 50 */ 420, 143, 118, 117, 46, 406, 260, 409, 22, 88,
/* 60 */ 97, 55, 285, 286, 287, 288, 289, 290, 291, 293,
/* 70 */ 294, 295, 132, 405, 395, 70, 65, 142, 420, 143,
/* 80 */ 127, 10, 39, 406, 55, 409, 445, 119, 114, 112,
/* 90 */ 87, 441, 334, 133, 519, 247, 248, 249, 250, 144,
/* 100 */ 253, 459, 506, 55, 258, 405, 395, 475, 261, 128,
/* 110 */ 420, 143, 127, 10, 40, 406, 54, 409, 445, 456,
/* 120 */ 504, 459, 95, 441, 49, 405, 395, 56, 135, 142,
/* 130 */ 420, 143, 383, 384, 81, 406, 71, 409, 20, 455,
/* 140 */ 405, 395, 103, 472, 128, 420, 143, 125, 292, 40,
/* 150 */ 406, 296, 409, 445, 29, 27, 421, 95, 441, 49,
/* 160 */ 75, 247, 248, 249, 250, 144, 253, 120, 102, 1,
/* 170 */ 459, 9, 8, 11, 26, 25, 24, 464, 473, 322,
/* 180 */ 405, 395, 386, 145, 142, 420, 143, 134, 454, 40,
/* 190 */ 406, 55, 409, 445, 303, 29, 27, 95, 441, 518,
/* 200 */ 2, 326, 247, 248, 249, 250, 144, 253, 479, 102,
/* 210 */ 1, 405, 395, 506, 11, 142, 420, 143, 6, 322,
/* 220 */ 40, 406, 261, 409, 445, 9, 8, 54, 95, 441,
/* 230 */ 518, 504, 405, 395, 506, 139, 142, 420, 143, 502,
/* 240 */ 111, 40, 406, 325, 409, 445, 486, 136, 505, 95,
/* 250 */ 441, 518, 504, 476, 29, 27, 327, 108, 124, 45,
/* 260 */ 463, 247, 248, 249, 250, 144, 253, 43, 102, 1,
/* 270 */ 57, 42, 351, 11, 348, 253, 126, 50, 452, 453,
/* 280 */ 140, 457, 132, 405, 395, 106, 107, 142, 420, 143,
/* 290 */ 137, 59, 79, 406, 62, 409, 29, 27, 109, 349,
/* 300 */ 350, 352, 353, 247, 248, 249, 250, 144, 253, 485,
/* 310 */ 102, 7, 506, 30, 28, 26, 25, 24, 31, 405,
/* 320 */ 395, 297, 94, 142, 420, 143, 54, 5, 41, 406,
/* 330 */ 504, 409, 445, 55, 61, 466, 444, 441, 405, 395,
/* 340 */ 121, 64, 142, 420, 143, 48, 105, 41, 406, 4,
/* 350 */ 409, 445, 130, 322, 282, 129, 441, 132, 66, 257,
/* 360 */ 31, 124, 45, 264, 29, 27, 131, 402, 44, 400,
/* 370 */ 43, 247, 248, 249, 250, 144, 253, 260, 102, 7,
/* 380 */ 68, 452, 123, 32, 122, 29, 27, 506, 460, 67,
/* 390 */ 16, 427, 247, 248, 249, 250, 144, 253, 521, 102,
/* 400 */ 1, 54, 98, 405, 395, 504, 141, 142, 420, 143,
/* 410 */ 138, 503, 41, 406, 258, 409, 445, 29, 27, 74,
/* 420 */ 3, 442, 14, 31, 247, 248, 249, 250, 144, 253,
/* 430 */ 58, 102, 7, 115, 345, 60, 405, 395, 35, 347,
/* 440 */ 142, 420, 143, 47, 63, 85, 406, 101, 409, 405,
/* 450 */ 395, 116, 341, 142, 420, 143, 36, 400, 85, 406,
/* 460 */ 104, 409, 405, 395, 340, 18, 142, 420, 143, 37,
/* 470 */ 69, 85, 406, 96, 409, 405, 395, 319, 15, 142,
/* 480 */ 420, 143, 318, 33, 46, 406, 34, 409, 405, 395,
/* 490 */ 8, 399, 142, 420, 143, 53, 283, 82, 406, 265,
/* 500 */ 409, 405, 395, 374, 17, 142, 420, 143, 12, 38,
/* 510 */ 77, 406, 369, 409, 368, 99, 405, 395, 373, 372,
/* 520 */ 142, 420, 143, 100, 520, 83, 406, 76, 409, 405,
/* 530 */ 395, 251, 13, 142, 420, 143, 389, 388, 78, 406,
/* 540 */ 146, 409, 405, 395, 387, 387, 142, 420, 143, 387,
/* 550 */ 387, 84, 406, 387, 409, 405, 395, 387, 387, 142,
/* 560 */ 420, 143, 387, 387, 417, 406, 387, 409, 405, 395,
/* 570 */ 387, 387, 142, 420, 143, 387, 387, 416, 406, 387,
/* 580 */ 409, 405, 395, 387, 387, 142, 420, 143, 387, 387,
/* 590 */ 415, 406, 387, 409, 387, 405, 395, 387, 387, 142,
/* 600 */ 420, 143, 387, 387, 91, 406, 387, 409, 405, 395,
/* 610 */ 387, 387, 142, 420, 143, 387, 387, 90, 406, 387,
/* 620 */ 409, 405, 395, 387, 387, 142, 420, 143, 387, 387,
/* 630 */ 92, 406, 387, 409, 405, 395, 387, 387, 142, 420,
/* 640 */ 143, 387, 387, 89, 406, 387, 409, 405, 395, 387,
/* 650 */ 387, 142, 420, 143, 387, 387, 86, 406, 387, 409,
/* 660 */ 124, 45, 387, 387, 387, 124, 45, 387, 387, 43,
/* 670 */ 387, 387, 387, 387, 43, 387, 387, 387, 387, 51,
/* 680 */ 452, 453, 387, 457, 52, 452, 453, 387, 457, 30,
/* 690 */ 28, 26, 25, 24, 19, 387, 387, 387, 387, 387,
/* 700 */ 30, 28, 26, 25, 24, 21, 387, 387, 387, 387,
/* 710 */ 387, 30, 28, 26, 25, 24, 387, 387, 387, 387,
/* 720 */ 30, 28, 26, 25, 24, 387, 387, 387, 387, 387,
/* 730 */ 387, 387, 387, 387, 387, 387, 267, 387, 387, 387,
/* 740 */ 387, 387, 387, 387, 387, 387, 387, 387, 380, 381,
};
static const YYCODETYPE yy_lookahead[] = {
/* 0 */ 74, 75, 76, 88, 89, 74, 75, 82, 8, 9,
/* 0 */ 74, 75, 76, 88, 89, 74, 75, 124, 8, 9,
/* 10 */ 10, 11, 12, 74, 75, 78, 79, 78, 79, 80,
/* 20 */ 123, 84, 83, 84, 24, 86, 26, 27, 28, 22,
/* 20 */ 115, 84, 83, 84, 24, 86, 26, 27, 28, 13,
/* 30 */ 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
/* 40 */ 8, 9, 10, 11, 12, 74, 75, 78, 79, 78,
/* 50 */ 79, 80, 13, 84, 83, 84, 45, 86, 26, 27,
/* 60 */ 28, 122, 30, 31, 32, 33, 34, 35, 36, 37,
/* 70 */ 38, 39, 73, 74, 75, 22, 23, 78, 79, 80,
/* 80 */ 43, 44, 83, 84, 45, 86, 87, 114, 8, 9,
/* 90 */ 91, 92, 121, 122, 107, 15, 16, 17, 18, 19,
/* 100 */ 20, 102, 22, 23, 50, 51, 52, 27, 15, 16,
/* 110 */ 17, 18, 19, 20, 102, 116, 81, 74, 75, 120,
/* 120 */ 22, 78, 79, 80, 100, 45, 83, 84, 116, 86,
/* 130 */ 87, 81, 120, 98, 91, 92, 81, 74, 75, 41,
/* 140 */ 10, 78, 79, 80, 101, 79, 83, 84, 98, 86,
/* 150 */ 87, 3, 22, 98, 91, 92, 21, 74, 75, 24,
/* 160 */ 103, 78, 79, 80, 101, 117, 83, 84, 29, 86,
/* 170 */ 87, 42, 54, 44, 91, 92, 73, 74, 75, 53,
/* 180 */ 4, 78, 79, 80, 101, 21, 83, 84, 24, 86,
/* 190 */ 22, 23, 8, 9, 55, 56, 57, 58, 59, 15,
/* 200 */ 16, 17, 18, 19, 20, 102, 22, 23, 2, 21,
/* 210 */ 62, 27, 24, 45, 8, 9, 10, 11, 12, 116,
/* 220 */ 8, 9, 46, 120, 10, 11, 12, 15, 16, 17,
/* 230 */ 18, 19, 20, 113, 22, 23, 74, 75, 1, 2,
/* 240 */ 78, 79, 80, 1, 2, 83, 84, 20, 86, 87,
/* 250 */ 27, 21, 29, 91, 92, 112, 23, 45, 25, 74,
/* 260 */ 75, 24, 75, 78, 79, 80, 70, 71, 83, 84,
/* 270 */ 75, 86, 87, 8, 9, 10, 91, 92, 113, 112,
/* 280 */ 15, 16, 17, 18, 19, 20, 75, 22, 23, 8,
/* 290 */ 9, 10, 11, 12, 74, 75, 66, 73, 78, 79,
/* 300 */ 80, 77, 78, 83, 84, 24, 86, 61, 109, 21,
/* 310 */ 86, 60, 26, 8, 9, 10, 11, 12, 108, 95,
/* 320 */ 96, 97, 36, 99, 104, 39, 102, 22, 48, 2,
/* 330 */ 110, 111, 106, 105, 47, 8, 9, 10, 11, 12,
/* 340 */ 116, 23, 21, 90, 120, 24, 41, 44, 22, 8,
/* 350 */ 9, 10, 64, 78, 22, 81, 15, 16, 17, 18,
/* 360 */ 19, 20, 40, 22, 23, 8, 9, 8, 9, 10,
/* 370 */ 11, 12, 15, 16, 17, 18, 19, 20, 93, 22,
/* 380 */ 23, 74, 75, 22, 82, 78, 79, 80, 69, 65,
/* 390 */ 83, 84, 124, 86, 87, 8, 9, 119, 63, 92,
/* 400 */ 118, 22, 15, 16, 17, 18, 19, 20, 24, 22,
/* 410 */ 23, 21, 8, 9, 10, 11, 12, 21, 49, 74,
/* 420 */ 75, 24, 23, 78, 79, 80, 67, 68, 83, 84,
/* 430 */ 85, 86, 74, 75, 21, 24, 78, 79, 80, 23,
/* 440 */ 23, 83, 84, 24, 86, 23, 15, 74, 75, 72,
/* 450 */ 73, 78, 79, 80, 24, 23, 83, 84, 85, 86,
/* 460 */ 21, 25, 74, 75, 21, 24, 78, 79, 80, 111,
/* 470 */ 2, 83, 84, 49, 86, 29, 24, 74, 75, 102,
/* 480 */ 25, 78, 79, 80, 42, 21, 83, 84, 85, 86,
/* 490 */ 25, 25, 21, 116, 24, 74, 75, 120, 24, 78,
/* 500 */ 79, 80, 49, 115, 83, 84, 4, 86, 74, 75,
/* 510 */ 15, 25, 78, 79, 80, 15, 15, 83, 84, 15,
/* 520 */ 86, 15, 74, 75, 0, 15, 78, 79, 80, 17,
/* 530 */ 23, 83, 84, 0, 86, 14, 125, 74, 75, 125,
/* 540 */ 125, 78, 79, 80, 125, 125, 83, 84, 125, 86,
/* 550 */ 125, 125, 74, 75, 125, 125, 78, 79, 80, 125,
/* 560 */ 125, 83, 84, 125, 86, 125, 125, 125, 125, 125,
/* 570 */ 74, 75, 125, 125, 78, 79, 80, 125, 125, 83,
/* 580 */ 84, 125, 86, 74, 75, 125, 125, 78, 79, 80,
/* 590 */ 125, 125, 83, 84, 125, 86, 125, 74, 75, 125,
/* 600 */ 125, 78, 79, 80, 125, 125, 83, 84, 125, 86,
/* 610 */ 125, 125, 74, 75, 125, 125, 78, 79, 80, 125,
/* 620 */ 125, 83, 84, 125, 86, 125, 125, 74, 75, 125,
/* 630 */ 125, 78, 79, 80, 125, 125, 83, 84, 125, 86,
/* 640 */ 125, 125, 125, 125, 125, 74, 75, 125, 125, 78,
/* 650 */ 79, 80, 125, 125, 83, 84, 125, 86, 74, 75,
/* 660 */ 125, 125, 78, 79, 80, 125, 125, 83, 84, 125,
/* 670 */ 86, 125, 74, 75, 125, 125, 78, 79, 80, 125,
/* 680 */ 125, 83, 84, 125, 86, 77, 78, 74, 75, 125,
/* 690 */ 125, 78, 79, 80, 86, 125, 83, 84, 125, 86,
/* 700 */ 77, 78, 94, 95, 96, 97, 125, 99, 125, 86,
/* 710 */ 125, 125, 125, 125, 77, 78, 125, 125, 95, 96,
/* 720 */ 97, 125, 99, 86, 125, 125, 125, 125, 125, 125,
/* 730 */ 125, 125, 95, 96, 97, 125, 99,
/* 50 */ 79, 80, 22, 84, 83, 84, 22, 86, 26, 27,
/* 60 */ 28, 45, 30, 31, 32, 33, 34, 35, 36, 37,
/* 70 */ 38, 39, 73, 74, 75, 41, 108, 78, 79, 80,
/* 80 */ 22, 23, 83, 84, 45, 86, 87, 50, 51, 52,
/* 90 */ 91, 92, 10, 122, 123, 15, 16, 17, 18, 19,
/* 100 */ 20, 81, 103, 45, 22, 74, 75, 82, 22, 78,
/* 110 */ 79, 80, 22, 23, 83, 84, 117, 86, 87, 99,
/* 120 */ 121, 81, 91, 92, 93, 74, 75, 41, 3, 78,
/* 130 */ 79, 80, 70, 71, 83, 84, 105, 86, 26, 99,
/* 140 */ 74, 75, 111, 112, 78, 79, 80, 101, 36, 83,
/* 150 */ 84, 39, 86, 87, 8, 9, 79, 91, 92, 93,
/* 160 */ 118, 15, 16, 17, 18, 19, 20, 116, 22, 23,
/* 170 */ 81, 1, 2, 27, 10, 11, 12, 42, 112, 44,
/* 180 */ 74, 75, 72, 73, 78, 79, 80, 62, 99, 83,
/* 190 */ 84, 45, 86, 87, 24, 8, 9, 91, 92, 93,
/* 200 */ 104, 4, 15, 16, 17, 18, 19, 20, 102, 22,
/* 210 */ 23, 74, 75, 103, 27, 78, 79, 80, 43, 44,
/* 220 */ 83, 84, 22, 86, 87, 1, 2, 117, 91, 92,
/* 230 */ 93, 121, 74, 75, 103, 21, 78, 79, 80, 102,
/* 240 */ 54, 83, 84, 46, 86, 87, 114, 21, 117, 91,
/* 250 */ 92, 93, 121, 82, 8, 9, 10, 53, 77, 78,
/* 260 */ 102, 15, 16, 17, 18, 19, 20, 86, 22, 23,
/* 270 */ 113, 21, 29, 27, 24, 20, 95, 96, 97, 98,
/* 280 */ 66, 100, 73, 74, 75, 75, 75, 78, 79, 80,
/* 290 */ 64, 21, 83, 84, 24, 86, 8, 9, 55, 56,
/* 300 */ 57, 58, 59, 15, 16, 17, 18, 19, 20, 114,
/* 310 */ 22, 23, 103, 8, 9, 10, 11, 12, 21, 74,
/* 320 */ 75, 24, 75, 78, 79, 80, 117, 61, 83, 84,
/* 330 */ 121, 86, 87, 45, 113, 110, 91, 92, 74, 75,
/* 340 */ 60, 109, 78, 79, 80, 107, 48, 83, 84, 47,
/* 350 */ 86, 87, 27, 44, 29, 91, 92, 73, 106, 22,
/* 360 */ 21, 77, 78, 24, 8, 9, 10, 23, 78, 25,
/* 370 */ 86, 15, 16, 17, 18, 19, 20, 22, 22, 23,
/* 380 */ 96, 97, 98, 40, 100, 8, 9, 103, 81, 94,
/* 390 */ 23, 90, 15, 16, 17, 18, 19, 20, 125, 22,
/* 400 */ 23, 117, 69, 74, 75, 121, 65, 78, 79, 80,
/* 410 */ 63, 120, 83, 84, 22, 86, 87, 8, 9, 119,
/* 420 */ 21, 92, 49, 21, 15, 16, 17, 18, 19, 20,
/* 430 */ 24, 22, 23, 15, 24, 23, 74, 75, 21, 24,
/* 440 */ 78, 79, 80, 23, 23, 83, 84, 85, 86, 74,
/* 450 */ 75, 21, 24, 78, 79, 80, 23, 25, 83, 84,
/* 460 */ 85, 86, 74, 75, 24, 21, 78, 79, 80, 23,
/* 470 */ 25, 83, 84, 85, 86, 74, 75, 24, 49, 78,
/* 480 */ 79, 80, 24, 42, 83, 84, 21, 86, 74, 75,
/* 490 */ 2, 25, 78, 79, 80, 25, 29, 83, 84, 24,
/* 500 */ 86, 74, 75, 24, 21, 78, 79, 80, 49, 4,
/* 510 */ 83, 84, 15, 86, 15, 15, 74, 75, 15, 15,
/* 520 */ 78, 79, 80, 15, 123, 83, 84, 25, 86, 74,
/* 530 */ 75, 17, 23, 78, 79, 80, 0, 0, 83, 84,
/* 540 */ 14, 86, 74, 75, 126, 126, 78, 79, 80, 126,
/* 550 */ 126, 83, 84, 126, 86, 74, 75, 126, 126, 78,
/* 560 */ 79, 80, 126, 126, 83, 84, 126, 86, 74, 75,
/* 570 */ 126, 126, 78, 79, 80, 126, 126, 83, 84, 126,
/* 580 */ 86, 74, 75, 126, 126, 78, 79, 80, 126, 126,
/* 590 */ 83, 84, 126, 86, 126, 74, 75, 126, 126, 78,
/* 600 */ 79, 80, 126, 126, 83, 84, 126, 86, 74, 75,
/* 610 */ 126, 126, 78, 79, 80, 126, 126, 83, 84, 126,
/* 620 */ 86, 74, 75, 126, 126, 78, 79, 80, 126, 126,
/* 630 */ 83, 84, 126, 86, 74, 75, 126, 126, 78, 79,
/* 640 */ 80, 126, 126, 83, 84, 126, 86, 74, 75, 126,
/* 650 */ 126, 78, 79, 80, 126, 126, 83, 84, 126, 86,
/* 660 */ 77, 78, 126, 126, 126, 77, 78, 126, 126, 86,
/* 670 */ 126, 126, 126, 126, 86, 126, 126, 126, 126, 96,
/* 680 */ 97, 98, 126, 100, 96, 97, 98, 126, 100, 8,
/* 690 */ 9, 10, 11, 12, 2, 126, 126, 126, 126, 126,
/* 700 */ 8, 9, 10, 11, 12, 2, 126, 126, 126, 126,
/* 710 */ 126, 8, 9, 10, 11, 12, 126, 126, 126, 126,
/* 720 */ 8, 9, 10, 11, 12, 126, 126, 126, 126, 126,
/* 730 */ 126, 126, 126, 126, 126, 126, 24, 126, 126, 126,
/* 740 */ 126, 126, 126, 126, 126, 126, 126, 126, 67, 68,
/* 750 */ 126, 126, 126, 126, 126, 126, 126, 126, 126, 126,
/* 760 */ 126, 126, 126, 126, 126, 126, 126, 126, 126, 126,
/* 770 */ 126, 126, 126, 126, 126, 126, 126, 126, 126, 126,
/* 780 */ 126, 126, 126, 126, 126, 126, 126, 126, 126, 126,
/* 790 */ 126, 126, 126,
};
#define YY_SHIFT_COUNT (146)
#define YY_SHIFT_COUNT (147)
#define YY_SHIFT_MIN (0)
#define YY_SHIFT_MAX (533)
#define YY_SHIFT_MAX (712)
static const unsigned short int yy_shift_ofst[] = {
/* 0 */ 39, 80, 184, 184, 184, 212, 184, 184, 265, 168,
/* 10 */ 357, 387, 341, 387, 387, 387, 387, 387, 387, 387,
/* 20 */ 387, 387, 387, 387, 387, 387, 387, 387, 387, 387,
/* 30 */ 387, 387, 53, 53, 53, 93, 7, 7, 11, 0,
/* 40 */ 32, 93, 98, 98, 98, 305, 359, 139, 54, 129,
/* 50 */ 37, 129, 130, 148, 176, 118, 126, 227, 227, 118,
/* 60 */ 126, 227, 246, 251, 280, 287, 318, 303, 326, 332,
/* 70 */ 322, 361, 319, 324, 335, 379, 206, 327, 281, 404,
/* 80 */ 404, 404, 404, 404, 404, 404, 237, 286, 214, 214,
/* 90 */ 214, 214, 135, 164, 242, 188, 223, 196, 288, 230,
/* 100 */ 321, 233, 390, 396, 369, 384, 397, 399, 413, 411,
/* 110 */ 416, 417, 419, 422, 430, 431, 439, 436, 432, 443,
/* 120 */ 424, 468, 446, 441, 452, 455, 442, 464, 465, 466,
/* 130 */ 470, 474, 471, 453, 502, 495, 500, 501, 504, 506,
/* 140 */ 510, 486, 507, 512, 524, 533, 521,
/* 0 */ 16, 146, 246, 187, 187, 187, 187, 288, 187, 187,
/* 10 */ 58, 377, 409, 356, 409, 409, 409, 409, 409, 409,
/* 20 */ 409, 409, 409, 409, 409, 409, 409, 409, 409, 409,
/* 30 */ 409, 409, 90, 90, 90, 80, 30, 30, 39, 0,
/* 40 */ 32, 32, 80, 34, 34, 34, 681, 243, 37, 86,
/* 50 */ 135, 175, 135, 82, 125, 197, 200, 186, 204, 255,
/* 60 */ 255, 186, 204, 255, 266, 280, 298, 302, 309, 337,
/* 70 */ 355, 343, 367, 333, 341, 347, 392, 692, 703, 712,
/* 80 */ 305, 305, 305, 305, 305, 305, 305, 170, 112, 164,
/* 90 */ 164, 164, 164, 250, 270, 224, 297, 325, 62, 226,
/* 100 */ 214, 339, 344, 399, 402, 373, 406, 410, 412, 417,
/* 110 */ 415, 420, 421, 428, 433, 440, 418, 430, 432, 446,
/* 120 */ 444, 429, 453, 458, 445, 441, 465, 466, 470, 488,
/* 130 */ 467, 475, 479, 483, 459, 505, 497, 499, 500, 503,
/* 140 */ 504, 508, 502, 509, 514, 536, 537, 526,
};
#define YY_REDUCE_COUNT (75)
#define YY_REDUCE_MIN (-103)
#define YY_REDUCE_MAX (637)
#define YY_REDUCE_COUNT (76)
#define YY_REDUCE_MIN (-117)
#define YY_REDUCE_MAX (588)
static const short yy_reduce_ofst[] = {
/* 0 */ 377, -1, 43, 63, 83, 103, 162, 185, 220, 224,
/* 10 */ 307, -29, 345, 358, 373, 388, 403, -61, 421, 434,
/* 20 */ 448, 463, 478, 496, 509, 523, 538, 553, 571, 584,
/* 30 */ 598, 613, 608, 623, 637, -74, -63, -31, 12, -85,
/* 40 */ -85, -69, 35, 50, 55, -75, -103, -27, -13, 24,
/* 50 */ 24, 24, 66, 48, 57, 120, 143, 187, 195, 165,
/* 60 */ 167, 211, 199, 210, 226, 228, 253, 24, 275, 274,
/* 70 */ 285, 302, 268, 278, 282, 66,
/* 0 */ 110, -1, 31, 66, 106, 137, 158, 209, 245, 264,
/* 10 */ 284, 329, -29, 362, 375, 51, 388, 401, -61, 414,
/* 20 */ 427, 442, 455, 468, 481, 494, 507, 521, 534, 547,
/* 30 */ 560, 573, 181, 583, 588, -74, -63, -31, 131, -85,
/* 40 */ -85, -85, -69, 20, 40, 89, -117, -95, -32, 25,
/* 50 */ 46, 46, 46, 77, 42, 96, 171, 132, 157, 210,
/* 60 */ 211, 195, 221, 247, 225, 232, 238, 252, 46, 290,
/* 70 */ 307, 295, 301, 273, 291, 300, 77,
};
static const YYACTIONTYPE yy_default[] = {
/* 0 */ 381, 381, 381, 381, 381, 381, 381, 381, 381, 381,
/* 10 */ 381, 381, 381, 381, 381, 381, 381, 381, 381, 381,
/* 20 */ 381, 381, 381, 381, 381, 381, 381, 381, 381, 381,
/* 30 */ 381, 381, 381, 381, 381, 381, 381, 381, 381, 381,
/* 40 */ 381, 381, 452, 452, 452, 468, 516, 381, 476, 444,
/* 50 */ 458, 445, 381, 501, 461, 483, 481, 381, 381, 483,
/* 60 */ 481, 381, 495, 491, 474, 472, 381, 458, 381, 381,
/* 70 */ 381, 381, 519, 507, 503, 381, 381, 381, 381, 494,
/* 80 */ 493, 420, 419, 418, 414, 415, 381, 381, 409, 410,
/* 90 */ 408, 407, 381, 381, 512, 381, 381, 381, 504, 508,
/* 100 */ 381, 397, 465, 475, 381, 381, 381, 381, 381, 381,
/* 110 */ 381, 381, 381, 381, 381, 381, 381, 397, 381, 492,
/* 120 */ 381, 439, 381, 451, 447, 381, 381, 443, 396, 381,
/* 130 */ 381, 381, 502, 381, 381, 381, 381, 381, 381, 381,
/* 140 */ 381, 381, 381, 381, 381, 381, 381,
/* 0 */ 385, 385, 385, 385, 385, 385, 385, 385, 385, 385,
/* 10 */ 385, 385, 385, 385, 385, 385, 385, 385, 385, 385,
/* 20 */ 385, 385, 385, 385, 385, 385, 385, 385, 385, 385,
/* 30 */ 385, 385, 385, 385, 385, 385, 385, 385, 385, 385,
/* 40 */ 447, 385, 385, 458, 458, 458, 522, 385, 482, 474,
/* 50 */ 450, 464, 451, 385, 507, 467, 385, 489, 487, 385,
/* 60 */ 385, 489, 487, 385, 501, 497, 480, 478, 464, 385,
/* 70 */ 385, 385, 385, 525, 513, 509, 385, 385, 385, 385,
/* 80 */ 500, 499, 424, 423, 422, 418, 419, 385, 385, 413,
/* 90 */ 414, 412, 411, 385, 385, 448, 385, 385, 385, 510,
/* 100 */ 514, 385, 401, 471, 481, 385, 385, 385, 385, 385,
/* 110 */ 385, 385, 385, 385, 385, 385, 385, 385, 401, 385,
/* 120 */ 498, 385, 457, 453, 385, 385, 449, 400, 385, 443,
/* 130 */ 385, 385, 385, 508, 385, 385, 385, 385, 385, 385,
/* 140 */ 385, 385, 385, 385, 385, 385, 385, 385,
};
/********** End of lemon-generated parsing tables *****************************/
......@@ -616,38 +623,39 @@ static const char *const yyTokenName[] = {
/* 90 */ "in_predicate_value",
/* 91 */ "boolean_value_expression",
/* 92 */ "boolean_primary",
/* 93 */ "from_clause",
/* 94 */ "table_reference_list",
/* 95 */ "table_reference",
/* 96 */ "table_primary",
/* 97 */ "joined_table",
/* 98 */ "alias_opt",
/* 99 */ "parenthesized_joined_table",
/* 100 */ "join_type",
/* 101 */ "search_condition",
/* 102 */ "query_specification",
/* 103 */ "set_quantifier_opt",
/* 104 */ "select_list",
/* 105 */ "where_clause_opt",
/* 106 */ "partition_by_clause_opt",
/* 107 */ "twindow_clause_opt",
/* 108 */ "group_by_clause_opt",
/* 109 */ "having_clause_opt",
/* 110 */ "select_sublist",
/* 111 */ "select_item",
/* 112 */ "sliding_opt",
/* 113 */ "fill_opt",
/* 114 */ "fill_mode",
/* 115 */ "group_by_list",
/* 116 */ "query_expression_body",
/* 117 */ "order_by_clause_opt",
/* 118 */ "slimit_clause_opt",
/* 119 */ "limit_clause_opt",
/* 120 */ "query_primary",
/* 121 */ "sort_specification_list",
/* 122 */ "sort_specification",
/* 123 */ "ordering_specification_opt",
/* 124 */ "null_ordering_opt",
/* 93 */ "common_expression",
/* 94 */ "from_clause",
/* 95 */ "table_reference_list",
/* 96 */ "table_reference",
/* 97 */ "table_primary",
/* 98 */ "joined_table",
/* 99 */ "alias_opt",
/* 100 */ "parenthesized_joined_table",
/* 101 */ "join_type",
/* 102 */ "search_condition",
/* 103 */ "query_specification",
/* 104 */ "set_quantifier_opt",
/* 105 */ "select_list",
/* 106 */ "where_clause_opt",
/* 107 */ "partition_by_clause_opt",
/* 108 */ "twindow_clause_opt",
/* 109 */ "group_by_clause_opt",
/* 110 */ "having_clause_opt",
/* 111 */ "select_sublist",
/* 112 */ "select_item",
/* 113 */ "sliding_opt",
/* 114 */ "fill_opt",
/* 115 */ "fill_mode",
/* 116 */ "group_by_list",
/* 117 */ "query_expression_body",
/* 118 */ "order_by_clause_opt",
/* 119 */ "slimit_clause_opt",
/* 120 */ "limit_clause_opt",
/* 121 */ "query_primary",
/* 122 */ "sort_specification_list",
/* 123 */ "sort_specification",
/* 124 */ "ordering_specification_opt",
/* 125 */ "null_ordering_opt",
};
#endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */
......@@ -714,85 +722,87 @@ static const char *const yyRuleName[] = {
/* 56 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression",
/* 57 */ "boolean_primary ::= predicate",
/* 58 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP",
/* 59 */ "from_clause ::= FROM table_reference_list",
/* 60 */ "table_reference_list ::= table_reference",
/* 61 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference",
/* 62 */ "table_reference ::= table_primary",
/* 63 */ "table_reference ::= joined_table",
/* 64 */ "table_primary ::= table_name alias_opt",
/* 65 */ "table_primary ::= db_name NK_DOT table_name alias_opt",
/* 66 */ "table_primary ::= subquery alias_opt",
/* 67 */ "table_primary ::= parenthesized_joined_table",
/* 68 */ "alias_opt ::=",
/* 69 */ "alias_opt ::= table_alias",
/* 70 */ "alias_opt ::= AS table_alias",
/* 71 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP",
/* 72 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP",
/* 73 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition",
/* 74 */ "join_type ::=",
/* 75 */ "join_type ::= INNER",
/* 76 */ "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",
/* 77 */ "set_quantifier_opt ::=",
/* 78 */ "set_quantifier_opt ::= DISTINCT",
/* 79 */ "set_quantifier_opt ::= ALL",
/* 80 */ "select_list ::= NK_STAR",
/* 81 */ "select_list ::= select_sublist",
/* 82 */ "select_sublist ::= select_item",
/* 83 */ "select_sublist ::= select_sublist NK_COMMA select_item",
/* 84 */ "select_item ::= expression",
/* 85 */ "select_item ::= expression column_alias",
/* 86 */ "select_item ::= expression AS column_alias",
/* 87 */ "select_item ::= table_name NK_DOT NK_STAR",
/* 88 */ "where_clause_opt ::=",
/* 89 */ "where_clause_opt ::= WHERE search_condition",
/* 90 */ "partition_by_clause_opt ::=",
/* 91 */ "partition_by_clause_opt ::= PARTITION BY expression_list",
/* 92 */ "twindow_clause_opt ::=",
/* 93 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA NK_INTEGER NK_RP",
/* 94 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP column_reference NK_RP",
/* 95 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt",
/* 96 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt",
/* 97 */ "sliding_opt ::=",
/* 98 */ "sliding_opt ::= SLIDING NK_LP duration_literal NK_RP",
/* 99 */ "fill_opt ::=",
/* 100 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP",
/* 101 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP",
/* 102 */ "fill_mode ::= NONE",
/* 103 */ "fill_mode ::= PREV",
/* 104 */ "fill_mode ::= NULL",
/* 105 */ "fill_mode ::= LINEAR",
/* 106 */ "fill_mode ::= NEXT",
/* 107 */ "group_by_clause_opt ::=",
/* 108 */ "group_by_clause_opt ::= GROUP BY group_by_list",
/* 109 */ "group_by_list ::= expression",
/* 110 */ "group_by_list ::= group_by_list NK_COMMA expression",
/* 111 */ "having_clause_opt ::=",
/* 112 */ "having_clause_opt ::= HAVING search_condition",
/* 113 */ "query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt",
/* 114 */ "query_expression_body ::= query_primary",
/* 115 */ "query_expression_body ::= query_expression_body UNION ALL query_expression_body",
/* 116 */ "query_primary ::= query_specification",
/* 117 */ "order_by_clause_opt ::=",
/* 118 */ "order_by_clause_opt ::= ORDER BY sort_specification_list",
/* 119 */ "slimit_clause_opt ::=",
/* 120 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER",
/* 121 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER",
/* 122 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER",
/* 123 */ "limit_clause_opt ::=",
/* 124 */ "limit_clause_opt ::= LIMIT NK_INTEGER",
/* 125 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER",
/* 126 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER",
/* 127 */ "subquery ::= NK_LP query_expression NK_RP",
/* 128 */ "search_condition ::= boolean_value_expression",
/* 129 */ "sort_specification_list ::= sort_specification",
/* 130 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification",
/* 131 */ "sort_specification ::= expression ordering_specification_opt null_ordering_opt",
/* 132 */ "ordering_specification_opt ::=",
/* 133 */ "ordering_specification_opt ::= ASC",
/* 134 */ "ordering_specification_opt ::= DESC",
/* 135 */ "null_ordering_opt ::=",
/* 136 */ "null_ordering_opt ::= NULLS FIRST",
/* 137 */ "null_ordering_opt ::= NULLS LAST",
/* 59 */ "common_expression ::= expression",
/* 60 */ "common_expression ::= boolean_value_expression",
/* 61 */ "from_clause ::= FROM table_reference_list",
/* 62 */ "table_reference_list ::= table_reference",
/* 63 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference",
/* 64 */ "table_reference ::= table_primary",
/* 65 */ "table_reference ::= joined_table",
/* 66 */ "table_primary ::= table_name alias_opt",
/* 67 */ "table_primary ::= db_name NK_DOT table_name alias_opt",
/* 68 */ "table_primary ::= subquery alias_opt",
/* 69 */ "table_primary ::= parenthesized_joined_table",
/* 70 */ "alias_opt ::=",
/* 71 */ "alias_opt ::= table_alias",
/* 72 */ "alias_opt ::= AS table_alias",
/* 73 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP",
/* 74 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP",
/* 75 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition",
/* 76 */ "join_type ::=",
/* 77 */ "join_type ::= INNER",
/* 78 */ "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",
/* 79 */ "set_quantifier_opt ::=",
/* 80 */ "set_quantifier_opt ::= DISTINCT",
/* 81 */ "set_quantifier_opt ::= ALL",
/* 82 */ "select_list ::= NK_STAR",
/* 83 */ "select_list ::= select_sublist",
/* 84 */ "select_sublist ::= select_item",
/* 85 */ "select_sublist ::= select_sublist NK_COMMA select_item",
/* 86 */ "select_item ::= common_expression",
/* 87 */ "select_item ::= common_expression column_alias",
/* 88 */ "select_item ::= common_expression AS column_alias",
/* 89 */ "select_item ::= table_name NK_DOT NK_STAR",
/* 90 */ "where_clause_opt ::=",
/* 91 */ "where_clause_opt ::= WHERE search_condition",
/* 92 */ "partition_by_clause_opt ::=",
/* 93 */ "partition_by_clause_opt ::= PARTITION BY expression_list",
/* 94 */ "twindow_clause_opt ::=",
/* 95 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA NK_INTEGER NK_RP",
/* 96 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP column_reference NK_RP",
/* 97 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt",
/* 98 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt",
/* 99 */ "sliding_opt ::=",
/* 100 */ "sliding_opt ::= SLIDING NK_LP duration_literal NK_RP",
/* 101 */ "fill_opt ::=",
/* 102 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP",
/* 103 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP",
/* 104 */ "fill_mode ::= NONE",
/* 105 */ "fill_mode ::= PREV",
/* 106 */ "fill_mode ::= NULL",
/* 107 */ "fill_mode ::= LINEAR",
/* 108 */ "fill_mode ::= NEXT",
/* 109 */ "group_by_clause_opt ::=",
/* 110 */ "group_by_clause_opt ::= GROUP BY group_by_list",
/* 111 */ "group_by_list ::= expression",
/* 112 */ "group_by_list ::= group_by_list NK_COMMA expression",
/* 113 */ "having_clause_opt ::=",
/* 114 */ "having_clause_opt ::= HAVING search_condition",
/* 115 */ "query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt",
/* 116 */ "query_expression_body ::= query_primary",
/* 117 */ "query_expression_body ::= query_expression_body UNION ALL query_expression_body",
/* 118 */ "query_primary ::= query_specification",
/* 119 */ "order_by_clause_opt ::=",
/* 120 */ "order_by_clause_opt ::= ORDER BY sort_specification_list",
/* 121 */ "slimit_clause_opt ::=",
/* 122 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER",
/* 123 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER",
/* 124 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER",
/* 125 */ "limit_clause_opt ::=",
/* 126 */ "limit_clause_opt ::= LIMIT NK_INTEGER",
/* 127 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER",
/* 128 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER",
/* 129 */ "subquery ::= NK_LP query_expression NK_RP",
/* 130 */ "search_condition ::= common_expression",
/* 131 */ "sort_specification_list ::= sort_specification",
/* 132 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification",
/* 133 */ "sort_specification ::= expression ordering_specification_opt null_ordering_opt",
/* 134 */ "ordering_specification_opt ::=",
/* 135 */ "ordering_specification_opt ::= ASC",
/* 136 */ "ordering_specification_opt ::= DESC",
/* 137 */ "null_ordering_opt ::=",
/* 138 */ "null_ordering_opt ::= NULLS FIRST",
/* 139 */ "null_ordering_opt ::= NULLS LAST",
};
#endif /* NDEBUG */
......@@ -930,40 +940,41 @@ static void yy_destructor(
case 90: /* in_predicate_value */
case 91: /* boolean_value_expression */
case 92: /* boolean_primary */
case 93: /* from_clause */
case 94: /* table_reference_list */
case 95: /* table_reference */
case 96: /* table_primary */
case 97: /* joined_table */
case 99: /* parenthesized_joined_table */
case 101: /* search_condition */
case 102: /* query_specification */
case 105: /* where_clause_opt */
case 107: /* twindow_clause_opt */
case 109: /* having_clause_opt */
case 111: /* select_item */
case 112: /* sliding_opt */
case 113: /* fill_opt */
case 116: /* query_expression_body */
case 118: /* slimit_clause_opt */
case 119: /* limit_clause_opt */
case 120: /* query_primary */
case 122: /* sort_specification */
case 93: /* common_expression */
case 94: /* from_clause */
case 95: /* table_reference_list */
case 96: /* table_reference */
case 97: /* table_primary */
case 98: /* joined_table */
case 100: /* parenthesized_joined_table */
case 102: /* search_condition */
case 103: /* query_specification */
case 106: /* where_clause_opt */
case 108: /* twindow_clause_opt */
case 110: /* having_clause_opt */
case 112: /* select_item */
case 113: /* sliding_opt */
case 114: /* fill_opt */
case 117: /* query_expression_body */
case 119: /* slimit_clause_opt */
case 120: /* limit_clause_opt */
case 121: /* query_primary */
case 123: /* sort_specification */
{
PARSER_DESTRUCTOR_TRACE; nodesDestroyNode((yypminor->yy212));
PARSER_DESTRUCTOR_TRACE; nodesDestroyNode((yypminor->yy56));
}
break;
case 76: /* literal_list */
case 85: /* expression_list */
case 104: /* select_list */
case 106: /* partition_by_clause_opt */
case 108: /* group_by_clause_opt */
case 110: /* select_sublist */
case 115: /* group_by_list */
case 117: /* order_by_clause_opt */
case 121: /* sort_specification_list */
case 105: /* select_list */
case 107: /* partition_by_clause_opt */
case 109: /* group_by_clause_opt */
case 111: /* select_sublist */
case 116: /* group_by_list */
case 118: /* order_by_clause_opt */
case 122: /* sort_specification_list */
{
PARSER_DESTRUCTOR_TRACE; nodesDestroyList((yypminor->yy174));
PARSER_DESTRUCTOR_TRACE; nodesDestroyList((yypminor->yy208));
}
break;
case 77: /* db_name */
......@@ -972,7 +983,7 @@ static void yy_destructor(
case 80: /* function_name */
case 81: /* table_alias */
case 82: /* column_alias */
case 98: /* alias_opt */
case 99: /* alias_opt */
{
PARSER_DESTRUCTOR_TRACE;
}
......@@ -983,27 +994,27 @@ static void yy_destructor(
PARSER_DESTRUCTOR_TRACE;
}
break;
case 100: /* join_type */
case 101: /* join_type */
{
PARSER_DESTRUCTOR_TRACE;
}
break;
case 103: /* set_quantifier_opt */
case 104: /* set_quantifier_opt */
{
PARSER_DESTRUCTOR_TRACE;
}
break;
case 114: /* fill_mode */
case 115: /* fill_mode */
{
PARSER_DESTRUCTOR_TRACE;
}
break;
case 123: /* ordering_specification_opt */
case 124: /* ordering_specification_opt */
{
PARSER_DESTRUCTOR_TRACE;
}
break;
case 124: /* null_ordering_opt */
case 125: /* null_ordering_opt */
{
PARSER_DESTRUCTOR_TRACE;
}
......@@ -1361,85 +1372,87 @@ static const struct {
{ 91, -3 }, /* (56) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */
{ 92, -1 }, /* (57) boolean_primary ::= predicate */
{ 92, -3 }, /* (58) boolean_primary ::= NK_LP boolean_value_expression NK_RP */
{ 93, -2 }, /* (59) from_clause ::= FROM table_reference_list */
{ 94, -1 }, /* (60) table_reference_list ::= table_reference */
{ 94, -3 }, /* (61) table_reference_list ::= table_reference_list NK_COMMA table_reference */
{ 95, -1 }, /* (62) table_reference ::= table_primary */
{ 95, -1 }, /* (63) table_reference ::= joined_table */
{ 96, -2 }, /* (64) table_primary ::= table_name alias_opt */
{ 96, -4 }, /* (65) table_primary ::= db_name NK_DOT table_name alias_opt */
{ 96, -2 }, /* (66) table_primary ::= subquery alias_opt */
{ 96, -1 }, /* (67) table_primary ::= parenthesized_joined_table */
{ 98, 0 }, /* (68) alias_opt ::= */
{ 98, -1 }, /* (69) alias_opt ::= table_alias */
{ 98, -2 }, /* (70) alias_opt ::= AS table_alias */
{ 99, -3 }, /* (71) parenthesized_joined_table ::= NK_LP joined_table NK_RP */
{ 99, -3 }, /* (72) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */
{ 97, -6 }, /* (73) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */
{ 100, 0 }, /* (74) join_type ::= */
{ 100, -1 }, /* (75) join_type ::= INNER */
{ 102, -9 }, /* (76) 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 */
{ 103, 0 }, /* (77) set_quantifier_opt ::= */
{ 103, -1 }, /* (78) set_quantifier_opt ::= DISTINCT */
{ 103, -1 }, /* (79) set_quantifier_opt ::= ALL */
{ 104, -1 }, /* (80) select_list ::= NK_STAR */
{ 104, -1 }, /* (81) select_list ::= select_sublist */
{ 110, -1 }, /* (82) select_sublist ::= select_item */
{ 110, -3 }, /* (83) select_sublist ::= select_sublist NK_COMMA select_item */
{ 111, -1 }, /* (84) select_item ::= expression */
{ 111, -2 }, /* (85) select_item ::= expression column_alias */
{ 111, -3 }, /* (86) select_item ::= expression AS column_alias */
{ 111, -3 }, /* (87) select_item ::= table_name NK_DOT NK_STAR */
{ 105, 0 }, /* (88) where_clause_opt ::= */
{ 105, -2 }, /* (89) where_clause_opt ::= WHERE search_condition */
{ 106, 0 }, /* (90) partition_by_clause_opt ::= */
{ 106, -3 }, /* (91) partition_by_clause_opt ::= PARTITION BY expression_list */
{ 107, 0 }, /* (92) twindow_clause_opt ::= */
{ 107, -6 }, /* (93) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA NK_INTEGER NK_RP */
{ 107, -4 }, /* (94) twindow_clause_opt ::= STATE_WINDOW NK_LP column_reference NK_RP */
{ 107, -6 }, /* (95) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */
{ 107, -8 }, /* (96) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */
{ 112, 0 }, /* (97) sliding_opt ::= */
{ 112, -4 }, /* (98) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */
{ 113, 0 }, /* (99) fill_opt ::= */
{ 113, -4 }, /* (100) fill_opt ::= FILL NK_LP fill_mode NK_RP */
{ 113, -6 }, /* (101) fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */
{ 114, -1 }, /* (102) fill_mode ::= NONE */
{ 114, -1 }, /* (103) fill_mode ::= PREV */
{ 114, -1 }, /* (104) fill_mode ::= NULL */
{ 114, -1 }, /* (105) fill_mode ::= LINEAR */
{ 114, -1 }, /* (106) fill_mode ::= NEXT */
{ 108, 0 }, /* (107) group_by_clause_opt ::= */
{ 108, -3 }, /* (108) group_by_clause_opt ::= GROUP BY group_by_list */
{ 115, -1 }, /* (109) group_by_list ::= expression */
{ 115, -3 }, /* (110) group_by_list ::= group_by_list NK_COMMA expression */
{ 109, 0 }, /* (111) having_clause_opt ::= */
{ 109, -2 }, /* (112) having_clause_opt ::= HAVING search_condition */
{ 73, -4 }, /* (113) query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt */
{ 116, -1 }, /* (114) query_expression_body ::= query_primary */
{ 116, -4 }, /* (115) query_expression_body ::= query_expression_body UNION ALL query_expression_body */
{ 120, -1 }, /* (116) query_primary ::= query_specification */
{ 117, 0 }, /* (117) order_by_clause_opt ::= */
{ 117, -3 }, /* (118) order_by_clause_opt ::= ORDER BY sort_specification_list */
{ 118, 0 }, /* (119) slimit_clause_opt ::= */
{ 118, -2 }, /* (120) slimit_clause_opt ::= SLIMIT NK_INTEGER */
{ 118, -4 }, /* (121) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */
{ 118, -4 }, /* (122) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */
{ 119, 0 }, /* (123) limit_clause_opt ::= */
{ 119, -2 }, /* (124) limit_clause_opt ::= LIMIT NK_INTEGER */
{ 119, -4 }, /* (125) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */
{ 119, -4 }, /* (126) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */
{ 86, -3 }, /* (127) subquery ::= NK_LP query_expression NK_RP */
{ 101, -1 }, /* (128) search_condition ::= boolean_value_expression */
{ 121, -1 }, /* (129) sort_specification_list ::= sort_specification */
{ 121, -3 }, /* (130) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */
{ 122, -3 }, /* (131) sort_specification ::= expression ordering_specification_opt null_ordering_opt */
{ 123, 0 }, /* (132) ordering_specification_opt ::= */
{ 123, -1 }, /* (133) ordering_specification_opt ::= ASC */
{ 123, -1 }, /* (134) ordering_specification_opt ::= DESC */
{ 124, 0 }, /* (135) null_ordering_opt ::= */
{ 124, -2 }, /* (136) null_ordering_opt ::= NULLS FIRST */
{ 124, -2 }, /* (137) null_ordering_opt ::= NULLS LAST */
{ 93, -1 }, /* (59) common_expression ::= expression */
{ 93, -1 }, /* (60) common_expression ::= boolean_value_expression */
{ 94, -2 }, /* (61) from_clause ::= FROM table_reference_list */
{ 95, -1 }, /* (62) table_reference_list ::= table_reference */
{ 95, -3 }, /* (63) table_reference_list ::= table_reference_list NK_COMMA table_reference */
{ 96, -1 }, /* (64) table_reference ::= table_primary */
{ 96, -1 }, /* (65) table_reference ::= joined_table */
{ 97, -2 }, /* (66) table_primary ::= table_name alias_opt */
{ 97, -4 }, /* (67) table_primary ::= db_name NK_DOT table_name alias_opt */
{ 97, -2 }, /* (68) table_primary ::= subquery alias_opt */
{ 97, -1 }, /* (69) table_primary ::= parenthesized_joined_table */
{ 99, 0 }, /* (70) alias_opt ::= */
{ 99, -1 }, /* (71) alias_opt ::= table_alias */
{ 99, -2 }, /* (72) alias_opt ::= AS table_alias */
{ 100, -3 }, /* (73) parenthesized_joined_table ::= NK_LP joined_table NK_RP */
{ 100, -3 }, /* (74) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */
{ 98, -6 }, /* (75) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */
{ 101, 0 }, /* (76) join_type ::= */
{ 101, -1 }, /* (77) join_type ::= INNER */
{ 103, -9 }, /* (78) 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 */
{ 104, 0 }, /* (79) set_quantifier_opt ::= */
{ 104, -1 }, /* (80) set_quantifier_opt ::= DISTINCT */
{ 104, -1 }, /* (81) set_quantifier_opt ::= ALL */
{ 105, -1 }, /* (82) select_list ::= NK_STAR */
{ 105, -1 }, /* (83) select_list ::= select_sublist */
{ 111, -1 }, /* (84) select_sublist ::= select_item */
{ 111, -3 }, /* (85) select_sublist ::= select_sublist NK_COMMA select_item */
{ 112, -1 }, /* (86) select_item ::= common_expression */
{ 112, -2 }, /* (87) select_item ::= common_expression column_alias */
{ 112, -3 }, /* (88) select_item ::= common_expression AS column_alias */
{ 112, -3 }, /* (89) select_item ::= table_name NK_DOT NK_STAR */
{ 106, 0 }, /* (90) where_clause_opt ::= */
{ 106, -2 }, /* (91) where_clause_opt ::= WHERE search_condition */
{ 107, 0 }, /* (92) partition_by_clause_opt ::= */
{ 107, -3 }, /* (93) partition_by_clause_opt ::= PARTITION BY expression_list */
{ 108, 0 }, /* (94) twindow_clause_opt ::= */
{ 108, -6 }, /* (95) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA NK_INTEGER NK_RP */
{ 108, -4 }, /* (96) twindow_clause_opt ::= STATE_WINDOW NK_LP column_reference NK_RP */
{ 108, -6 }, /* (97) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */
{ 108, -8 }, /* (98) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */
{ 113, 0 }, /* (99) sliding_opt ::= */
{ 113, -4 }, /* (100) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */
{ 114, 0 }, /* (101) fill_opt ::= */
{ 114, -4 }, /* (102) fill_opt ::= FILL NK_LP fill_mode NK_RP */
{ 114, -6 }, /* (103) fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */
{ 115, -1 }, /* (104) fill_mode ::= NONE */
{ 115, -1 }, /* (105) fill_mode ::= PREV */
{ 115, -1 }, /* (106) fill_mode ::= NULL */
{ 115, -1 }, /* (107) fill_mode ::= LINEAR */
{ 115, -1 }, /* (108) fill_mode ::= NEXT */
{ 109, 0 }, /* (109) group_by_clause_opt ::= */
{ 109, -3 }, /* (110) group_by_clause_opt ::= GROUP BY group_by_list */
{ 116, -1 }, /* (111) group_by_list ::= expression */
{ 116, -3 }, /* (112) group_by_list ::= group_by_list NK_COMMA expression */
{ 110, 0 }, /* (113) having_clause_opt ::= */
{ 110, -2 }, /* (114) having_clause_opt ::= HAVING search_condition */
{ 73, -4 }, /* (115) query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt */
{ 117, -1 }, /* (116) query_expression_body ::= query_primary */
{ 117, -4 }, /* (117) query_expression_body ::= query_expression_body UNION ALL query_expression_body */
{ 121, -1 }, /* (118) query_primary ::= query_specification */
{ 118, 0 }, /* (119) order_by_clause_opt ::= */
{ 118, -3 }, /* (120) order_by_clause_opt ::= ORDER BY sort_specification_list */
{ 119, 0 }, /* (121) slimit_clause_opt ::= */
{ 119, -2 }, /* (122) slimit_clause_opt ::= SLIMIT NK_INTEGER */
{ 119, -4 }, /* (123) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */
{ 119, -4 }, /* (124) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */
{ 120, 0 }, /* (125) limit_clause_opt ::= */
{ 120, -2 }, /* (126) limit_clause_opt ::= LIMIT NK_INTEGER */
{ 120, -4 }, /* (127) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */
{ 120, -4 }, /* (128) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */
{ 86, -3 }, /* (129) subquery ::= NK_LP query_expression NK_RP */
{ 102, -1 }, /* (130) search_condition ::= common_expression */
{ 122, -1 }, /* (131) sort_specification_list ::= sort_specification */
{ 122, -3 }, /* (132) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */
{ 123, -3 }, /* (133) sort_specification ::= expression ordering_specification_opt null_ordering_opt */
{ 124, 0 }, /* (134) ordering_specification_opt ::= */
{ 124, -1 }, /* (135) ordering_specification_opt ::= ASC */
{ 124, -1 }, /* (136) ordering_specification_opt ::= DESC */
{ 125, 0 }, /* (137) null_ordering_opt ::= */
{ 125, -2 }, /* (138) null_ordering_opt ::= NULLS FIRST */
{ 125, -2 }, /* (139) null_ordering_opt ::= NULLS LAST */
};
static void yy_accept(yyParser*); /* Forward Declaration */
......@@ -1530,27 +1543,27 @@ static YYACTIONTYPE yy_reduce(
{ PARSER_TRACE; createShowStmt(pCxt, SHOW_TYPE_DATABASE); }
break;
case 1: /* cmd ::= query_expression */
{ PARSER_TRACE; pCxt->pRootNode = yymsp[0].minor.yy212; }
{ PARSER_TRACE; pCxt->pRootNode = yymsp[0].minor.yy56; }
break;
case 2: /* literal ::= NK_INTEGER */
{ PARSER_TRACE; yylhsminor.yy212 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); }
yymsp[0].minor.yy212 = yylhsminor.yy212;
{ PARSER_TRACE; yylhsminor.yy56 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); }
yymsp[0].minor.yy56 = yylhsminor.yy56;
break;
case 3: /* literal ::= NK_FLOAT */
{ PARSER_TRACE; yylhsminor.yy212 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); }
yymsp[0].minor.yy212 = yylhsminor.yy212;
{ PARSER_TRACE; yylhsminor.yy56 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); }
yymsp[0].minor.yy56 = yylhsminor.yy56;
break;
case 4: /* literal ::= NK_STRING */
{ PARSER_TRACE; yylhsminor.yy212 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); }
yymsp[0].minor.yy212 = yylhsminor.yy212;
{ PARSER_TRACE; yylhsminor.yy56 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); }
yymsp[0].minor.yy56 = yylhsminor.yy56;
break;
case 5: /* literal ::= NK_BOOL */
{ PARSER_TRACE; yylhsminor.yy212 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); }
yymsp[0].minor.yy212 = yylhsminor.yy212;
{ PARSER_TRACE; yylhsminor.yy56 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); }
yymsp[0].minor.yy56 = yylhsminor.yy56;
break;
case 6: /* literal ::= TIMESTAMP NK_STRING */
{ PARSER_TRACE; yylhsminor.yy212 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); }
yymsp[-1].minor.yy212 = yylhsminor.yy212;
{ PARSER_TRACE; yylhsminor.yy56 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); }
yymsp[-1].minor.yy56 = yylhsminor.yy56;
break;
case 7: /* literal ::= duration_literal */
case 17: /* expression ::= literal */ yytestcase(yyruleno==17);
......@@ -1558,29 +1571,28 @@ static YYACTIONTYPE yy_reduce(
case 21: /* expression ::= subquery */ yytestcase(yyruleno==21);
case 53: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==53);
case 57: /* boolean_primary ::= predicate */ yytestcase(yyruleno==57);
case 60: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==60);
case 62: /* table_reference ::= table_primary */ yytestcase(yyruleno==62);
case 63: /* table_reference ::= joined_table */ yytestcase(yyruleno==63);
case 67: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==67);
case 114: /* query_expression_body ::= query_primary */ yytestcase(yyruleno==114);
case 116: /* query_primary ::= query_specification */ yytestcase(yyruleno==116);
case 128: /* search_condition ::= boolean_value_expression */ yytestcase(yyruleno==128);
{ PARSER_TRACE; yylhsminor.yy212 = yymsp[0].minor.yy212; }
yymsp[0].minor.yy212 = yylhsminor.yy212;
case 62: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==62);
case 64: /* table_reference ::= table_primary */ yytestcase(yyruleno==64);
case 65: /* table_reference ::= joined_table */ yytestcase(yyruleno==65);
case 69: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==69);
case 116: /* query_expression_body ::= query_primary */ yytestcase(yyruleno==116);
case 118: /* query_primary ::= query_specification */ yytestcase(yyruleno==118);
{ PARSER_TRACE; yylhsminor.yy56 = yymsp[0].minor.yy56; }
yymsp[0].minor.yy56 = yylhsminor.yy56;
break;
case 8: /* duration_literal ::= NK_VARIABLE */
{ PARSER_TRACE; yylhsminor.yy212 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); }
yymsp[0].minor.yy212 = yylhsminor.yy212;
{ PARSER_TRACE; yylhsminor.yy56 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); }
yymsp[0].minor.yy56 = yylhsminor.yy56;
break;
case 9: /* literal_list ::= literal */
case 30: /* expression_list ::= expression */ yytestcase(yyruleno==30);
{ PARSER_TRACE; yylhsminor.yy174 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy212)); }
yymsp[0].minor.yy174 = yylhsminor.yy174;
{ PARSER_TRACE; yylhsminor.yy208 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy56)); }
yymsp[0].minor.yy208 = yylhsminor.yy208;
break;
case 10: /* literal_list ::= literal_list NK_COMMA literal */
case 31: /* expression_list ::= expression_list NK_COMMA expression */ yytestcase(yyruleno==31);
{ PARSER_TRACE; yylhsminor.yy174 = addNodeToList(pCxt, yymsp[-2].minor.yy174, releaseRawExprNode(pCxt, yymsp[0].minor.yy212)); }
yymsp[-2].minor.yy174 = yylhsminor.yy174;
{ PARSER_TRACE; yylhsminor.yy208 = addNodeToList(pCxt, yymsp[-2].minor.yy208, releaseRawExprNode(pCxt, yymsp[0].minor.yy56)); }
yymsp[-2].minor.yy208 = yylhsminor.yy208;
break;
case 11: /* db_name ::= NK_ID */
case 12: /* table_name ::= NK_ID */ yytestcase(yyruleno==12);
......@@ -1588,380 +1600,425 @@ static YYACTIONTYPE yy_reduce(
case 14: /* function_name ::= NK_ID */ yytestcase(yyruleno==14);
case 15: /* table_alias ::= NK_ID */ yytestcase(yyruleno==15);
case 16: /* column_alias ::= NK_ID */ yytestcase(yyruleno==16);
{ PARSER_TRACE; yylhsminor.yy79 = yymsp[0].minor.yy0; }
yymsp[0].minor.yy79 = yylhsminor.yy79;
{ PARSER_TRACE; yylhsminor.yy29 = yymsp[0].minor.yy0; }
yymsp[0].minor.yy29 = yylhsminor.yy29;
break;
case 19: /* expression ::= function_name NK_LP expression_list NK_RP */
{ PARSER_TRACE; yylhsminor.yy212 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy79, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy79, yymsp[-1].minor.yy174)); }
yymsp[-3].minor.yy212 = yylhsminor.yy212;
{ PARSER_TRACE; yylhsminor.yy56 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy29, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy29, yymsp[-1].minor.yy208)); }
yymsp[-3].minor.yy56 = yylhsminor.yy56;
break;
case 20: /* expression ::= function_name NK_LP NK_STAR NK_RP */
{ PARSER_TRACE; yylhsminor.yy212 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy79, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy79, createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[-1].minor.yy0)))); }
yymsp[-3].minor.yy212 = yylhsminor.yy212;
{ PARSER_TRACE; yylhsminor.yy56 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy29, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy29, createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[-1].minor.yy0)))); }
yymsp[-3].minor.yy56 = yylhsminor.yy56;
break;
case 22: /* expression ::= NK_LP expression NK_RP */
{ PARSER_TRACE; yylhsminor.yy212 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy212)); }
yymsp[-2].minor.yy212 = yylhsminor.yy212;
case 58: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==58);
{ PARSER_TRACE; yylhsminor.yy56 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy56)); }
yymsp[-2].minor.yy56 = yylhsminor.yy56;
break;
case 23: /* expression ::= NK_PLUS expression */
{
PARSER_TRACE;
SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy212);
yylhsminor.yy212 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy212));
SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy56);
yylhsminor.yy56 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy56));
}
yymsp[-1].minor.yy212 = yylhsminor.yy212;
yymsp[-1].minor.yy56 = yylhsminor.yy56;
break;
case 24: /* expression ::= NK_MINUS expression */
{
PARSER_TRACE;
SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy212);
yylhsminor.yy212 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[0].minor.yy212), NULL));
SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy56);
yylhsminor.yy56 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[0].minor.yy56), NULL));
}
yymsp[-1].minor.yy212 = yylhsminor.yy212;
yymsp[-1].minor.yy56 = yylhsminor.yy56;
break;
case 25: /* expression ::= expression NK_PLUS expression */
{
PARSER_TRACE;
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy212);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy212);
yylhsminor.yy212 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy212), releaseRawExprNode(pCxt, yymsp[0].minor.yy212)));
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy56);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy56);
yylhsminor.yy56 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy56), releaseRawExprNode(pCxt, yymsp[0].minor.yy56)));
}
yymsp[-2].minor.yy212 = yylhsminor.yy212;
yymsp[-2].minor.yy56 = yylhsminor.yy56;
break;
case 26: /* expression ::= expression NK_MINUS expression */
{
PARSER_TRACE;
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy212);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy212);
yylhsminor.yy212 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy212), releaseRawExprNode(pCxt, yymsp[0].minor.yy212)));
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy56);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy56);
yylhsminor.yy56 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy56), releaseRawExprNode(pCxt, yymsp[0].minor.yy56)));
}
yymsp[-2].minor.yy212 = yylhsminor.yy212;
yymsp[-2].minor.yy56 = yylhsminor.yy56;
break;
case 27: /* expression ::= expression NK_STAR expression */
{
PARSER_TRACE;
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy212);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy212);
yylhsminor.yy212 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy212), releaseRawExprNode(pCxt, yymsp[0].minor.yy212)));
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy56);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy56);
yylhsminor.yy56 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy56), releaseRawExprNode(pCxt, yymsp[0].minor.yy56)));
}
yymsp[-2].minor.yy212 = yylhsminor.yy212;
yymsp[-2].minor.yy56 = yylhsminor.yy56;
break;
case 28: /* expression ::= expression NK_SLASH expression */
{
PARSER_TRACE;
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy212);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy212);
yylhsminor.yy212 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy212), releaseRawExprNode(pCxt, yymsp[0].minor.yy212)));
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy56);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy56);
yylhsminor.yy56 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy56), releaseRawExprNode(pCxt, yymsp[0].minor.yy56)));
}
yymsp[-2].minor.yy212 = yylhsminor.yy212;
yymsp[-2].minor.yy56 = yylhsminor.yy56;
break;
case 29: /* expression ::= expression NK_REM expression */
{
PARSER_TRACE;
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy212);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy212);
yylhsminor.yy212 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MOD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy212), releaseRawExprNode(pCxt, yymsp[0].minor.yy212)));
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy56);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy56);
yylhsminor.yy56 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MOD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy56), releaseRawExprNode(pCxt, yymsp[0].minor.yy56)));
}
yymsp[-2].minor.yy212 = yylhsminor.yy212;
yymsp[-2].minor.yy56 = yylhsminor.yy56;
break;
case 32: /* column_reference ::= column_name */
{ PARSER_TRACE; yylhsminor.yy212 = createRawExprNode(pCxt, &yymsp[0].minor.yy79, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy79)); }
yymsp[0].minor.yy212 = yylhsminor.yy212;
{ PARSER_TRACE; yylhsminor.yy56 = createRawExprNode(pCxt, &yymsp[0].minor.yy29, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy29)); }
yymsp[0].minor.yy56 = yylhsminor.yy56;
break;
case 33: /* column_reference ::= table_name NK_DOT column_name */
{ PARSER_TRACE; yylhsminor.yy212 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy79, &yymsp[0].minor.yy79, createColumnNode(pCxt, &yymsp[-2].minor.yy79, &yymsp[0].minor.yy79)); }
yymsp[-2].minor.yy212 = yylhsminor.yy212;
{ PARSER_TRACE; yylhsminor.yy56 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy29, &yymsp[0].minor.yy29, createColumnNode(pCxt, &yymsp[-2].minor.yy29, &yymsp[0].minor.yy29)); }
yymsp[-2].minor.yy56 = yylhsminor.yy56;
break;
case 34: /* predicate ::= expression compare_op expression */
{ PARSER_TRACE; yylhsminor.yy212 = createOperatorNode(pCxt, yymsp[-1].minor.yy40, releaseRawExprNode(pCxt, yymsp[-2].minor.yy212), releaseRawExprNode(pCxt, yymsp[0].minor.yy212)); }
yymsp[-2].minor.yy212 = yylhsminor.yy212;
case 39: /* predicate ::= expression in_op in_predicate_value */ yytestcase(yyruleno==39);
{
PARSER_TRACE;
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy56);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy56);
yylhsminor.yy56 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy128, releaseRawExprNode(pCxt, yymsp[-2].minor.yy56), releaseRawExprNode(pCxt, yymsp[0].minor.yy56)));
}
yymsp[-2].minor.yy56 = yylhsminor.yy56;
break;
case 35: /* predicate ::= expression BETWEEN expression AND expression */
{ PARSER_TRACE; yylhsminor.yy212 = createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy212), releaseRawExprNode(pCxt, yymsp[-2].minor.yy212), releaseRawExprNode(pCxt, yymsp[0].minor.yy212)); }
yymsp[-4].minor.yy212 = yylhsminor.yy212;
{
PARSER_TRACE;
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy56);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy56);
yylhsminor.yy56 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy56), releaseRawExprNode(pCxt, yymsp[-2].minor.yy56), releaseRawExprNode(pCxt, yymsp[0].minor.yy56)));
}
yymsp[-4].minor.yy56 = yylhsminor.yy56;
break;
case 36: /* predicate ::= expression NOT BETWEEN expression AND expression */
{ PARSER_TRACE; yylhsminor.yy212 = createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy212), releaseRawExprNode(pCxt, yymsp[-5].minor.yy212), releaseRawExprNode(pCxt, yymsp[0].minor.yy212)); }
yymsp[-5].minor.yy212 = yylhsminor.yy212;
{
PARSER_TRACE;
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy56);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy56);
yylhsminor.yy56 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy56), releaseRawExprNode(pCxt, yymsp[-5].minor.yy56), releaseRawExprNode(pCxt, yymsp[0].minor.yy56)));
}
yymsp[-5].minor.yy56 = yylhsminor.yy56;
break;
case 37: /* predicate ::= expression IS NULL */
{ PARSER_TRACE; yylhsminor.yy212 = createIsNullCondNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy212), true); }
yymsp[-2].minor.yy212 = yylhsminor.yy212;
{
PARSER_TRACE;
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy56);
yylhsminor.yy56 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createIsNullCondNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy56), true));
}
yymsp[-2].minor.yy56 = yylhsminor.yy56;
break;
case 38: /* predicate ::= expression IS NOT NULL */
{ PARSER_TRACE; yylhsminor.yy212 = createIsNullCondNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy212), false); }
yymsp[-3].minor.yy212 = yylhsminor.yy212;
break;
case 39: /* predicate ::= expression in_op in_predicate_value */
{ PARSER_TRACE; yylhsminor.yy212 = createOperatorNode(pCxt, yymsp[-1].minor.yy40, releaseRawExprNode(pCxt, yymsp[-2].minor.yy212), yymsp[0].minor.yy212); }
yymsp[-2].minor.yy212 = yylhsminor.yy212;
{
PARSER_TRACE;
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy56);
yylhsminor.yy56 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createIsNullCondNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy56), false));
}
yymsp[-3].minor.yy56 = yylhsminor.yy56;
break;
case 40: /* compare_op ::= NK_LT */
{ PARSER_TRACE; yymsp[0].minor.yy40 = OP_TYPE_LOWER_THAN; }
{ PARSER_TRACE; yymsp[0].minor.yy128 = OP_TYPE_LOWER_THAN; }
break;
case 41: /* compare_op ::= NK_GT */
{ PARSER_TRACE; yymsp[0].minor.yy40 = OP_TYPE_GREATER_THAN; }
{ PARSER_TRACE; yymsp[0].minor.yy128 = OP_TYPE_GREATER_THAN; }
break;
case 42: /* compare_op ::= NK_LE */
{ PARSER_TRACE; yymsp[0].minor.yy40 = OP_TYPE_LOWER_EQUAL; }
{ PARSER_TRACE; yymsp[0].minor.yy128 = OP_TYPE_LOWER_EQUAL; }
break;
case 43: /* compare_op ::= NK_GE */
{ PARSER_TRACE; yymsp[0].minor.yy40 = OP_TYPE_GREATER_EQUAL; }
{ PARSER_TRACE; yymsp[0].minor.yy128 = OP_TYPE_GREATER_EQUAL; }
break;
case 44: /* compare_op ::= NK_NE */
{ PARSER_TRACE; yymsp[0].minor.yy40 = OP_TYPE_NOT_EQUAL; }
{ PARSER_TRACE; yymsp[0].minor.yy128 = OP_TYPE_NOT_EQUAL; }
break;
case 45: /* compare_op ::= NK_EQ */
{ PARSER_TRACE; yymsp[0].minor.yy40 = OP_TYPE_EQUAL; }
{ PARSER_TRACE; yymsp[0].minor.yy128 = OP_TYPE_EQUAL; }
break;
case 46: /* compare_op ::= LIKE */
{ PARSER_TRACE; yymsp[0].minor.yy40 = OP_TYPE_LIKE; }
{ PARSER_TRACE; yymsp[0].minor.yy128 = OP_TYPE_LIKE; }
break;
case 47: /* compare_op ::= NOT LIKE */
{ PARSER_TRACE; yymsp[-1].minor.yy40 = OP_TYPE_NOT_LIKE; }
{ PARSER_TRACE; yymsp[-1].minor.yy128 = OP_TYPE_NOT_LIKE; }
break;
case 48: /* compare_op ::= MATCH */
{ PARSER_TRACE; yymsp[0].minor.yy40 = OP_TYPE_MATCH; }
{ PARSER_TRACE; yymsp[0].minor.yy128 = OP_TYPE_MATCH; }
break;
case 49: /* compare_op ::= NMATCH */
{ PARSER_TRACE; yymsp[0].minor.yy40 = OP_TYPE_NMATCH; }
{ PARSER_TRACE; yymsp[0].minor.yy128 = OP_TYPE_NMATCH; }
break;
case 50: /* in_op ::= IN */
{ PARSER_TRACE; yymsp[0].minor.yy40 = OP_TYPE_IN; }
{ PARSER_TRACE; yymsp[0].minor.yy128 = OP_TYPE_IN; }
break;
case 51: /* in_op ::= NOT IN */
{ PARSER_TRACE; yymsp[-1].minor.yy40 = OP_TYPE_NOT_IN; }
{ PARSER_TRACE; yymsp[-1].minor.yy128 = OP_TYPE_NOT_IN; }
break;
case 52: /* in_predicate_value ::= NK_LP expression_list NK_RP */
{ PARSER_TRACE; yymsp[-2].minor.yy212 = createNodeListNode(pCxt, yymsp[-1].minor.yy174); }
{ PARSER_TRACE; yylhsminor.yy56 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy208)); }
yymsp[-2].minor.yy56 = yylhsminor.yy56;
break;
case 54: /* boolean_value_expression ::= NOT boolean_primary */
{ PARSER_TRACE; yymsp[-1].minor.yy212 = createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, yymsp[0].minor.yy212, NULL); }
{
PARSER_TRACE;
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy56);
yylhsminor.yy56 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy56), NULL));
}
yymsp[-1].minor.yy56 = yylhsminor.yy56;
break;
case 55: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */
{ PARSER_TRACE; yylhsminor.yy212 = createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, yymsp[-2].minor.yy212, yymsp[0].minor.yy212); }
yymsp[-2].minor.yy212 = yylhsminor.yy212;
{
PARSER_TRACE;
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy56);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy56);
yylhsminor.yy56 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy56), releaseRawExprNode(pCxt, yymsp[0].minor.yy56)));
}
yymsp[-2].minor.yy56 = yylhsminor.yy56;
break;
case 56: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */
{ PARSER_TRACE; yylhsminor.yy212 = createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, yymsp[-2].minor.yy212, yymsp[0].minor.yy212); }
yymsp[-2].minor.yy212 = yylhsminor.yy212;
{
PARSER_TRACE;
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy56);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy56);
yylhsminor.yy56 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy56), releaseRawExprNode(pCxt, yymsp[0].minor.yy56)));
}
yymsp[-2].minor.yy56 = yylhsminor.yy56;
break;
case 59: /* common_expression ::= expression */
case 60: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==60);
{ yylhsminor.yy56 = yymsp[0].minor.yy56; }
yymsp[0].minor.yy56 = yylhsminor.yy56;
break;
case 58: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */
case 71: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ yytestcase(yyruleno==71);
case 72: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==72);
{ PARSER_TRACE; yymsp[-2].minor.yy212 = yymsp[-1].minor.yy212; }
case 61: /* from_clause ::= FROM table_reference_list */
case 91: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==91);
case 114: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==114);
{ PARSER_TRACE; yymsp[-1].minor.yy56 = yymsp[0].minor.yy56; }
break;
case 59: /* from_clause ::= FROM table_reference_list */
case 89: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==89);
case 112: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==112);
{ PARSER_TRACE; yymsp[-1].minor.yy212 = yymsp[0].minor.yy212; }
case 63: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */
{ PARSER_TRACE; yylhsminor.yy56 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy56, yymsp[0].minor.yy56, NULL); }
yymsp[-2].minor.yy56 = yylhsminor.yy56;
break;
case 61: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */
{ PARSER_TRACE; yylhsminor.yy212 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy212, yymsp[0].minor.yy212, NULL); }
yymsp[-2].minor.yy212 = yylhsminor.yy212;
case 66: /* table_primary ::= table_name alias_opt */
{ PARSER_TRACE; yylhsminor.yy56 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy29, &yymsp[0].minor.yy29); }
yymsp[-1].minor.yy56 = yylhsminor.yy56;
break;
case 64: /* table_primary ::= table_name alias_opt */
{ PARSER_TRACE; yylhsminor.yy212 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy79, &yymsp[0].minor.yy79); }
yymsp[-1].minor.yy212 = yylhsminor.yy212;
case 67: /* table_primary ::= db_name NK_DOT table_name alias_opt */
{ PARSER_TRACE; yylhsminor.yy56 = createRealTableNode(pCxt, &yymsp[-3].minor.yy29, &yymsp[-1].minor.yy29, &yymsp[0].minor.yy29); }
yymsp[-3].minor.yy56 = yylhsminor.yy56;
break;
case 65: /* table_primary ::= db_name NK_DOT table_name alias_opt */
{ PARSER_TRACE; yylhsminor.yy212 = createRealTableNode(pCxt, &yymsp[-3].minor.yy79, &yymsp[-1].minor.yy79, &yymsp[0].minor.yy79); }
yymsp[-3].minor.yy212 = yylhsminor.yy212;
case 68: /* table_primary ::= subquery alias_opt */
{ PARSER_TRACE; yylhsminor.yy56 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy56), &yymsp[0].minor.yy29); }
yymsp[-1].minor.yy56 = yylhsminor.yy56;
break;
case 66: /* table_primary ::= subquery alias_opt */
{ PARSER_TRACE; yylhsminor.yy212 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy212), &yymsp[0].minor.yy79); }
yymsp[-1].minor.yy212 = yylhsminor.yy212;
case 70: /* alias_opt ::= */
{ PARSER_TRACE; yymsp[1].minor.yy29 = nil_token; }
break;
case 68: /* alias_opt ::= */
{ PARSER_TRACE; yymsp[1].minor.yy79 = nil_token; }
case 71: /* alias_opt ::= table_alias */
{ PARSER_TRACE; yylhsminor.yy29 = yymsp[0].minor.yy29; }
yymsp[0].minor.yy29 = yylhsminor.yy29;
break;
case 69: /* alias_opt ::= table_alias */
{ PARSER_TRACE; yylhsminor.yy79 = yymsp[0].minor.yy79; }
yymsp[0].minor.yy79 = yylhsminor.yy79;
case 72: /* alias_opt ::= AS table_alias */
{ PARSER_TRACE; yymsp[-1].minor.yy29 = yymsp[0].minor.yy29; }
break;
case 70: /* alias_opt ::= AS table_alias */
{ PARSER_TRACE; yymsp[-1].minor.yy79 = yymsp[0].minor.yy79; }
case 73: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */
case 74: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==74);
{ PARSER_TRACE; yymsp[-2].minor.yy56 = yymsp[-1].minor.yy56; }
break;
case 73: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */
{ PARSER_TRACE; yylhsminor.yy212 = createJoinTableNode(pCxt, yymsp[-4].minor.yy162, yymsp[-5].minor.yy212, yymsp[-2].minor.yy212, yymsp[0].minor.yy212); }
yymsp[-5].minor.yy212 = yylhsminor.yy212;
case 75: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */
{ PARSER_TRACE; yylhsminor.yy56 = createJoinTableNode(pCxt, yymsp[-4].minor.yy36, yymsp[-5].minor.yy56, yymsp[-2].minor.yy56, yymsp[0].minor.yy56); }
yymsp[-5].minor.yy56 = yylhsminor.yy56;
break;
case 74: /* join_type ::= */
{ PARSER_TRACE; yymsp[1].minor.yy162 = JOIN_TYPE_INNER; }
case 76: /* join_type ::= */
{ PARSER_TRACE; yymsp[1].minor.yy36 = JOIN_TYPE_INNER; }
break;
case 75: /* join_type ::= INNER */
{ PARSER_TRACE; yymsp[0].minor.yy162 = JOIN_TYPE_INNER; }
case 77: /* join_type ::= INNER */
{ PARSER_TRACE; yymsp[0].minor.yy36 = JOIN_TYPE_INNER; }
break;
case 76: /* 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 78: /* 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 */
{
PARSER_TRACE;
yymsp[-8].minor.yy212 = createSelectStmt(pCxt, yymsp[-7].minor.yy237, yymsp[-6].minor.yy174, yymsp[-5].minor.yy212);
yymsp[-8].minor.yy212 = addWhereClause(pCxt, yymsp[-8].minor.yy212, yymsp[-4].minor.yy212);
yymsp[-8].minor.yy212 = addPartitionByClause(pCxt, yymsp[-8].minor.yy212, yymsp[-3].minor.yy174);
yymsp[-8].minor.yy212 = addWindowClauseClause(pCxt, yymsp[-8].minor.yy212, yymsp[-2].minor.yy212);
yymsp[-8].minor.yy212 = addGroupByClause(pCxt, yymsp[-8].minor.yy212, yymsp[-1].minor.yy174);
yymsp[-8].minor.yy212 = addHavingClause(pCxt, yymsp[-8].minor.yy212, yymsp[0].minor.yy212);
yymsp[-8].minor.yy56 = createSelectStmt(pCxt, yymsp[-7].minor.yy173, yymsp[-6].minor.yy208, yymsp[-5].minor.yy56);
yymsp[-8].minor.yy56 = addWhereClause(pCxt, yymsp[-8].minor.yy56, yymsp[-4].minor.yy56);
yymsp[-8].minor.yy56 = addPartitionByClause(pCxt, yymsp[-8].minor.yy56, yymsp[-3].minor.yy208);
yymsp[-8].minor.yy56 = addWindowClauseClause(pCxt, yymsp[-8].minor.yy56, yymsp[-2].minor.yy56);
yymsp[-8].minor.yy56 = addGroupByClause(pCxt, yymsp[-8].minor.yy56, yymsp[-1].minor.yy208);
yymsp[-8].minor.yy56 = addHavingClause(pCxt, yymsp[-8].minor.yy56, yymsp[0].minor.yy56);
}
break;
case 77: /* set_quantifier_opt ::= */
{ PARSER_TRACE; yymsp[1].minor.yy237 = false; }
case 79: /* set_quantifier_opt ::= */
{ PARSER_TRACE; yymsp[1].minor.yy173 = false; }
break;
case 78: /* set_quantifier_opt ::= DISTINCT */
{ PARSER_TRACE; yymsp[0].minor.yy237 = true; }
case 80: /* set_quantifier_opt ::= DISTINCT */
{ PARSER_TRACE; yymsp[0].minor.yy173 = true; }
break;
case 79: /* set_quantifier_opt ::= ALL */
{ PARSER_TRACE; yymsp[0].minor.yy237 = false; }
case 81: /* set_quantifier_opt ::= ALL */
{ PARSER_TRACE; yymsp[0].minor.yy173 = false; }
break;
case 80: /* select_list ::= NK_STAR */
{ PARSER_TRACE; yymsp[0].minor.yy174 = NULL; }
case 82: /* select_list ::= NK_STAR */
{ PARSER_TRACE; yymsp[0].minor.yy208 = NULL; }
break;
case 81: /* select_list ::= select_sublist */
{ PARSER_TRACE; yylhsminor.yy174 = yymsp[0].minor.yy174; }
yymsp[0].minor.yy174 = yylhsminor.yy174;
case 83: /* select_list ::= select_sublist */
{ PARSER_TRACE; yylhsminor.yy208 = yymsp[0].minor.yy208; }
yymsp[0].minor.yy208 = yylhsminor.yy208;
break;
case 82: /* select_sublist ::= select_item */
case 129: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==129);
{ PARSER_TRACE; yylhsminor.yy174 = createNodeList(pCxt, yymsp[0].minor.yy212); }
yymsp[0].minor.yy174 = yylhsminor.yy174;
case 84: /* select_sublist ::= select_item */
case 131: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==131);
{ PARSER_TRACE; yylhsminor.yy208 = createNodeList(pCxt, yymsp[0].minor.yy56); }
yymsp[0].minor.yy208 = yylhsminor.yy208;
break;
case 83: /* select_sublist ::= select_sublist NK_COMMA select_item */
case 130: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==130);
{ PARSER_TRACE; yylhsminor.yy174 = addNodeToList(pCxt, yymsp[-2].minor.yy174, yymsp[0].minor.yy212); }
yymsp[-2].minor.yy174 = yylhsminor.yy174;
case 85: /* select_sublist ::= select_sublist NK_COMMA select_item */
case 132: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==132);
{ PARSER_TRACE; yylhsminor.yy208 = addNodeToList(pCxt, yymsp[-2].minor.yy208, yymsp[0].minor.yy56); }
yymsp[-2].minor.yy208 = yylhsminor.yy208;
break;
case 84: /* select_item ::= expression */
case 86: /* select_item ::= common_expression */
{
PARSER_TRACE;
SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy212);
yylhsminor.yy212 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy212), &t);
SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy56);
yylhsminor.yy56 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy56), &t);
}
yymsp[0].minor.yy212 = yylhsminor.yy212;
yymsp[0].minor.yy56 = yylhsminor.yy56;
break;
case 85: /* select_item ::= expression column_alias */
{ PARSER_TRACE; yylhsminor.yy212 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy212), &yymsp[0].minor.yy79); }
yymsp[-1].minor.yy212 = yylhsminor.yy212;
case 87: /* select_item ::= common_expression column_alias */
{ PARSER_TRACE; yylhsminor.yy56 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy56), &yymsp[0].minor.yy29); }
yymsp[-1].minor.yy56 = yylhsminor.yy56;
break;
case 86: /* select_item ::= expression AS column_alias */
{ PARSER_TRACE; yylhsminor.yy212 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy212), &yymsp[0].minor.yy79); }
yymsp[-2].minor.yy212 = yylhsminor.yy212;
case 88: /* select_item ::= common_expression AS column_alias */
{ PARSER_TRACE; yylhsminor.yy56 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy56), &yymsp[0].minor.yy29); }
yymsp[-2].minor.yy56 = yylhsminor.yy56;
break;
case 87: /* select_item ::= table_name NK_DOT NK_STAR */
{ PARSER_TRACE; yylhsminor.yy212 = createColumnNode(pCxt, &yymsp[-2].minor.yy79, &yymsp[0].minor.yy0); }
yymsp[-2].minor.yy212 = yylhsminor.yy212;
case 89: /* select_item ::= table_name NK_DOT NK_STAR */
{ PARSER_TRACE; yylhsminor.yy56 = createColumnNode(pCxt, &yymsp[-2].minor.yy29, &yymsp[0].minor.yy0); }
yymsp[-2].minor.yy56 = yylhsminor.yy56;
break;
case 88: /* where_clause_opt ::= */
case 92: /* twindow_clause_opt ::= */ yytestcase(yyruleno==92);
case 97: /* sliding_opt ::= */ yytestcase(yyruleno==97);
case 99: /* fill_opt ::= */ yytestcase(yyruleno==99);
case 111: /* having_clause_opt ::= */ yytestcase(yyruleno==111);
case 119: /* slimit_clause_opt ::= */ yytestcase(yyruleno==119);
case 123: /* limit_clause_opt ::= */ yytestcase(yyruleno==123);
{ PARSER_TRACE; yymsp[1].minor.yy212 = NULL; }
case 90: /* where_clause_opt ::= */
case 94: /* twindow_clause_opt ::= */ yytestcase(yyruleno==94);
case 99: /* sliding_opt ::= */ yytestcase(yyruleno==99);
case 101: /* fill_opt ::= */ yytestcase(yyruleno==101);
case 113: /* having_clause_opt ::= */ yytestcase(yyruleno==113);
case 121: /* slimit_clause_opt ::= */ yytestcase(yyruleno==121);
case 125: /* limit_clause_opt ::= */ yytestcase(yyruleno==125);
{ PARSER_TRACE; yymsp[1].minor.yy56 = NULL; }
break;
case 90: /* partition_by_clause_opt ::= */
case 107: /* group_by_clause_opt ::= */ yytestcase(yyruleno==107);
case 117: /* order_by_clause_opt ::= */ yytestcase(yyruleno==117);
{ PARSER_TRACE; yymsp[1].minor.yy174 = NULL; }
case 92: /* partition_by_clause_opt ::= */
case 109: /* group_by_clause_opt ::= */ yytestcase(yyruleno==109);
case 119: /* order_by_clause_opt ::= */ yytestcase(yyruleno==119);
{ PARSER_TRACE; yymsp[1].minor.yy208 = NULL; }
break;
case 91: /* partition_by_clause_opt ::= PARTITION BY expression_list */
case 108: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==108);
case 118: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==118);
{ PARSER_TRACE; yymsp[-2].minor.yy174 = yymsp[0].minor.yy174; }
case 93: /* partition_by_clause_opt ::= PARTITION BY expression_list */
case 110: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==110);
case 120: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==120);
{ PARSER_TRACE; yymsp[-2].minor.yy208 = yymsp[0].minor.yy208; }
break;
case 93: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA NK_INTEGER NK_RP */
{ PARSER_TRACE; yymsp[-5].minor.yy212 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy212), &yymsp[-1].minor.yy0); }
case 95: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA NK_INTEGER NK_RP */
{ PARSER_TRACE; yymsp[-5].minor.yy56 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy56), &yymsp[-1].minor.yy0); }
break;
case 94: /* twindow_clause_opt ::= STATE_WINDOW NK_LP column_reference NK_RP */
{ PARSER_TRACE; yymsp[-3].minor.yy212 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy212)); }
case 96: /* twindow_clause_opt ::= STATE_WINDOW NK_LP column_reference NK_RP */
{ PARSER_TRACE; yymsp[-3].minor.yy56 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy56)); }
break;
case 95: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */
{ PARSER_TRACE; yymsp[-5].minor.yy212 = createIntervalWindowNode(pCxt, yymsp[-3].minor.yy212, NULL, yymsp[-1].minor.yy212, yymsp[0].minor.yy212); }
case 97: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */
{ PARSER_TRACE; yymsp[-5].minor.yy56 = createIntervalWindowNode(pCxt, yymsp[-3].minor.yy56, NULL, yymsp[-1].minor.yy56, yymsp[0].minor.yy56); }
break;
case 96: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */
{ PARSER_TRACE; yymsp[-7].minor.yy212 = createIntervalWindowNode(pCxt, yymsp[-5].minor.yy212, yymsp[-3].minor.yy212, yymsp[-1].minor.yy212, yymsp[0].minor.yy212); }
case 98: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */
{ PARSER_TRACE; yymsp[-7].minor.yy56 = createIntervalWindowNode(pCxt, yymsp[-5].minor.yy56, yymsp[-3].minor.yy56, yymsp[-1].minor.yy56, yymsp[0].minor.yy56); }
break;
case 98: /* sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */
{ PARSER_TRACE; yymsp[-3].minor.yy212 = yymsp[-1].minor.yy212; }
case 100: /* sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */
{ PARSER_TRACE; yymsp[-3].minor.yy56 = yymsp[-1].minor.yy56; }
break;
case 100: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */
{ PARSER_TRACE; yymsp[-3].minor.yy212 = createFillNode(pCxt, yymsp[-1].minor.yy44, NULL); }
case 102: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */
{ PARSER_TRACE; yymsp[-3].minor.yy56 = createFillNode(pCxt, yymsp[-1].minor.yy18, NULL); }
break;
case 101: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */
{ PARSER_TRACE; yymsp[-5].minor.yy212 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy174)); }
case 103: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */
{ PARSER_TRACE; yymsp[-5].minor.yy56 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy208)); }
break;
case 102: /* fill_mode ::= NONE */
{ PARSER_TRACE; yymsp[0].minor.yy44 = FILL_MODE_NONE; }
case 104: /* fill_mode ::= NONE */
{ PARSER_TRACE; yymsp[0].minor.yy18 = FILL_MODE_NONE; }
break;
case 103: /* fill_mode ::= PREV */
{ PARSER_TRACE; yymsp[0].minor.yy44 = FILL_MODE_PREV; }
case 105: /* fill_mode ::= PREV */
{ PARSER_TRACE; yymsp[0].minor.yy18 = FILL_MODE_PREV; }
break;
case 104: /* fill_mode ::= NULL */
{ PARSER_TRACE; yymsp[0].minor.yy44 = FILL_MODE_NULL; }
case 106: /* fill_mode ::= NULL */
{ PARSER_TRACE; yymsp[0].minor.yy18 = FILL_MODE_NULL; }
break;
case 105: /* fill_mode ::= LINEAR */
{ PARSER_TRACE; yymsp[0].minor.yy44 = FILL_MODE_LINEAR; }
case 107: /* fill_mode ::= LINEAR */
{ PARSER_TRACE; yymsp[0].minor.yy18 = FILL_MODE_LINEAR; }
break;
case 106: /* fill_mode ::= NEXT */
{ PARSER_TRACE; yymsp[0].minor.yy44 = FILL_MODE_NEXT; }
case 108: /* fill_mode ::= NEXT */
{ PARSER_TRACE; yymsp[0].minor.yy18 = FILL_MODE_NEXT; }
break;
case 109: /* group_by_list ::= expression */
{ PARSER_TRACE; yylhsminor.yy174 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy212))); }
yymsp[0].minor.yy174 = yylhsminor.yy174;
case 111: /* group_by_list ::= expression */
{ PARSER_TRACE; yylhsminor.yy208 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy56))); }
yymsp[0].minor.yy208 = yylhsminor.yy208;
break;
case 110: /* group_by_list ::= group_by_list NK_COMMA expression */
{ PARSER_TRACE; yylhsminor.yy174 = addNodeToList(pCxt, yymsp[-2].minor.yy174, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy212))); }
yymsp[-2].minor.yy174 = yylhsminor.yy174;
case 112: /* group_by_list ::= group_by_list NK_COMMA expression */
{ PARSER_TRACE; yylhsminor.yy208 = addNodeToList(pCxt, yymsp[-2].minor.yy208, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy56))); }
yymsp[-2].minor.yy208 = yylhsminor.yy208;
break;
case 113: /* query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt */
case 115: /* query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt */
{
PARSER_TRACE;
yylhsminor.yy212 = addOrderByClause(pCxt, yymsp[-3].minor.yy212, yymsp[-2].minor.yy174);
yylhsminor.yy212 = addSlimitClause(pCxt, yylhsminor.yy212, yymsp[-1].minor.yy212);
yylhsminor.yy212 = addLimitClause(pCxt, yylhsminor.yy212, yymsp[0].minor.yy212);
yylhsminor.yy56 = addOrderByClause(pCxt, yymsp[-3].minor.yy56, yymsp[-2].minor.yy208);
yylhsminor.yy56 = addSlimitClause(pCxt, yylhsminor.yy56, yymsp[-1].minor.yy56);
yylhsminor.yy56 = addLimitClause(pCxt, yylhsminor.yy56, yymsp[0].minor.yy56);
}
yymsp[-3].minor.yy212 = yylhsminor.yy212;
yymsp[-3].minor.yy56 = yylhsminor.yy56;
break;
case 117: /* query_expression_body ::= query_expression_body UNION ALL query_expression_body */
{ PARSER_TRACE; yylhsminor.yy56 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy56, yymsp[0].minor.yy56); }
yymsp[-3].minor.yy56 = yylhsminor.yy56;
break;
case 115: /* query_expression_body ::= query_expression_body UNION ALL query_expression_body */
{ PARSER_TRACE; yylhsminor.yy212 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy212, yymsp[0].minor.yy212); }
yymsp[-3].minor.yy212 = yylhsminor.yy212;
case 122: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */
case 126: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==126);
{ PARSER_TRACE; yymsp[-1].minor.yy56 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); }
break;
case 120: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */
case 124: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==124);
{ PARSER_TRACE; yymsp[-1].minor.yy212 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); }
case 123: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */
case 127: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==127);
{ PARSER_TRACE; yymsp[-3].minor.yy56 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); }
break;
case 121: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */
case 125: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==125);
{ PARSER_TRACE; yymsp[-3].minor.yy212 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); }
case 124: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */
case 128: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==128);
{ PARSER_TRACE; yymsp[-3].minor.yy56 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); }
break;
case 122: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */
case 126: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==126);
{ PARSER_TRACE; yymsp[-3].minor.yy212 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); }
case 129: /* subquery ::= NK_LP query_expression NK_RP */
{ PARSER_TRACE; yylhsminor.yy56 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy56); }
yymsp[-2].minor.yy56 = yylhsminor.yy56;
break;
case 127: /* subquery ::= NK_LP query_expression NK_RP */
{ PARSER_TRACE; yylhsminor.yy212 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy212); }
yymsp[-2].minor.yy212 = yylhsminor.yy212;
case 130: /* search_condition ::= common_expression */
{ PARSER_TRACE; yylhsminor.yy56 = releaseRawExprNode(pCxt, yymsp[0].minor.yy56); }
yymsp[0].minor.yy56 = yylhsminor.yy56;
break;
case 131: /* sort_specification ::= expression ordering_specification_opt null_ordering_opt */
{ PARSER_TRACE; yylhsminor.yy212 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy212), yymsp[-1].minor.yy188, yymsp[0].minor.yy107); }
yymsp[-2].minor.yy212 = yylhsminor.yy212;
case 133: /* sort_specification ::= expression ordering_specification_opt null_ordering_opt */
{ PARSER_TRACE; yylhsminor.yy56 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy56), yymsp[-1].minor.yy218, yymsp[0].minor.yy109); }
yymsp[-2].minor.yy56 = yylhsminor.yy56;
break;
case 132: /* ordering_specification_opt ::= */
{ PARSER_TRACE; yymsp[1].minor.yy188 = ORDER_ASC; }
case 134: /* ordering_specification_opt ::= */
{ PARSER_TRACE; yymsp[1].minor.yy218 = ORDER_ASC; }
break;
case 133: /* ordering_specification_opt ::= ASC */
{ PARSER_TRACE; yymsp[0].minor.yy188 = ORDER_ASC; }
case 135: /* ordering_specification_opt ::= ASC */
{ PARSER_TRACE; yymsp[0].minor.yy218 = ORDER_ASC; }
break;
case 134: /* ordering_specification_opt ::= DESC */
{ PARSER_TRACE; yymsp[0].minor.yy188 = ORDER_DESC; }
case 136: /* ordering_specification_opt ::= DESC */
{ PARSER_TRACE; yymsp[0].minor.yy218 = ORDER_DESC; }
break;
case 135: /* null_ordering_opt ::= */
{ PARSER_TRACE; yymsp[1].minor.yy107 = NULL_ORDER_DEFAULT; }
case 137: /* null_ordering_opt ::= */
{ PARSER_TRACE; yymsp[1].minor.yy109 = NULL_ORDER_DEFAULT; }
break;
case 136: /* null_ordering_opt ::= NULLS FIRST */
{ PARSER_TRACE; yymsp[-1].minor.yy107 = NULL_ORDER_FIRST; }
case 138: /* null_ordering_opt ::= NULLS FIRST */
{ PARSER_TRACE; yymsp[-1].minor.yy109 = NULL_ORDER_FIRST; }
break;
case 137: /* null_ordering_opt ::= NULLS LAST */
{ PARSER_TRACE; yymsp[-1].minor.yy107 = NULL_ORDER_LAST; }
case 139: /* null_ordering_opt ::= NULLS LAST */
{ PARSER_TRACE; yymsp[-1].minor.yy109 = NULL_ORDER_LAST; }
break;
default:
break;
......
......@@ -628,6 +628,12 @@ static EDealRes translateExprSubquery(STranslateContext* pCxt, SNode* pNode) {
return (TSDB_CODE_SUCCESS == translateSubquery(pCxt, pNode) ? DEAL_RES_CONTINUE : DEAL_RES_ERROR);
}
static EDealRes translateLogicCond(STranslateContext* pCxt, SLogicConditionNode* pCond) {
pCond->node.resType.type = TSDB_DATA_TYPE_BOOL;
pCond->node.resType.bytes = tDataTypes[TSDB_DATA_TYPE_BOOL].bytes;
return DEAL_RES_CONTINUE;
}
static EDealRes doTranslateExpr(SNode* pNode, void* pContext) {
STranslateContext* pCxt = (STranslateContext*)pContext;
switch (nodeType(pNode)) {
......@@ -639,6 +645,8 @@ static EDealRes doTranslateExpr(SNode* pNode, void* pContext) {
return translateOperator(pCxt, (SOperatorNode*)pNode);
case QUERY_NODE_FUNCTION:
return translateFunction(pCxt, (SFunctionNode*)pNode);
case QUERY_NODE_LOGIC_CONDITION:
return translateLogicCond(pCxt, (SLogicConditionNode*)pNode);
case QUERY_NODE_TEMP_TABLE:
return translateExprSubquery(pCxt, ((STempTableNode*)pNode)->pSubquery);
default:
......
......@@ -76,7 +76,8 @@ private:
case QUERY_NODE_COLUMN:
case QUERY_NODE_VALUE:
case QUERY_NODE_OPERATOR:
case QUERY_NODE_FUNCTION: {
case QUERY_NODE_FUNCTION:
case QUERY_NODE_LOGIC_CONDITION: {
SExprNode* pExpr = (SExprNode*)node;
str.append(" [" + dataTypeToStr(pExpr->resType) + "]");
if (isProject) {
......@@ -215,6 +216,34 @@ private:
str.append((NULL_ORDER_FIRST == pOrderBy->nullOrder ? " NULLS FIRST" : " NULLS LAST"));
}
string logicConditionTypeToStr(ELogicConditionType type) {
switch (type) {
case LOGIC_COND_TYPE_AND:
return "AND";
case LOGIC_COND_TYPE_OR:
return "OR";
case LOGIC_COND_TYPE_NOT:
return "NOT";
default:
break;
}
return "Unknown logic cond type";
}
void logicCondToStr(SLogicConditionNode* pCond, string& str) {
SNode* node = nullptr;
bool first = true;
FOREACH(node, pCond->pParameterList) {
if (first && LOGIC_COND_TYPE_NOT == pCond->condType) {
str.append(logicConditionTypeToStr(pCond->condType) + " ");
} else if (!first && LOGIC_COND_TYPE_NOT != pCond->condType) {
str.append(" " + logicConditionTypeToStr(pCond->condType) + " ");
}
first = false;
nodeToStr(node, str, false);
}
}
void nodeToStr(const SNode* node, string& str, bool isProject) {
if (nullptr == node) {
return;
......@@ -237,6 +266,10 @@ private:
functionToStr((SFunctionNode*)node, str);
break;
}
case QUERY_NODE_LOGIC_CONDITION: {
logicCondToStr((SLogicConditionNode*)node, str);
break;
}
case QUERY_NODE_GROUPING_SET: {
groupingSetToStr((SGroupingSetNode*)node, str);
break;
......@@ -511,6 +544,12 @@ TEST_F(NewParserTest, selectExpression) {
bind("SELECT ts + 10s, c1 + 10, concat(c2, 'abc') FROM t1");
ASSERT_TRUE(run());
bind("SELECT ts > 0, c1 < 20 AND c2 = 'qaz' FROM t1");
ASSERT_TRUE(run());
bind("SELECT ts > 0, c1 BETWEEN 10 AND 20 AND c2 = 'qaz' FROM t1");
ASSERT_TRUE(run());
}
TEST_F(NewParserTest, selectClause) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册