Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
50b82d68
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
50b82d68
编写于
11月 03, 2021
作者:
wmmhello
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add json tag support for group by
上级
235fbfae
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
1111 addition
and
1032 deletion
+1111
-1032
src/client/src/tscSQLParser.c
src/client/src/tscSQLParser.c
+19
-36
src/query/inc/qSqlparser.h
src/query/inc/qSqlparser.h
+9
-0
src/query/inc/sql.y
src/query/inc/sql.y
+29
-11
src/query/src/qSqlParser.c
src/query/src/qSqlParser.c
+29
-2
src/query/src/sql.c
src/query/src/sql.c
+1025
-967
src/util/inc/tutil.h
src/util/inc/tutil.h
+0
-1
src/util/src/tutil.c
src/util/src/tutil.c
+0
-15
未找到文件。
src/client/src/tscSQLParser.c
浏览文件 @
50b82d68
...
...
@@ -3711,8 +3711,6 @@ int32_t validateGroupbyNode(SQueryInfo* pQueryInfo, SArray* pList, SSqlCmd* pCmd
const
char
*
msg6
=
"tags not allowed for table query"
;
const
char
*
msg7
=
"not support group by expression"
;
const
char
*
msg8
=
"normal column can only locate at the end of group by clause"
;
const
char
*
msg9
=
"json tag format error, like json->'key'"
;
const
char
*
msg10
=
"-> operation only apply for json tag"
;
// todo : handle two tables situation
STableMetaInfo
*
pTableMetaInfo
=
NULL
;
...
...
@@ -3748,33 +3746,27 @@ int32_t validateGroupbyNode(SQueryInfo* pQueryInfo, SArray* pList, SSqlCmd* pCmd
size_t
num
=
taosArrayGetSize
(
pList
);
for
(
int32_t
i
=
0
;
i
<
num
;
++
i
)
{
tVariantListItem
*
pItem
=
taosArrayGet
(
pList
,
i
);
tVariant
*
pVar
=
&
pItem
->
pVar
;
SStrToken
token
=
{
pVar
->
nLen
,
pVar
->
nType
,
pVar
->
pz
};
char
*
jsonName
=
NULL
;
char
*
jsonKey
=
NULL
;
int
ret
=
getArrowKV
(
pVar
->
pz
,
pVar
->
nLen
,
&
jsonName
,
&
jsonKey
);
if
(
jsonName
&&
jsonKey
)
tscDebug
(
"group by json k:%s, v:%s"
,
jsonName
,
jsonKey
);
if
(
ret
==
2
){
return
invalidOperationMsg
(
tscGetErrorMsgPayload
(
pCmd
),
msg9
);
}
if
(
ret
==
0
){
token
.
z
=
jsonName
;
token
.
n
=
strlen
(
jsonName
);
CommonItem
*
pItem
=
taosArrayGet
(
pList
,
i
);
SStrToken
token
=
{
0
};
if
(
pItem
->
isJsonExp
){
assert
(
pItem
->
jsonExp
->
tokenId
==
TK_ARROW
);
token
.
n
=
pItem
->
jsonExp
->
pLeft
->
value
.
nLen
;
token
.
z
=
pItem
->
jsonExp
->
pLeft
->
value
.
pz
;
token
.
type
=
pItem
->
jsonExp
->
pLeft
->
value
.
nType
;
}
else
{
token
.
n
=
pItem
->
pVar
.
nLen
;
token
.
z
=
pItem
->
pVar
.
pz
;
token
.
type
=
pItem
->
pVar
.
nType
;
}
SColumnIndex
index
=
COLUMN_INDEX_INITIALIZER
;
if
(
getColumnIndexByName
(
&
token
,
pQueryInfo
,
&
index
,
tscGetErrorMsgPayload
(
pCmd
))
!=
TSDB_CODE_SUCCESS
)
{
tfree
(
jsonName
);
tfree
(
jsonKey
);
return
invalidOperationMsg
(
tscGetErrorMsgPayload
(
pCmd
),
msg2
);
}
if
(
tableIndex
==
COLUMN_INDEX_INITIAL_VAL
)
{
tableIndex
=
index
.
tableIndex
;
}
else
if
(
tableIndex
!=
index
.
tableIndex
)
{
tfree
(
jsonName
);
tfree
(
jsonKey
);
return
invalidOperationMsg
(
tscGetErrorMsgPayload
(
pCmd
),
msg3
);
}
...
...
@@ -3786,18 +3778,12 @@ int32_t validateGroupbyNode(SQueryInfo* pQueryInfo, SArray* pList, SSqlCmd* pCmd
}
else
{
pSchema
=
tscGetTableColumnSchema
(
pTableMeta
,
index
.
columnIndex
);
}
if
(
ret
==
0
&&
pSchema
->
type
!=
TSDB_DATA_TYPE_JSON
){
tfree
(
jsonName
);
tfree
(
jsonKey
);
return
invalidOperationMsg
(
tscGetErrorMsgPayload
(
pCmd
),
msg10
);
}
int32_t
numOfCols
=
tscGetNumOfColumns
(
pTableMeta
);
bool
groupTag
=
(
index
.
columnIndex
==
TSDB_TBNAME_COLUMN_INDEX
||
index
.
columnIndex
>=
numOfCols
);
if
(
groupTag
)
{
if
(
!
UTIL_TABLE_IS_SUPER_TABLE
(
pTableMetaInfo
))
{
tfree
(
jsonName
);
tfree
(
jsonKey
);
return
invalidOperationMsg
(
tscGetErrorMsgPayload
(
pCmd
),
msg6
);
}
...
...
@@ -3807,25 +3793,24 @@ int32_t validateGroupbyNode(SQueryInfo* pQueryInfo, SArray* pList, SSqlCmd* pCmd
}
SColIndex
colIndex
=
{
.
colIndex
=
relIndex
,
.
flag
=
TSDB_COL_TAG
,
.
colId
=
pSchema
->
colId
,
};
if
(
ret
==
0
)
{
tstrncpy
(
colIndex
.
name
,
jsonKey
,
tListLen
(
colIndex
.
name
));
if
(
pItem
->
isJsonExp
)
{
tstrncpy
(
colIndex
.
name
,
pItem
->
jsonExp
->
pRight
->
value
.
pz
,
tListLen
(
colIndex
.
name
));
}
else
{
tstrncpy
(
colIndex
.
name
,
pSchema
->
name
,
tListLen
(
colIndex
.
name
));
}
taosArrayPush
(
pGroupExpr
->
columnInfo
,
&
colIndex
);
index
.
columnIndex
=
relIndex
;
tscColumnListInsert
(
pTableMetaInfo
->
tagColList
,
index
.
columnIndex
,
pTableMeta
->
id
.
uid
,
pSchema
);
}
else
{
// check if the column type is valid, here only support the bool/tinyint/smallint/bigint group by
if
(
pSchema
->
type
==
TSDB_DATA_TYPE_FLOAT
||
pSchema
->
type
==
TSDB_DATA_TYPE_DOUBLE
)
{
tfree
(
jsonName
);
tfree
(
jsonKey
);
return
invalidOperationMsg
(
tscGetErrorMsgPayload
(
pCmd
),
msg5
);
}
tscColumnListInsert
(
pQueryInfo
->
colList
,
index
.
columnIndex
,
pTableMeta
->
id
.
uid
,
pSchema
);
SColIndex
colIndex
=
{
.
colIndex
=
index
.
columnIndex
,
.
flag
=
TSDB_COL_NORMAL
,
.
colId
=
pSchema
->
colId
};
strncpy
(
colIndex
.
name
,
pSchema
->
name
,
tListLen
(
colIndex
.
name
));
...
...
@@ -3833,8 +3818,6 @@ int32_t validateGroupbyNode(SQueryInfo* pQueryInfo, SArray* pList, SSqlCmd* pCmd
pQueryInfo
->
groupbyExpr
.
orderType
=
TSDB_ORDER_ASC
;
numOfGroupCols
++
;
}
tfree
(
jsonName
);
tfree
(
jsonKey
);
}
// 1. only one normal column allowed in the group by clause
...
...
@@ -3846,7 +3829,7 @@ int32_t validateGroupbyNode(SQueryInfo* pQueryInfo, SArray* pList, SSqlCmd* pCmd
for
(
int32_t
i
=
0
;
i
<
num
;
++
i
)
{
SColIndex
*
pIndex
=
taosArrayGet
(
pGroupExpr
->
columnInfo
,
i
);
if
(
TSDB_COL_IS_NORMAL_COL
(
pIndex
->
flag
)
&&
i
!=
num
-
1
)
{
return
invalidOperationMsg
(
tscGetErrorMsgPayload
(
pCmd
),
msg8
);
return
invalidOperationMsg
(
tscGetErrorMsgPayload
(
pCmd
),
msg8
);
}
}
...
...
src/query/inc/qSqlparser.h
浏览文件 @
50b82d68
...
...
@@ -79,6 +79,15 @@ typedef struct tVariantListItem {
uint8_t
sortOrder
;
}
tVariantListItem
;
typedef
struct
CommonItem
{
union
{
tVariant
pVar
;
struct
tSqlExpr
*
jsonExp
;
};
bool
isJsonExp
;
uint8_t
sortOrder
;
}
CommonItem
;
typedef
struct
SIntervalVal
{
int32_t
token
;
SStrToken
interval
;
...
...
src/query/inc/sql.y
浏览文件 @
50b82d68
...
...
@@ -621,25 +621,30 @@ sliding_opt(K) ::= . {K.n = 0; K.z = NULL; K.type = 0
%type sortlist {SArray*}
%destructor sortlist {taosArrayDestroy($$);}
%type sortitem {tVariant}
%destructor sortitem {tVariantDestroy(&$$);}
orderby_opt(A) ::= . {A = 0;}
orderby_opt(A) ::= ORDER BY sortlist(X). {A = X;}
sortlist(A) ::= sortlist(X) COMMA item(Y) sortorder(Z). {
A = tVariantListAppend(X, &Y, Z);
A = commonItemAppend(X, &Y, NULL, false, Z);
}
sortlist(A) ::= sortlist(X) COMMA arrow(Y) sortorder(Z). {
A = commonItemAppend(X, NULL, Y, true, Z);
}
sortlist(A) ::= item(Y) sortorder(Z). {
A = tVariantListAppend(NULL, &Y, Z);
A = commonItemAppend(NULL, &Y, NULL, false, Z);
}
sortlist(A) ::= arrow(Y) sortorder(Z). {
A = commonItemAppend(NULL, NULL, Y, true, Z);
}
%type item {tVariant}
item(A) ::= ids(X) cpxName(Y). {
item(A) ::= ID(X). { toTSDBType(X.type); tVariantCreate(&A, &X); }
item(A) ::= ID(X) DOT ID(Y). {
toTSDBType(X.type);
X.n += Y.n;
tVariantCreate(&A, &X);
}
...
...
@@ -658,11 +663,19 @@ groupby_opt(A) ::= . { A = 0;}
groupby_opt(A) ::= GROUP BY grouplist(X). { A = X;}
grouplist(A) ::= grouplist(X) COMMA item(Y). {
A = tVariantListAppend(X, &Y, -1);
A = commonItemAppend(X, &Y, NULL, false, -1);
}
grouplist(A) ::= grouplist(X) COMMA arrow(Y). {
A = commonItemAppend(X, NULL, Y, true, -1);
}
grouplist(A) ::= item(X). {
A = tVariantListAppend(NULL, &X, -1);
A = commonItemAppend(NULL, &X, NULL, false, -1);
}
grouplist(A) ::= arrow(X). {
A = commonItemAppend(NULL, NULL, X, true, -1);
}
//having clause, ignore the input condition in having
...
...
@@ -757,10 +770,15 @@ expr(A) ::= expr(X) MATCH expr(Y). {A = tSqlExprCreate(X, Y, TK_MATCH); }
expr(A) ::= expr(X) NMATCH expr(Y). {A = tSqlExprCreate(X, Y, TK_NMATCH); }
// question expression
expr(A) ::=
expr(X) QUESTION expr(Y). {A = tSqlExprCreate(X, Y
, TK_QUESTION); }
expr(A) ::=
ID(X) QUESTION STRING(Y). { tSqlExpr* S = tSqlExprCreateIdValue(pInfo, &X, TK_ID); tSqlExpr* M = tSqlExprCreateIdValue(pInfo, &Y, TK_STRING); A = tSqlExprCreate(S, M
, TK_QUESTION); }
// arrow expression
expr(A) ::= expr(X) ARROW expr(Y). {A = tSqlExprCreate(X, Y, TK_ARROW); }
%type arrow {tSqlExpr*}
%destructor arrow {tSqlExprDestroy($$);}
arrow(A) ::= ID(X) ARROW STRING(Y). {tSqlExpr* S = tSqlExprCreateIdValue(pInfo, &X, TK_ID); tSqlExpr* M = tSqlExprCreateIdValue(pInfo, &Y, TK_STRING); A = tSqlExprCreate(S, M, TK_ARROW); }
arrow(A) ::= ID(X) DOT ID(Y) ARROW STRING(Z). {X.n += (1+Y.n); tSqlExpr* S = tSqlExprCreateIdValue(pInfo, &X, TK_ID); tSqlExpr* M = tSqlExprCreateIdValue(pInfo, &Z, TK_STRING); A = tSqlExprCreate(S, M, TK_ARROW); }
expr(A) ::= arrow(X). {A = X;}
//in expression
expr(A) ::= expr(X) IN LP exprlist(Y) RP. {A = tSqlExprCreate(X, (tSqlExpr*)Y, TK_IN); }
...
...
src/query/src/qSqlParser.c
浏览文件 @
50b82d68
...
...
@@ -522,6 +522,24 @@ SArray *tVariantListAppendToken(SArray *pList, SStrToken *pToken, uint8_t order)
return
pList
;
}
SArray
*
commonItemAppend
(
SArray
*
pList
,
tVariant
*
pVar
,
tSqlExpr
*
jsonExp
,
bool
isJsonExp
,
uint8_t
sortOrder
){
if
(
pList
==
NULL
)
{
pList
=
taosArrayInit
(
4
,
sizeof
(
CommonItem
));
}
CommonItem
item
;
item
.
sortOrder
=
sortOrder
;
item
.
isJsonExp
=
isJsonExp
;
if
(
isJsonExp
){
item
.
jsonExp
=
jsonExp
;
}
else
{
item
.
pVar
=
*
pVar
;
}
taosArrayPush
(
pList
,
&
item
);
return
pList
;
}
SArray
*
tVariantListAppend
(
SArray
*
pList
,
tVariant
*
pVar
,
uint8_t
sortOrder
)
{
if
(
pList
==
NULL
)
{
pList
=
taosArrayInit
(
4
,
sizeof
(
tVariantListItem
));
...
...
@@ -822,6 +840,15 @@ static void freeVariant(void *pItem) {
tVariantDestroy
(
&
p
->
pVar
);
}
static
void
freeCommonItem
(
void
*
pItem
)
{
CommonItem
*
p
=
(
CommonItem
*
)
pItem
;
if
(
p
->
isJsonExp
){
tSqlExprDestroy
(
p
->
jsonExp
);
}
else
{
tVariantDestroy
(
&
p
->
pVar
);
}
}
void
freeCreateTableInfo
(
void
*
p
)
{
SCreatedTableInfo
*
pInfo
=
(
SCreatedTableInfo
*
)
p
;
taosArrayDestroy
(
pInfo
->
pTagNames
);
...
...
@@ -841,10 +868,10 @@ void destroySqlNode(SSqlNode *pSqlNode) {
tSqlExprDestroy
(
pSqlNode
->
pWhere
);
pSqlNode
->
pWhere
=
NULL
;
taosArrayDestroyEx
(
pSqlNode
->
pSortOrder
,
free
Variant
);
taosArrayDestroyEx
(
pSqlNode
->
pSortOrder
,
free
CommonItem
);
pSqlNode
->
pSortOrder
=
NULL
;
taosArrayDestroyEx
(
pSqlNode
->
pGroupby
,
free
Variant
);
taosArrayDestroyEx
(
pSqlNode
->
pGroupby
,
free
CommonItem
);
pSqlNode
->
pGroupby
=
NULL
;
pSqlNode
->
from
=
destroyRelationInfo
(
pSqlNode
->
from
);
...
...
src/query/src/sql.c
浏览文件 @
50b82d68
...
...
@@ -340,18 +340,18 @@ typedef union {
#define ParseCTX_FETCH
#define ParseCTX_STORE
#define YYFALLBACK 1
#define YYNSTATE 37
5
#define YYNRULE
296
#define YYNRULE_WITH_ACTION
296
#define YYNSTATE 37
6
#define YYNRULE
303
#define YYNRULE_WITH_ACTION
303
#define YYNTOKEN 201
#define YY_MAX_SHIFT 37
4
#define YY_MIN_SHIFTREDUCE 5
8
0
#define YY_MAX_SHIFTREDUCE 8
75
#define YY_ERROR_ACTION 8
76
#define YY_ACCEPT_ACTION 8
77
#define YY_NO_ACTION 8
78
#define YY_MIN_REDUCE 8
79
#define YY_MAX_REDUCE 11
74
#define YY_MAX_SHIFT 37
5
#define YY_MIN_SHIFTREDUCE 5
9
0
#define YY_MAX_SHIFTREDUCE 8
92
#define YY_ERROR_ACTION 8
93
#define YY_ACCEPT_ACTION 8
94
#define YY_NO_ACTION 8
95
#define YY_MIN_REDUCE 8
96
#define YY_MAX_REDUCE 11
98
/************* End control #defines *******************************************/
#define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0])))
...
...
@@ -418,172 +418,174 @@ typedef union {
** yy_default[] Default action for each state.
**
*********** Begin parsing tables **********************************************/
#define YY_ACTTAB_COUNT (
796
)
#define YY_ACTTAB_COUNT (
811
)
static
const
YYACTIONTYPE
yy_action
[]
=
{
/* 0 */
23
,
632
,
159
,
877
,
374
,
632
,
210
,
1057
,
213
,
633
,
/* 10 */
373
,
237
,
243
,
633
,
61
,
62
,
1035
,
65
,
66
,
1150
,
/* 20 */
166
,
262
,
55
,
54
,
53
,
668
,
64
,
331
,
69
,
67
,
/* 30 */
70
,
68
,
1005
,
1034
,
1003
,
1004
,
60
,
59
,
175
,
1006
,
/* 40 */
58
,
57
,
56
,
1007
,
166
,
1008
,
1009
,
52
,
51
,
259
,
/* 50 */
253
,
61
,
62
,
1048
,
65
,
66
,
293
,
211
,
262
,
55
,
/* 60 */
54
,
53
,
1021
,
64
,
331
,
69
,
67
,
70
,
68
,
284
,
/* 70 */
166
,
291
,
290
,
60
,
59
,
1054
,
716
,
58
,
57
,
56
,
/* 80 */
58
,
57
,
56
,
38
,
52
,
51
,
632
,
52
,
51
,
61
,
/* 90 */
62
,
84
,
65
,
66
,
633
,
1095
,
262
,
55
,
54
,
53
,
/* 100 */
90
,
64
,
331
,
69
,
67
,
70
,
68
,
351
,
350
,
213
,
/* 110 */
213
,
60
,
59
,
263
,
249
,
58
,
57
,
56
,
1035
,
96
,
/* 120 */
1151
,
1151
,
52
,
51
,
928
,
810
,
61
,
63
,
239
,
65
,
/* 130 */
66
,
194
,
1032
,
262
,
55
,
54
,
53
,
45
,
64
,
331
,
/* 140 */
69
,
67
,
70
,
68
,
127
,
1096
,
251
,
303
,
60
,
59
,
/* 150 */
1035
,
329
,
58
,
57
,
56
,
62
,
361
,
65
,
66
,
52
,
/* 160 */
51
,
262
,
55
,
54
,
53
,
276
,
64
,
331
,
69
,
67
,
/* 170 */
70
,
68
,
29
,
213
,
280
,
279
,
60
,
59
,
775
,
776
,
/* 180 */
58
,
57
,
56
,
329
,
1151
,
65
,
66
,
52
,
51
,
262
,
/* 190 */
55
,
54
,
53
,
632
,
64
,
331
,
69
,
67
,
70
,
68
,
/* 200 */
44
,
633
,
368
,
367
,
60
,
59
,
271
,
366
,
58
,
57
,
/* 210 */
56
,
365
,
361
,
364
,
363
,
52
,
51
,
180
,
254
,
44
,
/* 220 */
327
,
368
,
367
,
326
,
325
,
324
,
366
,
323
,
322
,
321
,
/* 230 */
365
,
320
,
364
,
363
,
156
,
154
,
153
,
255
,
265
,
372
,
/* 240 */
371
,
150
,
581
,
582
,
583
,
584
,
585
,
586
,
587
,
588
,
/* 250 */
589
,
590
,
591
,
592
,
593
,
594
,
157
,
216
,
238
,
997
,
/* 260 */
985
,
986
,
987
,
988
,
989
,
990
,
991
,
992
,
993
,
994
,
/* 270 */
995
,
996
,
998
,
999
,
24
,
38
,
69
,
67
,
70
,
68
,
/* 280 */
217
,
38
,
270
,
756
,
60
,
59
,
166
,
1048
,
58
,
57
,
/* 290 */
56
,
222
,
38
,
261
,
825
,
52
,
51
,
814
,
224
,
817
,
/* 300 */
816
,
820
,
819
,
240
,
141
,
140
,
139
,
223
,
218
,
261
,
/* 310 */
825
,
336
,
90
,
814
,
266
,
817
,
264
,
820
,
339
,
338
,
/* 320 */
247
,
815
,
271
,
818
,
1032
,
256
,
248
,
1048
,
235
,
236
,
/* 330 */
1032
,
740
,
332
,
181
,
737
,
938
,
738
,
340
,
739
,
1029
,
/* 340 */
257
,
1032
,
194
,
241
,
235
,
236
,
5
,
41
,
184
,
45
,
/* 350 */
97
,
38
,
258
,
183
,
108
,
113
,
104
,
112
,
272
,
305
,
/* 360 */
269
,
95
,
346
,
345
,
85
,
267
,
268
,
125
,
119
,
130
,
/* 370 */
760
,
283
,
316
,
82
,
129
,
99
,
135
,
138
,
128
,
71
,
/* 380 */
233
,
204
,
202
,
200
,
38
,
132
,
250
,
102
,
199
,
145
,
/* 390 */
144
,
143
,
142
,
60
,
59
,
71
,
341
,
58
,
57
,
56
,
/* 400 */
1032
,
38
,
14
,
792
,
52
,
51
,
98
,
38
,
1018
,
1019
,
/* 410 */
35
,
1022
,
75
,
38
,
826
,
821
,
87
,
271
,
38
,
38
,
/* 420 */
38
,
822
,
753
,
1023
,
823
,
369
,
966
,
929
,
1033
,
342
,
/* 430 */
826
,
821
,
83
,
1032
,
194
,
285
,
101
,
822
,
1
,
182
,
/* 440 */
3
,
195
,
88
,
772
,
78
,
824
,
343
,
782
,
9
,
39
,
/* 450 */
1032
,
741
,
742
,
287
,
76
,
333
,
1031
,
161
,
347
,
783
,
/* 460 */
791
,
72
,
1032
,
348
,
349
,
353
,
1020
,
1032
,
1032
,
1032
,
/* 470 */
812
,
726
,
308
,
26
,
728
,
310
,
727
,
34
,
260
,
287
,
/* 480 */
850
,
52
,
51
,
827
,
79
,
39
,
39
,
631
,
72
,
100
,
/* 490 */
72
,
81
,
229
,
16
,
25
,
15
,
118
,
25
,
117
,
230
,
/* 500 */
6
,
25
,
18
,
745
,
17
,
746
,
743
,
214
,
744
,
813
,
/* 510 */
311
,
20
,
124
,
19
,
123
,
22
,
215
,
21
,
137
,
136
,
/* 520 */
219
,
212
,
220
,
715
,
221
,
226
,
227
,
228
,
225
,
209
,
/* 530 */
1170
,
1162
,
1106
,
1105
,
245
,
281
,
1102
,
1101
,
158
,
246
,
/* 540 */
352
,
1056
,
48
,
1067
,
1064
,
1088
,
1087
,
1065
,
1069
,
1049
,
/* 550 */
288
,
160
,
165
,
299
,
1030
,
155
,
176
,
292
,
286
,
177
,
/* 560 */
242
,
829
,
294
,
1028
,
173
,
171
,
178
,
179
,
1046
,
943
,
/* 570 */
313
,
314
,
315
,
318
,
771
,
319
,
46
,
207
,
42
,
330
,
/* 580 */
937
,
337
,
1169
,
115
,
1168
,
1165
,
296
,
80
,
185
,
167
,
/* 590 */
77
,
306
,
344
,
50
,
1161
,
168
,
121
,
1160
,
304
,
1157
,
/* 600 */
186
,
963
,
169
,
43
,
40
,
47
,
208
,
302
,
925
,
131
,
/* 610 */
923
,
133
,
134
,
921
,
920
,
273
,
300
,
197
,
198
,
917
,
/* 620 */
916
,
915
,
914
,
913
,
912
,
911
,
201
,
203
,
908
,
906
,
/* 630 */
904
,
902
,
205
,
899
,
206
,
895
,
298
,
295
,
86
,
49
,
/* 640 */
317
,
91
,
297
,
1089
,
362
,
126
,
355
,
354
,
356
,
234
,
/* 650 */
360
,
357
,
358
,
252
,
312
,
359
,
370
,
875
,
274
,
231
,
/* 660 */
275
,
874
,
278
,
232
,
277
,
942
,
941
,
109
,
110
,
873
,
/* 670 */
856
,
282
,
919
,
855
,
287
,
307
,
10
,
918
,
30
,
89
,
/* 680 */
146
,
189
,
147
,
188
,
964
,
187
,
190
,
191
,
193
,
910
,
/* 690 */
192
,
148
,
965
,
909
,
1001
,
149
,
901
,
900
,
2
,
33
,
/* 700 */
174
,
172
,
170
,
4
,
748
,
289
,
1011
,
92
,
773
,
162
,
/* 710 */
164
,
784
,
163
,
244
,
778
,
93
,
31
,
780
,
94
,
301
,
/* 720 */
11
,
32
,
12
,
13
,
27
,
28
,
309
,
103
,
101
,
106
,
/* 730 */
646
,
36
,
105
,
681
,
37
,
679
,
107
,
678
,
677
,
675
,
/* 740 */
674
,
673
,
670
,
636
,
328
,
111
,
7
,
334
,
828
,
830
,
/* 750 */
8
,
335
,
114
,
116
,
120
,
73
,
74
,
718
,
717
,
714
,
/* 760 */
39
,
122
,
662
,
660
,
652
,
658
,
654
,
656
,
650
,
648
,
/* 770 */
684
,
683
,
682
,
680
,
676
,
672
,
671
,
196
,
634
,
598
,
/* 780 */
879
,
878
,
878
,
878
,
878
,
878
,
878
,
878
,
878
,
878
,
/* 790 */
878
,
878
,
878
,
878
,
151
,
152
,
/* 0 */
58
,
642
,
1117
,
245
,
1118
,
298
,
1051
,
302
,
94
,
643
,
/* 10 */
93
,
894
,
375
,
678
,
37
,
38
,
243
,
41
,
42
,
58
,
/* 20 */
1052
,
257
,
31
,
30
,
29
,
642
,
40
,
330
,
45
,
43
,
/* 30 */
46
,
44
,
255
,
643
,
1074
,
1194
,
36
,
35
,
374
,
237
,
/* 40 */
34
,
33
,
32
,
37
,
38
,
239
,
41
,
42
,
58
,
1049
,
/* 50 */
257
,
31
,
30
,
29
,
642
,
40
,
330
,
45
,
43
,
46
,
/* 60 */
44
,
1065
,
643
,
250
,
248
,
36
,
35
,
1052
,
1049
,
34
,
/* 70 */
33
,
32
,
37
,
38
,
159
,
41
,
42
,
279
,
1046
,
257
,
/* 80 */
31
,
30
,
29
,
1038
,
40
,
330
,
45
,
43
,
46
,
44
,
/* 90 */
326
,
82
,
212
,
249
,
36
,
35
,
642
,
1049
,
34
,
33
,
/* 100 */
32
,
1172
,
1071
,
1175
,
643
,
88
,
37
,
39
,
252
,
41
,
/* 110 */
42
,
51
,
1052
,
257
,
31
,
30
,
29
,
825
,
40
,
330
,
/* 120 */
45
,
43
,
46
,
44
,
1022
,
251
,
1020
,
1021
,
36
,
35
,
/* 130 */
212
,
1023
,
34
,
33
,
32
,
1024
,
58
,
1025
,
1026
,
1172
,
/* 140 */
763
,
1174
,
67
,
286
,
285
,
591
,
592
,
593
,
594
,
595
,
/* 150 */
596
,
597
,
598
,
599
,
600
,
601
,
602
,
603
,
604
,
157
,
/* 160 */
81
,
238
,
38
,
58
,
41
,
42
,
10
,
127
,
257
,
31
,
/* 170 */
30
,
29
,
326
,
40
,
330
,
45
,
43
,
46
,
44
,
362
,
/* 180 */
831
,
341
,
834
,
36
,
35
,
1049
,
362
,
34
,
33
,
32
,
/* 190 */
1065
,
41
,
42
,
1065
,
1037
,
257
,
31
,
30
,
29
,
99
,
/* 200 */
40
,
330
,
45
,
43
,
46
,
44
,
240
,
1186
,
342
,
241
,
/* 210 */
36
,
35
,
1049
,
1128
,
34
,
33
,
32
,
66
,
324
,
369
,
/* 220 */
368
,
323
,
322
,
321
,
367
,
320
,
319
,
318
,
366
,
317
,
/* 230 */
365
,
364
,
1035
,
1036
,
55
,
1039
,
726
,
1014
,
1002
,
1003
,
/* 240 */
1004
,
1005
,
1006
,
1007
,
1008
,
1009
,
1010
,
1011
,
1012
,
1013
,
/* 250 */
1015
,
1016
,
25
,
785
,
786
,
5
,
61
,
183
,
34
,
33
,
/* 260 */
32
,
24
,
182
,
108
,
113
,
104
,
112
,
352
,
351
,
215
,
/* 270 */
1172
,
230
,
840
,
945
,
174
,
829
,
223
,
832
,
1127
,
835
,
/* 280 */
193
,
313
,
141
,
140
,
139
,
222
,
246
,
230
,
840
,
337
,
/* 290 */
88
,
829
,
288
,
832
,
1124
,
835
,
254
,
329
,
328
,
1123
,
/* 300 */
45
,
43
,
46
,
44
,
838
,
58
,
235
,
236
,
36
,
35
,
/* 310 */
331
,
102
,
34
,
33
,
32
,
256
,
373
,
372
,
150
,
830
,
/* 320 */
260
,
833
,
235
,
236
,
209
,
750
,
265
,
67
,
747
,
271
,
/* 330 */
748
,
210
,
749
,
1172
,
125
,
119
,
130
,
6
,
275
,
274
,
/* 340 */
1172
,
129
,
266
,
135
,
138
,
128
,
216
,
1040
,
247
,
278
,
/* 350 */
343
,
80
,
132
,
179
,
1049
,
1172
,
212
,
47
,
231
,
262
,
/* 360 */
263
,
203
,
201
,
199
,
258
,
1172
,
217
,
1175
,
198
,
145
,
/* 370 */
144
,
143
,
142
,
47
,
58
,
1172
,
66
,
280
,
369
,
368
,
/* 380 */
36
,
35
,
58
,
367
,
34
,
33
,
32
,
366
,
218
,
365
,
/* 390 */
364
,
59
,
841
,
836
,
766
,
58
,
261
,
1172
,
259
,
837
,
/* 400 */
340
,
339
,
267
,
58
,
264
,
58
,
347
,
346
,
841
,
836
,
/* 410 */
1
,
181
,
58
,
13
,
276
,
837
,
1165
,
98
,
334
,
344
,
/* 420 */
156
,
154
,
153
,
1049
,
212
,
1172
,
158
,
348
,
1164
,
1163
,
/* 430 */
233
,
1049
,
234
,
1172
,
1115
,
1175
,
1116
,
1172
,
1172
,
1172
,
/* 440 */
349
,
1172
,
213
,
839
,
1049
,
751
,
752
,
101
,
350
,
805
,
/* 450 */
354
,
1172
,
1049
,
214
,
1049
,
219
,
211
,
370
,
983
,
220
,
/* 460 */
221
,
1048
,
1172
,
225
,
1172
,
1172
,
226
,
227
,
1172
,
1172
,
/* 470 */
955
,
224
,
1172
,
97
,
208
,
1172
,
1172
,
193
,
266
,
266
,
/* 480 */
1172
,
770
,
96
,
1172
,
95
,
85
,
946
,
83
,
86
,
180
,
/* 490 */
1050
,
3
,
194
,
193
,
782
,
792
,
793
,
328
,
73
,
736
,
/* 500 */
54
,
76
,
305
,
333
,
738
,
307
,
804
,
641
,
161
,
70
,
/* 510 */
48
,
353
,
737
,
59
,
301
,
79
,
59
,
867
,
70
,
100
,
/* 520 */
842
,
9
,
282
,
1073
,
844
,
282
,
70
,
15
,
118
,
14
,
/* 530 */
117
,
9
,
26
,
308
,
9
,
17
,
755
,
16
,
756
,
1084
,
/* 540 */
74
,
77
,
828
,
753
,
19
,
754
,
18
,
725
,
124
,
1081
,
/* 550 */
123
,
21
,
1082
,
20
,
137
,
136
,
1066
,
283
,
1086
,
160
,
/* 560 */
165
,
294
,
175
,
1107
,
1047
,
1106
,
1105
,
176
,
1104
,
1045
,
/* 570 */
177
,
155
,
178
,
960
,
310
,
311
,
312
,
315
,
316
,
68
,
/* 580 */
167
,
1063
,
206
,
64
,
327
,
954
,
338
,
1193
,
781
,
115
,
/* 590 */
1192
,
1189
,
184
,
345
,
1185
,
121
,
1184
,
78
,
1181
,
287
,
/* 600 */
75
,
242
,
289
,
291
,
166
,
303
,
185
,
980
,
65
,
169
,
/* 610 */
28
,
168
,
60
,
69
,
299
,
207
,
297
,
295
,
942
,
293
,
/* 620 */
170
,
131
,
171
,
940
,
133
,
134
,
938
,
290
,
937
,
268
,
/* 630 */
196
,
27
,
363
,
197
,
934
,
314
,
933
,
932
,
931
,
930
,
/* 640 */
929
,
928
,
200
,
202
,
925
,
923
,
921
,
919
,
204
,
916
,
/* 650 */
205
,
912
,
126
,
355
,
356
,
281
,
84
,
89
,
292
,
357
,
/* 660 */
358
,
359
,
360
,
361
,
371
,
232
,
253
,
309
,
892
,
270
,
/* 670 */
269
,
891
,
228
,
229
,
272
,
273
,
890
,
109
,
959
,
958
,
/* 680 */
277
,
873
,
872
,
110
,
282
,
304
,
936
,
11
,
284
,
87
,
/* 690 */
935
,
758
,
52
,
90
,
783
,
188
,
187
,
981
,
191
,
186
,
/* 700 */
189
,
146
,
190
,
147
,
927
,
192
,
148
,
1018
,
926
,
162
,
/* 710 */
149
,
53
,
918
,
172
,
917
,
982
,
173
,
2
,
4
,
794
,
/* 720 */
163
,
164
,
1028
,
788
,
91
,
244
,
790
,
92
,
296
,
62
,
/* 730 */
22
,
332
,
300
,
23
,
63
,
12
,
49
,
306
,
50
,
101
,
/* 740 */
103
,
656
,
56
,
105
,
106
,
57
,
107
,
691
,
689
,
688
,
/* 750 */
687
,
685
,
684
,
683
,
680
,
646
,
325
,
111
,
845
,
864
,
/* 760 */
863
,
843
,
7
,
865
,
8
,
336
,
335
,
114
,
116
,
71
,
/* 770 */
59
,
728
,
72
,
120
,
727
,
122
,
724
,
672
,
670
,
662
,
/* 780 */
668
,
664
,
666
,
660
,
658
,
694
,
693
,
692
,
690
,
686
,
/* 790 */
682
,
681
,
195
,
644
,
608
,
896
,
895
,
895
,
895
,
895
,
/* 800 */
895
,
895
,
895
,
895
,
895
,
895
,
895
,
895
,
895
,
151
,
/* 810 */
152
,
};
static
const
YYCODETYPE
yy_lookahead
[]
=
{
/* 0 */
2
70
,
1
,
203
,
201
,
202
,
1
,
270
,
203
,
270
,
9
,
/* 10 */
2
03
,
204
,
249
,
9
,
14
,
15
,
253
,
17
,
18
,
281
,
/* 20 */
2
03
,
21
,
22
,
23
,
24
,
5
,
26
,
27
,
28
,
29
,
/* 30 */
30
,
31
,
2
27
,
253
,
229
,
230
,
36
,
37
,
257
,
23
4
,
/* 40 */
40
,
41
,
42
,
238
,
203
,
240
,
241
,
47
,
48
,
210
,
/* 50 */
210
,
14
,
15
,
251
,
17
,
18
,
275
,
270
,
21
,
22
,
/* 60 */
23
,
24
,
0
,
26
,
27
,
28
,
29
,
30
,
31
,
267
,
/* 70 */
203
,
272
,
273
,
36
,
37
,
271
,
5
,
40
,
41
,
42
,
/* 80 */
40
,
41
,
42
,
203
,
47
,
48
,
1
,
47
,
48
,
14
,
/* 90 */
15
,
91
,
17
,
18
,
9
,
278
,
21
,
22
,
23
,
24
,
/* 100 */
87
,
26
,
27
,
28
,
29
,
30
,
31
,
36
,
37
,
270
,
/* 110 */
270
,
36
,
37
,
210
,
249
,
40
,
41
,
42
,
253
,
278
,
/* 120 */
281
,
281
,
47
,
48
,
209
,
88
,
14
,
15
,
248
,
1
7
,
/* 130 */
18
,
216
,
252
,
21
,
22
,
23
,
24
,
124
,
26
,
27
,
/* 140 */
28
,
29
,
30
,
31
,
83
,
278
,
249
,
280
,
36
,
37
,
/* 150 */
253
,
89
,
40
,
41
,
42
,
15
,
95
,
17
,
18
,
47
,
/* 160 */
48
,
21
,
22
,
23
,
24
,
147
,
26
,
27
,
28
,
29
,
/* 170 */
30
,
31
,
87
,
270
,
156
,
157
,
36
,
37
,
130
,
131
,
/* 180 */
40
,
41
,
42
,
89
,
281
,
17
,
18
,
47
,
48
,
21
,
/* 190 */
22
,
23
,
24
,
1
,
26
,
27
,
28
,
29
,
30
,
3
1
,
/* 200 */
103
,
9
,
105
,
106
,
36
,
37
,
203
,
110
,
40
,
41
,
/* 210 */
42
,
114
,
95
,
116
,
117
,
47
,
48
,
214
,
270
,
103
,
/* 220 */
10
4
,
105
,
106
,
107
,
108
,
109
,
110
,
111
,
112
,
113
,
/* 230 */
11
4
,
115
,
116
,
117
,
67
,
68
,
69
,
270
,
73
,
70
,
/* 240 */
71
,
72
,
50
,
51
,
52
,
53
,
54
,
55
,
56
,
57
,
/* 250 */
58
,
59
,
60
,
61
,
62
,
63
,
64
,
270
,
66
,
227
,
/* 260 */
228
,
229
,
230
,
231
,
232
,
233
,
234
,
235
,
236
,
237
,
/* 270 */
2
38
,
239
,
240
,
241
,
49
,
203
,
28
,
29
,
30
,
31
,
/* 280 */
2
70
,
203
,
73
,
40
,
36
,
37
,
203
,
251
,
40
,
41
,
/* 290 */
42
,
66
,
203
,
1
,
2
,
47
,
48
,
5
,
73
,
7
,
/* 300 */
5
,
9
,
7
,
267
,
79
,
80
,
81
,
82
,
270
,
1
,
/* 310 */
2
,
86
,
87
,
5
,
149
,
7
,
151
,
9
,
153
,
154
,
/* 320 */
248
,
5
,
203
,
7
,
252
,
270
,
248
,
251
,
36
,
3
7
,
/* 330 */
252
,
2
,
40
,
214
,
5
,
209
,
7
,
248
,
9
,
203
,
/* 340 */
27
0
,
252
,
216
,
267
,
36
,
37
,
67
,
68
,
69
,
124
,
/* 350 */
2
54
,
203
,
270
,
74
,
75
,
76
,
77
,
78
,
149
,
27
6
,
/* 360 */
151
,
278
,
153
,
154
,
268
,
36
,
37
,
67
,
68
,
69
,
/* 370 */
127
,
146
,
93
,
148
,
74
,
211
,
76
,
77
,
78
,
87
,
/* 380 */
155
,
67
,
68
,
69
,
203
,
85
,
250
,
211
,
74
,
75
,
/* 390 */
76
,
77
,
78
,
36
,
37
,
87
,
248
,
40
,
41
,
42
,
/* 400 */
252
,
203
,
87
,
81
,
47
,
48
,
91
,
203
,
244
,
245
,
/* 410 */
2
46
,
247
,
102
,
203
,
122
,
123
,
88
,
203
,
203
,
203
,
/* 420 */
203
,
129
,
102
,
247
,
129
,
225
,
226
,
209
,
214
,
248
,
/* 430 */
122
,
123
,
211
,
252
,
216
,
88
,
121
,
129
,
212
,
213
,
/* 440 */
2
07
,
208
,
88
,
88
,
102
,
129
,
248
,
88
,
128
,
102
,
/* 450 */
2
52
,
122
,
123
,
125
,
144
,
16
,
252
,
102
,
248
,
88
,
/* 460 */
138
,
102
,
252
,
248
,
248
,
248
,
245
,
252
,
252
,
252
,
/* 470 */
1
,
88
,
88
,
102
,
88
,
88
,
88
,
87
,
65
,
125
,
/* 480 */
88
,
47
,
48
,
88
,
142
,
102
,
102
,
88
,
102
,
102
,
/* 490 */
102
,
87
,
270
,
150
,
102
,
152
,
150
,
102
,
152
,
270
,
/* 500 */
87
,
102
,
150
,
5
,
152
,
7
,
5
,
270
,
7
,
40
,
/* 510 */
1
20
,
150
,
150
,
152
,
152
,
150
,
270
,
152
,
83
,
84
,
/* 520 */
270
,
270
,
270
,
119
,
270
,
270
,
270
,
270
,
270
,
270
,
/* 530 */
253
,
253
,
243
,
243
,
243
,
203
,
243
,
243
,
203
,
24
3
,
/* 540 */
243
,
203
,
269
,
203
,
203
,
279
,
279
,
203
,
203
,
251
,
/* 550 */
251
,
203
,
203
,
203
,
251
,
65
,
255
,
274
,
205
,
203
,
/* 560 */
2
74
,
122
,
274
,
203
,
259
,
261
,
203
,
203
,
266
,
203
,
/* 570 */
203
,
203
,
203
,
203
,
129
,
203
,
203
,
203
,
203
,
203
,
/* 580 */
2
03
,
203
,
203
,
203
,
203
,
203
,
274
,
141
,
203
,
265
,
/* 590 */
143
,
136
,
203
,
140
,
203
,
264
,
203
,
203
,
139
,
203
,
/* 600 */
203
,
203
,
263
,
203
,
203
,
203
,
203
,
134
,
203
,
203
,
/* 610 */
203
,
203
,
203
,
203
,
203
,
203
,
133
,
203
,
203
,
203
,
/* 620 */
2
03
,
203
,
203
,
203
,
203
,
203
,
203
,
203
,
203
,
203
,
/* 630 */
203
,
203
,
203
,
203
,
203
,
203
,
132
,
135
,
205
,
145
,
/* 640 */
94
,
205
,
205
,
205
,
118
,
101
,
56
,
100
,
97
,
205
,
/* 650 */
96
,
99
,
60
,
205
,
205
,
98
,
89
,
5
,
158
,
205
,
/* 660 */
5
,
5
,
5
,
205
,
158
,
215
,
215
,
211
,
211
,
5
,
/* 670 */
1
05
,
147
,
205
,
104
,
125
,
120
,
87
,
205
,
87
,
126
,
/* 680 */
206
,
218
,
206
,
222
,
224
,
223
,
221
,
219
,
217
,
205
,
/* 690 */
2
20
,
206
,
226
,
205
,
242
,
206
,
205
,
205
,
212
,
256
,
/* 700 */
2
58
,
260
,
262
,
207
,
88
,
102
,
242
,
102
,
88
,
87
,
/* 710 */
102
,
88
,
87
,
1
,
88
,
87
,
102
,
88
,
87
,
87
,
/* 720 */
137
,
102
,
137
,
87
,
87
,
87
,
120
,
83
,
121
,
75
,
/* 730 */
5
,
92
,
91
,
9
,
92
,
5
,
91
,
5
,
5
,
5
,
/* 740 */
5
,
5
,
5
,
90
,
16
,
83
,
87
,
27
,
88
,
122
,
/* 750 */
87
,
64
,
152
,
152
,
152
,
17
,
17
,
5
,
5
,
88
,
/* 760 */
102
,
152
,
5
,
5
,
5
,
5
,
5
,
5
,
5
,
5
,
/* 770 */
5
,
5
,
5
,
5
,
5
,
5
,
5
,
102
,
90
,
6
5
,
/* 780 */
0
,
282
,
282
,
282
,
282
,
282
,
282
,
282
,
282
,
282
,
/* 790 */
282
,
282
,
282
,
282
,
22
,
22
,
282
,
282
,
282
,
282
,
/* 800 */
282
,
282
,
282
,
282
,
282
,
282
,
282
,
282
,
282
,
28
2
,
/* 810 */
28
2
,
282
,
282
,
282
,
282
,
282
,
282
,
282
,
282
,
282
,
/* 0 */
2
03
,
1
,
277
,
1
,
279
,
280
,
253
,
276
,
277
,
9
,
/* 10 */
2
79
,
201
,
202
,
5
,
14
,
15
,
249
,
17
,
18
,
203
,
/* 20 */
2
53
,
21
,
22
,
23
,
24
,
1
,
26
,
27
,
28
,
29
,
/* 30 */
30
,
31
,
2
10
,
9
,
203
,
253
,
36
,
37
,
203
,
20
4
,
/* 40 */
40
,
41
,
42
,
14
,
15
,
248
,
17
,
18
,
203
,
252
,
/* 50 */
21
,
22
,
23
,
24
,
1
,
26
,
27
,
28
,
29
,
30
,
/* 60 */
31
,
251
,
9
,
249
,
248
,
36
,
37
,
253
,
252
,
40
,
/* 70 */
41
,
42
,
14
,
15
,
203
,
17
,
18
,
267
,
203
,
21
,
/* 80 */
22
,
23
,
24
,
0
,
26
,
27
,
28
,
29
,
30
,
31
,
/* 90 */
89
,
91
,
270
,
248
,
36
,
37
,
1
,
252
,
40
,
41
,
/* 100 */
42
,
279
,
271
,
281
,
9
,
87
,
14
,
15
,
249
,
17
,
/* 110 */
18
,
87
,
253
,
21
,
22
,
23
,
24
,
88
,
26
,
27
,
/* 120 */
28
,
29
,
30
,
31
,
227
,
250
,
229
,
230
,
36
,
3
7
,
/* 130 */
270
,
234
,
40
,
41
,
42
,
238
,
203
,
240
,
241
,
279
,
/* 140 */
102
,
281
,
124
,
272
,
273
,
50
,
51
,
52
,
53
,
54
,
/* 150 */
55
,
56
,
57
,
58
,
59
,
60
,
61
,
62
,
63
,
64
,
/* 160 */
211
,
66
,
15
,
203
,
17
,
18
,
128
,
83
,
21
,
22
,
/* 170 */
23
,
24
,
89
,
26
,
27
,
28
,
29
,
30
,
31
,
95
,
/* 180 */
5
,
248
,
7
,
36
,
37
,
252
,
95
,
40
,
41
,
42
,
/* 190 */
251
,
17
,
18
,
251
,
245
,
21
,
22
,
23
,
24
,
21
1
,
/* 200 */
26
,
27
,
28
,
29
,
30
,
31
,
267
,
253
,
248
,
267
,
/* 210 */
36
,
37
,
252
,
243
,
40
,
41
,
42
,
103
,
104
,
105
,
/* 220 */
10
6
,
107
,
108
,
109
,
110
,
111
,
112
,
113
,
114
,
115
,
/* 230 */
11
6
,
117
,
244
,
245
,
246
,
247
,
5
,
227
,
228
,
229
,
/* 240 */
230
,
231
,
232
,
233
,
234
,
235
,
236
,
237
,
238
,
239
,
/* 250 */
240
,
241
,
49
,
130
,
131
,
67
,
68
,
69
,
40
,
41
,
/* 260 */
42
,
270
,
74
,
75
,
76
,
77
,
78
,
36
,
37
,
66
,
/* 270 */
2
79
,
1
,
2
,
209
,
257
,
5
,
73
,
7
,
243
,
9
,
/* 280 */
2
16
,
93
,
79
,
80
,
81
,
82
,
243
,
1
,
2
,
86
,
/* 290 */
87
,
5
,
275
,
7
,
243
,
9
,
210
,
47
,
48
,
243
,
/* 300 */
28
,
29
,
30
,
31
,
129
,
203
,
36
,
37
,
36
,
37
,
/* 310 */
40
,
211
,
40
,
41
,
42
,
65
,
70
,
71
,
72
,
5
,
/* 320 */
73
,
7
,
36
,
37
,
270
,
2
,
73
,
124
,
5
,
14
7
,
/* 330 */
7
,
270
,
9
,
279
,
67
,
68
,
69
,
87
,
156
,
157
,
/* 340 */
27
9
,
74
,
203
,
76
,
77
,
78
,
270
,
247
,
243
,
146
,
/* 350 */
2
48
,
148
,
85
,
214
,
252
,
279
,
270
,
87
,
155
,
3
6
,
/* 360 */
37
,
67
,
68
,
69
,
210
,
279
,
270
,
281
,
74
,
75
,
/* 370 */
76
,
77
,
78
,
87
,
203
,
279
,
103
,
88
,
105
,
106
,
/* 380 */
36
,
37
,
203
,
110
,
40
,
41
,
42
,
114
,
270
,
116
,
/* 390 */
117
,
102
,
122
,
123
,
40
,
203
,
149
,
279
,
151
,
129
,
/* 400 */
153
,
154
,
149
,
203
,
151
,
203
,
153
,
154
,
122
,
123
,
/* 410 */
2
12
,
213
,
203
,
87
,
203
,
129
,
270
,
91
,
16
,
248
,
/* 420 */
67
,
68
,
69
,
252
,
270
,
279
,
203
,
248
,
270
,
270
,
/* 430 */
270
,
252
,
270
,
279
,
277
,
281
,
279
,
279
,
279
,
279
,
/* 440 */
2
48
,
279
,
270
,
129
,
252
,
122
,
123
,
121
,
248
,
81
,
/* 450 */
2
48
,
279
,
252
,
270
,
252
,
270
,
270
,
225
,
226
,
270
,
/* 460 */
270
,
252
,
279
,
270
,
279
,
279
,
270
,
270
,
279
,
279
,
/* 470 */
209
,
270
,
279
,
254
,
270
,
279
,
279
,
216
,
203
,
203
,
/* 480 */
279
,
127
,
277
,
279
,
279
,
88
,
209
,
268
,
88
,
214
,
/* 490 */
214
,
207
,
208
,
216
,
88
,
88
,
88
,
48
,
102
,
88
,
/* 500 */
87
,
102
,
88
,
1
,
88
,
88
,
138
,
88
,
102
,
102
,
/* 510 */
1
02
,
243
,
88
,
102
,
65
,
87
,
102
,
88
,
102
,
102
,
/* 520 */
88
,
102
,
125
,
203
,
122
,
125
,
102
,
150
,
150
,
152
,
/* 530 */
152
,
102
,
269
,
120
,
102
,
150
,
5
,
152
,
7
,
20
3
,
/* 540 */
144
,
142
,
40
,
5
,
150
,
7
,
152
,
119
,
150
,
203
,
/* 550 */
152
,
150
,
203
,
152
,
83
,
84
,
251
,
251
,
203
,
203
,
/* 560 */
2
03
,
203
,
255
,
278
,
251
,
278
,
278
,
203
,
278
,
203
,
/* 570 */
203
,
65
,
203
,
203
,
203
,
203
,
203
,
203
,
203
,
203
,
/* 580 */
2
64
,
266
,
203
,
203
,
203
,
203
,
203
,
203
,
129
,
203
,
/* 590 */
203
,
203
,
203
,
203
,
203
,
203
,
203
,
141
,
203
,
274
,
/* 600 */
143
,
274
,
274
,
274
,
265
,
136
,
203
,
203
,
203
,
262
,
/* 610 */
140
,
263
,
203
,
203
,
139
,
203
,
134
,
133
,
203
,
132
,
/* 620 */
2
61
,
203
,
260
,
203
,
203
,
203
,
203
,
135
,
203
,
203
,
/* 630 */
203
,
145
,
118
,
203
,
203
,
94
,
203
,
203
,
203
,
203
,
/* 640 */
203
,
203
,
203
,
203
,
203
,
203
,
203
,
203
,
203
,
203
,
/* 650 */
203
,
203
,
101
,
100
,
56
,
205
,
205
,
205
,
205
,
97
,
/* 660 */
99
,
60
,
98
,
96
,
89
,
205
,
205
,
205
,
5
,
5
,
/* 670 */
1
58
,
5
,
205
,
205
,
158
,
5
,
5
,
211
,
215
,
215
,
/* 680 */
147
,
105
,
104
,
211
,
125
,
120
,
205
,
87
,
102
,
126
,
/* 690 */
2
05
,
88
,
87
,
102
,
88
,
218
,
222
,
224
,
220
,
223
,
/* 700 */
2
21
,
206
,
219
,
206
,
205
,
217
,
206
,
242
,
205
,
87
,
/* 710 */
206
,
256
,
205
,
259
,
205
,
226
,
258
,
212
,
207
,
88
,
/* 720 */
87
,
102
,
242
,
88
,
87
,
1
,
88
,
87
,
87
,
102
,
/* 730 */
137
,
48
,
1
,
137
,
102
,
87
,
87
,
120
,
87
,
121
,
/* 740 */
83
,
5
,
92
,
91
,
75
,
92
,
91
,
9
,
5
,
5
,
/* 750 */
5
,
5
,
5
,
5
,
5
,
90
,
16
,
83
,
122
,
9
,
/* 760 */
9
,
88
,
87
,
9
,
87
,
64
,
27
,
152
,
152
,
17
,
/* 770 */
102
,
5
,
17
,
152
,
5
,
152
,
88
,
5
,
5
,
5
,
/* 780 */
5
,
5
,
5
,
5
,
5
,
5
,
5
,
5
,
5
,
5
,
/* 790 */
5
,
5
,
102
,
90
,
65
,
0
,
282
,
282
,
282
,
282
,
/* 800 */
282
,
282
,
282
,
282
,
282
,
282
,
282
,
282
,
282
,
2
2
,
/* 810 */
2
2
,
282
,
282
,
282
,
282
,
282
,
282
,
282
,
282
,
282
,
/* 820 */
282
,
282
,
282
,
282
,
282
,
282
,
282
,
282
,
282
,
282
,
/* 830 */
282
,
282
,
282
,
282
,
282
,
282
,
282
,
282
,
282
,
282
,
/* 840 */
282
,
282
,
282
,
282
,
282
,
282
,
282
,
282
,
282
,
282
,
...
...
@@ -601,116 +603,118 @@ static const YYCODETYPE yy_lookahead[] = {
/* 960 */
282
,
282
,
282
,
282
,
282
,
282
,
282
,
282
,
282
,
282
,
/* 970 */
282
,
282
,
282
,
282
,
282
,
282
,
282
,
282
,
282
,
282
,
/* 980 */
282
,
282
,
282
,
282
,
282
,
282
,
282
,
282
,
282
,
282
,
/* 990 */
282
,
282
,
282
,
282
,
282
,
282
,
282
,
/* 990 */
282
,
282
,
282
,
282
,
282
,
282
,
282
,
282
,
282
,
282
,
/* 1000 */
282
,
282
,
282
,
282
,
282
,
282
,
282
,
282
,
282
,
282
,
/* 1010 */
282
,
282
,
};
#define YY_SHIFT_COUNT (37
4
)
#define YY_SHIFT_COUNT (37
5
)
#define YY_SHIFT_MIN (0)
#define YY_SHIFT_MAX (7
80
)
#define YY_SHIFT_MAX (7
95
)
static
const
unsigned
short
int
yy_shift_ofst
[]
=
{
/* 0 */
2
25
,
116
,
116
,
97
,
97
,
94
,
292
,
308
,
308
,
85
,
/* 10 */
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
/* 20 */
4
,
4
,
4
,
0
,
192
,
308
,
329
,
329
,
329
,
13
,
/* 30 */
13
,
4
,
4
,
48
,
4
,
62
,
4
,
4
,
4
,
4
,
/* 40 */
61
,
94
,
117
,
117
,
20
,
796
,
796
,
796
,
308
,
308
,
/* 50 */
3
08
,
308
,
308
,
308
,
308
,
308
,
308
,
308
,
308
,
308
,
/* 60 */
308
,
308
,
308
,
308
,
308
,
308
,
308
,
308
,
308
,
308
,
/* 70 */
3
08
,
308
,
329
,
329
,
329
,
71
,
71
,
71
,
71
,
7
1
,
/* 80 */
71
,
71
,
4
,
4
,
4
,
243
,
4
,
4
,
4
,
1
3
,
/* 90 */
13
,
4
,
4
,
4
,
4
,
322
,
322
,
320
,
13
,
4
,
/* 100 */
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
/* 110 */
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
/* 120 */
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
/* 130 */
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
/* 140 */
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
/* 150 */
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
490
,
490
,
/* 160 */
490
,
445
,
445
,
445
,
445
,
490
,
490
,
446
,
447
,
455
,
/* 170 */
4
53
,
459
,
473
,
483
,
504
,
502
,
494
,
490
,
490
,
490
,
/* 180 */
54
6
,
546
,
526
,
94
,
94
,
490
,
490
,
544
,
547
,
590
,
/* 190 */
5
51
,
552
,
592
,
557
,
554
,
526
,
20
,
490
,
490
,
567
,
/* 200 */
5
67
,
490
,
567
,
490
,
567
,
490
,
490
,
796
,
796
,
37
,
/* 210 */
75
,
75
,
112
,
75
,
140
,
168
,
248
,
248
,
248
,
248
,
/* 220 */
2
48
,
248
,
279
,
300
,
314
,
357
,
357
,
357
,
357
,
40
,
/* 230 */
40
,
165
,
209
,
18
,
315
,
295
,
316
,
169
,
167
,
347
,
/* 240 */
3
28
,
354
,
355
,
359
,
371
,
310
,
342
,
383
,
384
,
386
,
/* 250 */
387
,
388
,
390
,
392
,
434
,
434
,
434
,
434
,
434
,
395
,
/* 260 */
469
,
413
,
439
,
399
,
343
,
346
,
352
,
498
,
501
,
361
,
/* 270 */
362
,
404
,
365
,
435
,
652
,
500
,
655
,
656
,
506
,
657
,
/* 280 */
664
,
565
,
569
,
524
,
549
,
555
,
589
,
553
,
616
,
59
1
,
/* 290 */
6
03
,
605
,
620
,
622
,
623
,
625
,
626
,
608
,
628
,
629
,
/* 300 */
6
31
,
712
,
632
,
614
,
583
,
619
,
585
,
636
,
555
,
637
,
/* 310 */
6
06
,
638
,
607
,
644
,
639
,
641
,
654
,
725
,
642
,
645
,
/* 320 */
7
24
,
730
,
732
,
733
,
734
,
735
,
736
,
737
,
653
,
728
,
/* 330 */
6
62
,
659
,
660
,
627
,
663
,
720
,
687
,
738
,
600
,
601
,
/* 340 */
6
58
,
658
,
658
,
658
,
739
,
602
,
609
,
658
,
658
,
65
8
,
/* 350 */
752
,
753
,
671
,
658
,
757
,
758
,
759
,
760
,
761
,
762
,
/* 360 */
7
63
,
764
,
765
,
766
,
767
,
768
,
769
,
770
,
771
,
675
,
/* 370 */
6
88
,
772
,
773
,
714
,
780
,
/* 0 */
2
03
,
114
,
114
,
273
,
273
,
1
,
270
,
286
,
286
,
286
,
/* 10 */
24
,
53
,
53
,
53
,
53
,
53
,
53
,
53
,
53
,
53
,
/* 20 */
53
,
53
,
2
,
2
,
0
,
95
,
286
,
286
,
286
,
286
,
/* 30 */
286
,
286
,
286
,
286
,
286
,
286
,
286
,
286
,
286
,
286
,
/* 40 */
286
,
286
,
286
,
286
,
286
,
286
,
286
,
286
,
323
,
323
,
/* 50 */
3
23
,
18
,
18
,
123
,
53
,
83
,
53
,
53
,
53
,
53
,
/* 60 */
84
,
1
,
2
,
2
,
91
,
91
,
8
,
811
,
811
,
811
,
/* 70 */
3
23
,
323
,
323
,
231
,
231
,
231
,
231
,
231
,
231
,
23
1
,
/* 80 */
53
,
53
,
53
,
354
,
53
,
53
,
53
,
18
,
18
,
5
3
,
/* 90 */
53
,
53
,
53
,
368
,
368
,
368
,
368
,
38
,
18
,
53
,
/* 100 */
53
,
53
,
53
,
53
,
53
,
53
,
53
,
53
,
53
,
53
,
/* 110 */
53
,
53
,
53
,
53
,
53
,
53
,
53
,
53
,
53
,
53
,
/* 120 */
53
,
53
,
53
,
53
,
53
,
53
,
53
,
53
,
53
,
53
,
/* 130 */
53
,
53
,
53
,
53
,
53
,
53
,
53
,
53
,
53
,
53
,
/* 140 */
53
,
53
,
53
,
53
,
53
,
53
,
53
,
53
,
53
,
53
,
/* 150 */
53
,
53
,
53
,
53
,
53
,
53
,
53
,
53
,
506
,
506
,
/* 160 */
506
,
459
,
459
,
459
,
459
,
506
,
456
,
457
,
469
,
470
,
/* 170 */
4
75
,
482
,
484
,
487
,
492
,
486
,
506
,
506
,
506
,
541
,
/* 180 */
54
1
,
514
,
1
,
1
,
506
,
506
,
551
,
553
,
598
,
562
,
/* 190 */
5
61
,
601
,
564
,
567
,
514
,
8
,
506
,
506
,
575
,
575
,
/* 200 */
5
06
,
575
,
506
,
575
,
506
,
506
,
811
,
811
,
29
,
58
,
/* 210 */
58
,
92
,
58
,
147
,
174
,
188
,
272
,
272
,
272
,
272
,
/* 220 */
2
72
,
272
,
267
,
294
,
344
,
344
,
344
,
344
,
247
,
253
,
/* 230 */
250
,
182
,
326
,
218
,
218
,
175
,
314
,
246
,
353
,
289
,
/* 240 */
3
97
,
400
,
406
,
407
,
408
,
449
,
396
,
399
,
411
,
414
,
/* 250 */
416
,
417
,
424
,
413
,
429
,
432
,
502
,
402
,
419
,
377
,
/* 260 */
378
,
385
,
531
,
538
,
394
,
398
,
428
,
401
,
471
,
663
,
/* 270 */
512
,
664
,
666
,
516
,
670
,
671
,
576
,
578
,
533
,
559
,
/* 280 */
565
,
600
,
563
,
603
,
605
,
586
,
591
,
606
,
622
,
63
1
,
/* 290 */
6
33
,
635
,
619
,
637
,
638
,
640
,
724
,
641
,
627
,
593
,
/* 300 */
6
83
,
731
,
632
,
596
,
648
,
565
,
649
,
617
,
651
,
618
,
/* 310 */
6
57
,
650
,
652
,
669
,
736
,
653
,
655
,
738
,
743
,
744
,
/* 320 */
7
45
,
746
,
747
,
748
,
749
,
665
,
740
,
674
,
750
,
751
,
/* 330 */
6
75
,
673
,
754
,
683
,
636
,
677
,
739
,
701
,
752
,
615
,
/* 340 */
6
16
,
668
,
668
,
668
,
668
,
755
,
621
,
623
,
668
,
66
8
,
/* 350 */
668
,
766
,
769
,
688
,
668
,
772
,
773
,
774
,
775
,
776
,
/* 360 */
7
77
,
778
,
779
,
780
,
781
,
782
,
783
,
784
,
785
,
786
,
/* 370 */
6
90
,
703
,
787
,
788
,
729
,
795
,
};
#define YY_REDUCE_COUNT (20
8
)
#define YY_REDUCE_MIN (-27
0
)
#define YY_REDUCE_MAX (
496
)
#define YY_REDUCE_COUNT (20
7
)
#define YY_REDUCE_MIN (-27
5
)
#define YY_REDUCE_MAX (
511
)
static
const
short
yy_reduce_ofst
[]
=
{
/* 0 */
-
19
8
,
32
,
32
,
-
195
,
-
195
,
164
,
-
161
,
-
160
,
-
97
,
-
201
,
/* 10 */
-
12
0
,
-
133
,
83
,
72
,
78
,
89
,
148
,
181
,
198
,
210
,
/* 20 */
2
15
,
216
,
217
,
-
196
,
-
193
,
-
262
,
-
237
,
-
135
,
-
103
,
3
6
,
/* 30 */
76
,
-
183
,
-
159
,
-
219
,
136
,
176
,
3
,
119
,
214
,
204
,
/* 40 */
-
85
,
221
,
126
,
218
,
200
,
96
,
226
,
233
,
-
270
,
-
264
,
/* 50 */
-
213
,
-
52
,
-
33
,
-
13
,
10
,
38
,
55
,
70
,
82
,
222
,
/* 60 */
229
,
237
,
246
,
250
,
251
,
252
,
254
,
255
,
256
,
257
,
/* 70 */
258
,
259
,
-
220
,
277
,
278
,
289
,
290
,
291
,
293
,
294
,
/* 80 */
2
96
,
297
,
332
,
335
,
338
,
273
,
340
,
341
,
344
,
298
,
/* 90 */
299
,
345
,
348
,
349
,
350
,
266
,
267
,
301
,
303
,
356
,
/* 100 */
36
0
,
363
,
364
,
366
,
367
,
368
,
369
,
370
,
372
,
373
,
/* 110 */
37
4
,
375
,
376
,
377
,
378
,
379
,
380
,
381
,
382
,
385
,
/* 120 */
3
89
,
391
,
393
,
394
,
396
,
397
,
398
,
400
,
401
,
402
,
/* 130 */
4
03
,
405
,
406
,
407
,
408
,
409
,
410
,
411
,
412
,
414
,
/* 140 */
4
15
,
416
,
417
,
418
,
419
,
420
,
421
,
422
,
423
,
424
,
/* 150 */
4
25
,
426
,
427
,
428
,
429
,
430
,
431
,
432
,
353
,
433
,
/* 160 */
4
36
,
283
,
286
,
288
,
312
,
437
,
438
,
302
,
324
,
331
,
/* 170 */
3
39
,
440
,
304
,
441
,
305
,
442
,
443
,
444
,
448
,
449
,
/* 180 */
4
50
,
451
,
452
,
456
,
457
,
454
,
458
,
460
,
462
,
461
,
/* 190 */
4
63
,
465
,
468
,
470
,
471
,
464
,
466
,
467
,
472
,
474
,
/* 200 */
4
76
,
484
,
485
,
488
,
489
,
491
,
492
,
486
,
496
,
/* 0 */
-
19
0
,
10
,
10
,
-
103
,
-
103
,
-
12
,
-
178
,
86
,
154
,
-
140
,
/* 10 */
-
12
9
,
-
203
,
-
184
,
-
155
,
-
67
,
-
40
,
102
,
171
,
179
,
192
,
/* 20 */
2
00
,
202
,
-
275
,
-
269
,
-
169
,
-
165
,
-
9
,
54
,
61
,
7
6
,
/* 30 */
96
,
118
,
146
,
158
,
159
,
160
,
162
,
172
,
183
,
185
,
/* 40 */
186
,
189
,
190
,
193
,
196
,
197
,
201
,
204
,
-
233
,
-
186
,
/* 50 */
-
141
,
-
61
,
-
58
,
17
,
-
125
,
100
,
139
,
275
,
276
,
209
,
/* 60 */
64
,
-
51
,
157
,
205
,
261
,
277
,
232
,
219
,
198
,
284
,
/* 70 */
-
247
,
-
218
,
-
46
,
-
30
,
35
,
43
,
51
,
56
,
105
,
268
,
/* 80 */
2
11
,
223
,
320
,
263
,
336
,
346
,
349
,
305
,
306
,
355
,
/* 90 */
356
,
357
,
358
,
285
,
287
,
288
,
290
,
307
,
313
,
364
,
/* 100 */
36
6
,
367
,
369
,
370
,
371
,
372
,
373
,
374
,
375
,
376
,
/* 110 */
37
9
,
380
,
381
,
382
,
383
,
384
,
386
,
387
,
388
,
389
,
/* 120 */
3
90
,
391
,
392
,
393
,
395
,
403
,
404
,
405
,
409
,
410
,
/* 130 */
4
12
,
415
,
418
,
420
,
421
,
422
,
423
,
425
,
426
,
427
,
/* 140 */
4
30
,
431
,
433
,
434
,
435
,
436
,
437
,
438
,
439
,
440
,
/* 150 */
4
41
,
442
,
443
,
444
,
445
,
446
,
447
,
448
,
450
,
451
,
/* 160 */
4
52
,
325
,
327
,
328
,
329
,
453
,
315
,
339
,
316
,
348
,
/* 170 */
3
47
,
359
,
362
,
454
,
458
,
455
,
460
,
461
,
462
,
463
,
/* 180 */
4
64
,
465
,
466
,
472
,
467
,
468
,
473
,
476
,
474
,
477
,
/* 190 */
4
79
,
483
,
478
,
488
,
480
,
489
,
481
,
485
,
495
,
497
,
/* 200 */
4
99
,
500
,
503
,
504
,
507
,
509
,
505
,
511
,
};
static
const
YYACTIONTYPE
yy_default
[]
=
{
/* 0 */
8
76
,
1000
,
939
,
1010
,
926
,
936
,
1153
,
1153
,
1153
,
876
,
/* 10 */
8
76
,
876
,
876
,
876
,
876
,
876
,
876
,
876
,
876
,
876
,
/* 20 */
8
76
,
876
,
876
,
1058
,
896
,
1153
,
876
,
876
,
876
,
876
,
/* 30 */
8
76
,
876
,
876
,
1073
,
876
,
936
,
876
,
876
,
876
,
876
,
/* 40 */
946
,
936
,
946
,
946
,
876
,
1053
,
984
,
1002
,
876
,
876
,
/* 50 */
8
76
,
876
,
876
,
876
,
876
,
876
,
876
,
876
,
876
,
876
,
/* 60 */
876
,
876
,
876
,
876
,
876
,
876
,
876
,
876
,
876
,
876
,
/* 70 */
8
76
,
876
,
876
,
876
,
876
,
876
,
876
,
876
,
876
,
876
,
/* 80 */
8
76
,
876
,
876
,
876
,
876
,
1060
,
1066
,
1063
,
876
,
876
,
/* 90 */
8
76
,
1068
,
876
,
876
,
876
,
1092
,
1092
,
1051
,
876
,
876
,
/* 100 */
8
76
,
876
,
876
,
876
,
876
,
876
,
876
,
876
,
876
,
876
,
/* 110 */
8
76
,
876
,
876
,
876
,
876
,
876
,
876
,
876
,
876
,
876
,
/* 120 */
8
76
,
876
,
876
,
876
,
876
,
876
,
876
,
876
,
876
,
876
,
/* 130 */
8
76
,
924
,
876
,
922
,
876
,
876
,
876
,
876
,
876
,
876
,
/* 140 */
8
76
,
876
,
876
,
876
,
876
,
876
,
876
,
876
,
876
,
876
,
/* 150 */
9
07
,
876
,
876
,
876
,
876
,
876
,
876
,
894
,
898
,
898
,
/* 160 */
898
,
876
,
876
,
876
,
876
,
898
,
898
,
1099
,
1103
,
1085
,
/* 170 */
1
097
,
1093
,
1080
,
1078
,
1076
,
1084
,
1107
,
898
,
898
,
898
,
/* 180 */
9
44
,
944
,
940
,
936
,
936
,
898
,
898
,
962
,
960
,
958
,
/* 190 */
9
50
,
956
,
952
,
954
,
948
,
927
,
876
,
898
,
898
,
934
,
/* 200 */
9
34
,
898
,
934
,
898
,
934
,
898
,
898
,
984
,
1002
,
876
,
/* 210 */
11
08
,
1098
,
876
,
1152
,
1138
,
1137
,
1146
,
1145
,
1144
,
1136
,
/* 220 */
11
35
,
1134
,
876
,
876
,
876
,
1130
,
1133
,
1132
,
1131
,
1140
,
/* 230 */
113
9
,
876
,
876
,
876
,
876
,
876
,
876
,
876
,
876
,
876
,
/* 240 */
8
76
,
876
,
876
,
876
,
876
,
1104
,
1100
,
876
,
876
,
876
,
/* 250 */
8
76
,
876
,
876
,
876
,
1148
,
1147
,
1143
,
1142
,
1141
,
876
,
/* 260 */
8
76
,
1110
,
876
,
876
,
876
,
876
,
876
,
876
,
876
,
876
,
/* 270 */
8
76
,
1012
,
876
,
876
,
876
,
876
,
876
,
876
,
876
,
876
,
/* 280 */
8
76
,
876
,
876
,
876
,
1050
,
876
,
876
,
876
,
876
,
876
,
/* 290 */
1062
,
1061
,
876
,
876
,
876
,
876
,
876
,
876
,
876
,
876
,
/* 300 */
876
,
876
,
876
,
1094
,
876
,
1086
,
876
,
876
,
1024
,
876
,
/* 310 */
8
76
,
876
,
876
,
876
,
876
,
876
,
876
,
876
,
876
,
876
,
/* 320 */
8
76
,
876
,
876
,
876
,
876
,
876
,
876
,
876
,
876
,
876
,
/* 330 */
8
76
,
876
,
876
,
876
,
876
,
876
,
876
,
876
,
876
,
876
,
/* 340 */
1171
,
1166
,
1167
,
1164
,
876
,
876
,
876
,
1163
,
1158
,
1159
,
/* 350 */
876
,
876
,
876
,
1156
,
876
,
876
,
876
,
876
,
876
,
876
,
/* 360 */
8
76
,
876
,
876
,
876
,
876
,
876
,
876
,
876
,
876
,
968
,
/* 370 */
876
,
905
,
903
,
876
,
876
,
/* 0 */
8
93
,
1017
,
956
,
1027
,
943
,
953
,
1177
,
1177
,
1177
,
1177
,
/* 10 */
8
93
,
893
,
893
,
893
,
893
,
893
,
893
,
893
,
893
,
893
,
/* 20 */
8
93
,
893
,
893
,
893
,
1075
,
913
,
893
,
893
,
893
,
893
,
/* 30 */
8
93
,
893
,
893
,
893
,
893
,
893
,
893
,
893
,
893
,
893
,
/* 40 */
893
,
893
,
893
,
893
,
893
,
893
,
893
,
893
,
893
,
893
,
/* 50 */
8
93
,
893
,
893
,
1090
,
893
,
953
,
893
,
893
,
893
,
893
,
/* 60 */
963
,
953
,
893
,
893
,
963
,
963
,
893
,
1070
,
1001
,
1019
,
/* 70 */
8
93
,
893
,
893
,
893
,
893
,
893
,
893
,
893
,
893
,
893
,
/* 80 */
8
93
,
893
,
893
,
1077
,
1083
,
1080
,
893
,
893
,
893
,
1085
,
/* 90 */
8
93
,
893
,
893
,
1112
,
1112
,
1112
,
1112
,
1068
,
893
,
893
,
/* 100 */
8
93
,
893
,
893
,
893
,
893
,
893
,
893
,
893
,
893
,
893
,
/* 110 */
8
93
,
893
,
893
,
893
,
893
,
893
,
893
,
893
,
893
,
893
,
/* 120 */
8
93
,
893
,
893
,
893
,
893
,
893
,
893
,
893
,
893
,
893
,
/* 130 */
8
93
,
941
,
893
,
939
,
893
,
893
,
893
,
893
,
893
,
893
,
/* 140 */
8
93
,
893
,
893
,
893
,
893
,
893
,
893
,
893
,
893
,
893
,
/* 150 */
9
24
,
893
,
893
,
893
,
893
,
893
,
893
,
911
,
915
,
915
,
/* 160 */
915
,
893
,
893
,
893
,
893
,
915
,
1121
,
1125
,
1102
,
1119
,
/* 170 */
1
113
,
1097
,
1095
,
1093
,
1101
,
1129
,
915
,
915
,
915
,
961
,
/* 180 */
9
61
,
957
,
953
,
953
,
915
,
915
,
979
,
977
,
975
,
967
,
/* 190 */
9
73
,
969
,
971
,
965
,
944
,
893
,
915
,
915
,
951
,
951
,
/* 200 */
9
15
,
951
,
915
,
951
,
915
,
915
,
1001
,
1019
,
893
,
1130
,
/* 210 */
11
20
,
893
,
1176
,
1160
,
1159
,
893
,
1168
,
1167
,
1166
,
1158
,
/* 220 */
11
57
,
1156
,
893
,
893
,
1152
,
1155
,
1154
,
1153
,
893
,
893
,
/* 230 */
113
2
,
893
,
893
,
1162
,
1161
,
893
,
893
,
893
,
893
,
893
,
/* 240 */
8
93
,
893
,
893
,
893
,
893
,
1108
,
1126
,
1122
,
893
,
893
,
/* 250 */
8
93
,
893
,
893
,
893
,
893
,
893
,
893
,
893
,
893
,
893
,
/* 260 */
8
93
,
893
,
893
,
893
,
893
,
893
,
1029
,
893
,
893
,
893
,
/* 270 */
8
93
,
893
,
893
,
893
,
893
,
893
,
893
,
893
,
893
,
1067
,
/* 280 */
8
93
,
893
,
893
,
893
,
893
,
1079
,
1078
,
893
,
893
,
893
,
/* 290 */
893
,
893
,
893
,
893
,
893
,
893
,
893
,
893
,
1114
,
893
,
/* 300 */
1109
,
893
,
1103
,
893
,
893
,
1041
,
893
,
893
,
893
,
893
,
/* 310 */
8
93
,
893
,
893
,
893
,
893
,
893
,
893
,
893
,
893
,
893
,
/* 320 */
8
93
,
893
,
893
,
893
,
893
,
893
,
893
,
893
,
893
,
893
,
/* 330 */
8
93
,
893
,
893
,
1133
,
893
,
893
,
893
,
893
,
893
,
893
,
/* 340 */
893
,
1195
,
1190
,
1191
,
1188
,
893
,
893
,
893
,
1187
,
1182
,
/* 350 */
1183
,
893
,
893
,
893
,
1180
,
893
,
893
,
893
,
893
,
893
,
/* 360 */
8
93
,
893
,
893
,
893
,
893
,
893
,
893
,
893
,
893
,
893
,
/* 370 */
985
,
893
,
922
,
920
,
893
,
893
,
};
/********** End of lemon-generated parsing tables *****************************/
...
...
@@ -1296,9 +1300,9 @@ static const char *const yyTokenName[] = {
/* 274 */
"tmvar"
,
/* 275 */
"intervalKey"
,
/* 276 */
"sortlist"
,
/* 277 */
"
sort
item"
,
/* 278 */
"
item
"
,
/* 279 */
"
sortorder
"
,
/* 277 */
"item"
,
/* 278 */
"
sortorder
"
,
/* 279 */
"
arrow
"
,
/* 280 */
"grouplist"
,
/* 281 */
"expritem"
,
};
...
...
@@ -1517,93 +1521,100 @@ static const char *const yyRuleName[] = {
/* 206 */
"orderby_opt ::="
,
/* 207 */
"orderby_opt ::= ORDER BY sortlist"
,
/* 208 */
"sortlist ::= sortlist COMMA item sortorder"
,
/* 209 */
"sortlist ::= item sortorder"
,
/* 210 */
"item ::= ids cpxName"
,
/* 211 */
"sortorder ::= ASC"
,
/* 212 */
"sortorder ::= DESC"
,
/* 213 */
"sortorder ::="
,
/* 214 */
"groupby_opt ::="
,
/* 215 */
"groupby_opt ::= GROUP BY grouplist"
,
/* 216 */
"grouplist ::= grouplist COMMA item"
,
/* 217 */
"grouplist ::= item"
,
/* 218 */
"having_opt ::="
,
/* 219 */
"having_opt ::= HAVING expr"
,
/* 220 */
"limit_opt ::="
,
/* 221 */
"limit_opt ::= LIMIT signed"
,
/* 222 */
"limit_opt ::= LIMIT signed OFFSET signed"
,
/* 223 */
"limit_opt ::= LIMIT signed COMMA signed"
,
/* 224 */
"slimit_opt ::="
,
/* 225 */
"slimit_opt ::= SLIMIT signed"
,
/* 226 */
"slimit_opt ::= SLIMIT signed SOFFSET signed"
,
/* 227 */
"slimit_opt ::= SLIMIT signed COMMA signed"
,
/* 228 */
"where_opt ::="
,
/* 229 */
"where_opt ::= WHERE expr"
,
/* 230 */
"expr ::= LP expr RP"
,
/* 231 */
"expr ::= ID"
,
/* 232 */
"expr ::= ID DOT ID"
,
/* 233 */
"expr ::= ID DOT STAR"
,
/* 234 */
"expr ::= INTEGER"
,
/* 235 */
"expr ::= MINUS INTEGER"
,
/* 236 */
"expr ::= PLUS INTEGER"
,
/* 237 */
"expr ::= FLOAT"
,
/* 238 */
"expr ::= MINUS FLOAT"
,
/* 239 */
"expr ::= PLUS FLOAT"
,
/* 240 */
"expr ::= STRING"
,
/* 241 */
"expr ::= NOW"
,
/* 242 */
"expr ::= VARIABLE"
,
/* 243 */
"expr ::= PLUS VARIABLE"
,
/* 244 */
"expr ::= MINUS VARIABLE"
,
/* 245 */
"expr ::= BOOL"
,
/* 246 */
"expr ::= NULL"
,
/* 247 */
"expr ::= ID LP exprlist RP"
,
/* 248 */
"expr ::= ID LP STAR RP"
,
/* 249 */
"expr ::= expr IS NULL"
,
/* 250 */
"expr ::= expr IS NOT NULL"
,
/* 251 */
"expr ::= expr LT expr"
,
/* 252 */
"expr ::= expr GT expr"
,
/* 253 */
"expr ::= expr LE expr"
,
/* 254 */
"expr ::= expr GE expr"
,
/* 255 */
"expr ::= expr NE expr"
,
/* 256 */
"expr ::= expr EQ expr"
,
/* 257 */
"expr ::= expr BETWEEN expr AND expr"
,
/* 258 */
"expr ::= expr AND expr"
,
/* 259 */
"expr ::= expr OR expr"
,
/* 260 */
"expr ::= expr PLUS expr"
,
/* 261 */
"expr ::= expr MINUS expr"
,
/* 262 */
"expr ::= expr STAR expr"
,
/* 263 */
"expr ::= expr SLASH expr"
,
/* 264 */
"expr ::= expr REM expr"
,
/* 265 */
"expr ::= expr LIKE expr"
,
/* 266 */
"expr ::= expr MATCH expr"
,
/* 267 */
"expr ::= expr NMATCH expr"
,
/* 268 */
"expr ::= expr QUESTION expr"
,
/* 269 */
"expr ::= expr ARROW expr"
,
/* 270 */
"expr ::= expr IN LP exprlist RP"
,
/* 271 */
"exprlist ::= exprlist COMMA expritem"
,
/* 272 */
"exprlist ::= expritem"
,
/* 273 */
"expritem ::= expr"
,
/* 274 */
"expritem ::="
,
/* 275 */
"cmd ::= RESET QUERY CACHE"
,
/* 276 */
"cmd ::= SYNCDB ids REPLICA"
,
/* 277 */
"cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist"
,
/* 278 */
"cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids"
,
/* 279 */
"cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist"
,
/* 280 */
"cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist"
,
/* 281 */
"cmd ::= ALTER TABLE ids cpxName DROP TAG ids"
,
/* 282 */
"cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids"
,
/* 283 */
"cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem"
,
/* 284 */
"cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist"
,
/* 285 */
"cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist"
,
/* 286 */
"cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids"
,
/* 287 */
"cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist"
,
/* 288 */
"cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist"
,
/* 289 */
"cmd ::= ALTER STABLE ids cpxName DROP TAG ids"
,
/* 290 */
"cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids"
,
/* 291 */
"cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem"
,
/* 292 */
"cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist"
,
/* 293 */
"cmd ::= KILL CONNECTION INTEGER"
,
/* 294 */
"cmd ::= KILL STREAM INTEGER COLON INTEGER"
,
/* 295 */
"cmd ::= KILL QUERY INTEGER COLON INTEGER"
,
/* 209 */
"sortlist ::= sortlist COMMA arrow sortorder"
,
/* 210 */
"sortlist ::= item sortorder"
,
/* 211 */
"sortlist ::= arrow sortorder"
,
/* 212 */
"item ::= ID"
,
/* 213 */
"item ::= ID DOT ID"
,
/* 214 */
"sortorder ::= ASC"
,
/* 215 */
"sortorder ::= DESC"
,
/* 216 */
"sortorder ::="
,
/* 217 */
"groupby_opt ::="
,
/* 218 */
"groupby_opt ::= GROUP BY grouplist"
,
/* 219 */
"grouplist ::= grouplist COMMA item"
,
/* 220 */
"grouplist ::= grouplist COMMA arrow"
,
/* 221 */
"grouplist ::= item"
,
/* 222 */
"grouplist ::= arrow"
,
/* 223 */
"having_opt ::="
,
/* 224 */
"having_opt ::= HAVING expr"
,
/* 225 */
"limit_opt ::="
,
/* 226 */
"limit_opt ::= LIMIT signed"
,
/* 227 */
"limit_opt ::= LIMIT signed OFFSET signed"
,
/* 228 */
"limit_opt ::= LIMIT signed COMMA signed"
,
/* 229 */
"slimit_opt ::="
,
/* 230 */
"slimit_opt ::= SLIMIT signed"
,
/* 231 */
"slimit_opt ::= SLIMIT signed SOFFSET signed"
,
/* 232 */
"slimit_opt ::= SLIMIT signed COMMA signed"
,
/* 233 */
"where_opt ::="
,
/* 234 */
"where_opt ::= WHERE expr"
,
/* 235 */
"expr ::= LP expr RP"
,
/* 236 */
"expr ::= ID"
,
/* 237 */
"expr ::= ID DOT ID"
,
/* 238 */
"expr ::= ID DOT STAR"
,
/* 239 */
"expr ::= INTEGER"
,
/* 240 */
"expr ::= MINUS INTEGER"
,
/* 241 */
"expr ::= PLUS INTEGER"
,
/* 242 */
"expr ::= FLOAT"
,
/* 243 */
"expr ::= MINUS FLOAT"
,
/* 244 */
"expr ::= PLUS FLOAT"
,
/* 245 */
"expr ::= STRING"
,
/* 246 */
"expr ::= NOW"
,
/* 247 */
"expr ::= VARIABLE"
,
/* 248 */
"expr ::= PLUS VARIABLE"
,
/* 249 */
"expr ::= MINUS VARIABLE"
,
/* 250 */
"expr ::= BOOL"
,
/* 251 */
"expr ::= NULL"
,
/* 252 */
"expr ::= ID LP exprlist RP"
,
/* 253 */
"expr ::= ID LP STAR RP"
,
/* 254 */
"expr ::= expr IS NULL"
,
/* 255 */
"expr ::= expr IS NOT NULL"
,
/* 256 */
"expr ::= expr LT expr"
,
/* 257 */
"expr ::= expr GT expr"
,
/* 258 */
"expr ::= expr LE expr"
,
/* 259 */
"expr ::= expr GE expr"
,
/* 260 */
"expr ::= expr NE expr"
,
/* 261 */
"expr ::= expr EQ expr"
,
/* 262 */
"expr ::= expr BETWEEN expr AND expr"
,
/* 263 */
"expr ::= expr AND expr"
,
/* 264 */
"expr ::= expr OR expr"
,
/* 265 */
"expr ::= expr PLUS expr"
,
/* 266 */
"expr ::= expr MINUS expr"
,
/* 267 */
"expr ::= expr STAR expr"
,
/* 268 */
"expr ::= expr SLASH expr"
,
/* 269 */
"expr ::= expr REM expr"
,
/* 270 */
"expr ::= expr LIKE expr"
,
/* 271 */
"expr ::= expr MATCH expr"
,
/* 272 */
"expr ::= expr NMATCH expr"
,
/* 273 */
"expr ::= ID QUESTION STRING"
,
/* 274 */
"arrow ::= ID ARROW STRING"
,
/* 275 */
"arrow ::= ID DOT ID ARROW STRING"
,
/* 276 */
"expr ::= arrow"
,
/* 277 */
"expr ::= expr IN LP exprlist RP"
,
/* 278 */
"exprlist ::= exprlist COMMA expritem"
,
/* 279 */
"exprlist ::= expritem"
,
/* 280 */
"expritem ::= expr"
,
/* 281 */
"expritem ::="
,
/* 282 */
"cmd ::= RESET QUERY CACHE"
,
/* 283 */
"cmd ::= SYNCDB ids REPLICA"
,
/* 284 */
"cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist"
,
/* 285 */
"cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids"
,
/* 286 */
"cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist"
,
/* 287 */
"cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist"
,
/* 288 */
"cmd ::= ALTER TABLE ids cpxName DROP TAG ids"
,
/* 289 */
"cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids"
,
/* 290 */
"cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem"
,
/* 291 */
"cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist"
,
/* 292 */
"cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist"
,
/* 293 */
"cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids"
,
/* 294 */
"cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist"
,
/* 295 */
"cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist"
,
/* 296 */
"cmd ::= ALTER STABLE ids cpxName DROP TAG ids"
,
/* 297 */
"cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids"
,
/* 298 */
"cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem"
,
/* 299 */
"cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist"
,
/* 300 */
"cmd ::= KILL CONNECTION INTEGER"
,
/* 301 */
"cmd ::= KILL STREAM INTEGER COLON INTEGER"
,
/* 302 */
"cmd ::= KILL QUERY INTEGER COLON INTEGER"
,
};
#endif
/* NDEBUG */
...
...
@@ -1733,9 +1744,9 @@ static void yy_destructor(
case
254
:
/* selcollist */
case
268
:
/* sclp */
{
#line 7
69
"sql.y"
#line 7
87
"sql.y"
tSqlExprListDestroy
((
yypminor
->
yy345
));
#line 17
38
"sql.c"
#line 17
49
"sql.c"
}
break
;
case
225
:
/* intitemlist */
...
...
@@ -1751,21 +1762,21 @@ tSqlExprListDestroy((yypminor->yy345));
{
#line 257 "sql.y"
taosArrayDestroy
((
yypminor
->
yy345
));
#line 17
54
"sql.c"
#line 17
65
"sql.c"
}
break
;
case
246
:
/* create_table_list */
{
#line 365 "sql.y"
destroyCreateTableSql
((
yypminor
->
yy170
));
#line 17
61
"sql.c"
#line 17
72
"sql.c"
}
break
;
case
251
:
/* select */
{
#line 485 "sql.y"
destroySqlNode
((
yypminor
->
yy68
));
#line 17
68
"sql.c"
#line 17
79
"sql.c"
}
break
;
case
255
:
/* from */
...
...
@@ -1774,31 +1785,25 @@ destroySqlNode((yypminor->yy68));
{
#line 540 "sql.y"
destroyRelationInfo
((
yypminor
->
yy484
));
#line 17
77
"sql.c"
#line 17
88
"sql.c"
}
break
;
case
256
:
/* where_opt */
case
263
:
/* having_opt */
case
270
:
/* expr */
case
279
:
/* arrow */
case
281
:
/* expritem */
{
#line
692
"sql.y"
#line
705
"sql.y"
tSqlExprDestroy
((
yypminor
->
yy418
));
#line 17
87
"sql.c"
#line 17
99
"sql.c"
}
break
;
case
267
:
/* union */
{
#line 493 "sql.y"
destroyAllSqlNode
((
yypminor
->
yy345
));
#line 1794 "sql.c"
}
break
;
case
277
:
/* sortitem */
{
#line 625 "sql.y"
tVariantDestroy
(
&
(
yypminor
->
yy2
));
#line 1801 "sql.c"
#line 1806 "sql.c"
}
break
;
/********* End destructor definitions *****************************************/
...
...
@@ -2296,93 +2301,100 @@ static const YYCODETYPE yyRuleInfoLhs[] = {
264
,
/* (206) orderby_opt ::= */
264
,
/* (207) orderby_opt ::= ORDER BY sortlist */
276
,
/* (208) sortlist ::= sortlist COMMA item sortorder */
276
,
/* (209) sortlist ::= item sortorder */
278
,
/* (210) item ::= ids cpxName */
279
,
/* (211) sortorder ::= ASC */
279
,
/* (212) sortorder ::= DESC */
279
,
/* (213) sortorder ::= */
262
,
/* (214) groupby_opt ::= */
262
,
/* (215) groupby_opt ::= GROUP BY grouplist */
280
,
/* (216) grouplist ::= grouplist COMMA item */
280
,
/* (217) grouplist ::= item */
263
,
/* (218) having_opt ::= */
263
,
/* (219) having_opt ::= HAVING expr */
266
,
/* (220) limit_opt ::= */
266
,
/* (221) limit_opt ::= LIMIT signed */
266
,
/* (222) limit_opt ::= LIMIT signed OFFSET signed */
266
,
/* (223) limit_opt ::= LIMIT signed COMMA signed */
265
,
/* (224) slimit_opt ::= */
265
,
/* (225) slimit_opt ::= SLIMIT signed */
265
,
/* (226) slimit_opt ::= SLIMIT signed SOFFSET signed */
265
,
/* (227) slimit_opt ::= SLIMIT signed COMMA signed */
256
,
/* (228) where_opt ::= */
256
,
/* (229) where_opt ::= WHERE expr */
270
,
/* (230) expr ::= LP expr RP */
270
,
/* (231) expr ::= ID */
270
,
/* (232) expr ::= ID DOT ID */
270
,
/* (233) expr ::= ID DOT STAR */
270
,
/* (234) expr ::= INTEGER */
270
,
/* (235) expr ::= MINUS INTEGER */
270
,
/* (236) expr ::= PLUS INTEGER */
270
,
/* (237) expr ::= FLOAT */
270
,
/* (238) expr ::= MINUS FLOAT */
270
,
/* (239) expr ::= PLUS FLOAT */
270
,
/* (240) expr ::= STRING */
270
,
/* (241) expr ::= NOW */
270
,
/* (242) expr ::= VARIABLE */
270
,
/* (243) expr ::= PLUS VARIABLE */
270
,
/* (244) expr ::= MINUS VARIABLE */
270
,
/* (245) expr ::= BOOL */
270
,
/* (246) expr ::= NULL */
270
,
/* (247) expr ::= ID LP exprlist RP */
270
,
/* (248) expr ::= ID LP STAR RP */
270
,
/* (249) expr ::= expr IS NULL */
270
,
/* (250) expr ::= expr IS NOT NULL */
270
,
/* (251) expr ::= expr LT expr */
270
,
/* (252) expr ::= expr GT expr */
270
,
/* (253) expr ::= expr LE expr */
270
,
/* (254) expr ::= expr GE expr */
270
,
/* (255) expr ::= expr NE expr */
270
,
/* (256) expr ::= expr EQ expr */
270
,
/* (257) expr ::= expr BETWEEN expr AND expr */
270
,
/* (258) expr ::= expr AND expr */
270
,
/* (259) expr ::= expr OR expr */
270
,
/* (260) expr ::= expr PLUS expr */
270
,
/* (261) expr ::= expr MINUS expr */
270
,
/* (262) expr ::= expr STAR expr */
270
,
/* (263) expr ::= expr SLASH expr */
270
,
/* (264) expr ::= expr REM expr */
270
,
/* (265) expr ::= expr LIKE expr */
270
,
/* (266) expr ::= expr MATCH expr */
270
,
/* (267) expr ::= expr NMATCH expr */
270
,
/* (268) expr ::= expr QUESTION expr */
270
,
/* (269) expr ::= expr ARROW expr */
270
,
/* (270) expr ::= expr IN LP exprlist RP */
210
,
/* (271) exprlist ::= exprlist COMMA expritem */
210
,
/* (272) exprlist ::= expritem */
281
,
/* (273) expritem ::= expr */
281
,
/* (274) expritem ::= */
202
,
/* (275) cmd ::= RESET QUERY CACHE */
202
,
/* (276) cmd ::= SYNCDB ids REPLICA */
202
,
/* (277) cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */
202
,
/* (278) cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */
202
,
/* (279) cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */
202
,
/* (280) cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */
202
,
/* (281) cmd ::= ALTER TABLE ids cpxName DROP TAG ids */
202
,
/* (282) cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */
202
,
/* (283) cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */
202
,
/* (284) cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */
202
,
/* (285) cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */
202
,
/* (286) cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */
202
,
/* (287) cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */
202
,
/* (288) cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */
202
,
/* (289) cmd ::= ALTER STABLE ids cpxName DROP TAG ids */
202
,
/* (290) cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */
202
,
/* (291) cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem */
202
,
/* (292) cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */
202
,
/* (293) cmd ::= KILL CONNECTION INTEGER */
202
,
/* (294) cmd ::= KILL STREAM INTEGER COLON INTEGER */
202
,
/* (295) cmd ::= KILL QUERY INTEGER COLON INTEGER */
276
,
/* (209) sortlist ::= sortlist COMMA arrow sortorder */
276
,
/* (210) sortlist ::= item sortorder */
276
,
/* (211) sortlist ::= arrow sortorder */
277
,
/* (212) item ::= ID */
277
,
/* (213) item ::= ID DOT ID */
278
,
/* (214) sortorder ::= ASC */
278
,
/* (215) sortorder ::= DESC */
278
,
/* (216) sortorder ::= */
262
,
/* (217) groupby_opt ::= */
262
,
/* (218) groupby_opt ::= GROUP BY grouplist */
280
,
/* (219) grouplist ::= grouplist COMMA item */
280
,
/* (220) grouplist ::= grouplist COMMA arrow */
280
,
/* (221) grouplist ::= item */
280
,
/* (222) grouplist ::= arrow */
263
,
/* (223) having_opt ::= */
263
,
/* (224) having_opt ::= HAVING expr */
266
,
/* (225) limit_opt ::= */
266
,
/* (226) limit_opt ::= LIMIT signed */
266
,
/* (227) limit_opt ::= LIMIT signed OFFSET signed */
266
,
/* (228) limit_opt ::= LIMIT signed COMMA signed */
265
,
/* (229) slimit_opt ::= */
265
,
/* (230) slimit_opt ::= SLIMIT signed */
265
,
/* (231) slimit_opt ::= SLIMIT signed SOFFSET signed */
265
,
/* (232) slimit_opt ::= SLIMIT signed COMMA signed */
256
,
/* (233) where_opt ::= */
256
,
/* (234) where_opt ::= WHERE expr */
270
,
/* (235) expr ::= LP expr RP */
270
,
/* (236) expr ::= ID */
270
,
/* (237) expr ::= ID DOT ID */
270
,
/* (238) expr ::= ID DOT STAR */
270
,
/* (239) expr ::= INTEGER */
270
,
/* (240) expr ::= MINUS INTEGER */
270
,
/* (241) expr ::= PLUS INTEGER */
270
,
/* (242) expr ::= FLOAT */
270
,
/* (243) expr ::= MINUS FLOAT */
270
,
/* (244) expr ::= PLUS FLOAT */
270
,
/* (245) expr ::= STRING */
270
,
/* (246) expr ::= NOW */
270
,
/* (247) expr ::= VARIABLE */
270
,
/* (248) expr ::= PLUS VARIABLE */
270
,
/* (249) expr ::= MINUS VARIABLE */
270
,
/* (250) expr ::= BOOL */
270
,
/* (251) expr ::= NULL */
270
,
/* (252) expr ::= ID LP exprlist RP */
270
,
/* (253) expr ::= ID LP STAR RP */
270
,
/* (254) expr ::= expr IS NULL */
270
,
/* (255) expr ::= expr IS NOT NULL */
270
,
/* (256) expr ::= expr LT expr */
270
,
/* (257) expr ::= expr GT expr */
270
,
/* (258) expr ::= expr LE expr */
270
,
/* (259) expr ::= expr GE expr */
270
,
/* (260) expr ::= expr NE expr */
270
,
/* (261) expr ::= expr EQ expr */
270
,
/* (262) expr ::= expr BETWEEN expr AND expr */
270
,
/* (263) expr ::= expr AND expr */
270
,
/* (264) expr ::= expr OR expr */
270
,
/* (265) expr ::= expr PLUS expr */
270
,
/* (266) expr ::= expr MINUS expr */
270
,
/* (267) expr ::= expr STAR expr */
270
,
/* (268) expr ::= expr SLASH expr */
270
,
/* (269) expr ::= expr REM expr */
270
,
/* (270) expr ::= expr LIKE expr */
270
,
/* (271) expr ::= expr MATCH expr */
270
,
/* (272) expr ::= expr NMATCH expr */
270
,
/* (273) expr ::= ID QUESTION STRING */
279
,
/* (274) arrow ::= ID ARROW STRING */
279
,
/* (275) arrow ::= ID DOT ID ARROW STRING */
270
,
/* (276) expr ::= arrow */
270
,
/* (277) expr ::= expr IN LP exprlist RP */
210
,
/* (278) exprlist ::= exprlist COMMA expritem */
210
,
/* (279) exprlist ::= expritem */
281
,
/* (280) expritem ::= expr */
281
,
/* (281) expritem ::= */
202
,
/* (282) cmd ::= RESET QUERY CACHE */
202
,
/* (283) cmd ::= SYNCDB ids REPLICA */
202
,
/* (284) cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */
202
,
/* (285) cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */
202
,
/* (286) cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */
202
,
/* (287) cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */
202
,
/* (288) cmd ::= ALTER TABLE ids cpxName DROP TAG ids */
202
,
/* (289) cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */
202
,
/* (290) cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */
202
,
/* (291) cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */
202
,
/* (292) cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */
202
,
/* (293) cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */
202
,
/* (294) cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */
202
,
/* (295) cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */
202
,
/* (296) cmd ::= ALTER STABLE ids cpxName DROP TAG ids */
202
,
/* (297) cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */
202
,
/* (298) cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem */
202
,
/* (299) cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */
202
,
/* (300) cmd ::= KILL CONNECTION INTEGER */
202
,
/* (301) cmd ::= KILL STREAM INTEGER COLON INTEGER */
202
,
/* (302) cmd ::= KILL QUERY INTEGER COLON INTEGER */
};
/* For rule J, yyRuleInfoNRhs[J] contains the negative of the number
...
...
@@ -2597,93 +2609,100 @@ static const signed char yyRuleInfoNRhs[] = {
0
,
/* (206) orderby_opt ::= */
-
3
,
/* (207) orderby_opt ::= ORDER BY sortlist */
-
4
,
/* (208) sortlist ::= sortlist COMMA item sortorder */
-
2
,
/* (209) sortlist ::= item sortorder */
-
2
,
/* (210) item ::= ids cpxName */
-
1
,
/* (211) sortorder ::= ASC */
-
1
,
/* (212) sortorder ::= DESC */
0
,
/* (213) sortorder ::= */
0
,
/* (214) groupby_opt ::= */
-
3
,
/* (215) groupby_opt ::= GROUP BY grouplist */
-
3
,
/* (216) grouplist ::= grouplist COMMA item */
-
1
,
/* (217) grouplist ::= item */
0
,
/* (218) having_opt ::= */
-
2
,
/* (219) having_opt ::= HAVING expr */
0
,
/* (220) limit_opt ::= */
-
2
,
/* (221) limit_opt ::= LIMIT signed */
-
4
,
/* (222) limit_opt ::= LIMIT signed OFFSET signed */
-
4
,
/* (223) limit_opt ::= LIMIT signed COMMA signed */
0
,
/* (224) slimit_opt ::= */
-
2
,
/* (225) slimit_opt ::= SLIMIT signed */
-
4
,
/* (226) slimit_opt ::= SLIMIT signed SOFFSET signed */
-
4
,
/* (227) slimit_opt ::= SLIMIT signed COMMA signed */
0
,
/* (228) where_opt ::= */
-
2
,
/* (229) where_opt ::= WHERE expr */
-
3
,
/* (230) expr ::= LP expr RP */
-
1
,
/* (231) expr ::= ID */
-
3
,
/* (232) expr ::= ID DOT ID */
-
3
,
/* (233) expr ::= ID DOT STAR */
-
1
,
/* (234) expr ::= INTEGER */
-
2
,
/* (235) expr ::= MINUS INTEGER */
-
2
,
/* (236) expr ::= PLUS INTEGER */
-
1
,
/* (237) expr ::= FLOAT */
-
2
,
/* (238) expr ::= MINUS FLOAT */
-
2
,
/* (239) expr ::= PLUS FLOAT */
-
1
,
/* (240) expr ::= STRING */
-
1
,
/* (241) expr ::= NOW */
-
1
,
/* (242) expr ::= VARIABLE */
-
2
,
/* (243) expr ::= PLUS VARIABLE */
-
2
,
/* (244) expr ::= MINUS VARIABLE */
-
1
,
/* (245) expr ::= BOOL */
-
1
,
/* (246) expr ::= NULL */
-
4
,
/* (247) expr ::= ID LP exprlist RP */
-
4
,
/* (248) expr ::= ID LP STAR RP */
-
3
,
/* (249) expr ::= expr IS NULL */
-
4
,
/* (250) expr ::= expr IS NOT NULL */
-
3
,
/* (251) expr ::= expr LT expr */
-
3
,
/* (252) expr ::= expr GT expr */
-
3
,
/* (253) expr ::= expr LE expr */
-
3
,
/* (254) expr ::= expr GE expr */
-
3
,
/* (255) expr ::= expr NE expr */
-
3
,
/* (256) expr ::= expr EQ expr */
-
5
,
/* (257) expr ::= expr BETWEEN expr AND expr */
-
3
,
/* (258) expr ::= expr AND expr */
-
3
,
/* (259) expr ::= expr OR expr */
-
3
,
/* (260) expr ::= expr PLUS expr */
-
3
,
/* (261) expr ::= expr MINUS expr */
-
3
,
/* (262) expr ::= expr STAR expr */
-
3
,
/* (263) expr ::= expr SLASH expr */
-
3
,
/* (264) expr ::= expr REM expr */
-
3
,
/* (265) expr ::= expr LIKE expr */
-
3
,
/* (266) expr ::= expr MATCH expr */
-
3
,
/* (267) expr ::= expr NMATCH expr */
-
3
,
/* (268) expr ::= expr QUESTION expr */
-
3
,
/* (269) expr ::= expr ARROW expr */
-
5
,
/* (270) expr ::= expr IN LP exprlist RP */
-
3
,
/* (271) exprlist ::= exprlist COMMA expritem */
-
1
,
/* (272) exprlist ::= expritem */
-
1
,
/* (273) expritem ::= expr */
0
,
/* (274) expritem ::= */
-
3
,
/* (275) cmd ::= RESET QUERY CACHE */
-
3
,
/* (276) cmd ::= SYNCDB ids REPLICA */
-
7
,
/* (277) cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */
-
7
,
/* (278) cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */
-
7
,
/* (279) cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */
-
7
,
/* (280) cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */
-
7
,
/* (281) cmd ::= ALTER TABLE ids cpxName DROP TAG ids */
-
8
,
/* (282) cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */
-
9
,
/* (283) cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */
-
7
,
/* (284) cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */
-
7
,
/* (285) cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */
-
7
,
/* (286) cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */
-
7
,
/* (287) cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */
-
7
,
/* (288) cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */
-
7
,
/* (289) cmd ::= ALTER STABLE ids cpxName DROP TAG ids */
-
8
,
/* (290) cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */
-
9
,
/* (291) cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem */
-
7
,
/* (292) cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */
-
3
,
/* (293) cmd ::= KILL CONNECTION INTEGER */
-
5
,
/* (294) cmd ::= KILL STREAM INTEGER COLON INTEGER */
-
5
,
/* (295) cmd ::= KILL QUERY INTEGER COLON INTEGER */
-
4
,
/* (209) sortlist ::= sortlist COMMA arrow sortorder */
-
2
,
/* (210) sortlist ::= item sortorder */
-
2
,
/* (211) sortlist ::= arrow sortorder */
-
1
,
/* (212) item ::= ID */
-
3
,
/* (213) item ::= ID DOT ID */
-
1
,
/* (214) sortorder ::= ASC */
-
1
,
/* (215) sortorder ::= DESC */
0
,
/* (216) sortorder ::= */
0
,
/* (217) groupby_opt ::= */
-
3
,
/* (218) groupby_opt ::= GROUP BY grouplist */
-
3
,
/* (219) grouplist ::= grouplist COMMA item */
-
3
,
/* (220) grouplist ::= grouplist COMMA arrow */
-
1
,
/* (221) grouplist ::= item */
-
1
,
/* (222) grouplist ::= arrow */
0
,
/* (223) having_opt ::= */
-
2
,
/* (224) having_opt ::= HAVING expr */
0
,
/* (225) limit_opt ::= */
-
2
,
/* (226) limit_opt ::= LIMIT signed */
-
4
,
/* (227) limit_opt ::= LIMIT signed OFFSET signed */
-
4
,
/* (228) limit_opt ::= LIMIT signed COMMA signed */
0
,
/* (229) slimit_opt ::= */
-
2
,
/* (230) slimit_opt ::= SLIMIT signed */
-
4
,
/* (231) slimit_opt ::= SLIMIT signed SOFFSET signed */
-
4
,
/* (232) slimit_opt ::= SLIMIT signed COMMA signed */
0
,
/* (233) where_opt ::= */
-
2
,
/* (234) where_opt ::= WHERE expr */
-
3
,
/* (235) expr ::= LP expr RP */
-
1
,
/* (236) expr ::= ID */
-
3
,
/* (237) expr ::= ID DOT ID */
-
3
,
/* (238) expr ::= ID DOT STAR */
-
1
,
/* (239) expr ::= INTEGER */
-
2
,
/* (240) expr ::= MINUS INTEGER */
-
2
,
/* (241) expr ::= PLUS INTEGER */
-
1
,
/* (242) expr ::= FLOAT */
-
2
,
/* (243) expr ::= MINUS FLOAT */
-
2
,
/* (244) expr ::= PLUS FLOAT */
-
1
,
/* (245) expr ::= STRING */
-
1
,
/* (246) expr ::= NOW */
-
1
,
/* (247) expr ::= VARIABLE */
-
2
,
/* (248) expr ::= PLUS VARIABLE */
-
2
,
/* (249) expr ::= MINUS VARIABLE */
-
1
,
/* (250) expr ::= BOOL */
-
1
,
/* (251) expr ::= NULL */
-
4
,
/* (252) expr ::= ID LP exprlist RP */
-
4
,
/* (253) expr ::= ID LP STAR RP */
-
3
,
/* (254) expr ::= expr IS NULL */
-
4
,
/* (255) expr ::= expr IS NOT NULL */
-
3
,
/* (256) expr ::= expr LT expr */
-
3
,
/* (257) expr ::= expr GT expr */
-
3
,
/* (258) expr ::= expr LE expr */
-
3
,
/* (259) expr ::= expr GE expr */
-
3
,
/* (260) expr ::= expr NE expr */
-
3
,
/* (261) expr ::= expr EQ expr */
-
5
,
/* (262) expr ::= expr BETWEEN expr AND expr */
-
3
,
/* (263) expr ::= expr AND expr */
-
3
,
/* (264) expr ::= expr OR expr */
-
3
,
/* (265) expr ::= expr PLUS expr */
-
3
,
/* (266) expr ::= expr MINUS expr */
-
3
,
/* (267) expr ::= expr STAR expr */
-
3
,
/* (268) expr ::= expr SLASH expr */
-
3
,
/* (269) expr ::= expr REM expr */
-
3
,
/* (270) expr ::= expr LIKE expr */
-
3
,
/* (271) expr ::= expr MATCH expr */
-
3
,
/* (272) expr ::= expr NMATCH expr */
-
3
,
/* (273) expr ::= ID QUESTION STRING */
-
3
,
/* (274) arrow ::= ID ARROW STRING */
-
5
,
/* (275) arrow ::= ID DOT ID ARROW STRING */
-
1
,
/* (276) expr ::= arrow */
-
5
,
/* (277) expr ::= expr IN LP exprlist RP */
-
3
,
/* (278) exprlist ::= exprlist COMMA expritem */
-
1
,
/* (279) exprlist ::= expritem */
-
1
,
/* (280) expritem ::= expr */
0
,
/* (281) expritem ::= */
-
3
,
/* (282) cmd ::= RESET QUERY CACHE */
-
3
,
/* (283) cmd ::= SYNCDB ids REPLICA */
-
7
,
/* (284) cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */
-
7
,
/* (285) cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */
-
7
,
/* (286) cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */
-
7
,
/* (287) cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */
-
7
,
/* (288) cmd ::= ALTER TABLE ids cpxName DROP TAG ids */
-
8
,
/* (289) cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */
-
9
,
/* (290) cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */
-
7
,
/* (291) cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */
-
7
,
/* (292) cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */
-
7
,
/* (293) cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */
-
7
,
/* (294) cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */
-
7
,
/* (295) cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */
-
7
,
/* (296) cmd ::= ALTER STABLE ids cpxName DROP TAG ids */
-
8
,
/* (297) cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */
-
9
,
/* (298) cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem */
-
7
,
/* (299) cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */
-
3
,
/* (300) cmd ::= KILL CONNECTION INTEGER */
-
5
,
/* (301) cmd ::= KILL STREAM INTEGER COLON INTEGER */
-
5
,
/* (302) cmd ::= KILL QUERY INTEGER COLON INTEGER */
};
static
void
yy_accept
(
yyParser
*
);
/* Forward Declaration */
...
...
@@ -2731,108 +2750,108 @@ static YYACTIONTYPE yy_reduce(
case
141
:
/* cmd ::= CREATE STABLE create_stable_args */
yytestcase
(
yyruleno
==
141
);
#line 64 "sql.y"
{}
#line 27
34
"sql.c"
#line 27
53
"sql.c"
break
;
case
1
:
/* cmd ::= SHOW DATABASES */
#line 67 "sql.y"
{
setShowOptions
(
pInfo
,
TSDB_MGMT_TABLE_DB
,
0
,
0
);}
#line 27
39
"sql.c"
#line 27
58
"sql.c"
break
;
case
2
:
/* cmd ::= SHOW TOPICS */
#line 68 "sql.y"
{
setShowOptions
(
pInfo
,
TSDB_MGMT_TABLE_TP
,
0
,
0
);}
#line 27
44
"sql.c"
#line 27
63
"sql.c"
break
;
case
3
:
/* cmd ::= SHOW FUNCTIONS */
#line 69 "sql.y"
{
setShowOptions
(
pInfo
,
TSDB_MGMT_TABLE_FUNCTION
,
0
,
0
);}
#line 27
49
"sql.c"
#line 27
68
"sql.c"
break
;
case
4
:
/* cmd ::= SHOW MNODES */
#line 70 "sql.y"
{
setShowOptions
(
pInfo
,
TSDB_MGMT_TABLE_MNODE
,
0
,
0
);}
#line 27
54
"sql.c"
#line 27
73
"sql.c"
break
;
case
5
:
/* cmd ::= SHOW DNODES */
#line 71 "sql.y"
{
setShowOptions
(
pInfo
,
TSDB_MGMT_TABLE_DNODE
,
0
,
0
);}
#line 27
59
"sql.c"
#line 27
78
"sql.c"
break
;
case
6
:
/* cmd ::= SHOW ACCOUNTS */
#line 72 "sql.y"
{
setShowOptions
(
pInfo
,
TSDB_MGMT_TABLE_ACCT
,
0
,
0
);}
#line 27
64
"sql.c"
#line 27
83
"sql.c"
break
;
case
7
:
/* cmd ::= SHOW USERS */
#line 73 "sql.y"
{
setShowOptions
(
pInfo
,
TSDB_MGMT_TABLE_USER
,
0
,
0
);}
#line 27
69
"sql.c"
#line 27
88
"sql.c"
break
;
case
8
:
/* cmd ::= SHOW MODULES */
#line 75 "sql.y"
{
setShowOptions
(
pInfo
,
TSDB_MGMT_TABLE_MODULE
,
0
,
0
);
}
#line 27
74
"sql.c"
#line 27
93
"sql.c"
break
;
case
9
:
/* cmd ::= SHOW QUERIES */
#line 76 "sql.y"
{
setShowOptions
(
pInfo
,
TSDB_MGMT_TABLE_QUERIES
,
0
,
0
);
}
#line 27
79
"sql.c"
#line 27
98
"sql.c"
break
;
case
10
:
/* cmd ::= SHOW CONNECTIONS */
#line 77 "sql.y"
{
setShowOptions
(
pInfo
,
TSDB_MGMT_TABLE_CONNS
,
0
,
0
);}
#line 2
784
"sql.c"
#line 2
803
"sql.c"
break
;
case
11
:
/* cmd ::= SHOW STREAMS */
#line 78 "sql.y"
{
setShowOptions
(
pInfo
,
TSDB_MGMT_TABLE_STREAMS
,
0
,
0
);
}
#line 2
789
"sql.c"
#line 2
808
"sql.c"
break
;
case
12
:
/* cmd ::= SHOW VARIABLES */
#line 79 "sql.y"
{
setShowOptions
(
pInfo
,
TSDB_MGMT_TABLE_VARIABLES
,
0
,
0
);
}
#line 2
794
"sql.c"
#line 2
813
"sql.c"
break
;
case
13
:
/* cmd ::= SHOW SCORES */
#line 80 "sql.y"
{
setShowOptions
(
pInfo
,
TSDB_MGMT_TABLE_SCORES
,
0
,
0
);
}
#line 2
799
"sql.c"
#line 2
818
"sql.c"
break
;
case
14
:
/* cmd ::= SHOW GRANTS */
#line 81 "sql.y"
{
setShowOptions
(
pInfo
,
TSDB_MGMT_TABLE_GRANTS
,
0
,
0
);
}
#line 28
04
"sql.c"
#line 28
23
"sql.c"
break
;
case
15
:
/* cmd ::= SHOW VNODES */
#line 83 "sql.y"
{
setShowOptions
(
pInfo
,
TSDB_MGMT_TABLE_VNODES
,
0
,
0
);
}
#line 28
09
"sql.c"
#line 28
28
"sql.c"
break
;
case
16
:
/* cmd ::= SHOW VNODES ids */
#line 84 "sql.y"
{
setShowOptions
(
pInfo
,
TSDB_MGMT_TABLE_VNODES
,
&
yymsp
[
0
].
minor
.
yy0
,
0
);
}
#line 28
14
"sql.c"
#line 28
33
"sql.c"
break
;
case
17
:
/* dbPrefix ::= */
#line 88 "sql.y"
{
yymsp
[
1
].
minor
.
yy0
.
n
=
0
;
yymsp
[
1
].
minor
.
yy0
.
type
=
0
;}
#line 28
19
"sql.c"
#line 28
38
"sql.c"
break
;
case
18
:
/* dbPrefix ::= ids DOT */
#line 89 "sql.y"
{
yylhsminor
.
yy0
=
yymsp
[
-
1
].
minor
.
yy0
;
}
#line 28
24
"sql.c"
#line 28
43
"sql.c"
yymsp
[
-
1
].
minor
.
yy0
=
yylhsminor
.
yy0
;
break
;
case
19
:
/* cpxName ::= */
#line 92 "sql.y"
{
yymsp
[
1
].
minor
.
yy0
.
n
=
0
;
}
#line 28
30
"sql.c"
#line 28
49
"sql.c"
break
;
case
20
:
/* cpxName ::= DOT ids */
#line 93 "sql.y"
{
yymsp
[
-
1
].
minor
.
yy0
=
yymsp
[
0
].
minor
.
yy0
;
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
1
;
}
#line 28
35
"sql.c"
#line 28
54
"sql.c"
break
;
case
21
:
/* cmd ::= SHOW CREATE TABLE ids cpxName */
#line 94 "sql.y"
...
...
@@ -2840,7 +2859,7 @@ static YYACTIONTYPE yy_reduce(
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
setDCLSqlElems
(
pInfo
,
TSDB_SQL_SHOW_CREATE_TABLE
,
1
,
&
yymsp
[
-
1
].
minor
.
yy0
);
}
#line 28
43
"sql.c"
#line 28
62
"sql.c"
break
;
case
22
:
/* cmd ::= SHOW CREATE STABLE ids cpxName */
#line 98 "sql.y"
...
...
@@ -2848,35 +2867,35 @@ static YYACTIONTYPE yy_reduce(
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
setDCLSqlElems
(
pInfo
,
TSDB_SQL_SHOW_CREATE_STABLE
,
1
,
&
yymsp
[
-
1
].
minor
.
yy0
);
}
#line 28
51
"sql.c"
#line 28
70
"sql.c"
break
;
case
23
:
/* cmd ::= SHOW CREATE DATABASE ids */
#line 103 "sql.y"
{
setDCLSqlElems
(
pInfo
,
TSDB_SQL_SHOW_CREATE_DATABASE
,
1
,
&
yymsp
[
0
].
minor
.
yy0
);
}
#line 28
58
"sql.c"
#line 28
77
"sql.c"
break
;
case
24
:
/* cmd ::= SHOW dbPrefix TABLES */
#line 107 "sql.y"
{
setShowOptions
(
pInfo
,
TSDB_MGMT_TABLE_TABLE
,
&
yymsp
[
-
1
].
minor
.
yy0
,
0
);
}
#line 28
65
"sql.c"
#line 28
84
"sql.c"
break
;
case
25
:
/* cmd ::= SHOW dbPrefix TABLES LIKE ids */
#line 111 "sql.y"
{
setShowOptions
(
pInfo
,
TSDB_MGMT_TABLE_TABLE
,
&
yymsp
[
-
3
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
);
}
#line 28
72
"sql.c"
#line 28
91
"sql.c"
break
;
case
26
:
/* cmd ::= SHOW dbPrefix STABLES */
#line 115 "sql.y"
{
setShowOptions
(
pInfo
,
TSDB_MGMT_TABLE_METRIC
,
&
yymsp
[
-
1
].
minor
.
yy0
,
0
);
}
#line 28
79
"sql.c"
#line 28
98
"sql.c"
break
;
case
27
:
/* cmd ::= SHOW dbPrefix STABLES LIKE ids */
#line 119 "sql.y"
...
...
@@ -2885,7 +2904,7 @@ static YYACTIONTYPE yy_reduce(
tSetDbName
(
&
token
,
&
yymsp
[
-
3
].
minor
.
yy0
);
setShowOptions
(
pInfo
,
TSDB_MGMT_TABLE_METRIC
,
&
token
,
&
yymsp
[
0
].
minor
.
yy0
);
}
#line 2
888
"sql.c"
#line 2
907
"sql.c"
break
;
case
28
:
/* cmd ::= SHOW dbPrefix VGROUPS */
#line 125 "sql.y"
...
...
@@ -2894,7 +2913,7 @@ static YYACTIONTYPE yy_reduce(
tSetDbName
(
&
token
,
&
yymsp
[
-
1
].
minor
.
yy0
);
setShowOptions
(
pInfo
,
TSDB_MGMT_TABLE_VGROUP
,
&
token
,
0
);
}
#line 2
897
"sql.c"
#line 2
916
"sql.c"
break
;
case
29
:
/* cmd ::= SHOW dbPrefix VGROUPS ids */
#line 131 "sql.y"
...
...
@@ -2903,7 +2922,7 @@ static YYACTIONTYPE yy_reduce(
tSetDbName
(
&
token
,
&
yymsp
[
-
2
].
minor
.
yy0
);
setShowOptions
(
pInfo
,
TSDB_MGMT_TABLE_VGROUP
,
&
token
,
&
yymsp
[
0
].
minor
.
yy0
);
}
#line 29
06
"sql.c"
#line 29
25
"sql.c"
break
;
case
30
:
/* cmd ::= DROP TABLE ifexists ids cpxName */
#line 138 "sql.y"
...
...
@@ -2911,7 +2930,7 @@ static YYACTIONTYPE yy_reduce(
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
setDropDbTableInfo
(
pInfo
,
TSDB_SQL_DROP_TABLE
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
yymsp
[
-
2
].
minor
.
yy0
,
-
1
,
-
1
);
}
#line 29
14
"sql.c"
#line 29
33
"sql.c"
break
;
case
31
:
/* cmd ::= DROP STABLE ifexists ids cpxName */
#line 144 "sql.y"
...
...
@@ -2919,42 +2938,42 @@ static YYACTIONTYPE yy_reduce(
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
setDropDbTableInfo
(
pInfo
,
TSDB_SQL_DROP_TABLE
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
yymsp
[
-
2
].
minor
.
yy0
,
-
1
,
TSDB_SUPER_TABLE
);
}
#line 29
22
"sql.c"
#line 29
41
"sql.c"
break
;
case
32
:
/* cmd ::= DROP DATABASE ifexists ids */
#line 149 "sql.y"
{
setDropDbTableInfo
(
pInfo
,
TSDB_SQL_DROP_DB
,
&
yymsp
[
0
].
minor
.
yy0
,
&
yymsp
[
-
1
].
minor
.
yy0
,
TSDB_DB_TYPE_DEFAULT
,
-
1
);
}
#line 29
27
"sql.c"
#line 29
46
"sql.c"
break
;
case
33
:
/* cmd ::= DROP TOPIC ifexists ids */
#line 150 "sql.y"
{
setDropDbTableInfo
(
pInfo
,
TSDB_SQL_DROP_DB
,
&
yymsp
[
0
].
minor
.
yy0
,
&
yymsp
[
-
1
].
minor
.
yy0
,
TSDB_DB_TYPE_TOPIC
,
-
1
);
}
#line 29
32
"sql.c"
#line 29
51
"sql.c"
break
;
case
34
:
/* cmd ::= DROP FUNCTION ids */
#line 151 "sql.y"
{
setDropFuncInfo
(
pInfo
,
TSDB_SQL_DROP_FUNCTION
,
&
yymsp
[
0
].
minor
.
yy0
);
}
#line 29
37
"sql.c"
#line 29
56
"sql.c"
break
;
case
35
:
/* cmd ::= DROP DNODE ids */
#line 153 "sql.y"
{
setDCLSqlElems
(
pInfo
,
TSDB_SQL_DROP_DNODE
,
1
,
&
yymsp
[
0
].
minor
.
yy0
);
}
#line 29
42
"sql.c"
#line 29
61
"sql.c"
break
;
case
36
:
/* cmd ::= DROP USER ids */
#line 154 "sql.y"
{
setDCLSqlElems
(
pInfo
,
TSDB_SQL_DROP_USER
,
1
,
&
yymsp
[
0
].
minor
.
yy0
);
}
#line 29
47
"sql.c"
#line 29
66
"sql.c"
break
;
case
37
:
/* cmd ::= DROP ACCOUNT ids */
#line 155 "sql.y"
{
setDCLSqlElems
(
pInfo
,
TSDB_SQL_DROP_ACCT
,
1
,
&
yymsp
[
0
].
minor
.
yy0
);
}
#line 29
52
"sql.c"
#line 29
71
"sql.c"
break
;
case
38
:
/* cmd ::= USE ids */
#line 158 "sql.y"
{
setDCLSqlElems
(
pInfo
,
TSDB_SQL_USE_DB
,
1
,
&
yymsp
[
0
].
minor
.
yy0
);}
#line 29
57
"sql.c"
#line 29
76
"sql.c"
break
;
case
39
:
/* cmd ::= DESCRIBE ids cpxName */
case
40
:
/* cmd ::= DESC ids cpxName */
yytestcase
(
yyruleno
==
40
);
...
...
@@ -2963,113 +2982,113 @@ static YYACTIONTYPE yy_reduce(
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
setDCLSqlElems
(
pInfo
,
TSDB_SQL_DESCRIBE_TABLE
,
1
,
&
yymsp
[
-
1
].
minor
.
yy0
);
}
#line 29
66
"sql.c"
#line 29
85
"sql.c"
break
;
case
41
:
/* cmd ::= ALTER USER ids PASS ids */
#line 171 "sql.y"
{
setAlterUserSql
(
pInfo
,
TSDB_ALTER_USER_PASSWD
,
&
yymsp
[
-
2
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
,
NULL
);
}
#line 29
71
"sql.c"
#line 29
90
"sql.c"
break
;
case
42
:
/* cmd ::= ALTER USER ids PRIVILEGE ids */
#line 172 "sql.y"
{
setAlterUserSql
(
pInfo
,
TSDB_ALTER_USER_PRIVILEGES
,
&
yymsp
[
-
2
].
minor
.
yy0
,
NULL
,
&
yymsp
[
0
].
minor
.
yy0
);}
#line 29
76
"sql.c"
#line 29
95
"sql.c"
break
;
case
43
:
/* cmd ::= ALTER DNODE ids ids */
#line 173 "sql.y"
{
setDCLSqlElems
(
pInfo
,
TSDB_SQL_CFG_DNODE
,
2
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
);
}
#line
2981
"sql.c"
#line
3000
"sql.c"
break
;
case
44
:
/* cmd ::= ALTER DNODE ids ids ids */
#line 174 "sql.y"
{
setDCLSqlElems
(
pInfo
,
TSDB_SQL_CFG_DNODE
,
3
,
&
yymsp
[
-
2
].
minor
.
yy0
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
);
}
#line
2986
"sql.c"
#line
3005
"sql.c"
break
;
case
45
:
/* cmd ::= ALTER LOCAL ids */
#line 175 "sql.y"
{
setDCLSqlElems
(
pInfo
,
TSDB_SQL_CFG_LOCAL
,
1
,
&
yymsp
[
0
].
minor
.
yy0
);
}
#line
2991
"sql.c"
#line
3010
"sql.c"
break
;
case
46
:
/* cmd ::= ALTER LOCAL ids ids */
#line 176 "sql.y"
{
setDCLSqlElems
(
pInfo
,
TSDB_SQL_CFG_LOCAL
,
2
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
);
}
#line
2996
"sql.c"
#line
3015
"sql.c"
break
;
case
47
:
/* cmd ::= ALTER DATABASE ids alter_db_optr */
case
48
:
/* cmd ::= ALTER TOPIC ids alter_topic_optr */
yytestcase
(
yyruleno
==
48
);
#line 177 "sql.y"
{
SStrToken
t
=
{
0
};
setCreateDbInfo
(
pInfo
,
TSDB_SQL_ALTER_DB
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy10
,
&
t
);}
#line 30
02
"sql.c"
#line 30
21
"sql.c"
break
;
case
49
:
/* cmd ::= ALTER ACCOUNT ids acct_optr */
#line 180 "sql.y"
{
setCreateAcctSql
(
pInfo
,
TSDB_SQL_ALTER_ACCT
,
&
yymsp
[
-
1
].
minor
.
yy0
,
NULL
,
&
yymsp
[
0
].
minor
.
yy427
);}
#line 30
07
"sql.c"
#line 30
26
"sql.c"
break
;
case
50
:
/* cmd ::= ALTER ACCOUNT ids PASS ids acct_optr */
#line 181 "sql.y"
{
setCreateAcctSql
(
pInfo
,
TSDB_SQL_ALTER_ACCT
,
&
yymsp
[
-
3
].
minor
.
yy0
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy427
);}
#line 30
12
"sql.c"
#line 30
31
"sql.c"
break
;
case
51
:
/* cmd ::= COMPACT VNODES IN LP exprlist RP */
#line 185 "sql.y"
{
setCompactVnodeSql
(
pInfo
,
TSDB_SQL_COMPACT_VNODE
,
yymsp
[
-
1
].
minor
.
yy345
);}
#line 30
17
"sql.c"
#line 30
36
"sql.c"
break
;
case
52
:
/* ids ::= ID */
case
53
:
/* ids ::= STRING */
yytestcase
(
yyruleno
==
53
);
#line 191 "sql.y"
{
yylhsminor
.
yy0
=
yymsp
[
0
].
minor
.
yy0
;
}
#line 30
23
"sql.c"
#line 30
42
"sql.c"
yymsp
[
0
].
minor
.
yy0
=
yylhsminor
.
yy0
;
break
;
case
54
:
/* ifexists ::= IF EXISTS */
#line 195 "sql.y"
{
yymsp
[
-
1
].
minor
.
yy0
.
n
=
1
;}
#line 30
29
"sql.c"
#line 30
48
"sql.c"
break
;
case
55
:
/* ifexists ::= */
case
57
:
/* ifnotexists ::= */
yytestcase
(
yyruleno
==
57
);
case
181
:
/* distinct ::= */
yytestcase
(
yyruleno
==
181
);
#line 196 "sql.y"
{
yymsp
[
1
].
minor
.
yy0
.
n
=
0
;}
#line 30
36
"sql.c"
#line 30
55
"sql.c"
break
;
case
56
:
/* ifnotexists ::= IF NOT EXISTS */
#line 199 "sql.y"
{
yymsp
[
-
2
].
minor
.
yy0
.
n
=
1
;}
#line 30
41
"sql.c"
#line 30
60
"sql.c"
break
;
case
58
:
/* cmd ::= CREATE DNODE ids */
#line 204 "sql.y"
{
setDCLSqlElems
(
pInfo
,
TSDB_SQL_CREATE_DNODE
,
1
,
&
yymsp
[
0
].
minor
.
yy0
);}
#line 30
46
"sql.c"
#line 30
65
"sql.c"
break
;
case
59
:
/* cmd ::= CREATE ACCOUNT ids PASS ids acct_optr */
#line 206 "sql.y"
{
setCreateAcctSql
(
pInfo
,
TSDB_SQL_CREATE_ACCT
,
&
yymsp
[
-
3
].
minor
.
yy0
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy427
);}
#line 30
51
"sql.c"
#line 30
70
"sql.c"
break
;
case
60
:
/* cmd ::= CREATE DATABASE ifnotexists ids db_optr */
case
61
:
/* cmd ::= CREATE TOPIC ifnotexists ids topic_optr */
yytestcase
(
yyruleno
==
61
);
#line 207 "sql.y"
{
setCreateDbInfo
(
pInfo
,
TSDB_SQL_CREATE_DB
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy10
,
&
yymsp
[
-
2
].
minor
.
yy0
);}
#line 30
57
"sql.c"
#line 30
76
"sql.c"
break
;
case
62
:
/* cmd ::= CREATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */
#line 209 "sql.y"
{
setCreateFuncInfo
(
pInfo
,
TSDB_SQL_CREATE_FUNCTION
,
&
yymsp
[
-
5
].
minor
.
yy0
,
&
yymsp
[
-
3
].
minor
.
yy0
,
&
yymsp
[
-
1
].
minor
.
yy487
,
&
yymsp
[
0
].
minor
.
yy0
,
1
);}
#line 30
62
"sql.c"
#line 30
81
"sql.c"
break
;
case
63
:
/* cmd ::= CREATE AGGREGATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */
#line 210 "sql.y"
{
setCreateFuncInfo
(
pInfo
,
TSDB_SQL_CREATE_FUNCTION
,
&
yymsp
[
-
5
].
minor
.
yy0
,
&
yymsp
[
-
3
].
minor
.
yy0
,
&
yymsp
[
-
1
].
minor
.
yy487
,
&
yymsp
[
0
].
minor
.
yy0
,
2
);}
#line 30
67
"sql.c"
#line 30
86
"sql.c"
break
;
case
64
:
/* cmd ::= CREATE USER ids PASS ids */
#line 211 "sql.y"
{
setCreateUserSql
(
pInfo
,
&
yymsp
[
-
2
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
);}
#line 30
72
"sql.c"
#line 30
91
"sql.c"
break
;
case
65
:
/* bufsize ::= */
case
67
:
/* pps ::= */
yytestcase
(
yyruleno
==
67
);
...
...
@@ -3083,7 +3102,7 @@ static YYACTIONTYPE yy_reduce(
case
83
:
/* state ::= */
yytestcase
(
yyruleno
==
83
);
#line 213 "sql.y"
{
yymsp
[
1
].
minor
.
yy0
.
n
=
0
;
}
#line 3
086
"sql.c"
#line 3
105
"sql.c"
break
;
case
66
:
/* bufsize ::= BUFSIZE INTEGER */
case
68
:
/* pps ::= PPS INTEGER */
yytestcase
(
yyruleno
==
68
);
...
...
@@ -3097,7 +3116,7 @@ static YYACTIONTYPE yy_reduce(
case
84
:
/* state ::= STATE ids */
yytestcase
(
yyruleno
==
84
);
#line 214 "sql.y"
{
yymsp
[
-
1
].
minor
.
yy0
=
yymsp
[
0
].
minor
.
yy0
;
}
#line 31
00
"sql.c"
#line 31
19
"sql.c"
break
;
case
85
:
/* acct_optr ::= pps tseries storage streams qtime dbs users conns state */
#line 244 "sql.y"
...
...
@@ -3112,21 +3131,21 @@ static YYACTIONTYPE yy_reduce(
yylhsminor
.
yy427
.
maxConnections
=
(
yymsp
[
-
1
].
minor
.
yy0
.
n
>
0
)
?
atoi
(
yymsp
[
-
1
].
minor
.
yy0
.
z
)
:-
1
;
yylhsminor
.
yy427
.
stat
=
yymsp
[
0
].
minor
.
yy0
;
}
#line 31
15
"sql.c"
#line 31
34
"sql.c"
yymsp
[
-
8
].
minor
.
yy427
=
yylhsminor
.
yy427
;
break
;
case
86
:
/* intitemlist ::= intitemlist COMMA intitem */
case
155
:
/* tagitemlist ::= tagitemlist COMMA tagitem */
yytestcase
(
yyruleno
==
155
);
#line 260 "sql.y"
{
yylhsminor
.
yy345
=
tVariantListAppend
(
yymsp
[
-
2
].
minor
.
yy345
,
&
yymsp
[
0
].
minor
.
yy2
,
-
1
);
}
#line 31
22
"sql.c"
#line 31
41
"sql.c"
yymsp
[
-
2
].
minor
.
yy345
=
yylhsminor
.
yy345
;
break
;
case
87
:
/* intitemlist ::= intitem */
case
156
:
/* tagitemlist ::= tagitem */
yytestcase
(
yyruleno
==
156
);
#line 261 "sql.y"
{
yylhsminor
.
yy345
=
tVariantListAppend
(
NULL
,
&
yymsp
[
0
].
minor
.
yy2
,
-
1
);
}
#line 31
29
"sql.c"
#line 31
48
"sql.c"
yymsp
[
0
].
minor
.
yy345
=
yylhsminor
.
yy345
;
break
;
case
88
:
/* intitem ::= INTEGER */
...
...
@@ -3134,15 +3153,16 @@ static YYACTIONTYPE yy_reduce(
case
158
:
/* tagitem ::= FLOAT */
yytestcase
(
yyruleno
==
158
);
case
159
:
/* tagitem ::= STRING */
yytestcase
(
yyruleno
==
159
);
case
160
:
/* tagitem ::= BOOL */
yytestcase
(
yyruleno
==
160
);
case
212
:
/* item ::= ID */
yytestcase
(
yyruleno
==
212
);
#line 263 "sql.y"
{
toTSDBType
(
yymsp
[
0
].
minor
.
yy0
.
type
);
tVariantCreate
(
&
yylhsminor
.
yy2
,
&
yymsp
[
0
].
minor
.
yy0
);
}
#line 31
3
9 "sql.c"
#line 31
5
9 "sql.c"
yymsp
[
0
].
minor
.
yy2
=
yylhsminor
.
yy2
;
break
;
case
89
:
/* keep ::= KEEP intitemlist */
#line 267 "sql.y"
{
yymsp
[
-
1
].
minor
.
yy345
=
yymsp
[
0
].
minor
.
yy345
;
}
#line 31
4
5 "sql.c"
#line 31
6
5 "sql.c"
break
;
case
90
:
/* cache ::= CACHE INTEGER */
case
91
:
/* replica ::= REPLICA INTEGER */
yytestcase
(
yyruleno
==
91
);
...
...
@@ -3161,128 +3181,128 @@ static YYACTIONTYPE yy_reduce(
case
104
:
/* partitions ::= PARTITIONS INTEGER */
yytestcase
(
yyruleno
==
104
);
#line 269 "sql.y"
{
yymsp
[
-
1
].
minor
.
yy0
=
yymsp
[
0
].
minor
.
yy0
;
}
#line 31
6
4 "sql.c"
#line 31
8
4 "sql.c"
break
;
case
105
:
/* db_optr ::= */
#line 286 "sql.y"
{
setDefaultCreateDbOption
(
&
yymsp
[
1
].
minor
.
yy10
);
yymsp
[
1
].
minor
.
yy10
.
dbType
=
TSDB_DB_TYPE_DEFAULT
;}
#line 31
6
9 "sql.c"
#line 31
8
9 "sql.c"
break
;
case
106
:
/* db_optr ::= db_optr cache */
#line 288 "sql.y"
{
yylhsminor
.
yy10
=
yymsp
[
-
1
].
minor
.
yy10
;
yylhsminor
.
yy10
.
cacheBlockSize
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
#line 31
7
4 "sql.c"
#line 31
9
4 "sql.c"
yymsp
[
-
1
].
minor
.
yy10
=
yylhsminor
.
yy10
;
break
;
case
107
:
/* db_optr ::= db_optr replica */
case
124
:
/* alter_db_optr ::= alter_db_optr replica */
yytestcase
(
yyruleno
==
124
);
#line 289 "sql.y"
{
yylhsminor
.
yy10
=
yymsp
[
-
1
].
minor
.
yy10
;
yylhsminor
.
yy10
.
replica
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
#line 3
18
1 "sql.c"
#line 3
20
1 "sql.c"
yymsp
[
-
1
].
minor
.
yy10
=
yylhsminor
.
yy10
;
break
;
case
108
:
/* db_optr ::= db_optr quorum */
case
125
:
/* alter_db_optr ::= alter_db_optr quorum */
yytestcase
(
yyruleno
==
125
);
#line 290 "sql.y"
{
yylhsminor
.
yy10
=
yymsp
[
-
1
].
minor
.
yy10
;
yylhsminor
.
yy10
.
quorum
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
#line 3
18
8 "sql.c"
#line 3
20
8 "sql.c"
yymsp
[
-
1
].
minor
.
yy10
=
yylhsminor
.
yy10
;
break
;
case
109
:
/* db_optr ::= db_optr days */
#line 291 "sql.y"
{
yylhsminor
.
yy10
=
yymsp
[
-
1
].
minor
.
yy10
;
yylhsminor
.
yy10
.
daysPerFile
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
#line 3
19
4 "sql.c"
#line 3
21
4 "sql.c"
yymsp
[
-
1
].
minor
.
yy10
=
yylhsminor
.
yy10
;
break
;
case
110
:
/* db_optr ::= db_optr minrows */
#line 292 "sql.y"
{
yylhsminor
.
yy10
=
yymsp
[
-
1
].
minor
.
yy10
;
yylhsminor
.
yy10
.
minRowsPerBlock
=
strtod
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
);
}
#line 32
0
0 "sql.c"
#line 32
2
0 "sql.c"
yymsp
[
-
1
].
minor
.
yy10
=
yylhsminor
.
yy10
;
break
;
case
111
:
/* db_optr ::= db_optr maxrows */
#line 293 "sql.y"
{
yylhsminor
.
yy10
=
yymsp
[
-
1
].
minor
.
yy10
;
yylhsminor
.
yy10
.
maxRowsPerBlock
=
strtod
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
);
}
#line 32
0
6 "sql.c"
#line 32
2
6 "sql.c"
yymsp
[
-
1
].
minor
.
yy10
=
yylhsminor
.
yy10
;
break
;
case
112
:
/* db_optr ::= db_optr blocks */
case
127
:
/* alter_db_optr ::= alter_db_optr blocks */
yytestcase
(
yyruleno
==
127
);
#line 294 "sql.y"
{
yylhsminor
.
yy10
=
yymsp
[
-
1
].
minor
.
yy10
;
yylhsminor
.
yy10
.
numOfBlocks
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
#line 32
1
3 "sql.c"
#line 32
3
3 "sql.c"
yymsp
[
-
1
].
minor
.
yy10
=
yylhsminor
.
yy10
;
break
;
case
113
:
/* db_optr ::= db_optr ctime */
#line 295 "sql.y"
{
yylhsminor
.
yy10
=
yymsp
[
-
1
].
minor
.
yy10
;
yylhsminor
.
yy10
.
commitTime
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
#line 32
1
9 "sql.c"
#line 32
3
9 "sql.c"
yymsp
[
-
1
].
minor
.
yy10
=
yylhsminor
.
yy10
;
break
;
case
114
:
/* db_optr ::= db_optr wal */
#line 296 "sql.y"
{
yylhsminor
.
yy10
=
yymsp
[
-
1
].
minor
.
yy10
;
yylhsminor
.
yy10
.
walLevel
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
#line 32
2
5 "sql.c"
#line 32
4
5 "sql.c"
yymsp
[
-
1
].
minor
.
yy10
=
yylhsminor
.
yy10
;
break
;
case
115
:
/* db_optr ::= db_optr fsync */
#line 297 "sql.y"
{
yylhsminor
.
yy10
=
yymsp
[
-
1
].
minor
.
yy10
;
yylhsminor
.
yy10
.
fsyncPeriod
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
#line 32
3
1 "sql.c"
#line 32
5
1 "sql.c"
yymsp
[
-
1
].
minor
.
yy10
=
yylhsminor
.
yy10
;
break
;
case
116
:
/* db_optr ::= db_optr comp */
case
128
:
/* alter_db_optr ::= alter_db_optr comp */
yytestcase
(
yyruleno
==
128
);
#line 298 "sql.y"
{
yylhsminor
.
yy10
=
yymsp
[
-
1
].
minor
.
yy10
;
yylhsminor
.
yy10
.
compressionLevel
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
#line 32
3
8 "sql.c"
#line 32
5
8 "sql.c"
yymsp
[
-
1
].
minor
.
yy10
=
yylhsminor
.
yy10
;
break
;
case
117
:
/* db_optr ::= db_optr prec */
#line 299 "sql.y"
{
yylhsminor
.
yy10
=
yymsp
[
-
1
].
minor
.
yy10
;
yylhsminor
.
yy10
.
precision
=
yymsp
[
0
].
minor
.
yy0
;
}
#line 32
4
4 "sql.c"
#line 32
6
4 "sql.c"
yymsp
[
-
1
].
minor
.
yy10
=
yylhsminor
.
yy10
;
break
;
case
118
:
/* db_optr ::= db_optr keep */
case
126
:
/* alter_db_optr ::= alter_db_optr keep */
yytestcase
(
yyruleno
==
126
);
#line 300 "sql.y"
{
yylhsminor
.
yy10
=
yymsp
[
-
1
].
minor
.
yy10
;
yylhsminor
.
yy10
.
keep
=
yymsp
[
0
].
minor
.
yy345
;
}
#line 32
5
1 "sql.c"
#line 32
7
1 "sql.c"
yymsp
[
-
1
].
minor
.
yy10
=
yylhsminor
.
yy10
;
break
;
case
119
:
/* db_optr ::= db_optr update */
case
129
:
/* alter_db_optr ::= alter_db_optr update */
yytestcase
(
yyruleno
==
129
);
#line 301 "sql.y"
{
yylhsminor
.
yy10
=
yymsp
[
-
1
].
minor
.
yy10
;
yylhsminor
.
yy10
.
update
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
#line 32
5
8 "sql.c"
#line 32
7
8 "sql.c"
yymsp
[
-
1
].
minor
.
yy10
=
yylhsminor
.
yy10
;
break
;
case
120
:
/* db_optr ::= db_optr cachelast */
case
130
:
/* alter_db_optr ::= alter_db_optr cachelast */
yytestcase
(
yyruleno
==
130
);
#line 302 "sql.y"
{
yylhsminor
.
yy10
=
yymsp
[
-
1
].
minor
.
yy10
;
yylhsminor
.
yy10
.
cachelast
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
#line 32
6
5 "sql.c"
#line 32
8
5 "sql.c"
yymsp
[
-
1
].
minor
.
yy10
=
yylhsminor
.
yy10
;
break
;
case
121
:
/* topic_optr ::= db_optr */
case
131
:
/* alter_topic_optr ::= alter_db_optr */
yytestcase
(
yyruleno
==
131
);
#line 306 "sql.y"
{
yylhsminor
.
yy10
=
yymsp
[
0
].
minor
.
yy10
;
yylhsminor
.
yy10
.
dbType
=
TSDB_DB_TYPE_TOPIC
;
}
#line 32
7
2 "sql.c"
#line 32
9
2 "sql.c"
yymsp
[
0
].
minor
.
yy10
=
yylhsminor
.
yy10
;
break
;
case
122
:
/* topic_optr ::= topic_optr partitions */
case
132
:
/* alter_topic_optr ::= alter_topic_optr partitions */
yytestcase
(
yyruleno
==
132
);
#line 307 "sql.y"
{
yylhsminor
.
yy10
=
yymsp
[
-
1
].
minor
.
yy10
;
yylhsminor
.
yy10
.
partitions
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
#line 32
7
9 "sql.c"
#line 32
9
9 "sql.c"
yymsp
[
-
1
].
minor
.
yy10
=
yylhsminor
.
yy10
;
break
;
case
123
:
/* alter_db_optr ::= */
#line 310 "sql.y"
{
setDefaultCreateDbOption
(
&
yymsp
[
1
].
minor
.
yy10
);
yymsp
[
1
].
minor
.
yy10
.
dbType
=
TSDB_DB_TYPE_DEFAULT
;}
#line 3
28
5 "sql.c"
#line 3
30
5 "sql.c"
break
;
case
133
:
/* typename ::= ids */
#line 330 "sql.y"
...
...
@@ -3290,7 +3310,7 @@ static YYACTIONTYPE yy_reduce(
yymsp
[
0
].
minor
.
yy0
.
type
=
0
;
tSetColumnType
(
&
yylhsminor
.
yy487
,
&
yymsp
[
0
].
minor
.
yy0
);
}
#line 3
29
3 "sql.c"
#line 3
31
3 "sql.c"
yymsp
[
0
].
minor
.
yy487
=
yylhsminor
.
yy487
;
break
;
case
134
:
/* typename ::= ids LP signed RP */
...
...
@@ -3304,7 +3324,7 @@ static YYACTIONTYPE yy_reduce(
tSetColumnType
(
&
yylhsminor
.
yy487
,
&
yymsp
[
-
3
].
minor
.
yy0
);
}
}
#line 33
0
7 "sql.c"
#line 33
2
7 "sql.c"
yymsp
[
-
3
].
minor
.
yy487
=
yylhsminor
.
yy487
;
break
;
case
135
:
/* typename ::= ids UNSIGNED */
...
...
@@ -3314,29 +3334,29 @@ static YYACTIONTYPE yy_reduce(
yymsp
[
-
1
].
minor
.
yy0
.
n
=
((
yymsp
[
0
].
minor
.
yy0
.
z
+
yymsp
[
0
].
minor
.
yy0
.
n
)
-
yymsp
[
-
1
].
minor
.
yy0
.
z
);
tSetColumnType
(
&
yylhsminor
.
yy487
,
&
yymsp
[
-
1
].
minor
.
yy0
);
}
#line 33
1
7 "sql.c"
#line 33
3
7 "sql.c"
yymsp
[
-
1
].
minor
.
yy487
=
yylhsminor
.
yy487
;
break
;
case
136
:
/* signed ::= INTEGER */
#line 354 "sql.y"
{
yylhsminor
.
yy525
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
#line 33
2
3 "sql.c"
#line 33
4
3 "sql.c"
yymsp
[
0
].
minor
.
yy525
=
yylhsminor
.
yy525
;
break
;
case
137
:
/* signed ::= PLUS INTEGER */
#line 355 "sql.y"
{
yymsp
[
-
1
].
minor
.
yy525
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
#line 33
2
9 "sql.c"
#line 33
4
9 "sql.c"
break
;
case
138
:
/* signed ::= MINUS INTEGER */
#line 356 "sql.y"
{
yymsp
[
-
1
].
minor
.
yy525
=
-
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);}
#line 33
3
4 "sql.c"
#line 33
5
4 "sql.c"
break
;
case
142
:
/* cmd ::= CREATE TABLE create_table_list */
#line 362 "sql.y"
{
pInfo
->
type
=
TSDB_SQL_CREATE_TABLE
;
pInfo
->
pCreateTableInfo
=
yymsp
[
0
].
minor
.
yy170
;}
#line 33
3
9 "sql.c"
#line 33
5
9 "sql.c"
break
;
case
143
:
/* create_table_list ::= create_from_stable */
#line 366 "sql.y"
...
...
@@ -3348,7 +3368,7 @@ static YYACTIONTYPE yy_reduce(
pCreateTable
->
type
=
TSQL_CREATE_TABLE_FROM_STABLE
;
yylhsminor
.
yy170
=
pCreateTable
;
}
#line 33
5
1 "sql.c"
#line 33
7
1 "sql.c"
yymsp
[
0
].
minor
.
yy170
=
yylhsminor
.
yy170
;
break
;
case
144
:
/* create_table_list ::= create_table_list create_from_stable */
...
...
@@ -3357,7 +3377,7 @@ static YYACTIONTYPE yy_reduce(
taosArrayPush
(
yymsp
[
-
1
].
minor
.
yy170
->
childTableInfo
,
&
yymsp
[
0
].
minor
.
yy72
);
yylhsminor
.
yy170
=
yymsp
[
-
1
].
minor
.
yy170
;
}
#line 33
6
0 "sql.c"
#line 33
8
0 "sql.c"
yymsp
[
-
1
].
minor
.
yy170
=
yylhsminor
.
yy170
;
break
;
case
145
:
/* create_table_args ::= ifnotexists ids cpxName LP columnlist RP */
...
...
@@ -3369,7 +3389,7 @@ static YYACTIONTYPE yy_reduce(
yymsp
[
-
4
].
minor
.
yy0
.
n
+=
yymsp
[
-
3
].
minor
.
yy0
.
n
;
setCreatedTableName
(
pInfo
,
&
yymsp
[
-
4
].
minor
.
yy0
,
&
yymsp
[
-
5
].
minor
.
yy0
);
}
#line 33
7
2 "sql.c"
#line 33
9
2 "sql.c"
yymsp
[
-
5
].
minor
.
yy170
=
yylhsminor
.
yy170
;
break
;
case
146
:
/* create_stable_args ::= ifnotexists ids cpxName LP columnlist RP TAGS LP columnlist RP */
...
...
@@ -3381,7 +3401,7 @@ static YYACTIONTYPE yy_reduce(
yymsp
[
-
8
].
minor
.
yy0
.
n
+=
yymsp
[
-
7
].
minor
.
yy0
.
n
;
setCreatedTableName
(
pInfo
,
&
yymsp
[
-
8
].
minor
.
yy0
,
&
yymsp
[
-
9
].
minor
.
yy0
);
}
#line 3
38
4 "sql.c"
#line 3
40
4 "sql.c"
yymsp
[
-
9
].
minor
.
yy170
=
yylhsminor
.
yy170
;
break
;
case
147
:
/* create_from_stable ::= ifnotexists ids cpxName USING ids cpxName TAGS LP tagitemlist RP */
...
...
@@ -3391,7 +3411,7 @@ static YYACTIONTYPE yy_reduce(
yymsp
[
-
8
].
minor
.
yy0
.
n
+=
yymsp
[
-
7
].
minor
.
yy0
.
n
;
yylhsminor
.
yy72
=
createNewChildTableInfo
(
&
yymsp
[
-
5
].
minor
.
yy0
,
NULL
,
yymsp
[
-
1
].
minor
.
yy345
,
&
yymsp
[
-
8
].
minor
.
yy0
,
&
yymsp
[
-
9
].
minor
.
yy0
);
}
#line 3
39
4 "sql.c"
#line 3
41
4 "sql.c"
yymsp
[
-
9
].
minor
.
yy72
=
yylhsminor
.
yy72
;
break
;
case
148
:
/* create_from_stable ::= ifnotexists ids cpxName USING ids cpxName LP tagNamelist RP TAGS LP tagitemlist RP */
...
...
@@ -3401,19 +3421,19 @@ static YYACTIONTYPE yy_reduce(
yymsp
[
-
11
].
minor
.
yy0
.
n
+=
yymsp
[
-
10
].
minor
.
yy0
.
n
;
yylhsminor
.
yy72
=
createNewChildTableInfo
(
&
yymsp
[
-
8
].
minor
.
yy0
,
yymsp
[
-
5
].
minor
.
yy345
,
yymsp
[
-
1
].
minor
.
yy345
,
&
yymsp
[
-
11
].
minor
.
yy0
,
&
yymsp
[
-
12
].
minor
.
yy0
);
}
#line 34
0
4 "sql.c"
#line 34
2
4 "sql.c"
yymsp
[
-
12
].
minor
.
yy72
=
yylhsminor
.
yy72
;
break
;
case
149
:
/* tagNamelist ::= tagNamelist COMMA ids */
#line 416 "sql.y"
{
taosArrayPush
(
yymsp
[
-
2
].
minor
.
yy345
,
&
yymsp
[
0
].
minor
.
yy0
);
yylhsminor
.
yy345
=
yymsp
[
-
2
].
minor
.
yy345
;
}
#line 34
1
0 "sql.c"
#line 34
3
0 "sql.c"
yymsp
[
-
2
].
minor
.
yy345
=
yylhsminor
.
yy345
;
break
;
case
150
:
/* tagNamelist ::= ids */
#line 417 "sql.y"
{
yylhsminor
.
yy345
=
taosArrayInit
(
4
,
sizeof
(
SStrToken
));
taosArrayPush
(
yylhsminor
.
yy345
,
&
yymsp
[
0
].
minor
.
yy0
);}
#line 34
1
6 "sql.c"
#line 34
3
6 "sql.c"
yymsp
[
0
].
minor
.
yy345
=
yylhsminor
.
yy345
;
break
;
case
151
:
/* create_table_args ::= ifnotexists ids cpxName AS select */
...
...
@@ -3425,19 +3445,19 @@ static YYACTIONTYPE yy_reduce(
yymsp
[
-
3
].
minor
.
yy0
.
n
+=
yymsp
[
-
2
].
minor
.
yy0
.
n
;
setCreatedTableName
(
pInfo
,
&
yymsp
[
-
3
].
minor
.
yy0
,
&
yymsp
[
-
4
].
minor
.
yy0
);
}
#line 34
2
8 "sql.c"
#line 34
4
8 "sql.c"
yymsp
[
-
4
].
minor
.
yy170
=
yylhsminor
.
yy170
;
break
;
case
152
:
/* columnlist ::= columnlist COMMA column */
#line 432 "sql.y"
{
taosArrayPush
(
yymsp
[
-
2
].
minor
.
yy345
,
&
yymsp
[
0
].
minor
.
yy487
);
yylhsminor
.
yy345
=
yymsp
[
-
2
].
minor
.
yy345
;
}
#line 34
3
4 "sql.c"
#line 34
5
4 "sql.c"
yymsp
[
-
2
].
minor
.
yy345
=
yylhsminor
.
yy345
;
break
;
case
153
:
/* columnlist ::= column */
#line 433 "sql.y"
{
yylhsminor
.
yy345
=
taosArrayInit
(
4
,
sizeof
(
TAOS_FIELD
));
taosArrayPush
(
yylhsminor
.
yy345
,
&
yymsp
[
0
].
minor
.
yy487
);}
#line 34
4
0 "sql.c"
#line 34
6
0 "sql.c"
yymsp
[
0
].
minor
.
yy345
=
yylhsminor
.
yy345
;
break
;
case
154
:
/* column ::= ids typename */
...
...
@@ -3445,19 +3465,19 @@ static YYACTIONTYPE yy_reduce(
{
tSetColumnInfo
(
&
yylhsminor
.
yy487
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy487
);
}
#line 34
4
8 "sql.c"
#line 34
6
8 "sql.c"
yymsp
[
-
1
].
minor
.
yy487
=
yylhsminor
.
yy487
;
break
;
case
161
:
/* tagitem ::= NULL */
#line 452 "sql.y"
{
yymsp
[
0
].
minor
.
yy0
.
type
=
0
;
tVariantCreate
(
&
yylhsminor
.
yy2
,
&
yymsp
[
0
].
minor
.
yy0
);
}
#line 34
5
4 "sql.c"
#line 34
7
4 "sql.c"
yymsp
[
0
].
minor
.
yy2
=
yylhsminor
.
yy2
;
break
;
case
162
:
/* tagitem ::= NOW */
#line 453 "sql.y"
{
yymsp
[
0
].
minor
.
yy0
.
type
=
TSDB_DATA_TYPE_TIMESTAMP
;
tVariantCreate
(
&
yylhsminor
.
yy2
,
&
yymsp
[
0
].
minor
.
yy0
);}
#line 34
6
0 "sql.c"
#line 34
8
0 "sql.c"
yymsp
[
0
].
minor
.
yy2
=
yylhsminor
.
yy2
;
break
;
case
163
:
/* tagitem ::= MINUS INTEGER */
...
...
@@ -3471,7 +3491,7 @@ static YYACTIONTYPE yy_reduce(
toTSDBType
(
yymsp
[
-
1
].
minor
.
yy0
.
type
);
tVariantCreate
(
&
yylhsminor
.
yy2
,
&
yymsp
[
-
1
].
minor
.
yy0
);
}
#line 34
7
4 "sql.c"
#line 34
9
4 "sql.c"
yymsp
[
-
1
].
minor
.
yy2
=
yylhsminor
.
yy2
;
break
;
case
167
:
/* select ::= SELECT selcollist from where_opt interval_option sliding_opt session_option windowstate_option fill_opt groupby_opt having_opt orderby_opt slimit_opt limit_opt */
...
...
@@ -3479,57 +3499,57 @@ static YYACTIONTYPE yy_reduce(
{
yylhsminor
.
yy68
=
tSetQuerySqlNode
(
&
yymsp
[
-
13
].
minor
.
yy0
,
yymsp
[
-
12
].
minor
.
yy345
,
yymsp
[
-
11
].
minor
.
yy484
,
yymsp
[
-
10
].
minor
.
yy418
,
yymsp
[
-
4
].
minor
.
yy345
,
yymsp
[
-
2
].
minor
.
yy345
,
&
yymsp
[
-
9
].
minor
.
yy280
,
&
yymsp
[
-
7
].
minor
.
yy295
,
&
yymsp
[
-
6
].
minor
.
yy432
,
&
yymsp
[
-
8
].
minor
.
yy0
,
yymsp
[
-
5
].
minor
.
yy345
,
&
yymsp
[
0
].
minor
.
yy114
,
&
yymsp
[
-
1
].
minor
.
yy114
,
yymsp
[
-
3
].
minor
.
yy418
);
}
#line 3
48
2 "sql.c"
#line 3
50
2 "sql.c"
yymsp
[
-
13
].
minor
.
yy68
=
yylhsminor
.
yy68
;
break
;
case
168
:
/* select ::= LP select RP */
#line 490 "sql.y"
{
yymsp
[
-
2
].
minor
.
yy68
=
yymsp
[
-
1
].
minor
.
yy68
;}
#line 3
48
8 "sql.c"
#line 3
50
8 "sql.c"
break
;
case
169
:
/* union ::= select */
#line 494 "sql.y"
{
yylhsminor
.
yy345
=
setSubclause
(
NULL
,
yymsp
[
0
].
minor
.
yy68
);
}
#line 3
49
3 "sql.c"
#line 3
51
3 "sql.c"
yymsp
[
0
].
minor
.
yy345
=
yylhsminor
.
yy345
;
break
;
case
170
:
/* union ::= union UNION ALL select */
#line 495 "sql.y"
{
yylhsminor
.
yy345
=
appendSelectClause
(
yymsp
[
-
3
].
minor
.
yy345
,
yymsp
[
0
].
minor
.
yy68
);
}
#line 3
49
9 "sql.c"
#line 3
51
9 "sql.c"
yymsp
[
-
3
].
minor
.
yy345
=
yylhsminor
.
yy345
;
break
;
case
171
:
/* cmd ::= union */
#line 497 "sql.y"
{
setSqlInfo
(
pInfo
,
yymsp
[
0
].
minor
.
yy345
,
NULL
,
TSDB_SQL_SELECT
);
}
#line 35
0
5 "sql.c"
#line 35
2
5 "sql.c"
break
;
case
172
:
/* select ::= SELECT selcollist */
#line 504 "sql.y"
{
yylhsminor
.
yy68
=
tSetQuerySqlNode
(
&
yymsp
[
-
1
].
minor
.
yy0
,
yymsp
[
0
].
minor
.
yy345
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
);
}
#line 35
1
2 "sql.c"
#line 35
3
2 "sql.c"
yymsp
[
-
1
].
minor
.
yy68
=
yylhsminor
.
yy68
;
break
;
case
173
:
/* sclp ::= selcollist COMMA */
#line 516 "sql.y"
{
yylhsminor
.
yy345
=
yymsp
[
-
1
].
minor
.
yy345
;}
#line 35
1
8 "sql.c"
#line 35
3
8 "sql.c"
yymsp
[
-
1
].
minor
.
yy345
=
yylhsminor
.
yy345
;
break
;
case
174
:
/* sclp ::= */
case
206
:
/* orderby_opt ::= */
yytestcase
(
yyruleno
==
206
);
#line 517 "sql.y"
{
yymsp
[
1
].
minor
.
yy345
=
0
;}
#line 35
2
5 "sql.c"
#line 35
4
5 "sql.c"
break
;
case
175
:
/* selcollist ::= sclp distinct expr as */
#line 518 "sql.y"
{
yylhsminor
.
yy345
=
tSqlExprListAppend
(
yymsp
[
-
3
].
minor
.
yy345
,
yymsp
[
-
1
].
minor
.
yy418
,
yymsp
[
-
2
].
minor
.
yy0
.
n
?
&
yymsp
[
-
2
].
minor
.
yy0
:
0
,
yymsp
[
0
].
minor
.
yy0
.
n
?&
yymsp
[
0
].
minor
.
yy0
:
0
);
}
#line 35
3
2 "sql.c"
#line 35
5
2 "sql.c"
yymsp
[
-
3
].
minor
.
yy345
=
yylhsminor
.
yy345
;
break
;
case
176
:
/* selcollist ::= sclp STAR */
...
...
@@ -3538,51 +3558,51 @@ static YYACTIONTYPE yy_reduce(
tSqlExpr
*
pNode
=
tSqlExprCreateIdValue
(
pInfo
,
NULL
,
TK_ALL
);
yylhsminor
.
yy345
=
tSqlExprListAppend
(
yymsp
[
-
1
].
minor
.
yy345
,
pNode
,
0
,
0
);
}
#line 35
4
1 "sql.c"
#line 35
6
1 "sql.c"
yymsp
[
-
1
].
minor
.
yy345
=
yylhsminor
.
yy345
;
break
;
case
177
:
/* as ::= AS ids */
#line 530 "sql.y"
{
yymsp
[
-
1
].
minor
.
yy0
=
yymsp
[
0
].
minor
.
yy0
;
}
#line 35
4
7 "sql.c"
#line 35
6
7 "sql.c"
break
;
case
178
:
/* as ::= ids */
#line 531 "sql.y"
{
yylhsminor
.
yy0
=
yymsp
[
0
].
minor
.
yy0
;
}
#line 35
5
2 "sql.c"
#line 35
7
2 "sql.c"
yymsp
[
0
].
minor
.
yy0
=
yylhsminor
.
yy0
;
break
;
case
179
:
/* as ::= */
#line 532 "sql.y"
{
yymsp
[
1
].
minor
.
yy0
.
n
=
0
;
}
#line 35
5
8 "sql.c"
#line 35
7
8 "sql.c"
break
;
case
180
:
/* distinct ::= DISTINCT */
#line 535 "sql.y"
{
yylhsminor
.
yy0
=
yymsp
[
0
].
minor
.
yy0
;
}
#line 35
6
3 "sql.c"
#line 35
8
3 "sql.c"
yymsp
[
0
].
minor
.
yy0
=
yylhsminor
.
yy0
;
break
;
case
182
:
/* from ::= FROM tablelist */
case
183
:
/* from ::= FROM sub */
yytestcase
(
yyruleno
==
183
);
#line 541 "sql.y"
{
yymsp
[
-
1
].
minor
.
yy484
=
yymsp
[
0
].
minor
.
yy484
;}
#line 35
7
0 "sql.c"
#line 35
9
0 "sql.c"
break
;
case
184
:
/* sub ::= LP union RP */
#line 546 "sql.y"
{
yymsp
[
-
2
].
minor
.
yy484
=
addSubqueryElem
(
NULL
,
yymsp
[
-
1
].
minor
.
yy345
,
NULL
);}
#line 35
7
5 "sql.c"
#line 35
9
5 "sql.c"
break
;
case
185
:
/* sub ::= LP union RP ids */
#line 547 "sql.y"
{
yymsp
[
-
3
].
minor
.
yy484
=
addSubqueryElem
(
NULL
,
yymsp
[
-
2
].
minor
.
yy345
,
&
yymsp
[
0
].
minor
.
yy0
);}
#line 3
58
0 "sql.c"
#line 3
60
0 "sql.c"
break
;
case
186
:
/* sub ::= sub COMMA LP union RP ids */
#line 548 "sql.y"
{
yylhsminor
.
yy484
=
addSubqueryElem
(
yymsp
[
-
5
].
minor
.
yy484
,
yymsp
[
-
2
].
minor
.
yy345
,
&
yymsp
[
0
].
minor
.
yy0
);}
#line 3
58
5 "sql.c"
#line 3
60
5 "sql.c"
yymsp
[
-
5
].
minor
.
yy484
=
yylhsminor
.
yy484
;
break
;
case
187
:
/* tablelist ::= ids cpxName */
...
...
@@ -3591,7 +3611,7 @@ static YYACTIONTYPE yy_reduce(
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
yylhsminor
.
yy484
=
setTableNameList
(
NULL
,
&
yymsp
[
-
1
].
minor
.
yy0
,
NULL
);
}
#line 3
59
4 "sql.c"
#line 3
61
4 "sql.c"
yymsp
[
-
1
].
minor
.
yy484
=
yylhsminor
.
yy484
;
break
;
case
188
:
/* tablelist ::= ids cpxName ids */
...
...
@@ -3600,7 +3620,7 @@ static YYACTIONTYPE yy_reduce(
yymsp
[
-
2
].
minor
.
yy0
.
n
+=
yymsp
[
-
1
].
minor
.
yy0
.
n
;
yylhsminor
.
yy484
=
setTableNameList
(
NULL
,
&
yymsp
[
-
2
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
);
}
#line 36
0
3 "sql.c"
#line 36
2
3 "sql.c"
yymsp
[
-
2
].
minor
.
yy484
=
yylhsminor
.
yy484
;
break
;
case
189
:
/* tablelist ::= tablelist COMMA ids cpxName */
...
...
@@ -3609,7 +3629,7 @@ static YYACTIONTYPE yy_reduce(
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
yylhsminor
.
yy484
=
setTableNameList
(
yymsp
[
-
3
].
minor
.
yy484
,
&
yymsp
[
-
1
].
minor
.
yy0
,
NULL
);
}
#line 36
1
2 "sql.c"
#line 36
3
2 "sql.c"
yymsp
[
-
3
].
minor
.
yy484
=
yylhsminor
.
yy484
;
break
;
case
190
:
/* tablelist ::= tablelist COMMA ids cpxName ids */
...
...
@@ -3618,46 +3638,46 @@ static YYACTIONTYPE yy_reduce(
yymsp
[
-
2
].
minor
.
yy0
.
n
+=
yymsp
[
-
1
].
minor
.
yy0
.
n
;
yylhsminor
.
yy484
=
setTableNameList
(
yymsp
[
-
4
].
minor
.
yy484
,
&
yymsp
[
-
2
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
);
}
#line 36
2
1 "sql.c"
#line 36
4
1 "sql.c"
yymsp
[
-
4
].
minor
.
yy484
=
yylhsminor
.
yy484
;
break
;
case
191
:
/* tmvar ::= VARIABLE */
#line 574 "sql.y"
{
yylhsminor
.
yy0
=
yymsp
[
0
].
minor
.
yy0
;}
#line 36
2
7 "sql.c"
#line 36
4
7 "sql.c"
yymsp
[
0
].
minor
.
yy0
=
yylhsminor
.
yy0
;
break
;
case
192
:
/* interval_option ::= intervalKey LP tmvar RP */
#line 577 "sql.y"
{
yylhsminor
.
yy280
.
interval
=
yymsp
[
-
1
].
minor
.
yy0
;
yylhsminor
.
yy280
.
offset
.
n
=
0
;
yylhsminor
.
yy280
.
token
=
yymsp
[
-
3
].
minor
.
yy40
;}
#line 36
3
3 "sql.c"
#line 36
5
3 "sql.c"
yymsp
[
-
3
].
minor
.
yy280
=
yylhsminor
.
yy280
;
break
;
case
193
:
/* interval_option ::= intervalKey LP tmvar COMMA tmvar RP */
#line 578 "sql.y"
{
yylhsminor
.
yy280
.
interval
=
yymsp
[
-
3
].
minor
.
yy0
;
yylhsminor
.
yy280
.
offset
=
yymsp
[
-
1
].
minor
.
yy0
;
yylhsminor
.
yy280
.
token
=
yymsp
[
-
5
].
minor
.
yy40
;}
#line 36
3
9 "sql.c"
#line 36
5
9 "sql.c"
yymsp
[
-
5
].
minor
.
yy280
=
yylhsminor
.
yy280
;
break
;
case
194
:
/* interval_option ::= */
#line 579 "sql.y"
{
memset
(
&
yymsp
[
1
].
minor
.
yy280
,
0
,
sizeof
(
yymsp
[
1
].
minor
.
yy280
));}
#line 36
4
5 "sql.c"
#line 36
6
5 "sql.c"
break
;
case
195
:
/* intervalKey ::= INTERVAL */
#line 582 "sql.y"
{
yymsp
[
0
].
minor
.
yy40
=
TK_INTERVAL
;}
#line 36
5
0 "sql.c"
#line 36
7
0 "sql.c"
break
;
case
196
:
/* intervalKey ::= EVERY */
#line 583 "sql.y"
{
yymsp
[
0
].
minor
.
yy40
=
TK_EVERY
;
}
#line 36
5
5 "sql.c"
#line 36
7
5 "sql.c"
break
;
case
197
:
/* session_option ::= */
#line 586 "sql.y"
{
yymsp
[
1
].
minor
.
yy295
.
col
.
n
=
0
;
yymsp
[
1
].
minor
.
yy295
.
gap
.
n
=
0
;}
#line 36
6
0 "sql.c"
#line 36
8
0 "sql.c"
break
;
case
198
:
/* session_option ::= SESSION LP ids cpxName COMMA tmvar RP */
#line 587 "sql.y"
...
...
@@ -3666,22 +3686,22 @@ static YYACTIONTYPE yy_reduce(
yymsp
[
-
6
].
minor
.
yy295
.
col
=
yymsp
[
-
4
].
minor
.
yy0
;
yymsp
[
-
6
].
minor
.
yy295
.
gap
=
yymsp
[
-
1
].
minor
.
yy0
;
}
#line 36
6
9 "sql.c"
#line 36
8
9 "sql.c"
break
;
case
199
:
/* windowstate_option ::= */
#line 594 "sql.y"
{
yymsp
[
1
].
minor
.
yy432
.
col
.
n
=
0
;
yymsp
[
1
].
minor
.
yy432
.
col
.
z
=
NULL
;}
#line 36
7
4 "sql.c"
#line 36
9
4 "sql.c"
break
;
case
200
:
/* windowstate_option ::= STATE_WINDOW LP ids RP */
#line 595 "sql.y"
{
yymsp
[
-
3
].
minor
.
yy432
.
col
=
yymsp
[
-
1
].
minor
.
yy0
;
}
#line 36
7
9 "sql.c"
#line 36
9
9 "sql.c"
break
;
case
201
:
/* fill_opt ::= */
#line 599 "sql.y"
{
yymsp
[
1
].
minor
.
yy345
=
0
;
}
#line 3
68
4 "sql.c"
#line 3
70
4 "sql.c"
break
;
case
202
:
/* fill_opt ::= FILL LP ID COMMA tagitemlist RP */
#line 600 "sql.y"
...
...
@@ -3693,7 +3713,7 @@ static YYACTIONTYPE yy_reduce(
tVariantListInsert
(
yymsp
[
-
1
].
minor
.
yy345
,
&
A
,
-
1
,
0
);
yymsp
[
-
5
].
minor
.
yy345
=
yymsp
[
-
1
].
minor
.
yy345
;
}
#line 3
69
6 "sql.c"
#line 3
71
6 "sql.c"
break
;
case
203
:
/* fill_opt ::= FILL LP ID RP */
#line 609 "sql.y"
...
...
@@ -3701,406 +3721,444 @@ static YYACTIONTYPE yy_reduce(
toTSDBType
(
yymsp
[
-
1
].
minor
.
yy0
.
type
);
yymsp
[
-
3
].
minor
.
yy345
=
tVariantListAppendToken
(
NULL
,
&
yymsp
[
-
1
].
minor
.
yy0
,
-
1
);
}
#line 37
0
4 "sql.c"
#line 37
2
4 "sql.c"
break
;
case
204
:
/* sliding_opt ::= SLIDING LP tmvar RP */
#line 615 "sql.y"
{
yymsp
[
-
3
].
minor
.
yy0
=
yymsp
[
-
1
].
minor
.
yy0
;
}
#line 37
0
9 "sql.c"
#line 37
2
9 "sql.c"
break
;
case
205
:
/* sliding_opt ::= */
#line 616 "sql.y"
{
yymsp
[
1
].
minor
.
yy0
.
n
=
0
;
yymsp
[
1
].
minor
.
yy0
.
z
=
NULL
;
yymsp
[
1
].
minor
.
yy0
.
type
=
0
;
}
#line 37
1
4 "sql.c"
#line 37
3
4 "sql.c"
break
;
case
207
:
/* orderby_opt ::= ORDER BY sortlist */
#line 62
8
"sql.y"
#line 62
5
"sql.y"
{
yymsp
[
-
2
].
minor
.
yy345
=
yymsp
[
0
].
minor
.
yy345
;}
#line 37
1
9 "sql.c"
#line 37
3
9 "sql.c"
break
;
case
208
:
/* sortlist ::= sortlist COMMA item sortorder */
#line 6
30
"sql.y"
#line 6
27
"sql.y"
{
yylhsminor
.
yy345
=
tVariantListAppend
(
yymsp
[
-
3
].
minor
.
yy345
,
&
yymsp
[
-
1
].
minor
.
yy2
,
yymsp
[
0
].
minor
.
yy281
);
yylhsminor
.
yy345
=
commonItemAppend
(
yymsp
[
-
3
].
minor
.
yy345
,
&
yymsp
[
-
1
].
minor
.
yy2
,
NULL
,
false
,
yymsp
[
0
].
minor
.
yy281
);
}
#line 37
2
6 "sql.c"
#line 37
4
6 "sql.c"
yymsp
[
-
3
].
minor
.
yy345
=
yylhsminor
.
yy345
;
break
;
case
209
:
/* sortlist ::=
item
sortorder */
#line 63
4
"sql.y"
case
209
:
/* sortlist ::=
sortlist COMMA arrow
sortorder */
#line 63
1
"sql.y"
{
yylhsminor
.
yy345
=
tVariantListAppend
(
NULL
,
&
yymsp
[
-
1
].
minor
.
yy2
,
yymsp
[
0
].
minor
.
yy281
);
yylhsminor
.
yy345
=
commonItemAppend
(
yymsp
[
-
3
].
minor
.
yy345
,
NULL
,
yymsp
[
-
1
].
minor
.
yy418
,
true
,
yymsp
[
0
].
minor
.
yy281
);
}
#line 3734 "sql.c"
#line 3754 "sql.c"
yymsp
[
-
3
].
minor
.
yy345
=
yylhsminor
.
yy345
;
break
;
case
210
:
/* sortlist ::= item sortorder */
#line 635 "sql.y"
{
yylhsminor
.
yy345
=
commonItemAppend
(
NULL
,
&
yymsp
[
-
1
].
minor
.
yy2
,
NULL
,
false
,
yymsp
[
0
].
minor
.
yy281
);
}
#line 3762 "sql.c"
yymsp
[
-
1
].
minor
.
yy345
=
yylhsminor
.
yy345
;
break
;
case
21
0
:
/* item ::= ids cpxName
*/
case
21
1
:
/* sortlist ::= arrow sortorder
*/
#line 639 "sql.y"
{
toTSDBType
(
yymsp
[
-
1
].
minor
.
yy0
.
type
);
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
tVariantCreate
(
&
yylhsminor
.
yy2
,
&
yymsp
[
-
1
].
minor
.
yy0
);
yylhsminor
.
yy345
=
commonItemAppend
(
NULL
,
NULL
,
yymsp
[
-
1
].
minor
.
yy418
,
true
,
yymsp
[
0
].
minor
.
yy281
);
}
#line 3745 "sql.c"
yymsp
[
-
1
].
minor
.
yy2
=
yylhsminor
.
yy2
;
#line 3770 "sql.c"
yymsp
[
-
1
].
minor
.
yy345
=
yylhsminor
.
yy345
;
break
;
case
213
:
/* item ::= ID DOT ID */
#line 645 "sql.y"
{
toTSDBType
(
yymsp
[
-
2
].
minor
.
yy0
.
type
);
yymsp
[
-
2
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
tVariantCreate
(
&
yylhsminor
.
yy2
,
&
yymsp
[
-
2
].
minor
.
yy0
);
}
#line 3780 "sql.c"
yymsp
[
-
2
].
minor
.
yy2
=
yylhsminor
.
yy2
;
break
;
case
21
1
:
/* sortorder ::= ASC */
#line 6
47
"sql.y"
case
21
4
:
/* sortorder ::= ASC */
#line 6
52
"sql.y"
{
yymsp
[
0
].
minor
.
yy281
=
TSDB_ORDER_ASC
;
}
#line 37
51
"sql.c"
#line 37
86
"sql.c"
break
;
case
21
2
:
/* sortorder ::= DESC */
#line 6
48
"sql.y"
case
21
5
:
/* sortorder ::= DESC */
#line 6
53
"sql.y"
{
yymsp
[
0
].
minor
.
yy281
=
TSDB_ORDER_DESC
;}
#line 37
56
"sql.c"
#line 37
91
"sql.c"
break
;
case
21
3
:
/* sortorder ::= */
#line 6
49
"sql.y"
case
21
6
:
/* sortorder ::= */
#line 6
54
"sql.y"
{
yymsp
[
1
].
minor
.
yy281
=
TSDB_ORDER_ASC
;
}
#line 37
61
"sql.c"
#line 37
96
"sql.c"
break
;
case
21
4
:
/* groupby_opt ::= */
#line 6
57
"sql.y"
case
21
7
:
/* groupby_opt ::= */
#line 6
62
"sql.y"
{
yymsp
[
1
].
minor
.
yy345
=
0
;}
#line 3
766
"sql.c"
#line 3
801
"sql.c"
break
;
case
21
5
:
/* groupby_opt ::= GROUP BY grouplist */
#line 6
58
"sql.y"
case
21
8
:
/* groupby_opt ::= GROUP BY grouplist */
#line 6
63
"sql.y"
{
yymsp
[
-
2
].
minor
.
yy345
=
yymsp
[
0
].
minor
.
yy345
;}
#line 3
771
"sql.c"
#line 3
806
"sql.c"
break
;
case
21
6
:
/* grouplist ::= grouplist COMMA item */
#line 66
0
"sql.y"
case
21
9
:
/* grouplist ::= grouplist COMMA item */
#line 66
5
"sql.y"
{
yylhsminor
.
yy345
=
tVariantListAppend
(
yymsp
[
-
2
].
minor
.
yy345
,
&
yymsp
[
0
].
minor
.
yy2
,
-
1
);
yylhsminor
.
yy345
=
commonItemAppend
(
yymsp
[
-
2
].
minor
.
yy345
,
&
yymsp
[
0
].
minor
.
yy2
,
NULL
,
false
,
-
1
);
}
#line 3
778
"sql.c"
#line 3
813
"sql.c"
yymsp
[
-
2
].
minor
.
yy345
=
yylhsminor
.
yy345
;
break
;
case
2
17
:
/* grouplist ::= item
*/
#line 66
4
"sql.y"
case
2
20
:
/* grouplist ::= grouplist COMMA arrow
*/
#line 66
9
"sql.y"
{
yylhsminor
.
yy345
=
tVariantListAppend
(
NULL
,
&
yymsp
[
0
].
minor
.
yy2
,
-
1
);
yylhsminor
.
yy345
=
commonItemAppend
(
yymsp
[
-
2
].
minor
.
yy345
,
NULL
,
yymsp
[
0
].
minor
.
yy418
,
true
,
-
1
);
}
#line 3786 "sql.c"
#line 3821 "sql.c"
yymsp
[
-
2
].
minor
.
yy345
=
yylhsminor
.
yy345
;
break
;
case
221
:
/* grouplist ::= item */
#line 673 "sql.y"
{
yylhsminor
.
yy345
=
commonItemAppend
(
NULL
,
&
yymsp
[
0
].
minor
.
yy2
,
NULL
,
false
,
-
1
);
}
#line 3829 "sql.c"
yymsp
[
0
].
minor
.
yy345
=
yylhsminor
.
yy345
;
break
;
case
222
:
/* grouplist ::= arrow */
#line 677 "sql.y"
{
yylhsminor
.
yy345
=
commonItemAppend
(
NULL
,
NULL
,
yymsp
[
0
].
minor
.
yy418
,
true
,
-
1
);
}
#line 3837 "sql.c"
yymsp
[
0
].
minor
.
yy345
=
yylhsminor
.
yy345
;
break
;
case
2
18
:
/* having_opt ::= */
case
2
28
:
/* where_opt ::= */
yytestcase
(
yyruleno
==
228
);
case
2
74
:
/* expritem ::= */
yytestcase
(
yyruleno
==
274
);
#line 6
71
"sql.y"
case
2
23
:
/* having_opt ::= */
case
2
33
:
/* where_opt ::= */
yytestcase
(
yyruleno
==
233
);
case
2
81
:
/* expritem ::= */
yytestcase
(
yyruleno
==
281
);
#line 6
84
"sql.y"
{
yymsp
[
1
].
minor
.
yy418
=
0
;}
#line 3
794
"sql.c"
#line 3
845
"sql.c"
break
;
case
2
19
:
/* having_opt ::= HAVING expr */
case
2
29
:
/* where_opt ::= WHERE expr */
yytestcase
(
yyruleno
==
229
);
#line 6
72
"sql.y"
case
2
24
:
/* having_opt ::= HAVING expr */
case
2
34
:
/* where_opt ::= WHERE expr */
yytestcase
(
yyruleno
==
234
);
#line 6
85
"sql.y"
{
yymsp
[
-
1
].
minor
.
yy418
=
yymsp
[
0
].
minor
.
yy418
;}
#line 38
00
"sql.c"
#line 38
51
"sql.c"
break
;
case
22
0
:
/* limit_opt ::= */
case
22
4
:
/* slimit_opt ::= */
yytestcase
(
yyruleno
==
224
);
#line 6
76
"sql.y"
case
22
5
:
/* limit_opt ::= */
case
22
9
:
/* slimit_opt ::= */
yytestcase
(
yyruleno
==
229
);
#line 6
89
"sql.y"
{
yymsp
[
1
].
minor
.
yy114
.
limit
=
-
1
;
yymsp
[
1
].
minor
.
yy114
.
offset
=
0
;}
#line 38
06
"sql.c"
#line 38
57
"sql.c"
break
;
case
22
1
:
/* limit_opt ::= LIMIT signed */
case
2
25
:
/* slimit_opt ::= SLIMIT signed */
yytestcase
(
yyruleno
==
225
);
#line 6
77
"sql.y"
case
22
6
:
/* limit_opt ::= LIMIT signed */
case
2
30
:
/* slimit_opt ::= SLIMIT signed */
yytestcase
(
yyruleno
==
230
);
#line 6
90
"sql.y"
{
yymsp
[
-
1
].
minor
.
yy114
.
limit
=
yymsp
[
0
].
minor
.
yy525
;
yymsp
[
-
1
].
minor
.
yy114
.
offset
=
0
;}
#line 38
12
"sql.c"
#line 38
63
"sql.c"
break
;
case
22
2
:
/* limit_opt ::= LIMIT signed OFFSET signed */
#line 6
79
"sql.y"
case
22
7
:
/* limit_opt ::= LIMIT signed OFFSET signed */
#line 6
92
"sql.y"
{
yymsp
[
-
3
].
minor
.
yy114
.
limit
=
yymsp
[
-
2
].
minor
.
yy525
;
yymsp
[
-
3
].
minor
.
yy114
.
offset
=
yymsp
[
0
].
minor
.
yy525
;}
#line 38
17
"sql.c"
#line 38
68
"sql.c"
break
;
case
22
3
:
/* limit_opt ::= LIMIT signed COMMA signed */
#line 6
81
"sql.y"
case
22
8
:
/* limit_opt ::= LIMIT signed COMMA signed */
#line 6
94
"sql.y"
{
yymsp
[
-
3
].
minor
.
yy114
.
limit
=
yymsp
[
0
].
minor
.
yy525
;
yymsp
[
-
3
].
minor
.
yy114
.
offset
=
yymsp
[
-
2
].
minor
.
yy525
;}
#line 38
22
"sql.c"
#line 38
73
"sql.c"
break
;
case
2
26
:
/* slimit_opt ::= SLIMIT signed SOFFSET signed */
#line
687
"sql.y"
case
2
31
:
/* slimit_opt ::= SLIMIT signed SOFFSET signed */
#line
700
"sql.y"
{
yymsp
[
-
3
].
minor
.
yy114
.
limit
=
yymsp
[
-
2
].
minor
.
yy525
;
yymsp
[
-
3
].
minor
.
yy114
.
offset
=
yymsp
[
0
].
minor
.
yy525
;}
#line 38
27
"sql.c"
#line 38
78
"sql.c"
break
;
case
2
27
:
/* slimit_opt ::= SLIMIT signed COMMA signed */
#line
689
"sql.y"
case
2
32
:
/* slimit_opt ::= SLIMIT signed COMMA signed */
#line
702
"sql.y"
{
yymsp
[
-
3
].
minor
.
yy114
.
limit
=
yymsp
[
0
].
minor
.
yy525
;
yymsp
[
-
3
].
minor
.
yy114
.
offset
=
yymsp
[
-
2
].
minor
.
yy525
;}
#line 38
32
"sql.c"
#line 38
83
"sql.c"
break
;
case
23
0
:
/* expr ::= LP expr RP */
#line 7
02
"sql.y"
case
23
5
:
/* expr ::= LP expr RP */
#line 7
15
"sql.y"
{
yylhsminor
.
yy418
=
yymsp
[
-
1
].
minor
.
yy418
;
yylhsminor
.
yy418
->
exprToken
.
z
=
yymsp
[
-
2
].
minor
.
yy0
.
z
;
yylhsminor
.
yy418
->
exprToken
.
n
=
(
yymsp
[
0
].
minor
.
yy0
.
z
-
yymsp
[
-
2
].
minor
.
yy0
.
z
+
1
);}
#line 38
37
"sql.c"
#line 38
88
"sql.c"
yymsp
[
-
2
].
minor
.
yy418
=
yylhsminor
.
yy418
;
break
;
case
23
1
:
/* expr ::= ID */
#line 7
04
"sql.y"
case
23
6
:
/* expr ::= ID */
#line 7
17
"sql.y"
{
yylhsminor
.
yy418
=
tSqlExprCreateIdValue
(
pInfo
,
&
yymsp
[
0
].
minor
.
yy0
,
TK_ID
);}
#line 38
43
"sql.c"
#line 38
94
"sql.c"
yymsp
[
0
].
minor
.
yy418
=
yylhsminor
.
yy418
;
break
;
case
23
2
:
/* expr ::= ID DOT ID */
#line 7
05
"sql.y"
case
23
7
:
/* expr ::= ID DOT ID */
#line 7
18
"sql.y"
{
yymsp
[
-
2
].
minor
.
yy0
.
n
+=
(
1
+
yymsp
[
0
].
minor
.
yy0
.
n
);
yylhsminor
.
yy418
=
tSqlExprCreateIdValue
(
pInfo
,
&
yymsp
[
-
2
].
minor
.
yy0
,
TK_ID
);}
#line 3
849
"sql.c"
#line 3
900
"sql.c"
yymsp
[
-
2
].
minor
.
yy418
=
yylhsminor
.
yy418
;
break
;
case
23
3
:
/* expr ::= ID DOT STAR */
#line 7
06
"sql.y"
case
23
8
:
/* expr ::= ID DOT STAR */
#line 7
19
"sql.y"
{
yymsp
[
-
2
].
minor
.
yy0
.
n
+=
(
1
+
yymsp
[
0
].
minor
.
yy0
.
n
);
yylhsminor
.
yy418
=
tSqlExprCreateIdValue
(
pInfo
,
&
yymsp
[
-
2
].
minor
.
yy0
,
TK_ALL
);}
#line 3
855
"sql.c"
#line 3
906
"sql.c"
yymsp
[
-
2
].
minor
.
yy418
=
yylhsminor
.
yy418
;
break
;
case
23
4
:
/* expr ::= INTEGER */
#line 7
08
"sql.y"
case
23
9
:
/* expr ::= INTEGER */
#line 7
21
"sql.y"
{
yylhsminor
.
yy418
=
tSqlExprCreateIdValue
(
pInfo
,
&
yymsp
[
0
].
minor
.
yy0
,
TK_INTEGER
);}
#line 3
861
"sql.c"
#line 3
912
"sql.c"
yymsp
[
0
].
minor
.
yy418
=
yylhsminor
.
yy418
;
break
;
case
2
35
:
/* expr ::= MINUS INTEGER */
case
2
36
:
/* expr ::= PLUS INTEGER */
yytestcase
(
yyruleno
==
236
);
#line 7
09
"sql.y"
case
2
40
:
/* expr ::= MINUS INTEGER */
case
2
41
:
/* expr ::= PLUS INTEGER */
yytestcase
(
yyruleno
==
241
);
#line 7
22
"sql.y"
{
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
yymsp
[
-
1
].
minor
.
yy0
.
type
=
TK_INTEGER
;
yylhsminor
.
yy418
=
tSqlExprCreateIdValue
(
pInfo
,
&
yymsp
[
-
1
].
minor
.
yy0
,
TK_INTEGER
);}
#line 3
868
"sql.c"
#line 3
919
"sql.c"
yymsp
[
-
1
].
minor
.
yy418
=
yylhsminor
.
yy418
;
break
;
case
2
37
:
/* expr ::= FLOAT */
#line 7
11
"sql.y"
case
2
42
:
/* expr ::= FLOAT */
#line 7
24
"sql.y"
{
yylhsminor
.
yy418
=
tSqlExprCreateIdValue
(
pInfo
,
&
yymsp
[
0
].
minor
.
yy0
,
TK_FLOAT
);}
#line 3
874
"sql.c"
#line 3
925
"sql.c"
yymsp
[
0
].
minor
.
yy418
=
yylhsminor
.
yy418
;
break
;
case
2
38
:
/* expr ::= MINUS FLOAT */
case
2
39
:
/* expr ::= PLUS FLOAT */
yytestcase
(
yyruleno
==
239
);
#line 7
12
"sql.y"
case
2
43
:
/* expr ::= MINUS FLOAT */
case
2
44
:
/* expr ::= PLUS FLOAT */
yytestcase
(
yyruleno
==
244
);
#line 7
25
"sql.y"
{
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
yymsp
[
-
1
].
minor
.
yy0
.
type
=
TK_FLOAT
;
yylhsminor
.
yy418
=
tSqlExprCreateIdValue
(
pInfo
,
&
yymsp
[
-
1
].
minor
.
yy0
,
TK_FLOAT
);}
#line 3
881
"sql.c"
#line 3
932
"sql.c"
yymsp
[
-
1
].
minor
.
yy418
=
yylhsminor
.
yy418
;
break
;
case
24
0
:
/* expr ::= STRING */
#line 7
14
"sql.y"
case
24
5
:
/* expr ::= STRING */
#line 7
27
"sql.y"
{
yylhsminor
.
yy418
=
tSqlExprCreateIdValue
(
pInfo
,
&
yymsp
[
0
].
minor
.
yy0
,
TK_STRING
);}
#line 3
887
"sql.c"
#line 3
938
"sql.c"
yymsp
[
0
].
minor
.
yy418
=
yylhsminor
.
yy418
;
break
;
case
24
1
:
/* expr ::= NOW */
#line 7
15
"sql.y"
case
24
6
:
/* expr ::= NOW */
#line 7
28
"sql.y"
{
yylhsminor
.
yy418
=
tSqlExprCreateIdValue
(
pInfo
,
&
yymsp
[
0
].
minor
.
yy0
,
TK_NOW
);
}
#line 3
893
"sql.c"
#line 3
944
"sql.c"
yymsp
[
0
].
minor
.
yy418
=
yylhsminor
.
yy418
;
break
;
case
24
2
:
/* expr ::= VARIABLE */
#line 7
16
"sql.y"
case
24
7
:
/* expr ::= VARIABLE */
#line 7
29
"sql.y"
{
yylhsminor
.
yy418
=
tSqlExprCreateIdValue
(
pInfo
,
&
yymsp
[
0
].
minor
.
yy0
,
TK_VARIABLE
);}
#line 3
899
"sql.c"
#line 3
950
"sql.c"
yymsp
[
0
].
minor
.
yy418
=
yylhsminor
.
yy418
;
break
;
case
24
3
:
/* expr ::= PLUS VARIABLE */
case
24
4
:
/* expr ::= MINUS VARIABLE */
yytestcase
(
yyruleno
==
244
);
#line 7
17
"sql.y"
case
24
8
:
/* expr ::= PLUS VARIABLE */
case
24
9
:
/* expr ::= MINUS VARIABLE */
yytestcase
(
yyruleno
==
249
);
#line 7
30
"sql.y"
{
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
yymsp
[
-
1
].
minor
.
yy0
.
type
=
TK_VARIABLE
;
yylhsminor
.
yy418
=
tSqlExprCreateIdValue
(
pInfo
,
&
yymsp
[
-
1
].
minor
.
yy0
,
TK_VARIABLE
);}
#line 39
06
"sql.c"
#line 39
57
"sql.c"
yymsp
[
-
1
].
minor
.
yy418
=
yylhsminor
.
yy418
;
break
;
case
2
45
:
/* expr ::= BOOL */
#line 7
19
"sql.y"
case
2
50
:
/* expr ::= BOOL */
#line 7
32
"sql.y"
{
yylhsminor
.
yy418
=
tSqlExprCreateIdValue
(
pInfo
,
&
yymsp
[
0
].
minor
.
yy0
,
TK_BOOL
);}
#line 39
12
"sql.c"
#line 39
63
"sql.c"
yymsp
[
0
].
minor
.
yy418
=
yylhsminor
.
yy418
;
break
;
case
2
46
:
/* expr ::= NULL */
#line 7
20
"sql.y"
case
2
51
:
/* expr ::= NULL */
#line 7
33
"sql.y"
{
yylhsminor
.
yy418
=
tSqlExprCreateIdValue
(
pInfo
,
&
yymsp
[
0
].
minor
.
yy0
,
TK_NULL
);}
#line 39
18
"sql.c"
#line 39
69
"sql.c"
yymsp
[
0
].
minor
.
yy418
=
yylhsminor
.
yy418
;
break
;
case
2
47
:
/* expr ::= ID LP exprlist RP */
#line 7
23
"sql.y"
case
2
52
:
/* expr ::= ID LP exprlist RP */
#line 7
36
"sql.y"
{
tStrTokenAppend
(
pInfo
->
funcs
,
&
yymsp
[
-
3
].
minor
.
yy0
);
yylhsminor
.
yy418
=
tSqlExprCreateFunction
(
yymsp
[
-
1
].
minor
.
yy345
,
&
yymsp
[
-
3
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
,
yymsp
[
-
3
].
minor
.
yy0
.
type
);
}
#line 39
24
"sql.c"
#line 39
75
"sql.c"
yymsp
[
-
3
].
minor
.
yy418
=
yylhsminor
.
yy418
;
break
;
case
2
48
:
/* expr ::= ID LP STAR RP */
#line 7
26
"sql.y"
case
2
53
:
/* expr ::= ID LP STAR RP */
#line 7
39
"sql.y"
{
tStrTokenAppend
(
pInfo
->
funcs
,
&
yymsp
[
-
3
].
minor
.
yy0
);
yylhsminor
.
yy418
=
tSqlExprCreateFunction
(
NULL
,
&
yymsp
[
-
3
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
,
yymsp
[
-
3
].
minor
.
yy0
.
type
);
}
#line 39
30
"sql.c"
#line 39
81
"sql.c"
yymsp
[
-
3
].
minor
.
yy418
=
yylhsminor
.
yy418
;
break
;
case
2
49
:
/* expr ::= expr IS NULL */
#line 7
29
"sql.y"
case
2
54
:
/* expr ::= expr IS NULL */
#line 7
42
"sql.y"
{
yylhsminor
.
yy418
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy418
,
NULL
,
TK_ISNULL
);}
#line 39
36
"sql.c"
#line 39
87
"sql.c"
yymsp
[
-
2
].
minor
.
yy418
=
yylhsminor
.
yy418
;
break
;
case
25
0
:
/* expr ::= expr IS NOT NULL */
#line 7
30
"sql.y"
case
25
5
:
/* expr ::= expr IS NOT NULL */
#line 7
43
"sql.y"
{
yylhsminor
.
yy418
=
tSqlExprCreate
(
yymsp
[
-
3
].
minor
.
yy418
,
NULL
,
TK_NOTNULL
);}
#line 39
42
"sql.c"
#line 39
93
"sql.c"
yymsp
[
-
3
].
minor
.
yy418
=
yylhsminor
.
yy418
;
break
;
case
25
1
:
/* expr ::= expr LT expr */
#line 7
33
"sql.y"
case
25
6
:
/* expr ::= expr LT expr */
#line 7
46
"sql.y"
{
yylhsminor
.
yy418
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy418
,
yymsp
[
0
].
minor
.
yy418
,
TK_LT
);}
#line 39
48
"sql.c"
#line 39
99
"sql.c"
yymsp
[
-
2
].
minor
.
yy418
=
yylhsminor
.
yy418
;
break
;
case
25
2
:
/* expr ::= expr GT expr */
#line 7
34
"sql.y"
case
25
7
:
/* expr ::= expr GT expr */
#line 7
47
"sql.y"
{
yylhsminor
.
yy418
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy418
,
yymsp
[
0
].
minor
.
yy418
,
TK_GT
);}
#line
3954
"sql.c"
#line
4005
"sql.c"
yymsp
[
-
2
].
minor
.
yy418
=
yylhsminor
.
yy418
;
break
;
case
25
3
:
/* expr ::= expr LE expr */
#line 7
35
"sql.y"
case
25
8
:
/* expr ::= expr LE expr */
#line 7
48
"sql.y"
{
yylhsminor
.
yy418
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy418
,
yymsp
[
0
].
minor
.
yy418
,
TK_LE
);}
#line
3960
"sql.c"
#line
4011
"sql.c"
yymsp
[
-
2
].
minor
.
yy418
=
yylhsminor
.
yy418
;
break
;
case
25
4
:
/* expr ::= expr GE expr */
#line 7
36
"sql.y"
case
25
9
:
/* expr ::= expr GE expr */
#line 7
49
"sql.y"
{
yylhsminor
.
yy418
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy418
,
yymsp
[
0
].
minor
.
yy418
,
TK_GE
);}
#line
3966
"sql.c"
#line
4017
"sql.c"
yymsp
[
-
2
].
minor
.
yy418
=
yylhsminor
.
yy418
;
break
;
case
2
55
:
/* expr ::= expr NE expr */
#line 7
37
"sql.y"
case
2
60
:
/* expr ::= expr NE expr */
#line 7
50
"sql.y"
{
yylhsminor
.
yy418
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy418
,
yymsp
[
0
].
minor
.
yy418
,
TK_NE
);}
#line
3972
"sql.c"
#line
4023
"sql.c"
yymsp
[
-
2
].
minor
.
yy418
=
yylhsminor
.
yy418
;
break
;
case
2
56
:
/* expr ::= expr EQ expr */
#line 7
38
"sql.y"
case
2
61
:
/* expr ::= expr EQ expr */
#line 7
51
"sql.y"
{
yylhsminor
.
yy418
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy418
,
yymsp
[
0
].
minor
.
yy418
,
TK_EQ
);}
#line
3978
"sql.c"
#line
4029
"sql.c"
yymsp
[
-
2
].
minor
.
yy418
=
yylhsminor
.
yy418
;
break
;
case
2
57
:
/* expr ::= expr BETWEEN expr AND expr */
#line 7
40
"sql.y"
case
2
62
:
/* expr ::= expr BETWEEN expr AND expr */
#line 7
53
"sql.y"
{
tSqlExpr
*
X2
=
tSqlExprClone
(
yymsp
[
-
4
].
minor
.
yy418
);
yylhsminor
.
yy418
=
tSqlExprCreate
(
tSqlExprCreate
(
yymsp
[
-
4
].
minor
.
yy418
,
yymsp
[
-
2
].
minor
.
yy418
,
TK_GE
),
tSqlExprCreate
(
X2
,
yymsp
[
0
].
minor
.
yy418
,
TK_LE
),
TK_AND
);}
#line
3984
"sql.c"
#line
4035
"sql.c"
yymsp
[
-
4
].
minor
.
yy418
=
yylhsminor
.
yy418
;
break
;
case
2
58
:
/* expr ::= expr AND expr */
#line 7
42
"sql.y"
case
2
63
:
/* expr ::= expr AND expr */
#line 7
55
"sql.y"
{
yylhsminor
.
yy418
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy418
,
yymsp
[
0
].
minor
.
yy418
,
TK_AND
);}
#line
3990
"sql.c"
#line
4041
"sql.c"
yymsp
[
-
2
].
minor
.
yy418
=
yylhsminor
.
yy418
;
break
;
case
2
59
:
/* expr ::= expr OR expr */
#line 7
43
"sql.y"
case
2
64
:
/* expr ::= expr OR expr */
#line 7
56
"sql.y"
{
yylhsminor
.
yy418
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy418
,
yymsp
[
0
].
minor
.
yy418
,
TK_OR
);
}
#line
3996
"sql.c"
#line
4047
"sql.c"
yymsp
[
-
2
].
minor
.
yy418
=
yylhsminor
.
yy418
;
break
;
case
26
0
:
/* expr ::= expr PLUS expr */
#line 7
46
"sql.y"
case
26
5
:
/* expr ::= expr PLUS expr */
#line 7
59
"sql.y"
{
yylhsminor
.
yy418
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy418
,
yymsp
[
0
].
minor
.
yy418
,
TK_PLUS
);
}
#line 40
02
"sql.c"
#line 40
53
"sql.c"
yymsp
[
-
2
].
minor
.
yy418
=
yylhsminor
.
yy418
;
break
;
case
26
1
:
/* expr ::= expr MINUS expr */
#line 7
47
"sql.y"
case
26
6
:
/* expr ::= expr MINUS expr */
#line 7
60
"sql.y"
{
yylhsminor
.
yy418
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy418
,
yymsp
[
0
].
minor
.
yy418
,
TK_MINUS
);
}
#line 40
08
"sql.c"
#line 40
59
"sql.c"
yymsp
[
-
2
].
minor
.
yy418
=
yylhsminor
.
yy418
;
break
;
case
26
2
:
/* expr ::= expr STAR expr */
#line 7
48
"sql.y"
case
26
7
:
/* expr ::= expr STAR expr */
#line 7
61
"sql.y"
{
yylhsminor
.
yy418
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy418
,
yymsp
[
0
].
minor
.
yy418
,
TK_STAR
);
}
#line 40
14
"sql.c"
#line 40
65
"sql.c"
yymsp
[
-
2
].
minor
.
yy418
=
yylhsminor
.
yy418
;
break
;
case
26
3
:
/* expr ::= expr SLASH expr */
#line 7
49
"sql.y"
case
26
8
:
/* expr ::= expr SLASH expr */
#line 7
62
"sql.y"
{
yylhsminor
.
yy418
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy418
,
yymsp
[
0
].
minor
.
yy418
,
TK_DIVIDE
);}
#line 40
20
"sql.c"
#line 40
71
"sql.c"
yymsp
[
-
2
].
minor
.
yy418
=
yylhsminor
.
yy418
;
break
;
case
26
4
:
/* expr ::= expr REM expr */
#line 7
50
"sql.y"
case
26
9
:
/* expr ::= expr REM expr */
#line 7
63
"sql.y"
{
yylhsminor
.
yy418
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy418
,
yymsp
[
0
].
minor
.
yy418
,
TK_REM
);
}
#line 40
26
"sql.c"
#line 40
77
"sql.c"
yymsp
[
-
2
].
minor
.
yy418
=
yylhsminor
.
yy418
;
break
;
case
2
65
:
/* expr ::= expr LIKE expr */
#line 7
53
"sql.y"
case
2
70
:
/* expr ::= expr LIKE expr */
#line 7
66
"sql.y"
{
yylhsminor
.
yy418
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy418
,
yymsp
[
0
].
minor
.
yy418
,
TK_LIKE
);
}
#line 40
32
"sql.c"
#line 40
83
"sql.c"
yymsp
[
-
2
].
minor
.
yy418
=
yylhsminor
.
yy418
;
break
;
case
2
66
:
/* expr ::= expr MATCH expr */
#line 7
56
"sql.y"
case
2
71
:
/* expr ::= expr MATCH expr */
#line 7
69
"sql.y"
{
yylhsminor
.
yy418
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy418
,
yymsp
[
0
].
minor
.
yy418
,
TK_MATCH
);
}
#line 40
38
"sql.c"
#line 40
89
"sql.c"
yymsp
[
-
2
].
minor
.
yy418
=
yylhsminor
.
yy418
;
break
;
case
2
67
:
/* expr ::= expr NMATCH expr */
#line 7
57
"sql.y"
case
2
72
:
/* expr ::= expr NMATCH expr */
#line 7
70
"sql.y"
{
yylhsminor
.
yy418
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy418
,
yymsp
[
0
].
minor
.
yy418
,
TK_NMATCH
);
}
#line 40
44
"sql.c"
#line 40
95
"sql.c"
yymsp
[
-
2
].
minor
.
yy418
=
yylhsminor
.
yy418
;
break
;
case
2
68
:
/* expr ::= expr QUESTION expr
*/
#line 7
60
"sql.y"
{
yylhsminor
.
yy418
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy418
,
yymsp
[
0
].
minor
.
yy418
,
TK_QUESTION
);
}
#line 4
050
"sql.c"
case
2
73
:
/* expr ::= ID QUESTION STRING
*/
#line 7
73
"sql.y"
{
tSqlExpr
*
S
=
tSqlExprCreateIdValue
(
pInfo
,
&
yymsp
[
-
2
].
minor
.
yy0
,
TK_ID
);
tSqlExpr
*
M
=
tSqlExprCreateIdValue
(
pInfo
,
&
yymsp
[
0
].
minor
.
yy0
,
TK_STRING
);
yylhsminor
.
yy418
=
tSqlExprCreate
(
S
,
M
,
TK_QUESTION
);
}
#line 4
101
"sql.c"
yymsp
[
-
2
].
minor
.
yy418
=
yylhsminor
.
yy418
;
break
;
case
2
69
:
/* expr ::= expr ARROW expr
*/
#line 7
63
"sql.y"
{
yylhsminor
.
yy418
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy418
,
yymsp
[
0
].
minor
.
yy418
,
TK_ARROW
);
}
#line 4
056
"sql.c"
case
2
74
:
/* arrow ::= ID ARROW STRING
*/
#line 7
78
"sql.y"
{
tSqlExpr
*
S
=
tSqlExprCreateIdValue
(
pInfo
,
&
yymsp
[
-
2
].
minor
.
yy0
,
TK_ID
);
tSqlExpr
*
M
=
tSqlExprCreateIdValue
(
pInfo
,
&
yymsp
[
0
].
minor
.
yy0
,
TK_STRING
);
yylhsminor
.
yy418
=
tSqlExprCreate
(
S
,
M
,
TK_ARROW
);
}
#line 4
107
"sql.c"
yymsp
[
-
2
].
minor
.
yy418
=
yylhsminor
.
yy418
;
break
;
case
270
:
/* expr ::= expr IN LP exprlist RP */
#line 766 "sql.y"
case
275
:
/* arrow ::= ID DOT ID ARROW STRING */
#line 779 "sql.y"
{
yymsp
[
-
4
].
minor
.
yy0
.
n
+=
(
1
+
yymsp
[
-
2
].
minor
.
yy0
.
n
);
tSqlExpr
*
S
=
tSqlExprCreateIdValue
(
pInfo
,
&
yymsp
[
-
4
].
minor
.
yy0
,
TK_ID
);
tSqlExpr
*
M
=
tSqlExprCreateIdValue
(
pInfo
,
&
yymsp
[
0
].
minor
.
yy0
,
TK_STRING
);
yylhsminor
.
yy418
=
tSqlExprCreate
(
S
,
M
,
TK_ARROW
);
}
#line 4113 "sql.c"
yymsp
[
-
4
].
minor
.
yy418
=
yylhsminor
.
yy418
;
break
;
case
276
:
/* expr ::= arrow */
case
280
:
/* expritem ::= expr */
yytestcase
(
yyruleno
==
280
);
#line 781 "sql.y"
{
yylhsminor
.
yy418
=
yymsp
[
0
].
minor
.
yy418
;}
#line 4120 "sql.c"
yymsp
[
0
].
minor
.
yy418
=
yylhsminor
.
yy418
;
break
;
case
277
:
/* expr ::= expr IN LP exprlist RP */
#line 784 "sql.y"
{
yylhsminor
.
yy418
=
tSqlExprCreate
(
yymsp
[
-
4
].
minor
.
yy418
,
(
tSqlExpr
*
)
yymsp
[
-
1
].
minor
.
yy345
,
TK_IN
);
}
#line 4
062
"sql.c"
#line 4
126
"sql.c"
yymsp
[
-
4
].
minor
.
yy418
=
yylhsminor
.
yy418
;
break
;
case
27
1
:
/* exprlist ::= exprlist COMMA expritem */
#line 7
74
"sql.y"
case
27
8
:
/* exprlist ::= exprlist COMMA expritem */
#line 7
92
"sql.y"
{
yylhsminor
.
yy345
=
tSqlExprListAppend
(
yymsp
[
-
2
].
minor
.
yy345
,
yymsp
[
0
].
minor
.
yy418
,
0
,
0
);}
#line 4
068
"sql.c"
#line 4
132
"sql.c"
yymsp
[
-
2
].
minor
.
yy345
=
yylhsminor
.
yy345
;
break
;
case
27
2
:
/* exprlist ::= expritem */
#line 7
75
"sql.y"
case
27
9
:
/* exprlist ::= expritem */
#line 7
93
"sql.y"
{
yylhsminor
.
yy345
=
tSqlExprListAppend
(
0
,
yymsp
[
0
].
minor
.
yy418
,
0
,
0
);}
#line 4
074
"sql.c"
#line 4
138
"sql.c"
yymsp
[
0
].
minor
.
yy345
=
yylhsminor
.
yy345
;
break
;
case
273
:
/* expritem ::= expr */
#line 776 "sql.y"
{
yylhsminor
.
yy418
=
yymsp
[
0
].
minor
.
yy418
;}
#line 4080 "sql.c"
yymsp
[
0
].
minor
.
yy418
=
yylhsminor
.
yy418
;
break
;
case
275
:
/* cmd ::= RESET QUERY CACHE */
#line 780 "sql.y"
case
282
:
/* cmd ::= RESET QUERY CACHE */
#line 798 "sql.y"
{
setDCLSqlElems
(
pInfo
,
TSDB_SQL_RESET_CACHE
,
0
);}
#line 4
086
"sql.c"
#line 4
144
"sql.c"
break
;
case
2
76
:
/* cmd ::= SYNCDB ids REPLICA */
#line
783
"sql.y"
case
2
83
:
/* cmd ::= SYNCDB ids REPLICA */
#line
801
"sql.y"
{
setDCLSqlElems
(
pInfo
,
TSDB_SQL_SYNC_DB_REPLICA
,
1
,
&
yymsp
[
-
1
].
minor
.
yy0
);}
#line 4
091
"sql.c"
#line 4
149
"sql.c"
break
;
case
2
77
:
/* cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */
#line
786
"sql.y"
case
2
84
:
/* cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */
#line
804
"sql.y"
{
yymsp
[
-
4
].
minor
.
yy0
.
n
+=
yymsp
[
-
3
].
minor
.
yy0
.
n
;
SAlterTableInfo
*
pAlterTable
=
tSetAlterTableInfo
(
&
yymsp
[
-
4
].
minor
.
yy0
,
yymsp
[
0
].
minor
.
yy345
,
NULL
,
TSDB_ALTER_TABLE_ADD_COLUMN
,
-
1
);
setSqlInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
#line 41
00
"sql.c"
#line 41
58
"sql.c"
break
;
case
2
78
:
/* cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */
#line
792
"sql.y"
case
2
85
:
/* cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */
#line
810
"sql.y"
{
yymsp
[
-
4
].
minor
.
yy0
.
n
+=
yymsp
[
-
3
].
minor
.
yy0
.
n
;
...
...
@@ -4110,28 +4168,28 @@ static YYACTIONTYPE yy_reduce(
SAlterTableInfo
*
pAlterTable
=
tSetAlterTableInfo
(
&
yymsp
[
-
4
].
minor
.
yy0
,
NULL
,
K
,
TSDB_ALTER_TABLE_DROP_COLUMN
,
-
1
);
setSqlInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
#line 41
13
"sql.c"
#line 41
71
"sql.c"
break
;
case
2
79
:
/* cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */
#line 8
02
"sql.y"
case
2
86
:
/* cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */
#line 8
20
"sql.y"
{
yymsp
[
-
4
].
minor
.
yy0
.
n
+=
yymsp
[
-
3
].
minor
.
yy0
.
n
;
SAlterTableInfo
*
pAlterTable
=
tSetAlterTableInfo
(
&
yymsp
[
-
4
].
minor
.
yy0
,
yymsp
[
0
].
minor
.
yy345
,
NULL
,
TSDB_ALTER_TABLE_CHANGE_COLUMN
,
-
1
);
setSqlInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
#line 41
22
"sql.c"
#line 41
80
"sql.c"
break
;
case
28
0
:
/* cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */
#line 8
09
"sql.y"
case
28
7
:
/* cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */
#line 8
27
"sql.y"
{
yymsp
[
-
4
].
minor
.
yy0
.
n
+=
yymsp
[
-
3
].
minor
.
yy0
.
n
;
SAlterTableInfo
*
pAlterTable
=
tSetAlterTableInfo
(
&
yymsp
[
-
4
].
minor
.
yy0
,
yymsp
[
0
].
minor
.
yy345
,
NULL
,
TSDB_ALTER_TABLE_ADD_TAG_COLUMN
,
-
1
);
setSqlInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
#line 41
31
"sql.c"
#line 41
89
"sql.c"
break
;
case
28
1
:
/* cmd ::= ALTER TABLE ids cpxName DROP TAG ids */
#line 8
14
"sql.y"
case
28
8
:
/* cmd ::= ALTER TABLE ids cpxName DROP TAG ids */
#line 8
32
"sql.y"
{
yymsp
[
-
4
].
minor
.
yy0
.
n
+=
yymsp
[
-
3
].
minor
.
yy0
.
n
;
...
...
@@ -4141,10 +4199,10 @@ static YYACTIONTYPE yy_reduce(
SAlterTableInfo
*
pAlterTable
=
tSetAlterTableInfo
(
&
yymsp
[
-
4
].
minor
.
yy0
,
NULL
,
A
,
TSDB_ALTER_TABLE_DROP_TAG_COLUMN
,
-
1
);
setSqlInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
#line 4
144
"sql.c"
#line 4
202
"sql.c"
break
;
case
28
2
:
/* cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */
#line 8
24
"sql.y"
case
28
9
:
/* cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */
#line 8
42
"sql.y"
{
yymsp
[
-
5
].
minor
.
yy0
.
n
+=
yymsp
[
-
4
].
minor
.
yy0
.
n
;
...
...
@@ -4157,10 +4215,10 @@ static YYACTIONTYPE yy_reduce(
SAlterTableInfo
*
pAlterTable
=
tSetAlterTableInfo
(
&
yymsp
[
-
5
].
minor
.
yy0
,
NULL
,
A
,
TSDB_ALTER_TABLE_CHANGE_TAG_COLUMN
,
-
1
);
setSqlInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
#line 4
160
"sql.c"
#line 4
218
"sql.c"
break
;
case
2
83
:
/* cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */
#line 8
37
"sql.y"
case
2
90
:
/* cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */
#line 8
55
"sql.y"
{
yymsp
[
-
6
].
minor
.
yy0
.
n
+=
yymsp
[
-
5
].
minor
.
yy0
.
n
;
...
...
@@ -4171,28 +4229,28 @@ static YYACTIONTYPE yy_reduce(
SAlterTableInfo
*
pAlterTable
=
tSetAlterTableInfo
(
&
yymsp
[
-
6
].
minor
.
yy0
,
NULL
,
A
,
TSDB_ALTER_TABLE_UPDATE_TAG_VAL
,
-
1
);
setSqlInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
#line 4
174
"sql.c"
#line 4
232
"sql.c"
break
;
case
2
84
:
/* cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */
#line 8
48
"sql.y"
case
2
91
:
/* cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */
#line 8
66
"sql.y"
{
yymsp
[
-
4
].
minor
.
yy0
.
n
+=
yymsp
[
-
3
].
minor
.
yy0
.
n
;
SAlterTableInfo
*
pAlterTable
=
tSetAlterTableInfo
(
&
yymsp
[
-
4
].
minor
.
yy0
,
yymsp
[
0
].
minor
.
yy345
,
NULL
,
TSDB_ALTER_TABLE_MODIFY_TAG_COLUMN
,
-
1
);
setSqlInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
#line 4
183
"sql.c"
#line 4
241
"sql.c"
break
;
case
2
85
:
/* cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */
#line 8
55
"sql.y"
case
2
92
:
/* cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */
#line 8
73
"sql.y"
{
yymsp
[
-
4
].
minor
.
yy0
.
n
+=
yymsp
[
-
3
].
minor
.
yy0
.
n
;
SAlterTableInfo
*
pAlterTable
=
tSetAlterTableInfo
(
&
yymsp
[
-
4
].
minor
.
yy0
,
yymsp
[
0
].
minor
.
yy345
,
NULL
,
TSDB_ALTER_TABLE_ADD_COLUMN
,
TSDB_SUPER_TABLE
);
setSqlInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
#line 4
192
"sql.c"
#line 4
250
"sql.c"
break
;
case
2
86
:
/* cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */
#line 8
61
"sql.y"
case
2
93
:
/* cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */
#line 8
79
"sql.y"
{
yymsp
[
-
4
].
minor
.
yy0
.
n
+=
yymsp
[
-
3
].
minor
.
yy0
.
n
;
...
...
@@ -4202,28 +4260,28 @@ static YYACTIONTYPE yy_reduce(
SAlterTableInfo
*
pAlterTable
=
tSetAlterTableInfo
(
&
yymsp
[
-
4
].
minor
.
yy0
,
NULL
,
K
,
TSDB_ALTER_TABLE_DROP_COLUMN
,
TSDB_SUPER_TABLE
);
setSqlInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
#line 42
05
"sql.c"
#line 42
63
"sql.c"
break
;
case
2
87
:
/* cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */
#line 8
71
"sql.y"
case
2
94
:
/* cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */
#line 8
89
"sql.y"
{
yymsp
[
-
4
].
minor
.
yy0
.
n
+=
yymsp
[
-
3
].
minor
.
yy0
.
n
;
SAlterTableInfo
*
pAlterTable
=
tSetAlterTableInfo
(
&
yymsp
[
-
4
].
minor
.
yy0
,
yymsp
[
0
].
minor
.
yy345
,
NULL
,
TSDB_ALTER_TABLE_CHANGE_COLUMN
,
TSDB_SUPER_TABLE
);
setSqlInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
#line 42
14
"sql.c"
#line 42
72
"sql.c"
break
;
case
2
88
:
/* cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */
#line 8
78
"sql.y"
case
2
95
:
/* cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */
#line 8
96
"sql.y"
{
yymsp
[
-
4
].
minor
.
yy0
.
n
+=
yymsp
[
-
3
].
minor
.
yy0
.
n
;
SAlterTableInfo
*
pAlterTable
=
tSetAlterTableInfo
(
&
yymsp
[
-
4
].
minor
.
yy0
,
yymsp
[
0
].
minor
.
yy345
,
NULL
,
TSDB_ALTER_TABLE_ADD_TAG_COLUMN
,
TSDB_SUPER_TABLE
);
setSqlInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
#line 42
23
"sql.c"
#line 42
81
"sql.c"
break
;
case
2
89
:
/* cmd ::= ALTER STABLE ids cpxName DROP TAG ids */
#line
883
"sql.y"
case
2
96
:
/* cmd ::= ALTER STABLE ids cpxName DROP TAG ids */
#line
901
"sql.y"
{
yymsp
[
-
4
].
minor
.
yy0
.
n
+=
yymsp
[
-
3
].
minor
.
yy0
.
n
;
...
...
@@ -4233,10 +4291,10 @@ static YYACTIONTYPE yy_reduce(
SAlterTableInfo
*
pAlterTable
=
tSetAlterTableInfo
(
&
yymsp
[
-
4
].
minor
.
yy0
,
NULL
,
A
,
TSDB_ALTER_TABLE_DROP_TAG_COLUMN
,
TSDB_SUPER_TABLE
);
setSqlInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
#line 42
36
"sql.c"
#line 42
94
"sql.c"
break
;
case
29
0
:
/* cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */
#line
893
"sql.y"
case
29
7
:
/* cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */
#line
911
"sql.y"
{
yymsp
[
-
5
].
minor
.
yy0
.
n
+=
yymsp
[
-
4
].
minor
.
yy0
.
n
;
...
...
@@ -4249,10 +4307,10 @@ static YYACTIONTYPE yy_reduce(
SAlterTableInfo
*
pAlterTable
=
tSetAlterTableInfo
(
&
yymsp
[
-
5
].
minor
.
yy0
,
NULL
,
A
,
TSDB_ALTER_TABLE_CHANGE_TAG_COLUMN
,
TSDB_SUPER_TABLE
);
setSqlInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
#line 4
252
"sql.c"
#line 4
310
"sql.c"
break
;
case
29
1
:
/* cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem */
#line 9
06
"sql.y"
case
29
8
:
/* cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem */
#line 9
24
"sql.y"
{
yymsp
[
-
6
].
minor
.
yy0
.
n
+=
yymsp
[
-
5
].
minor
.
yy0
.
n
;
...
...
@@ -4263,31 +4321,31 @@ static YYACTIONTYPE yy_reduce(
SAlterTableInfo
*
pAlterTable
=
tSetAlterTableInfo
(
&
yymsp
[
-
6
].
minor
.
yy0
,
NULL
,
A
,
TSDB_ALTER_TABLE_UPDATE_TAG_VAL
,
TSDB_SUPER_TABLE
);
setSqlInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
#line 4
266
"sql.c"
#line 4
324
"sql.c"
break
;
case
29
2
:
/* cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */
#line 9
17
"sql.y"
case
29
9
:
/* cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */
#line 9
35
"sql.y"
{
yymsp
[
-
4
].
minor
.
yy0
.
n
+=
yymsp
[
-
3
].
minor
.
yy0
.
n
;
SAlterTableInfo
*
pAlterTable
=
tSetAlterTableInfo
(
&
yymsp
[
-
4
].
minor
.
yy0
,
yymsp
[
0
].
minor
.
yy345
,
NULL
,
TSDB_ALTER_TABLE_MODIFY_TAG_COLUMN
,
TSDB_SUPER_TABLE
);
setSqlInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
#line 4
275
"sql.c"
#line 4
333
"sql.c"
break
;
case
293
:
/* cmd ::= KILL CONNECTION INTEGER */
#line 9
24
"sql.y"
case
300
:
/* cmd ::= KILL CONNECTION INTEGER */
#line 9
42
"sql.y"
{
setKillSql
(
pInfo
,
TSDB_SQL_KILL_CONNECTION
,
&
yymsp
[
0
].
minor
.
yy0
);}
#line 4
280
"sql.c"
#line 4
338
"sql.c"
break
;
case
294
:
/* cmd ::= KILL STREAM INTEGER COLON INTEGER */
#line 9
25
"sql.y"
case
301
:
/* cmd ::= KILL STREAM INTEGER COLON INTEGER */
#line 9
43
"sql.y"
{
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
);}
#line 4
285
"sql.c"
#line 4
343
"sql.c"
break
;
case
295
:
/* cmd ::= KILL QUERY INTEGER COLON INTEGER */
#line 9
26
"sql.y"
case
302
:
/* cmd ::= KILL QUERY INTEGER COLON INTEGER */
#line 9
44
"sql.y"
{
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
);}
#line 4
290
"sql.c"
#line 4
348
"sql.c"
break
;
default:
break
;
...
...
@@ -4372,7 +4430,7 @@ static void yy_syntax_error(
}
assert
(
len
<=
outputBufLen
);
#line 4
375
"sql.c"
#line 4
433
"sql.c"
/************ End %syntax_error code ******************************************/
ParseARG_STORE
/* Suppress warning about unused %extra_argument variable */
ParseCTX_STORE
...
...
@@ -4399,7 +4457,7 @@ static void yy_accept(
** parser accepts */
/*********** Begin %parse_accept code *****************************************/
#line 62 "sql.y"
#line 44
02
"sql.c"
#line 44
60
"sql.c"
/*********** End %parse_accept code *******************************************/
ParseARG_STORE
/* Suppress warning about unused %extra_argument variable */
ParseCTX_STORE
...
...
src/util/inc/tutil.h
浏览文件 @
50b82d68
...
...
@@ -38,7 +38,6 @@ char * strntolower_s(char *dst, const char *src, int32_t n);
int64_t
strnatoi
(
char
*
num
,
int32_t
len
);
char
*
strbetween
(
char
*
string
,
char
*
begin
,
char
*
end
);
char
*
paGetToken
(
char
*
src
,
char
**
token
,
int32_t
*
tokenLen
);
int
getArrowKV
(
char
*
src
,
int32_t
len
,
char
**
name
,
char
**
key
);
int32_t
taosByteArrayToHexStr
(
char
bytes
[],
int32_t
len
,
char
hexstr
[]);
int32_t
taosHexStrToByteArray
(
char
hexstr
[],
char
bytes
[]);
...
...
src/util/src/tutil.c
浏览文件 @
50b82d68
...
...
@@ -185,21 +185,6 @@ char *strnchr(char *haystack, char needle, int32_t len, bool skipquote) {
return
NULL
;
}
// src = json->'id' => name=json key=id
int
getArrowKV
(
char
*
src
,
int32_t
len
,
char
**
name
,
char
**
key
){
char
*
loc
=
strstr
(
src
,
"->"
);
if
(
loc
==
NULL
){
return
1
;}
if
(
loc
-
src
+
4
>=
len
)
{
return
2
;}
if
(
*
(
loc
+
2
)
!=
*
(
src
+
len
-
1
))
{
return
2
;}
if
(
*
(
loc
+
2
)
!=
'\''
&&
*
(
loc
+
2
)
!=
'"'
)
{
return
2
;}
*
name
=
calloc
(
1
,
loc
-
src
+
1
);
*
key
=
calloc
(
1
,
len
-
(
loc
-
src
+
4
)
+
1
);
tstrncpy
(
*
name
,
src
,
loc
-
src
+
1
);
tstrncpy
(
*
key
,
loc
+
2
,
len
-
(
loc
-
src
+
4
)
+
1
);
return
0
;
}
char
*
tstrstr
(
char
*
src
,
char
*
dst
,
bool
ignoreInEsc
)
{
if
(
!
ignoreInEsc
)
{
return
strstr
(
src
,
dst
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录