Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
eeab56e3
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
eeab56e3
编写于
6月 22, 2022
作者:
X
Xiaoyu Wang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: sql command 'select constant'
上级
45a806f7
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
617 addition
and
548 deletion
+617
-548
source/libs/function/src/builtins.c
source/libs/function/src/builtins.c
+1
-1
source/libs/parser/inc/sql.y
source/libs/parser/inc/sql.y
+6
-5
source/libs/parser/src/parCalcConst.c
source/libs/parser/src/parCalcConst.c
+13
-1
source/libs/parser/src/parTranslater.c
source/libs/parser/src/parTranslater.c
+15
-1
source/libs/parser/src/sql.c
source/libs/parser/src/sql.c
+530
-527
source/libs/parser/test/parSelectTest.cpp
source/libs/parser/test/parSelectTest.cpp
+6
-0
source/libs/planner/src/planLogicCreater.c
source/libs/planner/src/planLogicCreater.c
+14
-1
source/libs/planner/src/planOptimizer.c
source/libs/planner/src/planOptimizer.c
+16
-10
source/libs/planner/src/planPhysiCreater.c
source/libs/planner/src/planPhysiCreater.c
+10
-2
source/libs/planner/test/planBasicTest.cpp
source/libs/planner/test/planBasicTest.cpp
+6
-0
未找到文件。
source/libs/function/src/builtins.c
浏览文件 @
eeab56e3
...
...
@@ -1799,7 +1799,7 @@ const SBuiltinFuncDefinition funcMgtBuiltins[] = {
{
.
name
=
"last_row"
,
.
type
=
FUNCTION_TYPE_LAST_ROW
,
.
classification
=
FUNC_MGT_MULTI_RES_FUNC
,
.
classification
=
FUNC_MGT_
AGG_FUNC
|
FUNC_MGT_
MULTI_RES_FUNC
,
.
translateFunc
=
translateLastRow
,
.
getEnvFunc
=
getMinmaxFuncEnv
,
.
initFunc
=
minmaxFunctionSetup
,
...
...
source/libs/parser/inc/sql.y
浏览文件 @
eeab56e3
...
...
@@ -757,8 +757,9 @@ boolean_primary(A) ::= NK_LP(C) boolean_value_expression(B) NK_RP(D).
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). { A = B; }
/************************************************ from_clause_opt *********************************************************/
from_clause_opt(A) ::= . { A = NULL; }
from_clause_opt(A) ::= FROM table_reference_list(B). { A = B; }
table_reference_list(A) ::= table_reference(B). { A = B; }
table_reference_list(A) ::= table_reference_list(B) NK_COMMA table_reference(C). { A = createJoinTableNode(pCxt, JOIN_TYPE_INNER, B, C, NULL); }
...
...
@@ -792,9 +793,9 @@ join_type(A) ::= INNER.
/************************************************ query_specification *************************************************/
query_specification(A) ::=
SELECT set_quantifier_opt(B) select_list(C) from_clause
(D) where_clause_opt(E
)
partition_by_clause_opt(F) range_opt(J) every_opt(K) fill_opt(L) twindow_clause_opt(G)
group_by_clause_opt(H) having_clause_opt(I).
{
SELECT set_quantifier_opt(B) select_list(C) from_clause
_opt(D
)
where_clause_opt(E) partition_by_clause_opt(F) range_opt(J) every_opt(K)
fill_opt(L) twindow_clause_opt(G) group_by_clause_opt(H) having_clause_opt(I).
{
A = createSelectStmt(pCxt, B, C, D);
A = addWhereClause(pCxt, A, E);
A = addPartitionByClause(pCxt, A, F);
...
...
source/libs/parser/src/parCalcConst.c
浏览文件 @
eeab56e3
...
...
@@ -232,7 +232,11 @@ static int32_t calcConstGroupBy(SCalcConstContext* pCxt, SSelectStmt* pSelect) {
return
code
;
}
static
int32_t
calcConstSelect
(
SCalcConstContext
*
pCxt
,
SSelectStmt
*
pSelect
,
bool
subquery
)
{
static
int32_t
calcConstSelectWithoutFrom
(
SCalcConstContext
*
pCxt
,
SSelectStmt
*
pSelect
,
bool
subquery
)
{
return
calcConstProjections
(
pCxt
,
pSelect
,
subquery
);
}
static
int32_t
calcConstSelectFrom
(
SCalcConstContext
*
pCxt
,
SSelectStmt
*
pSelect
,
bool
subquery
)
{
int32_t
code
=
calcConstFromTable
(
pCxt
,
pSelect
->
pFromTable
);
if
(
TSDB_CODE_SUCCESS
==
code
)
{
code
=
calcConstProjections
(
pCxt
,
pSelect
,
subquery
);
...
...
@@ -258,6 +262,14 @@ static int32_t calcConstSelect(SCalcConstContext* pCxt, SSelectStmt* pSelect, bo
return
code
;
}
static
int32_t
calcConstSelect
(
SCalcConstContext
*
pCxt
,
SSelectStmt
*
pSelect
,
bool
subquery
)
{
if
(
NULL
==
pSelect
->
pFromTable
)
{
return
calcConstSelectWithoutFrom
(
pCxt
,
pSelect
,
subquery
);
}
else
{
return
calcConstSelectFrom
(
pCxt
,
pSelect
,
subquery
);
}
}
static
int32_t
calcConstDelete
(
SCalcConstContext
*
pCxt
,
SDeleteStmt
*
pDelete
)
{
int32_t
code
=
calcConstFromTable
(
pCxt
,
pDelete
->
pFromTable
);
if
(
TSDB_CODE_SUCCESS
==
code
)
{
...
...
source/libs/parser/src/parTranslater.c
浏览文件 @
eeab56e3
...
...
@@ -2466,7 +2466,13 @@ static int32_t replaceOrderByAlias(STranslateContext* pCxt, SNodeList* pProjecti
return
pCxt
->
errCode
;
}
static
int32_t
translateSelect
(
STranslateContext
*
pCxt
,
SSelectStmt
*
pSelect
)
{
static
int32_t
translateSelectWithoutFrom
(
STranslateContext
*
pCxt
,
SSelectStmt
*
pSelect
)
{
pCxt
->
pCurrSelectStmt
=
pSelect
;
pCxt
->
currClause
=
SQL_CLAUSE_SELECT
;
return
translateExprList
(
pCxt
,
pSelect
->
pProjectionList
);
}
static
int32_t
translateSelectFrom
(
STranslateContext
*
pCxt
,
SSelectStmt
*
pSelect
)
{
pCxt
->
pCurrSelectStmt
=
pSelect
;
int32_t
code
=
translateFrom
(
pCxt
,
pSelect
->
pFromTable
);
if
(
TSDB_CODE_SUCCESS
==
code
)
{
...
...
@@ -2515,6 +2521,14 @@ static int32_t translateSelect(STranslateContext* pCxt, SSelectStmt* pSelect) {
return
code
;
}
static
int32_t
translateSelect
(
STranslateContext
*
pCxt
,
SSelectStmt
*
pSelect
)
{
if
(
NULL
==
pSelect
->
pFromTable
)
{
return
translateSelectWithoutFrom
(
pCxt
,
pSelect
);
}
else
{
return
translateSelectFrom
(
pCxt
,
pSelect
);
}
}
static
SNode
*
createSetOperProject
(
const
char
*
pTableAlias
,
SNode
*
pNode
)
{
SColumnNode
*
pCol
=
(
SColumnNode
*
)
nodesMakeNode
(
QUERY_NODE_COLUMN
);
if
(
NULL
==
pCol
)
{
...
...
source/libs/parser/src/sql.c
浏览文件 @
eeab56e3
...
...
@@ -139,16 +139,16 @@ typedef union {
#define ParseCTX_STORE
#define YYFALLBACK 1
#define YYNSTATE 641
#define YYNRULE 46
6
#define YYNRULE 46
7
#define YYNTOKEN 242
#define YY_MAX_SHIFT 640
#define YY_MIN_SHIFTREDUCE 933
#define YY_MAX_SHIFTREDUCE 139
8
#define YY_ERROR_ACTION 1
399
#define YY_ACCEPT_ACTION 140
0
#define YY_NO_ACTION 140
1
#define YY_MIN_REDUCE 140
2
#define YY_MAX_REDUCE 186
7
#define YY_MAX_SHIFTREDUCE 139
9
#define YY_ERROR_ACTION 1
400
#define YY_ACCEPT_ACTION 140
1
#define YY_NO_ACTION 140
2
#define YY_MIN_REDUCE 140
3
#define YY_MAX_REDUCE 186
9
/************* End control #defines *******************************************/
#define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0])))
...
...
@@ -217,226 +217,226 @@ typedef union {
*********** Begin parsing tables **********************************************/
#define YY_ACTTAB_COUNT (2192)
static
const
YYACTIONTYPE
yy_action
[]
=
{
/* 0 */
169
7
,
1845
,
1522
,
309
,
412
,
1697
,
413
,
1434
,
326
,
1400
,
/* 10 */
137
,
169
4
,
37
,
35
,
1490
,
1844
,
1694
,
1710
,
417
,
1842
,
/* 0 */
169
8
,
1847
,
1523
,
309
,
412
,
1698
,
413
,
1435
,
326
,
1401
,
/* 10 */
137
,
169
5
,
37
,
35
,
1491
,
1846
,
1695
,
1711
,
417
,
1844
,
/* 20 */
318
,
556
,
1208
,
556
,
1230
,
38
,
36
,
34
,
33
,
32
,
/* 30 */
325
,
324
,
109
,
420
,
109
,
413
,
143
4
,
1690
,
1696
,
451
,
/* 40 */
1222
,
456
,
169
0
,
1696
,
1726
,
30
,
240
,
1206
,
559
,
1533
,
/* 50 */
179
3
,
1533
,
540
,
559
,
22
,
556
,
555
,
1680
,
14
,
539
,
/* 60 */
37
,
35
,
133
5
,
322
,
1214
,
1215
,
157
,
335
,
318
,
1710
,
/* 70 */
1208
,
134
,
520
,
365
,
179
0
,
38
,
36
,
34
,
33
,
32
,
/* 80 */
153
5
,
1
,
1214
,
1533
,
1739
,
67
,
555
,
85
,
1711
,
542
,
/* 90 */
171
3
,
1714
,
538
,
58
,
559
,
1206
,
1726
,
1779
,
113
,
76
,
/* 100 */
371
,
292
,
177
5
,
637
,
519
,
556
,
14
,
1528
,
1845
,
1680
,
/* 110 */
142
5
,
539
,
1214
,
1845
,
1845
,
543
,
369
,
1277
,
1278
,
963
,
/* 120 */
152
6
,
560
,
152
,
470
,
555
,
1631
,
1842
,
154
,
152
,
2
,
/* 130 */
430
,
184
2
,
1842
,
1533
,
206
,
82
,
1739
,
290
,
478
,
86
,
/* 140 */
171
1
,
542
,
1713
,
1714
,
538
,
1369
,
559
,
40
,
118
,
1779
,
/* 150 */
168
0
,
637
,
198
,
311
,
1775
,
148
,
1525
,
967
,
968
,
1209
,
/* 30 */
325
,
324
,
109
,
420
,
109
,
413
,
143
5
,
1691
,
1697
,
451
,
/* 40 */
1222
,
456
,
169
1
,
1697
,
1727
,
30
,
240
,
1206
,
559
,
1534
,
/* 50 */
179
5
,
1534
,
540
,
559
,
22
,
556
,
555
,
1681
,
14
,
539
,
/* 60 */
37
,
35
,
133
6
,
322
,
1214
,
1215
,
157
,
335
,
318
,
1711
,
/* 70 */
1208
,
134
,
520
,
365
,
179
2
,
38
,
36
,
34
,
33
,
32
,
/* 80 */
153
6
,
1
,
1214
,
1534
,
1740
,
67
,
555
,
85
,
1712
,
542
,
/* 90 */
171
4
,
1715
,
538
,
58
,
559
,
1206
,
1727
,
1780
,
113
,
76
,
/* 100 */
371
,
292
,
177
6
,
637
,
519
,
556
,
14
,
1529
,
1847
,
1681
,
/* 110 */
142
6
,
539
,
1214
,
1847
,
1847
,
543
,
369
,
1277
,
1278
,
963
,
/* 120 */
152
7
,
560
,
152
,
470
,
555
,
1632
,
1844
,
154
,
152
,
2
,
/* 130 */
430
,
184
4
,
1844
,
1534
,
206
,
82
,
1740
,
290
,
478
,
86
,
/* 140 */
171
2
,
542
,
1714
,
1715
,
538
,
1370
,
559
,
40
,
118
,
1780
,
/* 150 */
168
1
,
637
,
198
,
311
,
1776
,
148
,
1526
,
967
,
968
,
1209
,
/* 160 */
58
,
1207
,
70
,
328
,
473
,
1277
,
1278
,
232
,
56
,
467
,
/* 170 */
364
,
134
,
363
,
1233
,
197
,
495
,
180
6
,
1223
,
330
,
1218
,
/* 180 */
153
5
,
1578
,
1580
,
1212
,
1213
,
41
,
1259
,
1260
,
1262
,
1263
,
/* 170 */
364
,
134
,
363
,
1233
,
197
,
495
,
180
8
,
1223
,
330
,
1218
,
/* 180 */
153
6
,
1579
,
1581
,
1212
,
1213
,
41
,
1259
,
1260
,
1262
,
1263
,
/* 190 */
1264
,
1265
,
1266
,
535
,
557
,
1274
,
1275
,
1276
,
1279
,
53
,
/* 200 */
1232
,
1226
,
52
,
15
79
,
1580
,
26
,
59
,
1209
,
1845
,
1207
,
/* 200 */
1232
,
1226
,
52
,
15
80
,
1581
,
26
,
59
,
1209
,
1847
,
1207
,
/* 210 */
510
,
155
,
557
,
1274
,
1275
,
38
,
36
,
34
,
33
,
32
,
/* 220 */
37
,
35
,
153
,
155
,
142
4
,
1710
,
1842
,
402
,
318
,
67
,
/* 220 */
37
,
35
,
153
,
155
,
142
5
,
1711
,
1844
,
402
,
318
,
67
,
/* 230 */
1208
,
1212
,
1213
,
302
,
1259
,
1260
,
1262
,
1263
,
1264
,
1265
,
/* 240 */
1266
,
535
,
557
,
1274
,
1275
,
1276
,
1279
,
516
,
172
6
,
465
,
/* 250 */
464
,
15
29
,
1726
,
489
,
463
,
1206
,
509
,
114
,
460
,
1668
,
/* 260 */
540
,
459
,
458
,
457
,
168
0
,
1680
,
14
,
539
,
37
,
35
,
/* 240 */
1266
,
535
,
557
,
1274
,
1275
,
1276
,
1279
,
516
,
172
7
,
465
,
/* 250 */
464
,
15
30
,
1727
,
489
,
463
,
1206
,
509
,
114
,
460
,
1669
,
/* 260 */
540
,
459
,
458
,
457
,
168
1
,
1681
,
14
,
539
,
37
,
35
,
/* 270 */
1112
,
1113
,
1214
,
166
,
165
,
117
,
318
,
155
,
1208
,
1299
,
/* 280 */
520
,
151
1
,
303
,
58
,
301
,
300
,
356
,
453
,
58
,
2
,
/* 290 */
155
,
455
,
17
39
,
508
,
1845
,
85
,
1711
,
542
,
1713
,
1714
,
/* 300 */
538
,
1304
,
559
,
1206
,
344
,
17
79
,
358
,
354
,
152
,
292
,
/* 310 */
177
5
,
637
,
1842
,
454
,
115
,
38
,
36
,
34
,
33
,
32
,
/* 320 */
1214
,
184
5
,
136
,
1524
,
1414
,
1277
,
1278
,
1509
,
518
,
149
,
/* 330 */
178
6
,
1787
,
1233
,
1791
,
1694
,
152
,
27
,
8
,
430
,
1842
,
/* 280 */
520
,
151
2
,
303
,
58
,
301
,
300
,
356
,
453
,
58
,
2
,
/* 290 */
155
,
455
,
17
40
,
508
,
1847
,
85
,
1712
,
542
,
1714
,
1715
,
/* 300 */
538
,
1304
,
559
,
1206
,
344
,
17
80
,
358
,
354
,
152
,
292
,
/* 310 */
177
6
,
637
,
1844
,
454
,
115
,
38
,
36
,
34
,
33
,
32
,
/* 320 */
1214
,
184
7
,
136
,
1525
,
1415
,
1277
,
1278
,
1510
,
518
,
149
,
/* 330 */
178
8
,
1789
,
1233
,
1793
,
1695
,
152
,
27
,
8
,
430
,
1844
,
/* 340 */
1070
,
582
,
581
,
580
,
1074
,
579
,
1076
,
1077
,
578
,
1079
,
/* 350 */
575
,
140
3
,
1085
,
572
,
1087
,
1088
,
569
,
566
,
81
,
637
,
/* 360 */
169
0
,
1696
,
38
,
36
,
34
,
33
,
32
,
1209
,
78
,
1207
,
/* 370 */
13
59
,
559
,
99
,
1277
,
1278
,
98
,
97
,
96
,
95
,
94
,
/* 380 */
93
,
92
,
91
,
90
,
593
,
13
49
,
38
,
36
,
34
,
33
,
/* 350 */
575
,
140
4
,
1085
,
572
,
1087
,
1088
,
569
,
566
,
81
,
637
,
/* 360 */
169
1
,
1697
,
38
,
36
,
34
,
33
,
32
,
1209
,
78
,
1207
,
/* 370 */
13
60
,
559
,
99
,
1277
,
1278
,
98
,
97
,
96
,
95
,
94
,
/* 380 */
93
,
92
,
91
,
90
,
593
,
13
50
,
38
,
36
,
34
,
33
,
/* 390 */
32
,
1212
,
1213
,
522
,
1259
,
1260
,
1262
,
1263
,
1264
,
1265
,
/* 400 */
1266
,
535
,
557
,
1274
,
1275
,
1276
,
1279
,
502
,
135
7
,
1358
,
/* 410 */
136
0
,
1361
,
980
,
155
,
979
,
1209
,
99
,
1207
,
155
,
98
,
/* 400 */
1266
,
535
,
557
,
1274
,
1275
,
1276
,
1279
,
502
,
135
8
,
1359
,
/* 410 */
136
1
,
1362
,
980
,
155
,
979
,
1209
,
99
,
1207
,
155
,
98
,
/* 420 */
97
,
96
,
95
,
94
,
93
,
92
,
91
,
90
,
37
,
35
,
/* 430 */
1280
,
11
,
10
,
171
0
,
462
,
461
,
318
,
162
,
1208
,
1212
,
/* 430 */
1280
,
11
,
10
,
171
1
,
462
,
461
,
318
,
162
,
1208
,
1212
,
/* 440 */
1213
,
981
,
1259
,
1260
,
1262
,
1263
,
1264
,
1265
,
1266
,
535
,
/* 450 */
557
,
1274
,
1275
,
1276
,
1279
,
38
,
36
,
34
,
33
,
32
,
/* 460 */
172
6
,
479
,
65
,
1206
,
1845
,
64
,
593
,
155
,
540
,
980
,
/* 470 */
147
,
979
,
158
5
,
1680
,
1231
,
539
,
37
,
35
,
1843
,
308
,
/* 480 */
1214
,
146
1
,
1842
,
1572
,
318
,
1793
,
1208
,
1423
,
1583
,
1214
,
/* 490 */
38
,
36
,
34
,
33
,
32
,
142
2
,
449
,
9
,
981
,
1234
,
/* 500 */
17
39
,
1395
,
1845
,
87
,
1711
,
542
,
1713
,
1714
,
538
,
1789
,
/* 510 */
559
,
1206
,
1311
,
17
79
,
199
,
134
,
152
,
1778
,
1775
,
637
,
/* 520 */
184
2
,
543
,
133
,
1585
,
1536
,
1246
,
1342
,
1680
,
1214
,
321
,
/* 530 */
323
,
163
0
,
1232
,
1277
,
1278
,
1680
,
293
,
609
,
607
,
1583
,
/* 540 */
142
1
,
615
,
614
,
613
,
333
,
9
,
612
,
611
,
610
,
119
,
/* 460 */
172
7
,
479
,
65
,
1206
,
1847
,
64
,
593
,
155
,
540
,
980
,
/* 470 */
147
,
979
,
158
6
,
1681
,
1231
,
539
,
37
,
35
,
1845
,
308
,
/* 480 */
1214
,
146
2
,
1844
,
1573
,
318
,
1795
,
1208
,
1424
,
1584
,
1214
,
/* 490 */
38
,
36
,
34
,
33
,
32
,
142
3
,
449
,
9
,
981
,
1234
,
/* 500 */
17
40
,
1396
,
1847
,
87
,
1712
,
542
,
1714
,
1715
,
538
,
1791
,
/* 510 */
559
,
1206
,
1311
,
17
80
,
199
,
134
,
152
,
1779
,
1776
,
637
,
/* 520 */
184
4
,
543
,
133
,
1586
,
1537
,
1246
,
1343
,
1681
,
1214
,
321
,
/* 530 */
323
,
163
1
,
1232
,
1277
,
1278
,
1681
,
293
,
609
,
607
,
1584
,
/* 540 */
142
2
,
615
,
614
,
613
,
333
,
9
,
612
,
611
,
610
,
119
,
/* 550 */
605
,
604
,
603
,
602
,
601
,
600
,
599
,
598
,
127
,
594
,
/* 560 */
1246
,
140
2
,
38
,
36
,
34
,
33
,
32
,
637
,
1297
,
505
,
/* 570 */
69
,
291
,
1285
,
967
,
968
,
1209
,
142
0
,
1207
,
1232
,
1419
,
/* 580 */
168
0
,
1277
,
1278
,
1394
,
28
,
108
,
107
,
106
,
105
,
104
,
/* 560 */
1246
,
140
3
,
38
,
36
,
34
,
33
,
32
,
637
,
1297
,
505
,
/* 570 */
69
,
291
,
1285
,
967
,
968
,
1209
,
142
1
,
1207
,
1232
,
1420
,
/* 580 */
168
1
,
1277
,
1278
,
1395
,
28
,
108
,
107
,
106
,
105
,
104
,
/* 590 */
103
,
102
,
101
,
100
,
38
,
36
,
34
,
33
,
32
,
1212
,
/* 600 */
1213
,
151
0
,
1259
,
1260
,
1262
,
1263
,
1264
,
1265
,
1266
,
535
,
/* 610 */
557
,
1274
,
1275
,
1276
,
1279
,
556
,
168
0
,
1585
,
1585
,
1680
,
/* 620 */
1298
,
331
,
585
,
1209
,
329
,
1207
,
370
,
231
,
151
8
,
134
,
/* 630 */
34
,
33
,
32
,
158
3
,
1584
,
1418
,
37
,
35
,
1535
,
511
,
/* 640 */
506
,
200
,
1303
,
153
3
,
318
,
591
,
1208
,
1212
,
1213
,
1417
,
/* 600 */
1213
,
151
1
,
1259
,
1260
,
1262
,
1263
,
1264
,
1265
,
1266
,
535
,
/* 610 */
557
,
1274
,
1275
,
1276
,
1279
,
556
,
168
1
,
1586
,
1586
,
1681
,
/* 620 */
1298
,
331
,
585
,
1209
,
329
,
1207
,
370
,
231
,
151
9
,
134
,
/* 630 */
34
,
33
,
32
,
158
4
,
1585
,
1419
,
37
,
35
,
1536
,
511
,
/* 640 */
506
,
200
,
1303
,
153
4
,
318
,
591
,
1208
,
1212
,
1213
,
1418
,
/* 650 */
1259
,
1260
,
1262
,
1263
,
1264
,
1265
,
1266
,
535
,
557
,
1274
,
/* 660 */
1275
,
1276
,
1279
,
556
,
125
,
124
,
588
,
587
,
586
,
411
,
/* 670 */
419
,
1206
,
415
,
415
,
372
,
168
0
,
556
,
29
,
316
,
1292
,
/* 680 */
1293
,
1294
,
1295
,
1296
,
1300
,
1301
,
1302
,
387
,
1214
,
168
0
,
/* 690 */
185
,
153
3
,
556
,
263
,
591
,
597
,
1563
,
1505
,
1416
,
1261
,
/* 700 */
1190
,
1191
,
140
,
388
,
153
3
,
2
,
1413
,
556
,
447
,
443
,
/* 710 */
439
,
435
,
184
,
125
,
124
,
588
,
587
,
586
,
429
,
179
3
,
/* 720 */
153
3
,
1698
,
1710
,
1334
,
289
,
1232
,
1230
,
637
,
1412
,
1700
,
/* 730 */
141
1
,
455
,
1694
,
395
,
7
,
1533
,
407
,
68
,
1680
,
556
,
/* 740 */
182
,
1277
,
1278
,
17
88
,
556
,
1261
,
1680
,
1410
,
1409
,
1726
,
/* 750 */
153
0
,
380
,
1235
,
454
,
408
,
1657
,
382
,
540
,
1690
,
1696
,
/* 760 */
135
,
524
,
168
0
,
556
,
539
,
269
,
1702
,
1533
,
1680
,
559
,
/* 770 */
168
0
,
1621
,
1533
,
556
,
487
,
496
,
589
,
267
,
55
,
1576
,
/* 780 */
527
,
54
,
164
,
1209
,
553
,
1207
,
373
,
168
0
,
1680
,
1739
,
/* 790 */
596
,
153
3
,
287
,
1711
,
542
,
1713
,
1714
,
538
,
167
,
559
,
/* 800 */
181
,
153
3
,
173
,
1464
,
178
,
1520
,
425
,
1212
,
1213
,
1408
,
/* 670 */
419
,
1206
,
415
,
415
,
372
,
168
1
,
556
,
29
,
316
,
1292
,
/* 680 */
1293
,
1294
,
1295
,
1296
,
1300
,
1301
,
1302
,
387
,
1214
,
168
1
,
/* 690 */
185
,
153
4
,
556
,
263
,
591
,
597
,
1564
,
1506
,
1417
,
1261
,
/* 700 */
1190
,
1191
,
140
,
388
,
153
4
,
2
,
1414
,
556
,
447
,
443
,
/* 710 */
439
,
435
,
184
,
125
,
124
,
588
,
587
,
586
,
429
,
179
5
,
/* 720 */
153
4
,
1699
,
1711
,
1335
,
289
,
1232
,
1230
,
637
,
1413
,
1701
,
/* 730 */
141
2
,
455
,
1695
,
395
,
7
,
1534
,
407
,
68
,
1681
,
556
,
/* 740 */
182
,
1277
,
1278
,
17
90
,
556
,
1261
,
1681
,
1411
,
1410
,
1727
,
/* 750 */
153
1
,
380
,
1235
,
454
,
408
,
1658
,
382
,
540
,
1691
,
1697
,
/* 760 */
135
,
524
,
168
1
,
556
,
539
,
269
,
1703
,
1534
,
1681
,
559
,
/* 770 */
168
1
,
1622
,
1534
,
556
,
487
,
496
,
589
,
267
,
55
,
1577
,
/* 780 */
527
,
54
,
164
,
1209
,
553
,
1207
,
373
,
168
1
,
1681
,
1740
,
/* 790 */
596
,
153
4
,
287
,
1712
,
542
,
1714
,
1715
,
538
,
167
,
559
,
/* 800 */
181
,
153
4
,
173
,
1465
,
178
,
1521
,
425
,
1212
,
1213
,
1409
,
/* 810 */
1259
,
1260
,
1262
,
1263
,
1264
,
1265
,
1266
,
535
,
557
,
1274
,
/* 820 */
1275
,
1276
,
1279
,
58
,
590
,
171
,
406
,
157
6
,
1516
,
401
,
/* 820 */
1275
,
1276
,
1279
,
58
,
590
,
171
,
406
,
157
7
,
1517
,
401
,
/* 830 */
400
,
399
,
398
,
397
,
394
,
393
,
392
,
391
,
390
,
386
,
/* 840 */
385
,
384
,
383
,
377
,
376
,
375
,
374
,
203
,
1032
,
168
0
,
/* 840 */
385
,
384
,
383
,
377
,
376
,
375
,
374
,
203
,
1032
,
168
1
,
/* 850 */
38
,
36
,
34
,
33
,
32
,
556
,
556
,
1208
,
556
,
516
,
/* 860 */
140
7
,
84
,
1406
,
465
,
464
,
1034
,
554
,
253
,
463
,
332
,
/* 870 */
140
5
,
114
,
460
,
1798
,
1330
,
459
,
458
,
457
,
608
,
1451
,
/* 880 */
212
,
534
,
1206
,
153
3
,
1533
,
190
,
1533
,
117
,
188
,
486
,
/* 890 */
171
0
,
1508
,
1261
,
62
,
61
,
368
,
293
,
1217
,
161
,
1214
,
/* 900 */
168
0
,
466
,
1680
,
192
,
362
,
516
,
191
,
1330
,
194
,
196
,
/* 910 */
168
0
,
193
,
195
,
1446
,
1444
,
288
,
584
,
1726
,
352
,
359
,
/* 920 */
350
,
346
,
342
,
158
,
337
,
519
,
115
,
477
,
1297
,
141
5
,
/* 930 */
168
0
,
1333
,
539
,
117
,
1216
,
468
,
471
,
123
,
637
,
1004
,
/* 940 */
475
,
150
,
178
6
,
1787
,
532
,
1791
,
235
,
11
,
10
,
48
,
/* 950 */
525
,
216
,
149
1
,
155
,
448
,
503
,
1005
,
1739
,
1710
,
480
,
/* 960 */
86
,
171
1
,
542
,
1713
,
1714
,
538
,
1440
,
559
,
1397
,
1398
,
/* 970 */
17
79
,
528
,
115
,
39
,
311
,
1775
,
148
,
223
,
491
,
39
,
/* 980 */
1298
,
172
7
,
1710
,
334
,
591
,
1726
,
39
,
151
,
1786
,
1787
,
/* 990 */
135
6
,
1791
,
218
,
540
,
1209
,
242
,
1207
,
1807
,
1680
,
1435
,
/* 1000 */
539
,
157
3
,
1303
,
125
,
124
,
588
,
587
,
586
,
1809
,
1726
,
/* 860 */
140
8
,
84
,
1407
,
465
,
464
,
1034
,
554
,
253
,
463
,
332
,
/* 870 */
140
6
,
114
,
460
,
1800
,
1331
,
459
,
458
,
457
,
608
,
1452
,
/* 880 */
212
,
534
,
1206
,
153
4
,
1534
,
190
,
1534
,
117
,
188
,
486
,
/* 890 */
171
1
,
1509
,
1261
,
62
,
61
,
368
,
293
,
1217
,
161
,
1214
,
/* 900 */
168
1
,
466
,
1681
,
192
,
362
,
516
,
191
,
1331
,
194
,
196
,
/* 910 */
168
1
,
193
,
195
,
1447
,
1445
,
288
,
584
,
1727
,
352
,
359
,
/* 920 */
350
,
346
,
342
,
158
,
337
,
519
,
115
,
477
,
1297
,
141
6
,
/* 930 */
168
1
,
1334
,
539
,
117
,
1216
,
468
,
471
,
123
,
637
,
1004
,
/* 940 */
475
,
150
,
178
8
,
1789
,
532
,
1793
,
235
,
11
,
10
,
48
,
/* 950 */
525
,
216
,
149
2
,
155
,
448
,
503
,
1005
,
1740
,
1711
,
480
,
/* 960 */
86
,
171
2
,
542
,
1714
,
1715
,
538
,
1441
,
559
,
1398
,
1399
,
/* 970 */
17
80
,
528
,
115
,
39
,
311
,
1776
,
148
,
223
,
491
,
39
,
/* 980 */
1298
,
172
8
,
1711
,
334
,
591
,
1727
,
39
,
151
,
1788
,
1789
,
/* 990 */
135
7
,
1793
,
218
,
540
,
1209
,
242
,
1207
,
1809
,
1681
,
1436
,
/* 1000 */
539
,
157
4
,
1303
,
125
,
124
,
588
,
587
,
586
,
1811
,
1727
,
/* 1010 */
121
,
1220
,
633
,
517
,
1305
,
234
,
237
,
540
,
1212
,
1213
,
/* 1020 */
1267
,
239
,
168
0
,
1710
,
539
,
1739
,
3
,
1163
,
272
,
1711
,
/* 1030 */
542
,
171
3
,
1714
,
538
,
122
,
559
,
244
,
29
,
316
,
1292
,
/* 1040 */
1293
,
1294
,
1295
,
1296
,
1300
,
1301
,
1302
,
123
,
1219
,
17
39
,
/* 1050 */
172
6
,
548
,
86
,
1711
,
542
,
1713
,
1714
,
538
,
540
,
559
,
/* 1060 */
48
,
564
,
17
79
,
1680
,
1710
,
539
,
311
,
1775
,
1858
,
1289
,
/* 1070 */
122
,
123
,
110
,
122
,
5
,
250
,
336
,
181
3
,
1230
,
339
,
/* 1020 */
1267
,
239
,
168
1
,
1711
,
539
,
1740
,
3
,
1163
,
272
,
1712
,
/* 1030 */
542
,
171
4
,
1715
,
538
,
122
,
559
,
244
,
29
,
316
,
1292
,
/* 1040 */
1293
,
1294
,
1295
,
1296
,
1300
,
1301
,
1302
,
123
,
1219
,
17
40
,
/* 1050 */
172
7
,
548
,
86
,
1712
,
542
,
1714
,
1715
,
538
,
540
,
559
,
/* 1060 */
48
,
564
,
17
80
,
1681
,
1711
,
539
,
311
,
1776
,
1860
,
1289
,
/* 1070 */
122
,
123
,
110
,
122
,
5
,
250
,
336
,
181
5
,
1230
,
339
,
/* 1080 */
343
,
298
,
1174
,
1032
,
299
,
259
,
389
,
163
,
1063
,
396
,
/* 1090 */
17
39
,
1726
,
1623
,
86
,
1711
,
542
,
1713
,
1714
,
538
,
540
,
/* 1100 */
559
,
262
,
1091
,
17
79
,
1680
,
404
,
539
,
311
,
1775
,
1858
,
/* 1110 */
403
,
1095
,
1102
,
1100
,
126
,
405
,
409
,
1236
,
183
6
,
410
,
/* 1090 */
17
40
,
1727
,
1624
,
86
,
1712
,
542
,
1714
,
1715
,
538
,
540
,
/* 1100 */
559
,
262
,
1091
,
17
80
,
1681
,
404
,
539
,
311
,
1776
,
1860
,
/* 1110 */
403
,
1095
,
1102
,
1100
,
126
,
405
,
409
,
1236
,
183
8
,
410
,
/* 1120 */
418
,
1239
,
421
,
170
,
172
,
1238
,
422
,
423
,
1240
,
426
,
/* 1130 */
424
,
17
39
,
175
,
177
,
86
,
1711
,
542
,
1713
,
1714
,
538
,
/* 1140 */
171
0
,
559
,
427
,
1237
,
1779
,
428
,
180
,
450
,
311
,
1775
,
/* 1150 */
18
58
,
431
,
452
,
66
,
183
,
1523
,
187
,
1519
,
481
,
1797
,
/* 1160 */
189
,
128
,
307
,
89
,
260
,
129
,
152
1
,
1726
,
482
,
485
,
/* 1170 */
201
,
204
,
488
,
151
7
,
130
,
540
,
131
,
490
,
207
,
1235
,
/* 1180 */
168
0
,
210
,
539
,
1810
,
504
,
546
,
6
,
492
,
1662
,
1820
,
/* 1190 */
166
1
,
1819
,
513
,
1800
,
222
,
520
,
142
,
499
,
500
,
224
,
/* 1200 */
498
,
225
,
493
,
171
0
,
501
,
1330
,
310
,
1739
,
497
,
226
,
/* 1210 */
278
,
171
1
,
542
,
1713
,
1714
,
538
,
507
,
559
,
214
,
217
,
/* 1220 */
171
0
,
116
,
1234
,
42
,
1841
,
18
,
526
,
529
,
227
,
523
,
/* 1230 */
172
6
,
233
,
312
,
1861
,
544
,
545
,
1845
,
320
,
540
,
1794
,
/* 1240 */
16
29
,
549
,
246
,
1680
,
1628
,
539
,
551
,
1726
,
261
,
550
,
/* 1250 */
154
,
77
,
153
4
,
248
,
1842
,
540
,
75
,
562
,
520
,
264
,
/* 1260 */
168
0
,
228
,
539
,
1760
,
1577
,
1506
,
256
,
49
,
636
,
266
,
/* 1270 */
17
39
,
270
,
1674
,
278
,
1711
,
542
,
1713
,
1714
,
538
,
279
,
/* 1280 */
559
,
271
,
268
,
171
0
,
141
,
236
,
1673
,
1739
,
530
,
60
,
/* 1290 */
87
,
171
1
,
542
,
1713
,
1714
,
538
,
238
,
559
,
1672
,
1845
,
/* 1300 */
17
79
,
1710
,
338
,
1669
,
531
,
1775
,
340
,
341
,
1201
,
1202
,
/* 1310 */
172
6
,
159
,
345
,
152
,
1667
,
347
,
348
,
1842
,
537
,
349
,
/* 1320 */
166
6
,
1665
,
351
,
1680
,
353
,
539
,
1664
,
355
,
1726
,
1663
,
/* 1330 */
357
,
164
7
,
160
,
360
,
361
,
1177
,
540
,
1176
,
1641
,
1640
,
/* 1340 */
366
,
168
0
,
367
,
539
,
1639
,
1638
,
1149
,
1616
,
63
,
1615
,
/* 1350 */
17
39
,
378
,
1710
,
286
,
1711
,
542
,
1713
,
1714
,
538
,
536
,
/* 1360 */
559
,
533
,
175
1
,
1614
,
1613
,
1612
,
1611
,
1610
,
1739
,
379
,
/* 1370 */
640
,
138
,
171
1
,
542
,
1713
,
1714
,
538
,
381
,
559
,
1726
,
/* 1380 */
16
09
,
1608
,
1607
,
1606
,
258
,
1605
,
1604
,
540
,
1603
,
1602
,
/* 1390 */
160
1
,
1600
,
1680
,
516
,
539
,
1599
,
145
,
1598
,
1597
,
1596
,
/* 1400 */
120
,
159
5
,
631
,
627
,
623
,
619
,
257
,
1594
,
1593
,
1592
,
/* 1410 */
159
1
,
1590
,
1589
,
1710
,
1151
,
1588
,
521
,
1859
,
1587
,
1739
,
/* 1420 */
158
6
,
117
,
87
,
1711
,
542
,
1713
,
1714
,
538
,
1463
,
559
,
/* 1430 */
143
1
,
83
,
1779
,
168
,
251
,
146
,
970
,
1776
,
969
,
111
,
/* 1440 */
172
6
,
520
,
1430
,
169
,
414
,
1655
,
1649
,
416
,
540
,
1637
,
/* 1450 */
112
,
174
,
163
6
,
1680
,
176
,
539
,
1626
,
1512
,
179
,
1462
,
/* 1460 */
115
,
146
0
,
434
,
998
,
433
,
1458
,
1710
,
552
,
438
,
1456
,
/* 1470 */
432
,
145
4
,
437
,
436
,
441
,
229
,
1786
,
515
,
442
,
514
,
/* 1480 */
17
39
,
440
,
1845
,
282
,
1711
,
542
,
1713
,
1714
,
538
,
1710
,
/* 1490 */
559
,
444
,
445
,
172
6
,
1443
,
494
,
154
,
446
,
208
,
1442
,
/* 1500 */
184
2
,
540
,
1429
,
1514
,
186
,
1106
,
1680
,
516
,
539
,
1105
,
/* 1510 */
151
3
,
1031
,
1452
,
1030
,
1029
,
1028
,
1726
,
1182
,
606
,
202
,
/* 1520 */
608
,
1025
,
512
,
47
,
540
,
1024
,
304
,
1023
,
144
7
,
1680
,
/* 1530 */
305
,
539
,
469
,
17
39
,
1445
,
117
,
138
,
1711
,
542
,
1713
,
/* 1540 */
171
4
,
538
,
315
,
559
,
306
,
1710
,
1428
,
472
,
474
,
1427
,
/* 1550 */
88
,
476
,
165
4
,
1184
,
51
,
520
,
1739
,
1648
,
483
,
287
,
/* 1560 */
171
1
,
542
,
1713
,
1714
,
538
,
1635
,
559
,
1634
,
1633
,
1625
,
/* 1570 */
71
,
15
,
172
6
,
4
,
115
,
209
,
39
,
1371
,
23
,
213
,
/* 1580 */
537
,
205
,
186
0
,
484
,
45
,
1680
,
211
,
539
,
50
,
229
,
/* 1590 */
178
6
,
515
,
139
,
514
,
220
,
215
,
1845
,
132
,
1710
,
1355
,
/* 1600 */
219
,
24
,
221
,
134
8
,
1700
,
72
,
230
,
1710
,
143
,
1327
,
/* 1610 */
152
,
25
,
17
39
,
1326
,
1842
,
286
,
1711
,
542
,
1713
,
1714
,
/* 1620 */
538
,
171
0
,
559
,
44
,
1752
,
1726
,
1388
,
17
,
1383
,
1377
,
/* 1630 */
10
,
138
2
,
313
,
540
,
1726
,
1387
,
1386
,
314
,
1680
,
19
,
/* 1640 */
539
,
1269
,
540
,
1268
,
31
,
1290
,
144
,
168
0
,
1726
,
539
,
/* 1130 */
424
,
17
40
,
175
,
177
,
86
,
1712
,
542
,
1714
,
1715
,
538
,
/* 1140 */
171
1
,
559
,
427
,
1237
,
1780
,
428
,
180
,
450
,
311
,
1776
,
/* 1150 */
18
60
,
431
,
452
,
66
,
183
,
1524
,
187
,
1520
,
481
,
1799
,
/* 1160 */
189
,
128
,
307
,
89
,
260
,
129
,
152
2
,
1727
,
482
,
485
,
/* 1170 */
201
,
204
,
488
,
151
8
,
130
,
540
,
131
,
490
,
207
,
1235
,
/* 1180 */
168
1
,
210
,
539
,
1812
,
504
,
546
,
6
,
492
,
1663
,
1822
,
/* 1190 */
166
2
,
1821
,
513
,
1802
,
222
,
520
,
142
,
499
,
500
,
224
,
/* 1200 */
498
,
225
,
493
,
171
1
,
501
,
1331
,
310
,
1740
,
497
,
226
,
/* 1210 */
278
,
171
2
,
542
,
1714
,
1715
,
538
,
507
,
559
,
214
,
217
,
/* 1220 */
171
1
,
116
,
1234
,
42
,
1843
,
18
,
526
,
529
,
227
,
523
,
/* 1230 */
172
7
,
233
,
312
,
1863
,
544
,
545
,
1847
,
320
,
540
,
1796
,
/* 1240 */
16
30
,
549
,
246
,
1681
,
1629
,
539
,
551
,
1727
,
261
,
550
,
/* 1250 */
154
,
77
,
153
5
,
248
,
1844
,
540
,
75
,
562
,
520
,
264
,
/* 1260 */
168
1
,
228
,
539
,
1761
,
1578
,
1507
,
256
,
49
,
636
,
266
,
/* 1270 */
17
40
,
270
,
1675
,
278
,
1712
,
542
,
1714
,
1715
,
538
,
279
,
/* 1280 */
559
,
271
,
268
,
171
1
,
141
,
236
,
1674
,
1740
,
530
,
60
,
/* 1290 */
87
,
171
2
,
542
,
1714
,
1715
,
538
,
238
,
559
,
1673
,
1847
,
/* 1300 */
17
80
,
1711
,
338
,
1670
,
531
,
1776
,
340
,
341
,
1201
,
1202
,
/* 1310 */
172
7
,
159
,
345
,
152
,
1668
,
347
,
348
,
1844
,
537
,
349
,
/* 1320 */
166
7
,
1666
,
351
,
1681
,
353
,
539
,
1665
,
355
,
1727
,
1664
,
/* 1330 */
357
,
164
8
,
160
,
360
,
361
,
1177
,
540
,
1176
,
1642
,
1641
,
/* 1340 */
366
,
168
1
,
367
,
539
,
1640
,
1639
,
1149
,
1617
,
63
,
1616
,
/* 1350 */
17
40
,
378
,
1711
,
286
,
1712
,
542
,
1714
,
1715
,
538
,
536
,
/* 1360 */
559
,
533
,
175
2
,
1615
,
1614
,
1613
,
1612
,
1611
,
1740
,
379
,
/* 1370 */
640
,
138
,
171
2
,
542
,
1714
,
1715
,
538
,
381
,
559
,
1727
,
/* 1380 */
16
10
,
1609
,
1608
,
1607
,
258
,
1606
,
1605
,
540
,
1604
,
1603
,
/* 1390 */
160
2
,
1601
,
1681
,
516
,
539
,
1600
,
145
,
1599
,
1598
,
1597
,
/* 1400 */
120
,
159
6
,
631
,
627
,
623
,
619
,
257
,
1595
,
1594
,
1593
,
/* 1410 */
159
2
,
1591
,
1590
,
1711
,
1151
,
1589
,
521
,
1861
,
1588
,
1740
,
/* 1420 */
158
7
,
117
,
87
,
1712
,
542
,
1714
,
1715
,
538
,
1464
,
559
,
/* 1430 */
143
2
,
83
,
1780
,
168
,
251
,
146
,
970
,
1777
,
969
,
111
,
/* 1440 */
172
7
,
520
,
1431
,
169
,
414
,
1656
,
1650
,
416
,
540
,
1638
,
/* 1450 */
112
,
174
,
163
7
,
1681
,
176
,
539
,
1627
,
1513
,
179
,
1463
,
/* 1460 */
115
,
146
1
,
434
,
998
,
433
,
1459
,
1711
,
552
,
438
,
1457
,
/* 1470 */
432
,
145
5
,
437
,
436
,
441
,
229
,
1788
,
515
,
442
,
514
,
/* 1480 */
17
40
,
440
,
1847
,
282
,
1712
,
542
,
1714
,
1715
,
538
,
1711
,
/* 1490 */
559
,
444
,
445
,
172
7
,
1444
,
494
,
154
,
446
,
208
,
1443
,
/* 1500 */
184
4
,
540
,
1430
,
1515
,
186
,
1106
,
1681
,
516
,
539
,
1105
,
/* 1510 */
151
4
,
1031
,
1453
,
1030
,
1029
,
1028
,
1727
,
1182
,
606
,
202
,
/* 1520 */
608
,
1025
,
512
,
47
,
540
,
1024
,
304
,
1023
,
144
8
,
1681
,
/* 1530 */
305
,
539
,
469
,
17
40
,
1446
,
117
,
138
,
1712
,
542
,
1714
,
/* 1540 */
171
5
,
538
,
315
,
559
,
306
,
1711
,
1429
,
472
,
474
,
1428
,
/* 1550 */
88
,
476
,
165
5
,
1184
,
51
,
520
,
1740
,
1649
,
483
,
287
,
/* 1560 */
171
2
,
542
,
1714
,
1715
,
538
,
1636
,
559
,
1635
,
1634
,
1626
,
/* 1570 */
71
,
15
,
172
7
,
4
,
115
,
209
,
39
,
1372
,
23
,
213
,
/* 1580 */
537
,
205
,
186
2
,
484
,
45
,
1681
,
211
,
539
,
50
,
229
,
/* 1590 */
178
8
,
515
,
139
,
514
,
220
,
215
,
1847
,
132
,
1711
,
1356
,
/* 1600 */
219
,
24
,
221
,
134
9
,
1701
,
72
,
230
,
1711
,
143
,
1328
,
/* 1610 */
152
,
25
,
17
40
,
1327
,
1844
,
286
,
1712
,
542
,
1714
,
1715
,
/* 1620 */
538
,
171
1
,
559
,
44
,
1753
,
1727
,
1389
,
17
,
1384
,
1378
,
/* 1630 */
10
,
138
3
,
313
,
540
,
1727
,
1388
,
1387
,
314
,
1681
,
19
,
/* 1640 */
539
,
1269
,
540
,
1268
,
31
,
1290
,
144
,
168
1
,
1727
,
539
,
/* 1650 */
156
,
317
,
16
,
12
,
13
,
20
,
540
,
43
,
1254
,
21
,
/* 1660 */
319
,
168
0
,
1710
,
539
,
1624
,
1739
,
541
,
247
,
287
,
1711
,
/* 1670 */
542
,
171
3
,
1714
,
538
,
1739
,
559
,
241
,
287
,
1711
,
542
,
/* 1680 */
171
3
,
1714
,
538
,
1710
,
559
,
1353
,
243
,
547
,
1739
,
1726
,
/* 1690 */
245
,
273
,
171
1
,
542
,
1713
,
1714
,
538
,
540
,
559
,
73
,
/* 1700 */
74
,
78
,
168
0
,
1699
,
539
,
252
,
1742
,
1224
,
1271
,
249
,
/* 1710 */
172
6
,
1092
,
558
,
46
,
561
,
563
,
327
,
1089
,
540
,
565
,
/* 1720 */
567
,
568
,
570
,
168
0
,
1086
,
539
,
571
,
573
,
1080
,
1739
,
/* 1730 */
574
,
576
,
274
,
171
1
,
542
,
1713
,
1714
,
538
,
1078
,
559
,
/* 1740 */
1069
,
171
0
,
1084
,
583
,
577
,
1101
,
1083
,
79
,
1082
,
1081
,
/* 1750 */
17
39
,
80
,
1710
,
281
,
1711
,
542
,
1713
,
1714
,
538
,
57
,
/* 1760 */
559
,
254
,
1097
,
171
0
,
996
,
592
,
1020
,
595
,
1726
,
255
,
/* 1770 */
1038
,
1013
,
1018
,
1017
,
1016
,
1035
,
540
,
1015
,
1014
,
172
6
,
/* 1780 */
1012
,
168
0
,
1011
,
539
,
1033
,
1008
,
1007
,
540
,
1006
,
1003
,
/* 1790 */
172
6
,
1002
,
1680
,
1001
,
539
,
1459
,
617
,
616
,
540
,
618
,
/* 1800 */
145
7
,
620
,
621
,
1680
,
622
,
539
,
1455
,
624
,
1739
,
625
,
/* 1810 */
626
,
283
,
171
1
,
542
,
1713
,
1714
,
538
,
1453
,
559
,
1739
,
/* 1820 */
629
,
628
,
275
,
171
1
,
542
,
1713
,
1714
,
538
,
1710
,
559
,
/* 1830 */
17
39
,
630
,
1441
,
284
,
1711
,
542
,
1713
,
1714
,
538
,
632
,
/* 1840 */
559
,
142
6
,
634
,
635
,
1710
,
1210
,
265
,
638
,
639
,
1401
,
/* 1850 */
140
1
,
1401
,
1401
,
1401
,
1401
,
1726
,
1401
,
1401
,
1401
,
1401
,
/* 1860 */
140
1
,
1401
,
1401
,
540
,
1401
,
1401
,
1401
,
1401
,
1680
,
1401
,
/* 1870 */
539
,
172
6
,
1401
,
1401
,
1401
,
1401
,
1401
,
1401
,
1401
,
540
,
/* 1880 */
140
1
,
1401
,
1401
,
1401
,
1680
,
1401
,
539
,
1401
,
1401
,
1401
,
/* 1890 */
140
1
,
1401
,
1401
,
1710
,
1401
,
1739
,
1401
,
1401
,
276
,
1711
,
/* 1900 */
542
,
171
3
,
1714
,
538
,
1401
,
559
,
1401
,
1710
,
1401
,
1401
,
/* 1910 */
140
1
,
1739
,
1401
,
1401
,
285
,
1711
,
542
,
1713
,
1714
,
538
,
/* 1920 */
172
6
,
559
,
1401
,
1401
,
1401
,
1401
,
1401
,
1401
,
540
,
1401
,
/* 1930 */
140
1
,
1401
,
1401
,
1680
,
1726
,
539
,
1401
,
1401
,
1401
,
1401
,
/* 1940 */
140
1
,
1401
,
540
,
1401
,
1401
,
1401
,
1401
,
1680
,
1710
,
539
,
/* 1950 */
140
1
,
1401
,
1401
,
1401
,
1401
,
1401
,
1401
,
1401
,
1401
,
1401
,
/* 1960 */
17
39
,
1401
,
1401
,
277
,
1711
,
542
,
1713
,
1714
,
538
,
1710
,
/* 1970 */
559
,
140
1
,
1401
,
1401
,
1739
,
1726
,
1401
,
1722
,
1711
,
542
,
/* 1980 */
171
3
,
1714
,
538
,
540
,
559
,
1401
,
1401
,
1401
,
1680
,
1401
,
/* 1990 */
539
,
140
1
,
1401
,
1401
,
1401
,
1401
,
1726
,
1401
,
1401
,
1401
,
/* 2000 */
140
1
,
1401
,
1401
,
1401
,
540
,
1401
,
1401
,
1401
,
1401
,
1680
,
/* 2010 */
140
1
,
539
,
1401
,
1401
,
1401
,
1739
,
1401
,
1401
,
1721
,
1711
,
/* 2020 */
542
,
171
3
,
1714
,
538
,
1401
,
559
,
1401
,
1710
,
1401
,
1401
,
/* 2030 */
140
1
,
1401
,
1401
,
1401
,
1401
,
1401
,
1739
,
1401
,
1710
,
1720
,
/* 2040 */
171
1
,
542
,
1713
,
1714
,
538
,
1401
,
559
,
1401
,
1401
,
1710
,
/* 2050 */
140
1
,
1401
,
1401
,
1401
,
1726
,
1401
,
1401
,
1401
,
1401
,
1401
,
/* 2060 */
140
1
,
1401
,
540
,
1401
,
1401
,
1726
,
1401
,
1680
,
1401
,
539
,
/* 2070 */
140
1
,
1401
,
1401
,
540
,
1401
,
1401
,
1726
,
1401
,
1680
,
1401
,
/* 2080 */
539
,
140
1
,
1401
,
1401
,
540
,
1401
,
1401
,
1401
,
1401
,
1680
,
/* 2090 */
171
0
,
539
,
1401
,
1401
,
1739
,
1401
,
1401
,
296
,
1711
,
542
,
/* 2100 */
171
3
,
1714
,
538
,
1401
,
559
,
1739
,
1401
,
1401
,
295
,
1711
,
/* 2110 */
542
,
171
3
,
1714
,
538
,
1710
,
559
,
1739
,
1726
,
1401
,
297
,
/* 2120 */
171
1
,
542
,
1713
,
1714
,
538
,
540
,
559
,
1401
,
1401
,
1401
,
/* 2130 */
168
0
,
1401
,
539
,
1401
,
1401
,
1401
,
1401
,
1401
,
1401
,
1401
,
/* 2140 */
140
1
,
1726
,
1401
,
1401
,
1401
,
1401
,
1401
,
1401
,
1401
,
540
,
/* 2150 */
140
1
,
1401
,
1401
,
1401
,
1680
,
1401
,
539
,
1739
,
1401
,
1401
,
/* 2160 */
294
,
171
1
,
542
,
1713
,
1714
,
538
,
1401
,
559
,
1401
,
1401
,
/* 2170 */
140
1
,
1401
,
1401
,
1401
,
1401
,
1401
,
1401
,
1401
,
1401
,
1401
,
/* 2180 */
140
1
,
1739
,
1401
,
1401
,
280
,
1711
,
542
,
1713
,
1714
,
538
,
/* 2190 */
140
1
,
559
,
/* 1660 */
319
,
168
1
,
1711
,
539
,
1625
,
1740
,
541
,
247
,
287
,
1712
,
/* 1670 */
542
,
171
4
,
1715
,
538
,
1740
,
559
,
241
,
287
,
1712
,
542
,
/* 1680 */
171
4
,
1715
,
538
,
1711
,
559
,
1354
,
243
,
547
,
1740
,
1727
,
/* 1690 */
245
,
273
,
171
2
,
542
,
1714
,
1715
,
538
,
540
,
559
,
73
,
/* 1700 */
74
,
78
,
168
1
,
1700
,
539
,
252
,
1743
,
1224
,
1271
,
249
,
/* 1710 */
172
7
,
1092
,
558
,
46
,
561
,
563
,
327
,
1089
,
540
,
565
,
/* 1720 */
567
,
568
,
570
,
168
1
,
1086
,
539
,
571
,
573
,
1080
,
1740
,
/* 1730 */
574
,
576
,
274
,
171
2
,
542
,
1714
,
1715
,
538
,
1078
,
559
,
/* 1740 */
1069
,
171
1
,
1084
,
583
,
577
,
1101
,
1083
,
79
,
1082
,
1081
,
/* 1750 */
17
40
,
80
,
1711
,
281
,
1712
,
542
,
1714
,
1715
,
538
,
57
,
/* 1760 */
559
,
254
,
1097
,
171
1
,
996
,
592
,
1020
,
595
,
1727
,
255
,
/* 1770 */
1038
,
1013
,
1018
,
1017
,
1016
,
1035
,
540
,
1015
,
1014
,
172
7
,
/* 1780 */
1012
,
168
1
,
1011
,
539
,
1033
,
1008
,
1007
,
540
,
1006
,
1003
,
/* 1790 */
172
7
,
1002
,
1681
,
1001
,
539
,
1460
,
617
,
616
,
540
,
618
,
/* 1800 */
145
8
,
620
,
621
,
1681
,
622
,
539
,
1456
,
624
,
1740
,
625
,
/* 1810 */
626
,
283
,
171
2
,
542
,
1714
,
1715
,
538
,
1454
,
559
,
1740
,
/* 1820 */
629
,
628
,
275
,
171
2
,
542
,
1714
,
1715
,
538
,
1711
,
559
,
/* 1830 */
17
40
,
630
,
1442
,
284
,
1712
,
542
,
1714
,
1715
,
538
,
632
,
/* 1840 */
559
,
142
7
,
634
,
635
,
1711
,
1210
,
265
,
638
,
639
,
1402
,
/* 1850 */
140
2
,
1402
,
1402
,
1402
,
1402
,
1727
,
1402
,
1402
,
1402
,
1402
,
/* 1860 */
140
2
,
1402
,
1402
,
540
,
1402
,
1402
,
1402
,
1402
,
1681
,
1402
,
/* 1870 */
539
,
172
7
,
1402
,
1402
,
1402
,
1402
,
1402
,
1402
,
1402
,
540
,
/* 1880 */
140
2
,
1402
,
1402
,
1402
,
1681
,
1402
,
539
,
1402
,
1402
,
1402
,
/* 1890 */
140
2
,
1402
,
1402
,
1711
,
1402
,
1740
,
1402
,
1402
,
276
,
1712
,
/* 1900 */
542
,
171
4
,
1715
,
538
,
1402
,
559
,
1402
,
1711
,
1402
,
1402
,
/* 1910 */
140
2
,
1740
,
1402
,
1402
,
285
,
1712
,
542
,
1714
,
1715
,
538
,
/* 1920 */
172
7
,
559
,
1402
,
1402
,
1402
,
1402
,
1402
,
1402
,
540
,
1402
,
/* 1930 */
140
2
,
1402
,
1402
,
1681
,
1727
,
539
,
1402
,
1402
,
1402
,
1402
,
/* 1940 */
140
2
,
1402
,
540
,
1402
,
1402
,
1402
,
1402
,
1681
,
1711
,
539
,
/* 1950 */
140
2
,
1402
,
1402
,
1402
,
1402
,
1402
,
1402
,
1402
,
1402
,
1402
,
/* 1960 */
17
40
,
1402
,
1402
,
277
,
1712
,
542
,
1714
,
1715
,
538
,
1711
,
/* 1970 */
559
,
140
2
,
1402
,
1402
,
1740
,
1727
,
1402
,
1723
,
1712
,
542
,
/* 1980 */
171
4
,
1715
,
538
,
540
,
559
,
1402
,
1402
,
1402
,
1681
,
1402
,
/* 1990 */
539
,
140
2
,
1402
,
1402
,
1402
,
1402
,
1727
,
1402
,
1402
,
1402
,
/* 2000 */
140
2
,
1402
,
1402
,
1402
,
540
,
1402
,
1402
,
1402
,
1402
,
1681
,
/* 2010 */
140
2
,
539
,
1402
,
1402
,
1402
,
1740
,
1402
,
1402
,
1722
,
1712
,
/* 2020 */
542
,
171
4
,
1715
,
538
,
1402
,
559
,
1402
,
1711
,
1402
,
1402
,
/* 2030 */
140
2
,
1402
,
1402
,
1402
,
1402
,
1402
,
1740
,
1402
,
1711
,
1721
,
/* 2040 */
171
2
,
542
,
1714
,
1715
,
538
,
1402
,
559
,
1402
,
1402
,
1711
,
/* 2050 */
140
2
,
1402
,
1402
,
1402
,
1727
,
1402
,
1402
,
1402
,
1402
,
1402
,
/* 2060 */
140
2
,
1402
,
540
,
1402
,
1402
,
1727
,
1402
,
1681
,
1402
,
539
,
/* 2070 */
140
2
,
1402
,
1402
,
540
,
1402
,
1402
,
1727
,
1402
,
1681
,
1402
,
/* 2080 */
539
,
140
2
,
1402
,
1402
,
540
,
1402
,
1402
,
1402
,
1402
,
1681
,
/* 2090 */
171
1
,
539
,
1402
,
1402
,
1740
,
1402
,
1402
,
296
,
1712
,
542
,
/* 2100 */
171
4
,
1715
,
538
,
1402
,
559
,
1740
,
1402
,
1402
,
295
,
1712
,
/* 2110 */
542
,
171
4
,
1715
,
538
,
1711
,
559
,
1740
,
1727
,
1402
,
297
,
/* 2120 */
171
2
,
542
,
1714
,
1715
,
538
,
540
,
559
,
1402
,
1402
,
1402
,
/* 2130 */
168
1
,
1402
,
539
,
1402
,
1402
,
1402
,
1402
,
1402
,
1402
,
1402
,
/* 2140 */
140
2
,
1727
,
1402
,
1402
,
1402
,
1402
,
1402
,
1402
,
1402
,
540
,
/* 2150 */
140
2
,
1402
,
1402
,
1402
,
1681
,
1402
,
539
,
1740
,
1402
,
1402
,
/* 2160 */
294
,
171
2
,
542
,
1714
,
1715
,
538
,
1402
,
559
,
1402
,
1402
,
/* 2170 */
140
2
,
1402
,
1402
,
1402
,
1402
,
1402
,
1402
,
1402
,
1402
,
1402
,
/* 2180 */
140
2
,
1740
,
1402
,
1402
,
280
,
1712
,
542
,
1714
,
1715
,
538
,
/* 2190 */
140
2
,
559
,
};
static
const
YYCODETYPE
yy_lookahead
[]
=
{
/* 0 */
274
,
341
,
273
,
277
,
248
,
274
,
250
,
251
,
277
,
242
,
...
...
@@ -763,71 +763,71 @@ static const short yy_reduce_ofst[] = {
/* 260 */
977
,
1005
,
1013
,
1015
,
1014
,
1039
,
};
static
const
YYACTIONTYPE
yy_default
[]
=
{
/* 0 */
1
399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
/* 10 */
1
399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
/* 20 */
1
399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
/* 30 */
1
399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
/* 40 */
1
399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
/* 50 */
1
399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
/* 60 */
1
399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1468
,
1399
,
/* 70 */
1
399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
/* 80 */
1
399
,
1399
,
1399
,
1466
,
1617
,
1399
,
1781
,
1399
,
1399
,
1399
,
/* 90 */
1
399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
/* 100 */
1
399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
/* 110 */
1
399
,
1399
,
1399
,
1468
,
1399
,
1792
,
1792
,
1792
,
1466
,
1399
,
/* 120 */
1
399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1562
,
1399
,
1399
,
1399
,
/* 130 */
1
399
,
1399
,
1399
,
1399
,
1399
,
1650
,
1399
,
1399
,
1862
,
1399
,
/* 140 */
1
399
,
1656
,
1816
,
1399
,
1399
,
1399
,
1399
,
1515
,
1808
,
1784
,
/* 150 */
1
798
,
1785
,
1847
,
1847
,
1847
,
1801
,
1399
,
1812
,
1399
,
1399
,
/* 160 */
1
399
,
1642
,
1399
,
1399
,
1622
,
1619
,
1619
,
1399
,
1399
,
1399
,
/* 170 */
1
399
,
1468
,
1399
,
1468
,
1399
,
1399
,
1468
,
1399
,
1468
,
1399
,
/* 180 */
1
399
,
1468
,
1468
,
1399
,
1468
,
1399
,
1399
,
1399
,
1399
,
1399
,
/* 190 */
1
399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
/* 200 */
1
399
,
1399
,
1466
,
1652
,
1399
,
1466
,
1399
,
1399
,
1466
,
1399
,
/* 210 */
1
399
,
1466
,
1399
,
1399
,
1823
,
1821
,
1399
,
1823
,
1821
,
1399
,
/* 220 */
1
399
,
1399
,
1835
,
1831
,
1823
,
1839
,
1837
,
1814
,
1812
,
1798
,
/* 230 */
1
399
,
1399
,
1399
,
1853
,
1849
,
1865
,
1853
,
1849
,
1853
,
1849
,
/* 240 */
1
399
,
1821
,
1399
,
1399
,
1821
,
1399
,
1627
,
1399
,
1399
,
1466
,
/* 250 */
1
399
,
1466
,
1399
,
1531
,
1399
,
1399
,
1399
,
1466
,
1399
,
1644
,
/* 260 */
165
8
,
1565
,
1565
,
1565
,
1469
,
1404
,
1399
,
1399
,
1399
,
1399
,
/* 270 */
1
399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1527
,
/* 280 */
172
5
,
1834
,
1833
,
1757
,
1756
,
1755
,
1753
,
1724
,
1399
,
1399
,
/* 290 */
1
399
,
1399
,
1399
,
1399
,
1718
,
1719
,
1717
,
1716
,
1399
,
1399
,
/* 300 */
1
399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
/* 310 */
1
399
,
1782
,
1399
,
1850
,
1854
,
1399
,
1399
,
1399
,
1701
,
1399
,
/* 320 */
1
399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
/* 330 */
1
399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
/* 340 */
1
399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
/* 350 */
1
399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
/* 360 */
1
399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
/* 370 */
1
399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
/* 380 */
1
399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
/* 390 */
1
399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
/* 400 */
1
399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
/* 410 */
1
399
,
1399
,
1399
,
1433
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
/* 420 */
1
399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
/* 430 */
1
399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
/* 440 */
1
399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
/* 450 */
1
399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
/* 460 */
1
399
,
1496
,
1495
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
/* 470 */
1
399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
/* 480 */
1
399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
/* 490 */
1
399
,
1399
,
1399
,
1399
,
1399
,
1805
,
1815
,
1399
,
1399
,
1399
,
/* 500 */
1
399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
/* 510 */
170
1
,
1399
,
1832
,
1399
,
1791
,
1787
,
1399
,
1399
,
1783
,
1399
,
/* 520 */
1
399
,
1848
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
/* 530 */
1
399
,
1777
,
1399
,
1750
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
/* 540 */
1
399
,
1399
,
1712
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
/* 550 */
1
399
,
1399
,
1399
,
1399
,
1399
,
1700
,
1399
,
1741
,
1399
,
1399
,
/* 560 */
1
399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1559
,
1399
,
1399
,
1399
,
/* 570 */
1
399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1544
,
/* 580 */
154
2
,
1541
,
1540
,
1399
,
1537
,
1399
,
1399
,
1399
,
1399
,
1568
,
/* 590 */
156
7
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1488
,
1399
,
1399
,
/* 600 */
1
399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1479
,
1399
,
1478
,
/* 610 */
1
399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
/* 620 */
1
399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
/* 630 */
1
399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
1399
,
/* 640 */
1
399
,
/* 0 */
1
400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
/* 10 */
1
400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
/* 20 */
1
400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
/* 30 */
1
400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
/* 40 */
1
400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
/* 50 */
1
400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
/* 60 */
1
400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1469
,
1400
,
/* 70 */
1
400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
/* 80 */
1
400
,
1400
,
1400
,
1467
,
1618
,
1400
,
1782
,
1400
,
1400
,
1400
,
/* 90 */
1
400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
/* 100 */
1
400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
/* 110 */
1
400
,
1400
,
1400
,
1469
,
1400
,
1794
,
1794
,
1794
,
1467
,
1400
,
/* 120 */
1
400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1563
,
1400
,
1400
,
1400
,
/* 130 */
1
400
,
1400
,
1400
,
1400
,
1400
,
1651
,
1400
,
1400
,
1864
,
1400
,
/* 140 */
1
400
,
1657
,
1818
,
1400
,
1400
,
1400
,
1400
,
1516
,
1810
,
1786
,
/* 150 */
1
800
,
1787
,
1849
,
1849
,
1849
,
1803
,
1400
,
1814
,
1400
,
1400
,
/* 160 */
1
400
,
1643
,
1400
,
1400
,
1623
,
1620
,
1620
,
1400
,
1400
,
1400
,
/* 170 */
1
400
,
1469
,
1400
,
1469
,
1400
,
1400
,
1469
,
1400
,
1469
,
1400
,
/* 180 */
1
400
,
1469
,
1469
,
1400
,
1469
,
1400
,
1400
,
1400
,
1400
,
1400
,
/* 190 */
1
400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
/* 200 */
1
400
,
1400
,
1467
,
1653
,
1400
,
1467
,
1400
,
1400
,
1467
,
1400
,
/* 210 */
1
400
,
1467
,
1400
,
1400
,
1825
,
1823
,
1400
,
1825
,
1823
,
1400
,
/* 220 */
1
400
,
1400
,
1837
,
1833
,
1825
,
1841
,
1839
,
1816
,
1814
,
1800
,
/* 230 */
1
400
,
1400
,
1784
,
1855
,
1851
,
1867
,
1855
,
1851
,
1855
,
1851
,
/* 240 */
1
400
,
1823
,
1400
,
1400
,
1823
,
1400
,
1628
,
1400
,
1400
,
1467
,
/* 250 */
1
400
,
1467
,
1400
,
1532
,
1400
,
1400
,
1400
,
1467
,
1400
,
1645
,
/* 260 */
165
9
,
1566
,
1566
,
1566
,
1470
,
1405
,
1400
,
1400
,
1400
,
1400
,
/* 270 */
1
400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1528
,
/* 280 */
172
6
,
1836
,
1835
,
1758
,
1757
,
1756
,
1754
,
1725
,
1400
,
1400
,
/* 290 */
1
400
,
1400
,
1400
,
1400
,
1719
,
1720
,
1718
,
1717
,
1400
,
1400
,
/* 300 */
1
400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
/* 310 */
1
400
,
1783
,
1400
,
1852
,
1856
,
1400
,
1400
,
1400
,
1702
,
1400
,
/* 320 */
1
400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
/* 330 */
1
400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
/* 340 */
1
400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
/* 350 */
1
400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
/* 360 */
1
400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
/* 370 */
1
400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
/* 380 */
1
400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
/* 390 */
1
400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
/* 400 */
1
400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
/* 410 */
1
400
,
1400
,
1400
,
1434
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
/* 420 */
1
400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
/* 430 */
1
400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
/* 440 */
1
400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
/* 450 */
1
400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
/* 460 */
1
400
,
1497
,
1496
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
/* 470 */
1
400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
/* 480 */
1
400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
/* 490 */
1
400
,
1400
,
1400
,
1400
,
1400
,
1807
,
1817
,
1400
,
1400
,
1400
,
/* 500 */
1
400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
/* 510 */
170
2
,
1400
,
1834
,
1400
,
1793
,
1789
,
1400
,
1400
,
1785
,
1400
,
/* 520 */
1
400
,
1850
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
/* 530 */
1
400
,
1778
,
1400
,
1751
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
/* 540 */
1
400
,
1400
,
1713
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
/* 550 */
1
400
,
1400
,
1400
,
1400
,
1400
,
1701
,
1400
,
1742
,
1400
,
1400
,
/* 560 */
1
400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1560
,
1400
,
1400
,
1400
,
/* 570 */
1
400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1545
,
/* 580 */
154
3
,
1542
,
1541
,
1400
,
1538
,
1400
,
1400
,
1400
,
1400
,
1569
,
/* 590 */
156
8
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1489
,
1400
,
1400
,
/* 600 */
1
400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1480
,
1400
,
1479
,
/* 610 */
1
400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
/* 620 */
1
400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
/* 630 */
1
400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
1400
,
/* 640 */
1
400
,
};
/********** End of lemon-generated parsing tables *****************************/
...
...
@@ -1508,7 +1508,7 @@ static const char *const yyTokenName[] = {
/* 329 */
"boolean_value_expression"
,
/* 330 */
"boolean_primary"
,
/* 331 */
"common_expression"
,
/* 332 */
"from_clause"
,
/* 332 */
"from_clause
_opt
"
,
/* 333 */
"table_reference_list"
,
/* 334 */
"table_reference"
,
/* 335 */
"table_primary"
,
...
...
@@ -1928,91 +1928,92 @@ static const char *const yyRuleName[] = {
/* 378 */
"boolean_primary ::= NK_LP boolean_value_expression NK_RP"
,
/* 379 */
"common_expression ::= expression"
,
/* 380 */
"common_expression ::= boolean_value_expression"
,
/* 381 */
"from_clause ::= FROM table_reference_list"
,
/* 382 */
"table_reference_list ::= table_reference"
,
/* 383 */
"table_reference_list ::= table_reference_list NK_COMMA table_reference"
,
/* 384 */
"table_reference ::= table_primary"
,
/* 385 */
"table_reference ::= joined_table"
,
/* 386 */
"table_primary ::= table_name alias_opt"
,
/* 387 */
"table_primary ::= db_name NK_DOT table_name alias_opt"
,
/* 388 */
"table_primary ::= subquery alias_opt"
,
/* 389 */
"table_primary ::= parenthesized_joined_table"
,
/* 390 */
"alias_opt ::="
,
/* 391 */
"alias_opt ::= table_alias"
,
/* 392 */
"alias_opt ::= AS table_alias"
,
/* 393 */
"parenthesized_joined_table ::= NK_LP joined_table NK_RP"
,
/* 394 */
"parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP"
,
/* 395 */
"joined_table ::= table_reference join_type JOIN table_reference ON search_condition"
,
/* 396 */
"join_type ::="
,
/* 397 */
"join_type ::= INNER"
,
/* 398 */
"query_specification ::= SELECT set_quantifier_opt select_list from_clause where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt"
,
/* 399 */
"set_quantifier_opt ::="
,
/* 400 */
"set_quantifier_opt ::= DISTINCT"
,
/* 401 */
"set_quantifier_opt ::= ALL"
,
/* 402 */
"select_list ::= NK_STAR"
,
/* 403 */
"select_list ::= select_sublist"
,
/* 404 */
"select_sublist ::= select_item"
,
/* 405 */
"select_sublist ::= select_sublist NK_COMMA select_item"
,
/* 406 */
"select_item ::= common_expression"
,
/* 407 */
"select_item ::= common_expression column_alias"
,
/* 408 */
"select_item ::= common_expression AS column_alias"
,
/* 409 */
"select_item ::= table_name NK_DOT NK_STAR"
,
/* 410 */
"where_clause_opt ::="
,
/* 411 */
"where_clause_opt ::= WHERE search_condition"
,
/* 412 */
"partition_by_clause_opt ::="
,
/* 413 */
"partition_by_clause_opt ::= PARTITION BY expression_list"
,
/* 414 */
"twindow_clause_opt ::="
,
/* 415 */
"twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP"
,
/* 416 */
"twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP"
,
/* 417 */
"twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt"
,
/* 418 */
"twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt"
,
/* 419 */
"sliding_opt ::="
,
/* 420 */
"sliding_opt ::= SLIDING NK_LP duration_literal NK_RP"
,
/* 421 */
"fill_opt ::="
,
/* 422 */
"fill_opt ::= FILL NK_LP fill_mode NK_RP"
,
/* 423 */
"fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP"
,
/* 424 */
"fill_mode ::= NONE"
,
/* 425 */
"fill_mode ::= PREV"
,
/* 426 */
"fill_mode ::= NULL"
,
/* 427 */
"fill_mode ::= LINEAR"
,
/* 428 */
"fill_mode ::= NEXT"
,
/* 429 */
"group_by_clause_opt ::="
,
/* 430 */
"group_by_clause_opt ::= GROUP BY group_by_list"
,
/* 431 */
"group_by_list ::= expression"
,
/* 432 */
"group_by_list ::= group_by_list NK_COMMA expression"
,
/* 433 */
"having_clause_opt ::="
,
/* 434 */
"having_clause_opt ::= HAVING search_condition"
,
/* 435 */
"range_opt ::="
,
/* 436 */
"range_opt ::= RANGE NK_LP expression NK_COMMA expression NK_RP"
,
/* 437 */
"every_opt ::="
,
/* 438 */
"every_opt ::= EVERY NK_LP duration_literal NK_RP"
,
/* 439 */
"query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt"
,
/* 440 */
"query_expression_body ::= query_primary"
,
/* 441 */
"query_expression_body ::= query_expression_body UNION ALL query_expression_body"
,
/* 442 */
"query_expression_body ::= query_expression_body UNION query_expression_body"
,
/* 443 */
"query_primary ::= query_specification"
,
/* 444 */
"query_primary ::= NK_LP query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt NK_RP"
,
/* 445 */
"order_by_clause_opt ::="
,
/* 446 */
"order_by_clause_opt ::= ORDER BY sort_specification_list"
,
/* 447 */
"slimit_clause_opt ::="
,
/* 448 */
"slimit_clause_opt ::= SLIMIT NK_INTEGER"
,
/* 449 */
"slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER"
,
/* 450 */
"slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER"
,
/* 451 */
"limit_clause_opt ::="
,
/* 452 */
"limit_clause_opt ::= LIMIT NK_INTEGER"
,
/* 453 */
"limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER"
,
/* 454 */
"limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER"
,
/* 455 */
"subquery ::= NK_LP query_expression NK_RP"
,
/* 456 */
"search_condition ::= common_expression"
,
/* 457 */
"sort_specification_list ::= sort_specification"
,
/* 458 */
"sort_specification_list ::= sort_specification_list NK_COMMA sort_specification"
,
/* 459 */
"sort_specification ::= expression ordering_specification_opt null_ordering_opt"
,
/* 460 */
"ordering_specification_opt ::="
,
/* 461 */
"ordering_specification_opt ::= ASC"
,
/* 462 */
"ordering_specification_opt ::= DESC"
,
/* 463 */
"null_ordering_opt ::="
,
/* 464 */
"null_ordering_opt ::= NULLS FIRST"
,
/* 465 */
"null_ordering_opt ::= NULLS LAST"
,
/* 381 */
"from_clause_opt ::="
,
/* 382 */
"from_clause_opt ::= FROM table_reference_list"
,
/* 383 */
"table_reference_list ::= table_reference"
,
/* 384 */
"table_reference_list ::= table_reference_list NK_COMMA table_reference"
,
/* 385 */
"table_reference ::= table_primary"
,
/* 386 */
"table_reference ::= joined_table"
,
/* 387 */
"table_primary ::= table_name alias_opt"
,
/* 388 */
"table_primary ::= db_name NK_DOT table_name alias_opt"
,
/* 389 */
"table_primary ::= subquery alias_opt"
,
/* 390 */
"table_primary ::= parenthesized_joined_table"
,
/* 391 */
"alias_opt ::="
,
/* 392 */
"alias_opt ::= table_alias"
,
/* 393 */
"alias_opt ::= AS table_alias"
,
/* 394 */
"parenthesized_joined_table ::= NK_LP joined_table NK_RP"
,
/* 395 */
"parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP"
,
/* 396 */
"joined_table ::= table_reference join_type JOIN table_reference ON search_condition"
,
/* 397 */
"join_type ::="
,
/* 398 */
"join_type ::= INNER"
,
/* 399 */
"query_specification ::= SELECT set_quantifier_opt select_list from_clause_opt where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt"
,
/* 400 */
"set_quantifier_opt ::="
,
/* 401 */
"set_quantifier_opt ::= DISTINCT"
,
/* 402 */
"set_quantifier_opt ::= ALL"
,
/* 403 */
"select_list ::= NK_STAR"
,
/* 404 */
"select_list ::= select_sublist"
,
/* 405 */
"select_sublist ::= select_item"
,
/* 406 */
"select_sublist ::= select_sublist NK_COMMA select_item"
,
/* 407 */
"select_item ::= common_expression"
,
/* 408 */
"select_item ::= common_expression column_alias"
,
/* 409 */
"select_item ::= common_expression AS column_alias"
,
/* 410 */
"select_item ::= table_name NK_DOT NK_STAR"
,
/* 411 */
"where_clause_opt ::="
,
/* 412 */
"where_clause_opt ::= WHERE search_condition"
,
/* 413 */
"partition_by_clause_opt ::="
,
/* 414 */
"partition_by_clause_opt ::= PARTITION BY expression_list"
,
/* 415 */
"twindow_clause_opt ::="
,
/* 416 */
"twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP"
,
/* 417 */
"twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP"
,
/* 418 */
"twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt"
,
/* 419 */
"twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt"
,
/* 420 */
"sliding_opt ::="
,
/* 421 */
"sliding_opt ::= SLIDING NK_LP duration_literal NK_RP"
,
/* 422 */
"fill_opt ::="
,
/* 423 */
"fill_opt ::= FILL NK_LP fill_mode NK_RP"
,
/* 424 */
"fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP"
,
/* 425 */
"fill_mode ::= NONE"
,
/* 426 */
"fill_mode ::= PREV"
,
/* 427 */
"fill_mode ::= NULL"
,
/* 428 */
"fill_mode ::= LINEAR"
,
/* 429 */
"fill_mode ::= NEXT"
,
/* 430 */
"group_by_clause_opt ::="
,
/* 431 */
"group_by_clause_opt ::= GROUP BY group_by_list"
,
/* 432 */
"group_by_list ::= expression"
,
/* 433 */
"group_by_list ::= group_by_list NK_COMMA expression"
,
/* 434 */
"having_clause_opt ::="
,
/* 435 */
"having_clause_opt ::= HAVING search_condition"
,
/* 436 */
"range_opt ::="
,
/* 437 */
"range_opt ::= RANGE NK_LP expression NK_COMMA expression NK_RP"
,
/* 438 */
"every_opt ::="
,
/* 439 */
"every_opt ::= EVERY NK_LP duration_literal NK_RP"
,
/* 440 */
"query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt"
,
/* 441 */
"query_expression_body ::= query_primary"
,
/* 442 */
"query_expression_body ::= query_expression_body UNION ALL query_expression_body"
,
/* 443 */
"query_expression_body ::= query_expression_body UNION query_expression_body"
,
/* 444 */
"query_primary ::= query_specification"
,
/* 445 */
"query_primary ::= NK_LP query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt NK_RP"
,
/* 446 */
"order_by_clause_opt ::="
,
/* 447 */
"order_by_clause_opt ::= ORDER BY sort_specification_list"
,
/* 448 */
"slimit_clause_opt ::="
,
/* 449 */
"slimit_clause_opt ::= SLIMIT NK_INTEGER"
,
/* 450 */
"slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER"
,
/* 451 */
"slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER"
,
/* 452 */
"limit_clause_opt ::="
,
/* 453 */
"limit_clause_opt ::= LIMIT NK_INTEGER"
,
/* 454 */
"limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER"
,
/* 455 */
"limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER"
,
/* 456 */
"subquery ::= NK_LP query_expression NK_RP"
,
/* 457 */
"search_condition ::= common_expression"
,
/* 458 */
"sort_specification_list ::= sort_specification"
,
/* 459 */
"sort_specification_list ::= sort_specification_list NK_COMMA sort_specification"
,
/* 460 */
"sort_specification ::= expression ordering_specification_opt null_ordering_opt"
,
/* 461 */
"ordering_specification_opt ::="
,
/* 462 */
"ordering_specification_opt ::= ASC"
,
/* 463 */
"ordering_specification_opt ::= DESC"
,
/* 464 */
"null_ordering_opt ::="
,
/* 465 */
"null_ordering_opt ::= NULLS FIRST"
,
/* 466 */
"null_ordering_opt ::= NULLS LAST"
,
};
#endif
/* NDEBUG */
...
...
@@ -2180,7 +2181,7 @@ static void yy_destructor(
case
329
:
/* boolean_value_expression */
case
330
:
/* boolean_primary */
case
331
:
/* common_expression */
case
332
:
/* from_clause */
case
332
:
/* from_clause
_opt
*/
case
333
:
/* table_reference_list */
case
334
:
/* table_reference */
case
335
:
/* table_primary */
...
...
@@ -2988,91 +2989,92 @@ static const struct {
{
330
,
-
3
},
/* (378) boolean_primary ::= NK_LP boolean_value_expression NK_RP */
{
331
,
-
1
},
/* (379) common_expression ::= expression */
{
331
,
-
1
},
/* (380) common_expression ::= boolean_value_expression */
{
332
,
-
2
},
/* (381) from_clause ::= FROM table_reference_list */
{
333
,
-
1
},
/* (382) table_reference_list ::= table_reference */
{
333
,
-
3
},
/* (383) table_reference_list ::= table_reference_list NK_COMMA table_reference */
{
334
,
-
1
},
/* (384) table_reference ::= table_primary */
{
334
,
-
1
},
/* (385) table_reference ::= joined_table */
{
335
,
-
2
},
/* (386) table_primary ::= table_name alias_opt */
{
335
,
-
4
},
/* (387) table_primary ::= db_name NK_DOT table_name alias_opt */
{
335
,
-
2
},
/* (388) table_primary ::= subquery alias_opt */
{
335
,
-
1
},
/* (389) table_primary ::= parenthesized_joined_table */
{
337
,
0
},
/* (390) alias_opt ::= */
{
337
,
-
1
},
/* (391) alias_opt ::= table_alias */
{
337
,
-
2
},
/* (392) alias_opt ::= AS table_alias */
{
338
,
-
3
},
/* (393) parenthesized_joined_table ::= NK_LP joined_table NK_RP */
{
338
,
-
3
},
/* (394) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */
{
336
,
-
6
},
/* (395) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */
{
339
,
0
},
/* (396) join_type ::= */
{
339
,
-
1
},
/* (397) join_type ::= INNER */
{
341
,
-
12
},
/* (398) query_specification ::= SELECT set_quantifier_opt select_list from_clause where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt */
{
342
,
0
},
/* (399) set_quantifier_opt ::= */
{
342
,
-
1
},
/* (400) set_quantifier_opt ::= DISTINCT */
{
342
,
-
1
},
/* (401) set_quantifier_opt ::= ALL */
{
343
,
-
1
},
/* (402) select_list ::= NK_STAR */
{
343
,
-
1
},
/* (403) select_list ::= select_sublist */
{
351
,
-
1
},
/* (404) select_sublist ::= select_item */
{
351
,
-
3
},
/* (405) select_sublist ::= select_sublist NK_COMMA select_item */
{
352
,
-
1
},
/* (406) select_item ::= common_expression */
{
352
,
-
2
},
/* (407) select_item ::= common_expression column_alias */
{
352
,
-
3
},
/* (408) select_item ::= common_expression AS column_alias */
{
352
,
-
3
},
/* (409) select_item ::= table_name NK_DOT NK_STAR */
{
310
,
0
},
/* (410) where_clause_opt ::= */
{
310
,
-
2
},
/* (411) where_clause_opt ::= WHERE search_condition */
{
344
,
0
},
/* (412) partition_by_clause_opt ::= */
{
344
,
-
3
},
/* (413) partition_by_clause_opt ::= PARTITION BY expression_list */
{
348
,
0
},
/* (414) twindow_clause_opt ::= */
{
348
,
-
6
},
/* (415) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */
{
348
,
-
4
},
/* (416) twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP */
{
348
,
-
6
},
/* (417) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */
{
348
,
-
8
},
/* (418) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */
{
296
,
0
},
/* (419) sliding_opt ::= */
{
296
,
-
4
},
/* (420) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */
{
347
,
0
},
/* (421) fill_opt ::= */
{
347
,
-
4
},
/* (422) fill_opt ::= FILL NK_LP fill_mode NK_RP */
{
347
,
-
6
},
/* (423) fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */
{
353
,
-
1
},
/* (424) fill_mode ::= NONE */
{
353
,
-
1
},
/* (425) fill_mode ::= PREV */
{
353
,
-
1
},
/* (426) fill_mode ::= NULL */
{
353
,
-
1
},
/* (427) fill_mode ::= LINEAR */
{
353
,
-
1
},
/* (428) fill_mode ::= NEXT */
{
349
,
0
},
/* (429) group_by_clause_opt ::= */
{
349
,
-
3
},
/* (430) group_by_clause_opt ::= GROUP BY group_by_list */
{
354
,
-
1
},
/* (431) group_by_list ::= expression */
{
354
,
-
3
},
/* (432) group_by_list ::= group_by_list NK_COMMA expression */
{
350
,
0
},
/* (433) having_clause_opt ::= */
{
350
,
-
2
},
/* (434) having_clause_opt ::= HAVING search_condition */
{
345
,
0
},
/* (435) range_opt ::= */
{
345
,
-
6
},
/* (436) range_opt ::= RANGE NK_LP expression NK_COMMA expression NK_RP */
{
346
,
0
},
/* (437) every_opt ::= */
{
346
,
-
4
},
/* (438) every_opt ::= EVERY NK_LP duration_literal NK_RP */
{
300
,
-
4
},
/* (439) query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt */
{
355
,
-
1
},
/* (440) query_expression_body ::= query_primary */
{
355
,
-
4
},
/* (441) query_expression_body ::= query_expression_body UNION ALL query_expression_body */
{
355
,
-
3
},
/* (442) query_expression_body ::= query_expression_body UNION query_expression_body */
{
359
,
-
1
},
/* (443) query_primary ::= query_specification */
{
359
,
-
6
},
/* (444) query_primary ::= NK_LP query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt NK_RP */
{
356
,
0
},
/* (445) order_by_clause_opt ::= */
{
356
,
-
3
},
/* (446) order_by_clause_opt ::= ORDER BY sort_specification_list */
{
357
,
0
},
/* (447) slimit_clause_opt ::= */
{
357
,
-
2
},
/* (448) slimit_clause_opt ::= SLIMIT NK_INTEGER */
{
357
,
-
4
},
/* (449) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */
{
357
,
-
4
},
/* (450) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */
{
358
,
0
},
/* (451) limit_clause_opt ::= */
{
358
,
-
2
},
/* (452) limit_clause_opt ::= LIMIT NK_INTEGER */
{
358
,
-
4
},
/* (453) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */
{
358
,
-
4
},
/* (454) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */
{
319
,
-
3
},
/* (455) subquery ::= NK_LP query_expression NK_RP */
{
340
,
-
1
},
/* (456) search_condition ::= common_expression */
{
360
,
-
1
},
/* (457) sort_specification_list ::= sort_specification */
{
360
,
-
3
},
/* (458) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */
{
361
,
-
3
},
/* (459) sort_specification ::= expression ordering_specification_opt null_ordering_opt */
{
362
,
0
},
/* (460) ordering_specification_opt ::= */
{
362
,
-
1
},
/* (461) ordering_specification_opt ::= ASC */
{
362
,
-
1
},
/* (462) ordering_specification_opt ::= DESC */
{
363
,
0
},
/* (463) null_ordering_opt ::= */
{
363
,
-
2
},
/* (464) null_ordering_opt ::= NULLS FIRST */
{
363
,
-
2
},
/* (465) null_ordering_opt ::= NULLS LAST */
{
332
,
0
},
/* (381) from_clause_opt ::= */
{
332
,
-
2
},
/* (382) from_clause_opt ::= FROM table_reference_list */
{
333
,
-
1
},
/* (383) table_reference_list ::= table_reference */
{
333
,
-
3
},
/* (384) table_reference_list ::= table_reference_list NK_COMMA table_reference */
{
334
,
-
1
},
/* (385) table_reference ::= table_primary */
{
334
,
-
1
},
/* (386) table_reference ::= joined_table */
{
335
,
-
2
},
/* (387) table_primary ::= table_name alias_opt */
{
335
,
-
4
},
/* (388) table_primary ::= db_name NK_DOT table_name alias_opt */
{
335
,
-
2
},
/* (389) table_primary ::= subquery alias_opt */
{
335
,
-
1
},
/* (390) table_primary ::= parenthesized_joined_table */
{
337
,
0
},
/* (391) alias_opt ::= */
{
337
,
-
1
},
/* (392) alias_opt ::= table_alias */
{
337
,
-
2
},
/* (393) alias_opt ::= AS table_alias */
{
338
,
-
3
},
/* (394) parenthesized_joined_table ::= NK_LP joined_table NK_RP */
{
338
,
-
3
},
/* (395) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */
{
336
,
-
6
},
/* (396) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */
{
339
,
0
},
/* (397) join_type ::= */
{
339
,
-
1
},
/* (398) join_type ::= INNER */
{
341
,
-
12
},
/* (399) query_specification ::= SELECT set_quantifier_opt select_list from_clause_opt where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt */
{
342
,
0
},
/* (400) set_quantifier_opt ::= */
{
342
,
-
1
},
/* (401) set_quantifier_opt ::= DISTINCT */
{
342
,
-
1
},
/* (402) set_quantifier_opt ::= ALL */
{
343
,
-
1
},
/* (403) select_list ::= NK_STAR */
{
343
,
-
1
},
/* (404) select_list ::= select_sublist */
{
351
,
-
1
},
/* (405) select_sublist ::= select_item */
{
351
,
-
3
},
/* (406) select_sublist ::= select_sublist NK_COMMA select_item */
{
352
,
-
1
},
/* (407) select_item ::= common_expression */
{
352
,
-
2
},
/* (408) select_item ::= common_expression column_alias */
{
352
,
-
3
},
/* (409) select_item ::= common_expression AS column_alias */
{
352
,
-
3
},
/* (410) select_item ::= table_name NK_DOT NK_STAR */
{
310
,
0
},
/* (411) where_clause_opt ::= */
{
310
,
-
2
},
/* (412) where_clause_opt ::= WHERE search_condition */
{
344
,
0
},
/* (413) partition_by_clause_opt ::= */
{
344
,
-
3
},
/* (414) partition_by_clause_opt ::= PARTITION BY expression_list */
{
348
,
0
},
/* (415) twindow_clause_opt ::= */
{
348
,
-
6
},
/* (416) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */
{
348
,
-
4
},
/* (417) twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP */
{
348
,
-
6
},
/* (418) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */
{
348
,
-
8
},
/* (419) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */
{
296
,
0
},
/* (420) sliding_opt ::= */
{
296
,
-
4
},
/* (421) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */
{
347
,
0
},
/* (422) fill_opt ::= */
{
347
,
-
4
},
/* (423) fill_opt ::= FILL NK_LP fill_mode NK_RP */
{
347
,
-
6
},
/* (424) fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */
{
353
,
-
1
},
/* (425) fill_mode ::= NONE */
{
353
,
-
1
},
/* (426) fill_mode ::= PREV */
{
353
,
-
1
},
/* (427) fill_mode ::= NULL */
{
353
,
-
1
},
/* (428) fill_mode ::= LINEAR */
{
353
,
-
1
},
/* (429) fill_mode ::= NEXT */
{
349
,
0
},
/* (430) group_by_clause_opt ::= */
{
349
,
-
3
},
/* (431) group_by_clause_opt ::= GROUP BY group_by_list */
{
354
,
-
1
},
/* (432) group_by_list ::= expression */
{
354
,
-
3
},
/* (433) group_by_list ::= group_by_list NK_COMMA expression */
{
350
,
0
},
/* (434) having_clause_opt ::= */
{
350
,
-
2
},
/* (435) having_clause_opt ::= HAVING search_condition */
{
345
,
0
},
/* (436) range_opt ::= */
{
345
,
-
6
},
/* (437) range_opt ::= RANGE NK_LP expression NK_COMMA expression NK_RP */
{
346
,
0
},
/* (438) every_opt ::= */
{
346
,
-
4
},
/* (439) every_opt ::= EVERY NK_LP duration_literal NK_RP */
{
300
,
-
4
},
/* (440) query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt */
{
355
,
-
1
},
/* (441) query_expression_body ::= query_primary */
{
355
,
-
4
},
/* (442) query_expression_body ::= query_expression_body UNION ALL query_expression_body */
{
355
,
-
3
},
/* (443) query_expression_body ::= query_expression_body UNION query_expression_body */
{
359
,
-
1
},
/* (444) query_primary ::= query_specification */
{
359
,
-
6
},
/* (445) query_primary ::= NK_LP query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt NK_RP */
{
356
,
0
},
/* (446) order_by_clause_opt ::= */
{
356
,
-
3
},
/* (447) order_by_clause_opt ::= ORDER BY sort_specification_list */
{
357
,
0
},
/* (448) slimit_clause_opt ::= */
{
357
,
-
2
},
/* (449) slimit_clause_opt ::= SLIMIT NK_INTEGER */
{
357
,
-
4
},
/* (450) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */
{
357
,
-
4
},
/* (451) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */
{
358
,
0
},
/* (452) limit_clause_opt ::= */
{
358
,
-
2
},
/* (453) limit_clause_opt ::= LIMIT NK_INTEGER */
{
358
,
-
4
},
/* (454) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */
{
358
,
-
4
},
/* (455) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */
{
319
,
-
3
},
/* (456) subquery ::= NK_LP query_expression NK_RP */
{
340
,
-
1
},
/* (457) search_condition ::= common_expression */
{
360
,
-
1
},
/* (458) sort_specification_list ::= sort_specification */
{
360
,
-
3
},
/* (459) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */
{
361
,
-
3
},
/* (460) sort_specification ::= expression ordering_specification_opt null_ordering_opt */
{
362
,
0
},
/* (461) ordering_specification_opt ::= */
{
362
,
-
1
},
/* (462) ordering_specification_opt ::= ASC */
{
362
,
-
1
},
/* (463) ordering_specification_opt ::= DESC */
{
363
,
0
},
/* (464) null_ordering_opt ::= */
{
363
,
-
2
},
/* (465) null_ordering_opt ::= NULLS FIRST */
{
363
,
-
2
},
/* (466) null_ordering_opt ::= NULLS LAST */
};
static
void
yy_accept
(
yyParser
*
);
/* Forward Declaration */
...
...
@@ -3349,7 +3351,7 @@ static YYACTIONTYPE yy_reduce(
case
66
:
/* exists_opt ::= */
yytestcase
(
yyruleno
==
66
);
case
240
:
/* analyze_opt ::= */
yytestcase
(
yyruleno
==
240
);
case
248
:
/* agg_func_opt ::= */
yytestcase
(
yyruleno
==
248
);
case
399
:
/* set_quantifier_opt ::= */
yytestcase
(
yyruleno
==
399
);
case
400
:
/* set_quantifier_opt ::= */
yytestcase
(
yyruleno
==
400
);
{
yymsp
[
1
].
minor
.
yy481
=
false
;
}
break
;
case
65
:
/* exists_opt ::= IF EXISTS */
...
...
@@ -3491,8 +3493,8 @@ static YYACTIONTYPE yy_reduce(
case
228
:
/* func_list ::= func */
yytestcase
(
yyruleno
==
228
);
case
295
:
/* literal_list ::= signed_literal */
yytestcase
(
yyruleno
==
295
);
case
349
:
/* other_para_list ::= star_func_para */
yytestcase
(
yyruleno
==
349
);
case
40
4
:
/* select_sublist ::= select_item */
yytestcase
(
yyruleno
==
404
);
case
45
7
:
/* sort_specification_list ::= sort_specification */
yytestcase
(
yyruleno
==
457
);
case
40
5
:
/* select_sublist ::= select_item */
yytestcase
(
yyruleno
==
405
);
case
45
8
:
/* sort_specification_list ::= sort_specification */
yytestcase
(
yyruleno
==
458
);
{
yylhsminor
.
yy600
=
createNodeList
(
pCxt
,
yymsp
[
0
].
minor
.
yy392
);
}
yymsp
[
0
].
minor
.
yy600
=
yylhsminor
.
yy600
;
break
;
...
...
@@ -3503,8 +3505,8 @@ static YYACTIONTYPE yy_reduce(
case
229
:
/* func_list ::= func_list NK_COMMA func */
yytestcase
(
yyruleno
==
229
);
case
296
:
/* literal_list ::= literal_list NK_COMMA signed_literal */
yytestcase
(
yyruleno
==
296
);
case
350
:
/* other_para_list ::= other_para_list NK_COMMA star_func_para */
yytestcase
(
yyruleno
==
350
);
case
40
5
:
/* select_sublist ::= select_sublist NK_COMMA select_item */
yytestcase
(
yyruleno
==
405
);
case
45
8
:
/* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */
yytestcase
(
yyruleno
==
458
);
case
40
6
:
/* select_sublist ::= select_sublist NK_COMMA select_item */
yytestcase
(
yyruleno
==
406
);
case
45
9
:
/* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */
yytestcase
(
yyruleno
==
459
);
{
yylhsminor
.
yy600
=
addNodeToList
(
pCxt
,
yymsp
[
-
2
].
minor
.
yy600
,
yymsp
[
0
].
minor
.
yy392
);
}
yymsp
[
-
2
].
minor
.
yy600
=
yylhsminor
.
yy600
;
break
;
...
...
@@ -3585,9 +3587,9 @@ static YYACTIONTYPE yy_reduce(
break
;
case
129
:
/* specific_tags_opt ::= */
case
160
:
/* tags_def_opt ::= */
yytestcase
(
yyruleno
==
160
);
case
41
2
:
/* partition_by_clause_opt ::= */
yytestcase
(
yyruleno
==
412
);
case
4
29
:
/* group_by_clause_opt ::= */
yytestcase
(
yyruleno
==
429
);
case
44
5
:
/* order_by_clause_opt ::= */
yytestcase
(
yyruleno
==
445
);
case
41
3
:
/* partition_by_clause_opt ::= */
yytestcase
(
yyruleno
==
413
);
case
4
30
:
/* group_by_clause_opt ::= */
yytestcase
(
yyruleno
==
430
);
case
44
6
:
/* order_by_clause_opt ::= */
yytestcase
(
yyruleno
==
446
);
{
yymsp
[
1
].
minor
.
yy600
=
NULL
;
}
break
;
case
130
:
/* specific_tags_opt ::= NK_LP col_name_list NK_RP */
...
...
@@ -3678,7 +3680,7 @@ static YYACTIONTYPE yy_reduce(
break
;
case
161
:
/* tags_def_opt ::= tags_def */
case
348
:
/* star_func_para_list ::= other_para_list */
yytestcase
(
yyruleno
==
348
);
case
40
3
:
/* select_list ::= select_sublist */
yytestcase
(
yyruleno
==
403
);
case
40
4
:
/* select_list ::= select_sublist */
yytestcase
(
yyruleno
==
404
);
{
yylhsminor
.
yy600
=
yymsp
[
0
].
minor
.
yy600
;
}
yymsp
[
0
].
minor
.
yy600
=
yylhsminor
.
yy600
;
break
;
...
...
@@ -3851,15 +3853,16 @@ static YYACTIONTYPE yy_reduce(
case
217
:
/* like_pattern_opt ::= */
case
225
:
/* index_options ::= */
yytestcase
(
yyruleno
==
225
);
case
254
:
/* into_opt ::= */
yytestcase
(
yyruleno
==
254
);
case
410
:
/* where_clause_opt ::= */
yytestcase
(
yyruleno
==
410
);
case
414
:
/* twindow_clause_opt ::= */
yytestcase
(
yyruleno
==
414
);
case
419
:
/* sliding_opt ::= */
yytestcase
(
yyruleno
==
419
);
case
421
:
/* fill_opt ::= */
yytestcase
(
yyruleno
==
421
);
case
433
:
/* having_clause_opt ::= */
yytestcase
(
yyruleno
==
433
);
case
435
:
/* range_opt ::= */
yytestcase
(
yyruleno
==
435
);
case
437
:
/* every_opt ::= */
yytestcase
(
yyruleno
==
437
);
case
447
:
/* slimit_clause_opt ::= */
yytestcase
(
yyruleno
==
447
);
case
451
:
/* limit_clause_opt ::= */
yytestcase
(
yyruleno
==
451
);
case
381
:
/* from_clause_opt ::= */
yytestcase
(
yyruleno
==
381
);
case
411
:
/* where_clause_opt ::= */
yytestcase
(
yyruleno
==
411
);
case
415
:
/* twindow_clause_opt ::= */
yytestcase
(
yyruleno
==
415
);
case
420
:
/* sliding_opt ::= */
yytestcase
(
yyruleno
==
420
);
case
422
:
/* fill_opt ::= */
yytestcase
(
yyruleno
==
422
);
case
434
:
/* having_clause_opt ::= */
yytestcase
(
yyruleno
==
434
);
case
436
:
/* range_opt ::= */
yytestcase
(
yyruleno
==
436
);
case
438
:
/* every_opt ::= */
yytestcase
(
yyruleno
==
438
);
case
448
:
/* slimit_clause_opt ::= */
yytestcase
(
yyruleno
==
448
);
case
452
:
/* limit_clause_opt ::= */
yytestcase
(
yyruleno
==
452
);
{
yymsp
[
1
].
minor
.
yy392
=
NULL
;
}
break
;
case
218
:
/* like_pattern_opt ::= LIKE NK_STRING */
...
...
@@ -3918,7 +3921,7 @@ static YYACTIONTYPE yy_reduce(
break
;
case
241
:
/* analyze_opt ::= ANALYZE */
case
249
:
/* agg_func_opt ::= AGGREGATE */
yytestcase
(
yyruleno
==
249
);
case
40
0
:
/* set_quantifier_opt ::= DISTINCT */
yytestcase
(
yyruleno
==
400
);
case
40
1
:
/* set_quantifier_opt ::= DISTINCT */
yytestcase
(
yyruleno
==
401
);
{
yymsp
[
0
].
minor
.
yy481
=
true
;
}
break
;
case
242
:
/* explain_options ::= */
...
...
@@ -3954,9 +3957,9 @@ static YYACTIONTYPE yy_reduce(
{
pCxt
->
pRootNode
=
createDropStreamStmt
(
pCxt
,
yymsp
[
-
1
].
minor
.
yy481
,
&
yymsp
[
0
].
minor
.
yy57
);
}
break
;
case
255
:
/* into_opt ::= INTO full_table_name */
case
38
1
:
/* from_clause ::= FROM table_reference_list */
yytestcase
(
yyruleno
==
381
);
case
41
1
:
/* where_clause_opt ::= WHERE search_condition */
yytestcase
(
yyruleno
==
411
);
case
43
4
:
/* having_clause_opt ::= HAVING search_condition */
yytestcase
(
yyruleno
==
434
);
case
38
2
:
/* from_clause_opt ::= FROM table_reference_list */
yytestcase
(
yyruleno
==
382
);
case
41
2
:
/* where_clause_opt ::= WHERE search_condition */
yytestcase
(
yyruleno
==
412
);
case
43
5
:
/* having_clause_opt ::= HAVING search_condition */
yytestcase
(
yyruleno
==
435
);
{
yymsp
[
-
1
].
minor
.
yy392
=
yymsp
[
0
].
minor
.
yy392
;
}
break
;
case
256
:
/* stream_options ::= */
...
...
@@ -4040,12 +4043,12 @@ static YYACTIONTYPE yy_reduce(
case
377
:
/* boolean_primary ::= predicate */
yytestcase
(
yyruleno
==
377
);
case
379
:
/* common_expression ::= expression */
yytestcase
(
yyruleno
==
379
);
case
380
:
/* common_expression ::= boolean_value_expression */
yytestcase
(
yyruleno
==
380
);
case
38
2
:
/* table_reference_list ::= table_reference */
yytestcase
(
yyruleno
==
382
);
case
38
4
:
/* table_reference ::= table_primary */
yytestcase
(
yyruleno
==
384
);
case
38
5
:
/* table_reference ::= joined_table */
yytestcase
(
yyruleno
==
385
);
case
3
89
:
/* table_primary ::= parenthesized_joined_table */
yytestcase
(
yyruleno
==
389
);
case
44
0
:
/* query_expression_body ::= query_primary */
yytestcase
(
yyruleno
==
440
);
case
44
3
:
/* query_primary ::= query_specification */
yytestcase
(
yyruleno
==
443
);
case
38
3
:
/* table_reference_list ::= table_reference */
yytestcase
(
yyruleno
==
383
);
case
38
5
:
/* table_reference ::= table_primary */
yytestcase
(
yyruleno
==
385
);
case
38
6
:
/* table_reference ::= joined_table */
yytestcase
(
yyruleno
==
386
);
case
3
90
:
/* table_primary ::= parenthesized_joined_table */
yytestcase
(
yyruleno
==
390
);
case
44
1
:
/* query_expression_body ::= query_primary */
yytestcase
(
yyruleno
==
441
);
case
44
4
:
/* query_primary ::= query_specification */
yytestcase
(
yyruleno
==
444
);
{
yylhsminor
.
yy392
=
yymsp
[
0
].
minor
.
yy392
;
}
yymsp
[
0
].
minor
.
yy392
=
yylhsminor
.
yy392
;
break
;
...
...
@@ -4105,8 +4108,8 @@ static YYACTIONTYPE yy_reduce(
case
292
:
/* signed_literal ::= duration_literal */
case
294
:
/* signed_literal ::= literal_func */
yytestcase
(
yyruleno
==
294
);
case
351
:
/* star_func_para ::= expression */
yytestcase
(
yyruleno
==
351
);
case
40
6
:
/* select_item ::= common_expression */
yytestcase
(
yyruleno
==
406
);
case
45
6
:
/* search_condition ::= common_expression */
yytestcase
(
yyruleno
==
456
);
case
40
7
:
/* select_item ::= common_expression */
yytestcase
(
yyruleno
==
407
);
case
45
7
:
/* search_condition ::= common_expression */
yytestcase
(
yyruleno
==
457
);
{
yylhsminor
.
yy392
=
releaseRawExprNode
(
pCxt
,
yymsp
[
0
].
minor
.
yy392
);
}
yymsp
[
0
].
minor
.
yy392
=
yylhsminor
.
yy392
;
break
;
...
...
@@ -4221,7 +4224,7 @@ static YYACTIONTYPE yy_reduce(
yymsp
[
0
].
minor
.
yy600
=
yylhsminor
.
yy600
;
break
;
case
352
:
/* star_func_para ::= table_name NK_DOT NK_STAR */
case
4
09
:
/* select_item ::= table_name NK_DOT NK_STAR */
yytestcase
(
yyruleno
==
409
);
case
4
10
:
/* select_item ::= table_name NK_DOT NK_STAR */
yytestcase
(
yyruleno
==
410
);
{
yylhsminor
.
yy392
=
createColumnNode
(
pCxt
,
&
yymsp
[
-
2
].
minor
.
yy57
,
&
yymsp
[
0
].
minor
.
yy0
);
}
yymsp
[
-
2
].
minor
.
yy392
=
yylhsminor
.
yy392
;
break
;
...
...
@@ -4330,47 +4333,47 @@ static YYACTIONTYPE yy_reduce(
}
yymsp
[
-
2
].
minor
.
yy392
=
yylhsminor
.
yy392
;
break
;
case
38
3
:
/* table_reference_list ::= table_reference_list NK_COMMA table_reference */
case
38
4
:
/* table_reference_list ::= table_reference_list NK_COMMA table_reference */
{
yylhsminor
.
yy392
=
createJoinTableNode
(
pCxt
,
JOIN_TYPE_INNER
,
yymsp
[
-
2
].
minor
.
yy392
,
yymsp
[
0
].
minor
.
yy392
,
NULL
);
}
yymsp
[
-
2
].
minor
.
yy392
=
yylhsminor
.
yy392
;
break
;
case
38
6
:
/* table_primary ::= table_name alias_opt */
case
38
7
:
/* table_primary ::= table_name alias_opt */
{
yylhsminor
.
yy392
=
createRealTableNode
(
pCxt
,
NULL
,
&
yymsp
[
-
1
].
minor
.
yy57
,
&
yymsp
[
0
].
minor
.
yy57
);
}
yymsp
[
-
1
].
minor
.
yy392
=
yylhsminor
.
yy392
;
break
;
case
38
7
:
/* table_primary ::= db_name NK_DOT table_name alias_opt */
case
38
8
:
/* table_primary ::= db_name NK_DOT table_name alias_opt */
{
yylhsminor
.
yy392
=
createRealTableNode
(
pCxt
,
&
yymsp
[
-
3
].
minor
.
yy57
,
&
yymsp
[
-
1
].
minor
.
yy57
,
&
yymsp
[
0
].
minor
.
yy57
);
}
yymsp
[
-
3
].
minor
.
yy392
=
yylhsminor
.
yy392
;
break
;
case
38
8
:
/* table_primary ::= subquery alias_opt */
case
38
9
:
/* table_primary ::= subquery alias_opt */
{
yylhsminor
.
yy392
=
createTempTableNode
(
pCxt
,
releaseRawExprNode
(
pCxt
,
yymsp
[
-
1
].
minor
.
yy392
),
&
yymsp
[
0
].
minor
.
yy57
);
}
yymsp
[
-
1
].
minor
.
yy392
=
yylhsminor
.
yy392
;
break
;
case
39
0
:
/* alias_opt ::= */
case
39
1
:
/* alias_opt ::= */
{
yymsp
[
1
].
minor
.
yy57
=
nil_token
;
}
break
;
case
39
1
:
/* alias_opt ::= table_alias */
case
39
2
:
/* alias_opt ::= table_alias */
{
yylhsminor
.
yy57
=
yymsp
[
0
].
minor
.
yy57
;
}
yymsp
[
0
].
minor
.
yy57
=
yylhsminor
.
yy57
;
break
;
case
39
2
:
/* alias_opt ::= AS table_alias */
case
39
3
:
/* alias_opt ::= AS table_alias */
{
yymsp
[
-
1
].
minor
.
yy57
=
yymsp
[
0
].
minor
.
yy57
;
}
break
;
case
39
3
:
/* parenthesized_joined_table ::= NK_LP joined_table NK_RP */
case
39
4
:
/* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */
yytestcase
(
yyruleno
==
394
);
case
39
4
:
/* parenthesized_joined_table ::= NK_LP joined_table NK_RP */
case
39
5
:
/* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */
yytestcase
(
yyruleno
==
395
);
{
yymsp
[
-
2
].
minor
.
yy392
=
yymsp
[
-
1
].
minor
.
yy392
;
}
break
;
case
39
5
:
/* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */
case
39
6
:
/* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */
{
yylhsminor
.
yy392
=
createJoinTableNode
(
pCxt
,
yymsp
[
-
4
].
minor
.
yy204
,
yymsp
[
-
5
].
minor
.
yy392
,
yymsp
[
-
2
].
minor
.
yy392
,
yymsp
[
0
].
minor
.
yy392
);
}
yymsp
[
-
5
].
minor
.
yy392
=
yylhsminor
.
yy392
;
break
;
case
39
6
:
/* join_type ::= */
case
39
7
:
/* join_type ::= */
{
yymsp
[
1
].
minor
.
yy204
=
JOIN_TYPE_INNER
;
}
break
;
case
39
7
:
/* join_type ::= INNER */
case
39
8
:
/* join_type ::= INNER */
{
yymsp
[
0
].
minor
.
yy204
=
JOIN_TYPE_INNER
;
}
break
;
case
39
8
:
/* query_specification ::= SELECT set_quantifier_opt select_list from_clause
where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt */
case
39
9
:
/* query_specification ::= SELECT set_quantifier_opt select_list from_clause_opt
where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt */
{
yymsp
[
-
11
].
minor
.
yy392
=
createSelectStmt
(
pCxt
,
yymsp
[
-
10
].
minor
.
yy481
,
yymsp
[
-
9
].
minor
.
yy600
,
yymsp
[
-
8
].
minor
.
yy392
);
yymsp
[
-
11
].
minor
.
yy392
=
addWhereClause
(
pCxt
,
yymsp
[
-
11
].
minor
.
yy392
,
yymsp
[
-
7
].
minor
.
yy392
);
...
...
@@ -4383,74 +4386,74 @@ static YYACTIONTYPE yy_reduce(
yymsp
[
-
11
].
minor
.
yy392
=
addFillClause
(
pCxt
,
yymsp
[
-
11
].
minor
.
yy392
,
yymsp
[
-
3
].
minor
.
yy392
);
}
break
;
case
40
1
:
/* set_quantifier_opt ::= ALL */
case
40
2
:
/* set_quantifier_opt ::= ALL */
{
yymsp
[
0
].
minor
.
yy481
=
false
;
}
break
;
case
40
2
:
/* select_list ::= NK_STAR */
case
40
3
:
/* select_list ::= NK_STAR */
{
yymsp
[
0
].
minor
.
yy600
=
NULL
;
}
break
;
case
40
7
:
/* select_item ::= common_expression column_alias */
case
40
8
:
/* select_item ::= common_expression column_alias */
{
yylhsminor
.
yy392
=
setProjectionAlias
(
pCxt
,
releaseRawExprNode
(
pCxt
,
yymsp
[
-
1
].
minor
.
yy392
),
&
yymsp
[
0
].
minor
.
yy57
);
}
yymsp
[
-
1
].
minor
.
yy392
=
yylhsminor
.
yy392
;
break
;
case
40
8
:
/* select_item ::= common_expression AS column_alias */
case
40
9
:
/* select_item ::= common_expression AS column_alias */
{
yylhsminor
.
yy392
=
setProjectionAlias
(
pCxt
,
releaseRawExprNode
(
pCxt
,
yymsp
[
-
2
].
minor
.
yy392
),
&
yymsp
[
0
].
minor
.
yy57
);
}
yymsp
[
-
2
].
minor
.
yy392
=
yylhsminor
.
yy392
;
break
;
case
41
3
:
/* partition_by_clause_opt ::= PARTITION BY expression_list */
case
43
0
:
/* group_by_clause_opt ::= GROUP BY group_by_list */
yytestcase
(
yyruleno
==
430
);
case
44
6
:
/* order_by_clause_opt ::= ORDER BY sort_specification_list */
yytestcase
(
yyruleno
==
446
);
case
41
4
:
/* partition_by_clause_opt ::= PARTITION BY expression_list */
case
43
1
:
/* group_by_clause_opt ::= GROUP BY group_by_list */
yytestcase
(
yyruleno
==
431
);
case
44
7
:
/* order_by_clause_opt ::= ORDER BY sort_specification_list */
yytestcase
(
yyruleno
==
447
);
{
yymsp
[
-
2
].
minor
.
yy600
=
yymsp
[
0
].
minor
.
yy600
;
}
break
;
case
41
5
:
/* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */
case
41
6
:
/* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */
{
yymsp
[
-
5
].
minor
.
yy392
=
createSessionWindowNode
(
pCxt
,
releaseRawExprNode
(
pCxt
,
yymsp
[
-
3
].
minor
.
yy392
),
releaseRawExprNode
(
pCxt
,
yymsp
[
-
1
].
minor
.
yy392
));
}
break
;
case
41
6
:
/* twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP */
case
41
7
:
/* twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP */
{
yymsp
[
-
3
].
minor
.
yy392
=
createStateWindowNode
(
pCxt
,
releaseRawExprNode
(
pCxt
,
yymsp
[
-
1
].
minor
.
yy392
));
}
break
;
case
41
7
:
/* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */
case
41
8
:
/* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */
{
yymsp
[
-
5
].
minor
.
yy392
=
createIntervalWindowNode
(
pCxt
,
releaseRawExprNode
(
pCxt
,
yymsp
[
-
3
].
minor
.
yy392
),
NULL
,
yymsp
[
-
1
].
minor
.
yy392
,
yymsp
[
0
].
minor
.
yy392
);
}
break
;
case
41
8
:
/* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */
case
41
9
:
/* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */
{
yymsp
[
-
7
].
minor
.
yy392
=
createIntervalWindowNode
(
pCxt
,
releaseRawExprNode
(
pCxt
,
yymsp
[
-
5
].
minor
.
yy392
),
releaseRawExprNode
(
pCxt
,
yymsp
[
-
3
].
minor
.
yy392
),
yymsp
[
-
1
].
minor
.
yy392
,
yymsp
[
0
].
minor
.
yy392
);
}
break
;
case
42
0
:
/* sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */
case
43
8
:
/* every_opt ::= EVERY NK_LP duration_literal NK_RP */
yytestcase
(
yyruleno
==
438
);
case
42
1
:
/* sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */
case
43
9
:
/* every_opt ::= EVERY NK_LP duration_literal NK_RP */
yytestcase
(
yyruleno
==
439
);
{
yymsp
[
-
3
].
minor
.
yy392
=
releaseRawExprNode
(
pCxt
,
yymsp
[
-
1
].
minor
.
yy392
);
}
break
;
case
42
2
:
/* fill_opt ::= FILL NK_LP fill_mode NK_RP */
case
42
3
:
/* fill_opt ::= FILL NK_LP fill_mode NK_RP */
{
yymsp
[
-
3
].
minor
.
yy392
=
createFillNode
(
pCxt
,
yymsp
[
-
1
].
minor
.
yy270
,
NULL
);
}
break
;
case
42
3
:
/* fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */
case
42
4
:
/* fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */
{
yymsp
[
-
5
].
minor
.
yy392
=
createFillNode
(
pCxt
,
FILL_MODE_VALUE
,
createNodeListNode
(
pCxt
,
yymsp
[
-
1
].
minor
.
yy600
));
}
break
;
case
42
4
:
/* fill_mode ::= NONE */
case
42
5
:
/* fill_mode ::= NONE */
{
yymsp
[
0
].
minor
.
yy270
=
FILL_MODE_NONE
;
}
break
;
case
42
5
:
/* fill_mode ::= PREV */
case
42
6
:
/* fill_mode ::= PREV */
{
yymsp
[
0
].
minor
.
yy270
=
FILL_MODE_PREV
;
}
break
;
case
42
6
:
/* fill_mode ::= NULL */
case
42
7
:
/* fill_mode ::= NULL */
{
yymsp
[
0
].
minor
.
yy270
=
FILL_MODE_NULL
;
}
break
;
case
42
7
:
/* fill_mode ::= LINEAR */
case
42
8
:
/* fill_mode ::= LINEAR */
{
yymsp
[
0
].
minor
.
yy270
=
FILL_MODE_LINEAR
;
}
break
;
case
42
8
:
/* fill_mode ::= NEXT */
case
42
9
:
/* fill_mode ::= NEXT */
{
yymsp
[
0
].
minor
.
yy270
=
FILL_MODE_NEXT
;
}
break
;
case
43
1
:
/* group_by_list ::= expression */
case
43
2
:
/* group_by_list ::= expression */
{
yylhsminor
.
yy600
=
createNodeList
(
pCxt
,
createGroupingSetNode
(
pCxt
,
releaseRawExprNode
(
pCxt
,
yymsp
[
0
].
minor
.
yy392
)));
}
yymsp
[
0
].
minor
.
yy600
=
yylhsminor
.
yy600
;
break
;
case
43
2
:
/* group_by_list ::= group_by_list NK_COMMA expression */
case
43
3
:
/* group_by_list ::= group_by_list NK_COMMA expression */
{
yylhsminor
.
yy600
=
addNodeToList
(
pCxt
,
yymsp
[
-
2
].
minor
.
yy600
,
createGroupingSetNode
(
pCxt
,
releaseRawExprNode
(
pCxt
,
yymsp
[
0
].
minor
.
yy392
)));
}
yymsp
[
-
2
].
minor
.
yy600
=
yylhsminor
.
yy600
;
break
;
case
43
6
:
/* range_opt ::= RANGE NK_LP expression NK_COMMA expression NK_RP */
case
43
7
:
/* range_opt ::= RANGE NK_LP expression NK_COMMA expression NK_RP */
{
yymsp
[
-
5
].
minor
.
yy392
=
createInterpTimeRange
(
pCxt
,
releaseRawExprNode
(
pCxt
,
yymsp
[
-
3
].
minor
.
yy392
),
releaseRawExprNode
(
pCxt
,
yymsp
[
-
1
].
minor
.
yy392
));
}
break
;
case
4
39
:
/* query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt */
case
4
40
:
/* query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt */
{
yylhsminor
.
yy392
=
addOrderByClause
(
pCxt
,
yymsp
[
-
3
].
minor
.
yy392
,
yymsp
[
-
2
].
minor
.
yy600
);
yylhsminor
.
yy392
=
addSlimitClause
(
pCxt
,
yylhsminor
.
yy392
,
yymsp
[
-
1
].
minor
.
yy392
);
...
...
@@ -4458,56 +4461,56 @@ static YYACTIONTYPE yy_reduce(
}
yymsp
[
-
3
].
minor
.
yy392
=
yylhsminor
.
yy392
;
break
;
case
44
1
:
/* query_expression_body ::= query_expression_body UNION ALL query_expression_body */
case
44
2
:
/* query_expression_body ::= query_expression_body UNION ALL query_expression_body */
{
yylhsminor
.
yy392
=
createSetOperator
(
pCxt
,
SET_OP_TYPE_UNION_ALL
,
yymsp
[
-
3
].
minor
.
yy392
,
yymsp
[
0
].
minor
.
yy392
);
}
yymsp
[
-
3
].
minor
.
yy392
=
yylhsminor
.
yy392
;
break
;
case
44
2
:
/* query_expression_body ::= query_expression_body UNION query_expression_body */
case
44
3
:
/* query_expression_body ::= query_expression_body UNION query_expression_body */
{
yylhsminor
.
yy392
=
createSetOperator
(
pCxt
,
SET_OP_TYPE_UNION
,
yymsp
[
-
2
].
minor
.
yy392
,
yymsp
[
0
].
minor
.
yy392
);
}
yymsp
[
-
2
].
minor
.
yy392
=
yylhsminor
.
yy392
;
break
;
case
44
4
:
/* query_primary ::= NK_LP query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt NK_RP */
case
44
5
:
/* query_primary ::= NK_LP query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt NK_RP */
{
yymsp
[
-
5
].
minor
.
yy392
=
yymsp
[
-
4
].
minor
.
yy392
;
}
yy_destructor
(
yypParser
,
356
,
&
yymsp
[
-
3
].
minor
);
yy_destructor
(
yypParser
,
357
,
&
yymsp
[
-
2
].
minor
);
yy_destructor
(
yypParser
,
358
,
&
yymsp
[
-
1
].
minor
);
break
;
case
44
8
:
/* slimit_clause_opt ::= SLIMIT NK_INTEGER */
case
45
2
:
/* limit_clause_opt ::= LIMIT NK_INTEGER */
yytestcase
(
yyruleno
==
452
);
case
44
9
:
/* slimit_clause_opt ::= SLIMIT NK_INTEGER */
case
45
3
:
/* limit_clause_opt ::= LIMIT NK_INTEGER */
yytestcase
(
yyruleno
==
453
);
{
yymsp
[
-
1
].
minor
.
yy392
=
createLimitNode
(
pCxt
,
&
yymsp
[
0
].
minor
.
yy0
,
NULL
);
}
break
;
case
4
49
:
/* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */
case
45
3
:
/* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */
yytestcase
(
yyruleno
==
453
);
case
4
50
:
/* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */
case
45
4
:
/* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */
yytestcase
(
yyruleno
==
454
);
{
yymsp
[
-
3
].
minor
.
yy392
=
createLimitNode
(
pCxt
,
&
yymsp
[
-
2
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
);
}
break
;
case
45
0
:
/* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */
case
45
4
:
/* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */
yytestcase
(
yyruleno
==
454
);
case
45
1
:
/* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */
case
45
5
:
/* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */
yytestcase
(
yyruleno
==
455
);
{
yymsp
[
-
3
].
minor
.
yy392
=
createLimitNode
(
pCxt
,
&
yymsp
[
0
].
minor
.
yy0
,
&
yymsp
[
-
2
].
minor
.
yy0
);
}
break
;
case
45
5
:
/* subquery ::= NK_LP query_expression NK_RP */
case
45
6
:
/* subquery ::= NK_LP query_expression NK_RP */
{
yylhsminor
.
yy392
=
createRawExprNodeExt
(
pCxt
,
&
yymsp
[
-
2
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
,
yymsp
[
-
1
].
minor
.
yy392
);
}
yymsp
[
-
2
].
minor
.
yy392
=
yylhsminor
.
yy392
;
break
;
case
4
59
:
/* sort_specification ::= expression ordering_specification_opt null_ordering_opt */
case
4
60
:
/* sort_specification ::= expression ordering_specification_opt null_ordering_opt */
{
yylhsminor
.
yy392
=
createOrderByExprNode
(
pCxt
,
releaseRawExprNode
(
pCxt
,
yymsp
[
-
2
].
minor
.
yy392
),
yymsp
[
-
1
].
minor
.
yy162
,
yymsp
[
0
].
minor
.
yy529
);
}
yymsp
[
-
2
].
minor
.
yy392
=
yylhsminor
.
yy392
;
break
;
case
46
0
:
/* ordering_specification_opt ::= */
case
46
1
:
/* ordering_specification_opt ::= */
{
yymsp
[
1
].
minor
.
yy162
=
ORDER_ASC
;
}
break
;
case
46
1
:
/* ordering_specification_opt ::= ASC */
case
46
2
:
/* ordering_specification_opt ::= ASC */
{
yymsp
[
0
].
minor
.
yy162
=
ORDER_ASC
;
}
break
;
case
46
2
:
/* ordering_specification_opt ::= DESC */
case
46
3
:
/* ordering_specification_opt ::= DESC */
{
yymsp
[
0
].
minor
.
yy162
=
ORDER_DESC
;
}
break
;
case
46
3
:
/* null_ordering_opt ::= */
case
46
4
:
/* null_ordering_opt ::= */
{
yymsp
[
1
].
minor
.
yy529
=
NULL_ORDER_DEFAULT
;
}
break
;
case
46
4
:
/* null_ordering_opt ::= NULLS FIRST */
case
46
5
:
/* null_ordering_opt ::= NULLS FIRST */
{
yymsp
[
-
1
].
minor
.
yy529
=
NULL_ORDER_FIRST
;
}
break
;
case
46
5
:
/* null_ordering_opt ::= NULLS LAST */
case
46
6
:
/* null_ordering_opt ::= NULLS LAST */
{
yymsp
[
-
1
].
minor
.
yy529
=
NULL_ORDER_LAST
;
}
break
;
default:
...
...
source/libs/parser/test/parSelectTest.cpp
浏览文件 @
eeab56e3
...
...
@@ -388,4 +388,10 @@ TEST_F(ParserSelectTest, informationSchema) {
run
(
"SELECT * FROM information_schema.user_databases WHERE name = 'information_schema'"
);
}
TEST_F
(
ParserSelectTest
,
withoutFrom
)
{
useDb
(
"root"
,
"test"
);
run
(
"SELECT 1"
);
}
}
// namespace ParserTest
source/libs/planner/src/planLogicCreater.c
浏览文件 @
eeab56e3
...
...
@@ -901,7 +901,12 @@ static int32_t createDistinctLogicNode(SLogicPlanContext* pCxt, SSelectStmt* pSe
return
code
;
}
static
int32_t
createSelectLogicNode
(
SLogicPlanContext
*
pCxt
,
SSelectStmt
*
pSelect
,
SLogicNode
**
pLogicNode
)
{
static
int32_t
createSelectWithoutFromLogicNode
(
SLogicPlanContext
*
pCxt
,
SSelectStmt
*
pSelect
,
SLogicNode
**
pLogicNode
)
{
return
createProjectLogicNode
(
pCxt
,
pSelect
,
pLogicNode
);
}
static
int32_t
createSelectFromLogicNode
(
SLogicPlanContext
*
pCxt
,
SSelectStmt
*
pSelect
,
SLogicNode
**
pLogicNode
)
{
SLogicNode
*
pRoot
=
NULL
;
int32_t
code
=
createLogicNodeByTable
(
pCxt
,
pSelect
,
pSelect
->
pFromTable
,
&
pRoot
);
if
(
TSDB_CODE_SUCCESS
==
code
)
{
...
...
@@ -941,6 +946,14 @@ static int32_t createSelectLogicNode(SLogicPlanContext* pCxt, SSelectStmt* pSele
return
code
;
}
static
int32_t
createSelectLogicNode
(
SLogicPlanContext
*
pCxt
,
SSelectStmt
*
pSelect
,
SLogicNode
**
pLogicNode
)
{
if
(
NULL
==
pSelect
->
pFromTable
)
{
return
createSelectWithoutFromLogicNode
(
pCxt
,
pSelect
,
pLogicNode
);
}
else
{
return
createSelectFromLogicNode
(
pCxt
,
pSelect
,
pLogicNode
);
}
}
static
int32_t
createSetOpRootLogicNode
(
SLogicPlanContext
*
pCxt
,
SSetOperator
*
pSetOperator
,
FCreateSetOpLogicNode
func
,
SLogicNode
**
pRoot
)
{
return
createRootLogicNode
(
pCxt
,
pSetOperator
,
pSetOperator
->
precision
,
(
FCreateLogicNode
)
func
,
pRoot
);
...
...
source/libs/planner/src/planOptimizer.c
浏览文件 @
eeab56e3
...
...
@@ -293,16 +293,22 @@ static int32_t cpdCondAppend(SNode** pCond, SNode** pAdditionalCond) {
return
code
;
}
static
int32_t
cpdCalcTimeRange
(
SScanLogicNode
*
pScan
,
SNode
**
pPrimaryKeyCond
,
SNode
**
pOtherCond
)
{
bool
isStrict
=
false
;
int32_t
code
=
filterGetTimeRange
(
*
pPrimaryKeyCond
,
&
pScan
->
scanRange
,
&
isStrict
);
if
(
TSDB_CODE_SUCCESS
==
code
)
{
if
(
isStrict
)
{
nodesDestroyNode
(
*
pPrimaryKeyCond
);
}
else
{
code
=
cpdCondAppend
(
pOtherCond
,
pPrimaryKeyCond
);
static
int32_t
cpdCalcTimeRange
(
SOptimizeContext
*
pCxt
,
SScanLogicNode
*
pScan
,
SNode
**
pPrimaryKeyCond
,
SNode
**
pOtherCond
)
{
int32_t
code
=
TSDB_CODE_SUCCESS
;
if
(
pCxt
->
pPlanCxt
->
topicQuery
||
pCxt
->
pPlanCxt
->
streamQuery
)
{
code
=
cpdCondAppend
(
pOtherCond
,
pPrimaryKeyCond
);
}
else
{
bool
isStrict
=
false
;
code
=
filterGetTimeRange
(
*
pPrimaryKeyCond
,
&
pScan
->
scanRange
,
&
isStrict
);
if
(
TSDB_CODE_SUCCESS
==
code
)
{
if
(
isStrict
)
{
nodesDestroyNode
(
*
pPrimaryKeyCond
);
}
else
{
code
=
cpdCondAppend
(
pOtherCond
,
pPrimaryKeyCond
);
}
*
pPrimaryKeyCond
=
NULL
;
}
*
pPrimaryKeyCond
=
NULL
;
}
return
code
;
}
...
...
@@ -344,7 +350,7 @@ static int32_t cpdOptimizeScanCondition(SOptimizeContext* pCxt, SScanLogicNode*
SNode
*
pOtherCond
=
NULL
;
int32_t
code
=
nodesPartitionCond
(
&
pScan
->
node
.
pConditions
,
&
pPrimaryKeyCond
,
&
pTagCond
,
&
pOtherCond
);
if
(
TSDB_CODE_SUCCESS
==
code
&&
NULL
!=
pPrimaryKeyCond
)
{
code
=
cpdCalcTimeRange
(
pScan
,
&
pPrimaryKeyCond
,
&
pOtherCond
);
code
=
cpdCalcTimeRange
(
p
Cxt
,
p
Scan
,
&
pPrimaryKeyCond
,
&
pOtherCond
);
}
if
(
TSDB_CODE_SUCCESS
==
code
&&
NULL
!=
pTagCond
)
{
code
=
cpdApplyTagIndex
(
pScan
,
&
pTagCond
,
&
pOtherCond
);
...
...
source/libs/planner/src/planPhysiCreater.c
浏览文件 @
eeab56e3
...
...
@@ -917,8 +917,16 @@ static int32_t createProjectPhysiNode(SPhysiPlanContext* pCxt, SNodeList* pChild
pProject
->
slimit
=
pProjectLogicNode
->
slimit
;
pProject
->
soffset
=
pProjectLogicNode
->
soffset
;
int32_t
code
=
setListSlotId
(
pCxt
,
((
SPhysiNode
*
)
nodesListGetNode
(
pChildren
,
0
))
->
pOutputDataBlockDesc
->
dataBlockId
,
-
1
,
pProjectLogicNode
->
pProjections
,
&
pProject
->
pProjections
);
int32_t
code
=
TSDB_CODE_SUCCESS
;
if
(
0
==
LIST_LENGTH
(
pChildren
))
{
pProject
->
pProjections
=
nodesCloneList
(
pProjectLogicNode
->
pProjections
);
if
(
NULL
==
pProject
->
pProjections
)
{
code
=
TSDB_CODE_OUT_OF_MEMORY
;
}
}
else
{
code
=
setListSlotId
(
pCxt
,
((
SPhysiNode
*
)
nodesListGetNode
(
pChildren
,
0
))
->
pOutputDataBlockDesc
->
dataBlockId
,
-
1
,
pProjectLogicNode
->
pProjections
,
&
pProject
->
pProjections
);
}
if
(
TSDB_CODE_SUCCESS
==
code
)
{
code
=
addDataBlockSlotsForProject
(
pCxt
,
pProjectLogicNode
->
stmtName
,
pProject
->
pProjections
,
pProject
->
node
.
pOutputDataBlockDesc
);
...
...
source/libs/planner/test/planBasicTest.cpp
浏览文件 @
eeab56e3
...
...
@@ -95,3 +95,9 @@ TEST_F(PlanBasicTest, lastRowFunc) {
run
(
"SELECT LAST_ROW(c1) FROM st1"
);
}
TEST_F
(
PlanBasicTest
,
withoutFrom
)
{
useDb
(
"root"
,
"test"
);
run
(
"SELECT 1"
);
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录