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