Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
b289b28a
T
TDengine
项目概览
慢慢CG
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
b289b28a
编写于
6月 01, 2021
作者:
H
haojun Liao
提交者:
GitHub
6月 01, 2021
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #6305 from taosdata/feature/TD-2570
Feature/td 2570
上级
68aeccbe
41293c17
变更
18
隐藏空白更改
内联
并排
Showing
18 changed file
with
1565 addition
and
1245 deletion
+1565
-1245
src/client/inc/tscUtil.h
src/client/inc/tscUtil.h
+2
-0
src/client/src/tscSQLParser.c
src/client/src/tscSQLParser.c
+76
-6
src/client/src/tscServer.c
src/client/src/tscServer.c
+1
-0
src/client/src/tscUtil.c
src/client/src/tscUtil.c
+7
-2
src/connector/go
src/connector/go
+1
-1
src/connector/grafanaplugin
src/connector/grafanaplugin
+1
-1
src/inc/taosmsg.h
src/inc/taosmsg.h
+1
-0
src/inc/ttokendef.h
src/inc/ttokendef.h
+68
-68
src/query/inc/qExecutor.h
src/query/inc/qExecutor.h
+13
-0
src/query/inc/qSqlparser.h
src/query/inc/qSqlparser.h
+6
-1
src/query/inc/qTableMeta.h
src/query/inc/qTableMeta.h
+1
-0
src/query/inc/sql.y
src/query/inc/sql.y
+8
-3
src/query/src/qAggMain.c
src/query/src/qAggMain.c
+5
-1
src/query/src/qExecutor.c
src/query/src/qExecutor.c
+197
-15
src/query/src/qPlan.c
src/query/src/qPlan.c
+8
-0
src/query/src/qSqlParser.c
src/query/src/qSqlParser.c
+9
-3
src/query/src/sql.c
src/query/src/sql.c
+1160
-1144
src/util/src/ttokenizer.c
src/util/src/ttokenizer.c
+1
-0
未找到文件。
src/client/inc/tscUtil.h
浏览文件 @
b289b28a
...
...
@@ -123,6 +123,8 @@ int32_t tscGetDataBlockFromList(SHashObj* pHashList, int64_t id, int32_t size, i
*/
bool
tscIsPointInterpQuery
(
SQueryInfo
*
pQueryInfo
);
bool
tscIsTWAQuery
(
SQueryInfo
*
pQueryInfo
);
bool
tscIsSessionWindowQuery
(
SQueryInfo
*
pQueryInfo
);
bool
tscIsSecondStageQuery
(
SQueryInfo
*
pQueryInfo
);
bool
tsIsArithmeticQueryOnAggResult
(
SQueryInfo
*
pQueryInfo
);
bool
tscGroupbyColumn
(
SQueryInfo
*
pQueryInfo
);
bool
tscIsTopBotQuery
(
SQueryInfo
*
pQueryInfo
);
...
...
src/client/src/tscSQLParser.c
浏览文件 @
b289b28a
...
...
@@ -90,6 +90,7 @@ static int32_t validateGroupbyNode(SQueryInfo* pQueryInfo, SArray* pList, SSqlCm
static
int32_t
validateIntervalNode
(
SSqlObj
*
pSql
,
SQueryInfo
*
pQueryInfo
,
SSqlNode
*
pSqlNode
);
static
int32_t
parseIntervalOffset
(
SSqlCmd
*
pCmd
,
SQueryInfo
*
pQueryInfo
,
SStrToken
*
offsetToken
);
static
int32_t
parseSlidingClause
(
SSqlCmd
*
pCmd
,
SQueryInfo
*
pQueryInfo
,
SStrToken
*
pSliding
);
static
int32_t
validateStateWindowNode
(
SSqlCmd
*
pSql
,
SQueryInfo
*
pQueryInfo
,
SSqlNode
*
pSqlNode
,
bool
isStable
);
static
int32_t
addProjectionExprAndResultField
(
SSqlCmd
*
pCmd
,
SQueryInfo
*
pQueryInfo
,
tSqlExprItem
*
pItem
);
...
...
@@ -851,6 +852,59 @@ int32_t validateIntervalNode(SSqlObj* pSql, SQueryInfo* pQueryInfo, SSqlNode* pS
// The following part is used to check for the invalid query expression.
return
checkInvalidExprForTimeWindow
(
pCmd
,
pQueryInfo
);
}
static
int32_t
validateStateWindowNode
(
SSqlCmd
*
pCmd
,
SQueryInfo
*
pQueryInfo
,
SSqlNode
*
pSqlNode
,
bool
isStable
)
{
const
char
*
msg1
=
"invalid column name"
;
const
char
*
msg3
=
"not support state_window with group by "
;
const
char
*
msg4
=
"function not support for super table query"
;
SStrToken
*
col
=
&
(
pSqlNode
->
windowstateVal
.
col
)
;
if
(
col
->
z
==
NULL
||
col
->
n
<=
0
)
{
return
TSDB_CODE_SUCCESS
;
}
if
(
pQueryInfo
->
colList
==
NULL
)
{
pQueryInfo
->
colList
=
taosArrayInit
(
4
,
POINTER_BYTES
);
}
if
(
pQueryInfo
->
groupbyExpr
.
numOfGroupCols
>
0
)
{
return
invalidOperationMsg
(
tscGetErrorMsgPayload
(
pCmd
),
msg3
);
}
pQueryInfo
->
groupbyExpr
.
numOfGroupCols
=
1
;
//TODO(dengyihao): check tag column
if
(
isStable
)
{
return
invalidOperationMsg
(
tscGetErrorMsgPayload
(
pCmd
),
msg4
);
}
SColumnIndex
index
=
COLUMN_INDEX_INITIALIZER
;
if
(
getColumnIndexByName
(
pCmd
,
col
,
pQueryInfo
,
&
index
)
!=
TSDB_CODE_SUCCESS
)
{
return
invalidOperationMsg
(
tscGetErrorMsgPayload
(
pCmd
),
msg1
);
}
STableMetaInfo
*
pTableMetaInfo
=
tscGetMetaInfo
(
pQueryInfo
,
index
.
tableIndex
);
STableMeta
*
pTableMeta
=
pTableMetaInfo
->
pTableMeta
;
int32_t
numOfCols
=
tscGetNumOfColumns
(
pTableMeta
);
if
(
index
.
columnIndex
==
TSDB_TBNAME_COLUMN_INDEX
||
index
.
columnIndex
>=
numOfCols
)
{
return
invalidOperationMsg
(
tscGetErrorMsgPayload
(
pCmd
),
msg3
);
}
SGroupbyExpr
*
pGroupExpr
=
&
pQueryInfo
->
groupbyExpr
;
if
(
pGroupExpr
->
columnInfo
==
NULL
)
{
pGroupExpr
->
columnInfo
=
taosArrayInit
(
4
,
sizeof
(
SColIndex
));
}
SSchema
*
pSchema
=
tscGetTableColumnSchema
(
pTableMeta
,
index
.
columnIndex
);
if
(
pSchema
->
type
==
TSDB_DATA_TYPE_TIMESTAMP
||
pSchema
->
type
==
TSDB_DATA_TYPE_FLOAT
||
pSchema
->
type
==
TSDB_DATA_TYPE_DOUBLE
)
{
return
invalidOperationMsg
(
tscGetErrorMsgPayload
(
pCmd
),
msg1
);
}
tscColumnListInsert
(
pQueryInfo
->
colList
,
index
.
columnIndex
,
pTableMeta
->
id
.
uid
,
pSchema
);
SColIndex
colIndex
=
{
.
colIndex
=
index
.
columnIndex
,
.
flag
=
TSDB_COL_NORMAL
,
.
colId
=
pSchema
->
colId
};
taosArrayPush
(
pGroupExpr
->
columnInfo
,
&
colIndex
);
pQueryInfo
->
groupbyExpr
.
orderType
=
TSDB_ORDER_ASC
;
pQueryInfo
->
stateWindow
=
true
;
return
TSDB_CODE_SUCCESS
;
}
int32_t
validateSessionNode
(
SSqlCmd
*
pCmd
,
SQueryInfo
*
pQueryInfo
,
SSqlNode
*
pSqlNode
)
{
const
char
*
msg1
=
"gap should be fixed time window"
;
...
...
@@ -885,11 +939,17 @@ int32_t validateSessionNode(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, SSqlNode * pS
if
(
pQueryInfo
->
sessionWindow
.
gap
!=
0
&&
pQueryInfo
->
interval
.
interval
!=
0
)
{
return
invalidOperationMsg
(
tscGetErrorMsgPayload
(
pCmd
),
msg2
);
}
if
(
pQueryInfo
->
sessionWindow
.
gap
==
0
)
{
return
invalidOperationMsg
(
tscGetErrorMsgPayload
(
pCmd
),
msg4
);
}
SColumnIndex
index
=
COLUMN_INDEX_INITIALIZER
;
if
(
getColumnIndexByName
(
pCmd
,
col
,
pQueryInfo
,
&
index
)
!=
TSDB_CODE_SUCCESS
)
{
return
invalidOperationMsg
(
tscGetErrorMsgPayload
(
pCmd
),
msg3
);
}
if
(
index
.
columnIndex
!=
PRIMARYKEY_TIMESTAMP_COL_INDEX
)
{
return
invalidOperationMsg
(
tscGetErrorMsgPayload
(
pCmd
),
msg3
);
}
pQueryInfo
->
sessionWindow
.
primaryColId
=
PRIMARYKEY_TIMESTAMP_COL_INDEX
;
...
...
@@ -2896,6 +2956,9 @@ bool hasUnsupportFunctionsForSTableQuery(SSqlCmd* pCmd, SQueryInfo* pQueryInfo)
return
true
;
}
}
}
else
if
(
tscIsSessionWindowQuery
(
pQueryInfo
))
{
invalidOperationMsg
(
tscGetErrorMsgPayload
(
pCmd
),
msg3
);
return
true
;
}
return
false
;
...
...
@@ -6156,7 +6219,7 @@ static int32_t doTagFunctionCheck(SQueryInfo* pQueryInfo) {
int32_t
doFunctionsCompatibleCheck
(
SSqlCmd
*
pCmd
,
SQueryInfo
*
pQueryInfo
)
{
const
char
*
msg1
=
"functions/columns not allowed in group by query"
;
const
char
*
msg2
=
"projection query on columns not allowed"
;
const
char
*
msg3
=
"group by not allowed on projection query"
;
const
char
*
msg3
=
"group by
/session/state_window
not allowed on projection query"
;
const
char
*
msg4
=
"retrieve tags not compatible with group by or interval query"
;
const
char
*
msg5
=
"functions can not be mixed up"
;
...
...
@@ -6172,6 +6235,9 @@ int32_t doFunctionsCompatibleCheck(SSqlCmd* pCmd, SQueryInfo* pQueryInfo) {
return
TSDB_CODE_SUCCESS
;
}
}
if
(
tscIsProjectionQuery
(
pQueryInfo
)
&&
tscIsSessionWindowQuery
(
pQueryInfo
))
{
return
invalidOperationMsg
(
tscGetErrorMsgPayload
(
pCmd
),
msg3
);
}
if
(
pQueryInfo
->
groupbyExpr
.
numOfGroupCols
>
0
)
{
// check if all the tags prj columns belongs to the group by columns
...
...
@@ -6741,6 +6807,7 @@ int32_t doCheckForStream(SSqlObj* pSql, SSqlInfo* pInfo) {
return
TSDB_CODE_TSC_INVALID_OPERATION
;
}
if
(
isTimeWindowQuery
(
pQueryInfo
)
&&
(
validateFunctionsInIntervalOrGroupbyQuery
(
pCmd
,
pQueryInfo
)
!=
TSDB_CODE_SUCCESS
))
{
return
invalidOperationMsg
(
tscGetErrorMsgPayload
(
pCmd
),
msg2
);
}
...
...
@@ -7529,7 +7596,10 @@ int32_t validateSqlNode(SSqlObj* pSql, SSqlNode* pSqlNode, SQueryInfo* pQueryInf
TSDB_CODE_SUCCESS
)
{
return
TSDB_CODE_TSC_INVALID_OPERATION
;
}
// parse the window_state
if
(
validateStateWindowNode
(
pCmd
,
pQueryInfo
,
pSqlNode
,
isSTable
)
!=
TSDB_CODE_SUCCESS
)
{
return
TSDB_CODE_TSC_INVALID_OPERATION
;
}
// set order by info
if
(
validateOrderbyNode
(
pCmd
,
pQueryInfo
,
pSqlNode
,
tscGetTableSchema
(
pTableMetaInfo
->
pTableMeta
))
!=
TSDB_CODE_SUCCESS
)
{
...
...
@@ -7570,6 +7640,10 @@ int32_t validateSqlNode(SSqlObj* pSql, SSqlNode* pSqlNode, SQueryInfo* pQueryInf
* transfer sql functions that need secondary merge into another format
* in dealing with super table queries such as: count/first/last
*/
if
(
validateSessionNode
(
pCmd
,
pQueryInfo
,
pSqlNode
)
!=
TSDB_CODE_SUCCESS
)
{
return
TSDB_CODE_TSC_INVALID_OPERATION
;
}
if
(
isSTable
)
{
tscTansformFuncForSTableQuery
(
pQueryInfo
);
if
(
hasUnsupportFunctionsForSTableQuery
(
pCmd
,
pQueryInfo
))
{
...
...
@@ -7577,10 +7651,6 @@ int32_t validateSqlNode(SSqlObj* pSql, SSqlNode* pSqlNode, SQueryInfo* pQueryInf
}
}
if
(
validateSessionNode
(
pCmd
,
pQueryInfo
,
pSqlNode
)
!=
TSDB_CODE_SUCCESS
)
{
return
TSDB_CODE_TSC_INVALID_OPERATION
;
}
// no result due to invalid query time range
if
(
pQueryInfo
->
window
.
skey
>
pQueryInfo
->
window
.
ekey
)
{
pQueryInfo
->
command
=
TSDB_SQL_RETRIEVE_EMPTY_RESULT
;
...
...
src/client/src/tscServer.c
浏览文件 @
b289b28a
...
...
@@ -857,6 +857,7 @@ int tscBuildQueryMsg(SSqlObj *pSql, SSqlInfo *pInfo) {
pQueryMsg
->
simpleAgg
=
query
.
simpleAgg
;
pQueryMsg
->
pointInterpQuery
=
query
.
pointInterpQuery
;
pQueryMsg
->
needReverseScan
=
query
.
needReverseScan
;
pQueryMsg
->
stateWindow
=
query
.
stateWindow
;
pQueryMsg
->
numOfTags
=
htonl
(
numOfTags
);
pQueryMsg
->
sqlstrLen
=
htonl
(
sqlLen
);
...
...
src/client/src/tscUtil.c
浏览文件 @
b289b28a
...
...
@@ -434,6 +434,9 @@ bool tscIsTWAQuery(SQueryInfo* pQueryInfo) {
return
false
;
}
bool
tscIsSessionWindowQuery
(
SQueryInfo
*
pQueryInfo
)
{
return
pQueryInfo
->
sessionWindow
.
gap
>
0
;
}
bool
tscNeedReverseScan
(
SQueryInfo
*
pQueryInfo
)
{
size_t
numOfExprs
=
tscNumOfExprs
(
pQueryInfo
);
...
...
@@ -4202,11 +4205,13 @@ int32_t tscCreateQueryFromQueryInfo(SQueryInfo* pQueryInfo, SQueryAttr* pQueryAt
pQueryAttr
->
simpleAgg
=
isSimpleAggregate
(
pQueryInfo
);
pQueryAttr
->
needReverseScan
=
tscNeedReverseScan
(
pQueryInfo
);
pQueryAttr
->
stableQuery
=
QUERY_IS_STABLE_QUERY
(
pQueryInfo
->
type
);
pQueryAttr
->
groupbyColumn
=
tscGroupbyColumn
(
pQueryInfo
);
pQueryAttr
->
groupbyColumn
=
(
!
pQueryInfo
->
stateWindow
)
&&
tscGroupbyColumn
(
pQueryInfo
);
pQueryAttr
->
queryBlockDist
=
isBlockDistQuery
(
pQueryInfo
);
pQueryAttr
->
pointInterpQuery
=
tscIsPointInterpQuery
(
pQueryInfo
);
pQueryAttr
->
timeWindowInterpo
=
timeWindowInterpoRequired
(
pQueryInfo
);
pQueryAttr
->
distinctTag
=
pQueryInfo
->
distinctTag
;
pQueryAttr
->
sw
=
pQueryInfo
->
sessionWindow
;
pQueryAttr
->
stateWindow
=
pQueryInfo
->
stateWindow
;
pQueryAttr
->
numOfCols
=
numOfCols
;
pQueryAttr
->
numOfOutput
=
numOfOutput
;
...
...
@@ -4214,8 +4219,8 @@ int32_t tscCreateQueryFromQueryInfo(SQueryInfo* pQueryInfo, SQueryAttr* pQueryAt
pQueryAttr
->
slimit
=
pQueryInfo
->
slimit
;
pQueryAttr
->
order
=
pQueryInfo
->
order
;
pQueryAttr
->
fillType
=
pQueryInfo
->
fillType
;
pQueryAttr
->
groupbyColumn
=
tscGroupbyColumn
(
pQueryInfo
);
pQueryAttr
->
havingNum
=
pQueryInfo
->
havingFieldNum
;
if
(
pQueryInfo
->
order
.
order
==
TSDB_ORDER_ASC
)
{
// TODO refactor
pQueryAttr
->
window
=
pQueryInfo
->
window
;
...
...
go
@
8ce6d865
比较
050667e5
...
8ce6d865
Subproject commit
050667e5b4d0eafa5387e4283e713559b421203f
Subproject commit
8ce6d86558afc8c0b50c10f990fd2b4270cf06fc
grafanaplugin
@
3530c6df
比较
32e2c97a
...
3530c6df
Subproject commit 3
2e2c97a4cf7bedaa99f5d6dd8cb036e7f4470df
Subproject commit 3
530c6df097134a410bacec6b3cd013ef38a61aa
src/inc/taosmsg.h
浏览文件 @
b289b28a
...
...
@@ -473,6 +473,7 @@ typedef struct {
bool
simpleAgg
;
bool
pointInterpQuery
;
// point interpolation query
bool
needReverseScan
;
// need reverse scan
bool
stateWindow
;
// state window flag
STimeWindow
window
;
int32_t
numOfTables
;
...
...
src/inc/ttokendef.h
浏览文件 @
b289b28a
...
...
@@ -136,74 +136,74 @@
#define TK_VARIABLE 117
#define TK_INTERVAL 118
#define TK_SESSION 119
#define TK_
FILL
120
#define TK_
SLIDING
121
#define TK_
ORDER
122
#define TK_
BY
123
#define TK_
ASC
124
#define TK_
DESC
125
#define TK_
GROUP
126
#define TK_
HAVING
127
#define TK_
LIMIT
128
#define TK_
OFFSET
129
#define TK_
SLIMI
T 130
#define TK_S
OFFSET
131
#define TK_
WHERE
132
#define TK_
NOW
133
#define TK_
RESET
134
#define TK_
QUERY
135
#define TK_
SYNCDB
136
#define TK_
ADD
137
#define TK_
COLUMN
138
#define TK_
TAG
139
#define TK_
CHANGE
140
#define TK_
SET
141
#define TK_
KILL
142
#define TK_
CONNECTION
143
#define TK_
STREAM
144
#define TK_
COLON
145
#define TK_
ABORT
146
#define TK_A
FTER
147
#define TK_A
TTACH
148
#define TK_
BEFORE
149
#define TK_BE
GIN
150
#define TK_
CASCADE
151
#define TK_C
LUSTER
152
#define TK_C
ONFLICT
153
#define TK_CO
PY
154
#define TK_
DEFERRED
155
#define TK_DE
LIMITERS
156
#define TK_DE
TACH
157
#define TK_
EACH
158
#define TK_E
ND
159
#define TK_E
XPLAIN
160
#define TK_
FAIL
161
#define TK_F
OR
162
#define TK_
IGNORE
163
#define TK_I
MMEDIATE
164
#define TK_I
NITIALLY
165
#define TK_IN
STEAD
166
#define TK_
MATCH
167
#define TK_
KEY
168
#define TK_
OF
169
#define TK_
RAISE
170
#define TK_R
EPLACE
171
#define TK_RE
STRICT
172
#define TK_R
OW
173
#define TK_
STATEMENT
174
#define TK_
TRIGGER
175
#define TK_
VIEW
176
#define TK_
SEMI
177
#define TK_
NONE
178
#define TK_
PREV
179
#define TK_
LINEAR
180
#define TK_
IMPORT
181
#define TK_
TBNAME
182
#define TK_
JOIN
183
#define TK_
INSERT
184
#define TK_IN
TO
185
#define TK_
VALUES
186
#define TK_
STATE_WINDOW
120
#define TK_
FILL
121
#define TK_
SLIDING
122
#define TK_
ORDER
123
#define TK_
BY
124
#define TK_
ASC
125
#define TK_
DESC
126
#define TK_
GROUP
127
#define TK_
HAVING
128
#define TK_
LIMIT
129
#define TK_
OFFSE
T 130
#define TK_S
LIMIT
131
#define TK_
SOFFSET
132
#define TK_
WHERE
133
#define TK_
NOW
134
#define TK_
RESET
135
#define TK_
QUERY
136
#define TK_
SYNCDB
137
#define TK_
ADD
138
#define TK_
COLUMN
139
#define TK_
TAG
140
#define TK_
CHANGE
141
#define TK_
SET
142
#define TK_
KILL
143
#define TK_
CONNECTION
144
#define TK_
STREAM
145
#define TK_
COLON
146
#define TK_A
BORT
147
#define TK_A
FTER
148
#define TK_
ATTACH
149
#define TK_BE
FORE
150
#define TK_
BEGIN
151
#define TK_C
ASCADE
152
#define TK_C
LUSTER
153
#define TK_CO
NFLICT
154
#define TK_
COPY
155
#define TK_DE
FERRED
156
#define TK_DE
LIMITERS
157
#define TK_
DETACH
158
#define TK_E
ACH
159
#define TK_E
ND
160
#define TK_
EXPLAIN
161
#define TK_F
AIL
162
#define TK_
FOR
163
#define TK_I
GNORE
164
#define TK_I
MMEDIATE
165
#define TK_IN
ITIALLY
166
#define TK_
INSTEAD
167
#define TK_
MATCH
168
#define TK_
KEY
169
#define TK_
OF
170
#define TK_R
AISE
171
#define TK_RE
PLACE
172
#define TK_R
ESTRICT
173
#define TK_
ROW
174
#define TK_
STATEMENT
175
#define TK_
TRIGGER
176
#define TK_
VIEW
177
#define TK_
SEMI
178
#define TK_
NONE
179
#define TK_
PREV
180
#define TK_
LINEAR
181
#define TK_
IMPORT
182
#define TK_
TBNAME
183
#define TK_
JOIN
184
#define TK_IN
SERT
185
#define TK_
INTO
186
#define TK_VALUES 187
#define TK_SPACE 300
#define TK_COMMENT 301
...
...
src/query/inc/qExecutor.h
浏览文件 @
b289b28a
...
...
@@ -189,6 +189,7 @@ typedef struct SQueryAttr {
bool
pointInterpQuery
;
// point interpolation query
bool
needReverseScan
;
// need reverse scan
bool
distinctTag
;
// distinct tag query
bool
stateWindow
;
// window State on sub/normal table
int32_t
interBufSize
;
// intermediate buffer sizse
int32_t
havingNum
;
// having expr number
...
...
@@ -296,6 +297,7 @@ enum OPERATOR_TYPE_E {
OP_Filter
=
19
,
OP_Distinct
=
20
,
OP_Join
=
21
,
OP_StateWindow
=
22
,
};
typedef
struct
SOperatorInfo
{
...
...
@@ -460,6 +462,16 @@ typedef struct SSWindowOperatorInfo {
int32_t
start
;
// start row index
}
SSWindowOperatorInfo
;
typedef
struct
SStateWindowOperatorInfo
{
SOptrBasicInfo
binfo
;
STimeWindow
curWindow
;
// current time window
int32_t
numOfRows
;
// number of rows
int32_t
colIndex
;
// start row index
int32_t
start
;
char
*
prevData
;
// previous data
}
SStateWindowOperatorInfo
;
typedef
struct
SDistinctOperatorInfo
{
SHashObj
*
pSet
;
SSDataBlock
*
pRes
;
...
...
@@ -509,6 +521,7 @@ SOperatorInfo* createDistinctOperatorInfo(SQueryRuntimeEnv* pRuntimeEnv, SOperat
SOperatorInfo
*
createTableBlockInfoScanOperator
(
void
*
pTsdbQueryHandle
,
SQueryRuntimeEnv
*
pRuntimeEnv
);
SOperatorInfo
*
createMultiwaySortOperatorInfo
(
SQueryRuntimeEnv
*
pRuntimeEnv
,
SExprInfo
*
pExpr
,
int32_t
numOfOutput
,
int32_t
numOfRows
,
void
*
merger
,
bool
groupMix
);
SOperatorInfo
*
createStatewindowOperatorInfo
(
SQueryRuntimeEnv
*
pRuntimeEnv
,
SOperatorInfo
*
upstream
,
SExprInfo
*
pExpr
,
int32_t
numOfOutput
);
SOperatorInfo
*
createGlobalAggregateOperatorInfo
(
SQueryRuntimeEnv
*
pRuntimeEnv
,
SOperatorInfo
*
upstream
,
SExprInfo
*
pExpr
,
int32_t
numOfOutput
,
void
*
param
);
SOperatorInfo
*
createSLimitOperatorInfo
(
SQueryRuntimeEnv
*
pRuntimeEnv
,
SOperatorInfo
*
upstream
,
SExprInfo
*
pExpr
,
int32_t
numOfOutput
,
void
*
merger
);
SOperatorInfo
*
createFilterOperatorInfo
(
SQueryRuntimeEnv
*
pRuntimeEnv
,
SOperatorInfo
*
upstream
,
SExprInfo
*
pExpr
,
...
...
src/query/inc/qSqlparser.h
浏览文件 @
b289b28a
...
...
@@ -89,6 +89,10 @@ typedef struct SSessionWindowVal {
SStrToken
gap
;
}
SSessionWindowVal
;
typedef
struct
SWindowStateVal
{
SStrToken
col
;
}
SWindowStateVal
;
struct
SRelationInfo
;
typedef
struct
SSqlNode
{
...
...
@@ -100,6 +104,7 @@ typedef struct SSqlNode {
SArray
*
fillType
;
// fill type[optional], SArray<tVariantListItem>
SIntervalVal
interval
;
// (interval, interval_offset) [optional]
SSessionWindowVal
sessionVal
;
// session window [optional]
SWindowStateVal
windowstateVal
;
// window_state(col) [optional]
SStrToken
sliding
;
// sliding window [optional]
SLimitVal
limit
;
// limit offset [optional]
SLimitVal
slimit
;
// group limit offset [optional]
...
...
@@ -275,7 +280,7 @@ SArray *tSqlExprListAppend(SArray *pList, tSqlExpr *pNode, SStrToken *pDistinc
void
tSqlExprListDestroy
(
SArray
*
pList
);
SSqlNode
*
tSetQuerySqlNode
(
SStrToken
*
pSelectToken
,
SArray
*
pSelNodeList
,
SRelationInfo
*
pFrom
,
tSqlExpr
*
pWhere
,
SArray
*
pGroupby
,
SArray
*
pSortOrder
,
SIntervalVal
*
pInterval
,
SSessionWindowVal
*
ps
,
SArray
*
pGroupby
,
SArray
*
pSortOrder
,
SIntervalVal
*
pInterval
,
SSessionWindowVal
*
ps
,
SWindowStateVal
*
pw
,
SStrToken
*
pSliding
,
SArray
*
pFill
,
SLimitVal
*
pLimit
,
SLimitVal
*
pgLimit
,
tSqlExpr
*
pHaving
);
int32_t
tSqlExprCompare
(
tSqlExpr
*
left
,
tSqlExpr
*
right
);
...
...
src/query/inc/qTableMeta.h
浏览文件 @
b289b28a
...
...
@@ -138,6 +138,7 @@ typedef struct SQueryInfo {
bool
hasFilter
;
bool
onlyTagQuery
;
bool
orderProjectQuery
;
bool
stateWindow
;
}
SQueryInfo
;
/**
...
...
src/query/inc/sql.y
浏览文件 @
b289b28a
...
...
@@ -456,8 +456,8 @@ tagitem(A) ::= PLUS(X) FLOAT(Y). {
//////////////////////// The SELECT statement /////////////////////////////////
%type select {SSqlNode*}
%destructor select {destroySqlNode($$);}
select(A) ::= SELECT(T) selcollist(W) from(X) where_opt(Y) interval_opt(K) session_option(H) fill_opt(F) sliding_opt(S) groupby_opt(P) orderby_opt(Z) having_opt(N) slimit_opt(G) limit_opt(L). {
A = tSetQuerySqlNode(&T, W, X, Y, P, Z, &K, &H, &S, F, &L, &G, N);
select(A) ::= SELECT(T) selcollist(W) from(X) where_opt(Y) interval_opt(K) session_option(H)
windowstate_option(D)
fill_opt(F) sliding_opt(S) groupby_opt(P) orderby_opt(Z) having_opt(N) slimit_opt(G) limit_opt(L). {
A = tSetQuerySqlNode(&T, W, X, Y, P, Z, &K, &H, &
D, &
S, F, &L, &G, N);
}
select(A) ::= LP select(B) RP. {A = B;}
...
...
@@ -475,7 +475,7 @@ cmd ::= union(X). { setSqlInfo(pInfo, X, NULL, TSDB_SQL_SELECT); }
// select client_version()
// select server_state()
select(A) ::= SELECT(T) selcollist(W). {
A = tSetQuerySqlNode(&T, W, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
A = tSetQuerySqlNode(&T, W, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
, NULL
);
}
// selcollist is a list of expressions that are to become the return
...
...
@@ -558,6 +558,11 @@ session_option(X) ::= SESSION LP ids(V) cpxName(Z) COMMA tmvar(Y) RP. {
X.col = V;
X.gap = Y;
}
%type windowstate_option {SWindowStateVal}
windowstate_option(X) ::= . {X.col.n = 0;}
windowstate_option(X) ::= STATE_WINDOW LP ids(V) RP. {
X.col = V;
}
%type fill_opt {SArray*}
%destructor fill_opt {taosArrayDestroy($$);}
...
...
src/query/src/qAggMain.c
浏览文件 @
b289b28a
...
...
@@ -3299,8 +3299,12 @@ static void col_project_function(SQLFunctionCtx *pCtx) {
if
(
pCtx
->
numOfParams
==
2
)
{
return
;
}
if
(
pCtx
->
param
[
0
].
i64
==
1
)
{
SET_VAL
(
pCtx
,
pCtx
->
size
,
1
);
}
else
{
INC_INIT_VAL
(
pCtx
,
pCtx
->
size
);
}
INC_INIT_VAL
(
pCtx
,
pCtx
->
size
);
char
*
pData
=
GET_INPUT_DATA_LIST
(
pCtx
);
if
(
pCtx
->
order
==
TSDB_ORDER_ASC
)
{
...
...
src/query/src/qExecutor.c
浏览文件 @
b289b28a
...
...
@@ -189,12 +189,16 @@ static void destroySFillOperatorInfo(void* param, int32_t numOfOutput);
static
void
destroyGroupbyOperatorInfo
(
void
*
param
,
int32_t
numOfOutput
);
static
void
destroyArithOperatorInfo
(
void
*
param
,
int32_t
numOfOutput
);
static
void
destroyTagScanOperatorInfo
(
void
*
param
,
int32_t
numOfOutput
);
static
void
destroySWindowOperatorInfo
(
void
*
param
,
int32_t
numOfOutput
);
static
void
destroyStateWindowOperatorInfo
(
void
*
param
,
int32_t
numOfOutput
);
static
void
destroyAggOperatorInfo
(
void
*
param
,
int32_t
numOfOutput
);
static
void
destroyOperatorInfo
(
SOperatorInfo
*
pOperator
);
static
int32_t
doCopyToSDataBlock
(
SQueryRuntimeEnv
*
pRuntimeEnv
,
SGroupResInfo
*
pGroupResInfo
,
int32_t
orderType
,
SSDataBlock
*
pBlock
);
static
int32_t
getGroupbyColumnIndex
(
SGroupbyExpr
*
pGroupbyExpr
,
SSDataBlock
*
pDataBlock
);
static
int32_t
setGroupResultOutputBuf
(
SQueryRuntimeEnv
*
pRuntimeEnv
,
S
GroupbyOperatorInfo
*
pInfo
,
int32_t
numOfCols
,
char
*
pData
,
int16_t
type
,
int16_t
bytes
,
int32_t
groupIndex
);
static
int32_t
setGroupResultOutputBuf
(
SQueryRuntimeEnv
*
pRuntimeEnv
,
S
OptrBasicInfo
*
binf
,
int32_t
numOfCols
,
char
*
pData
,
int16_t
type
,
int16_t
bytes
,
int32_t
groupIndex
);
static
void
initCtxOutputBuffer
(
SQLFunctionCtx
*
pCtx
,
int32_t
size
);
static
void
getAlignQueryTimeWindow
(
SQueryAttr
*
pQueryAttr
,
int64_t
key
,
int64_t
keyFirst
,
int64_t
keyLast
,
STimeWindow
*
win
);
...
...
@@ -731,7 +735,6 @@ static void doApplyFunctions(SQueryRuntimeEnv* pRuntimeEnv, SQLFunctionCtx* pCtx
if
(
pCtx
[
k
].
preAggVals
.
isSet
&&
forwardStep
<
numOfTotal
)
{
pCtx
[
k
].
preAggVals
.
isSet
=
false
;
}
if
(
functionNeedToExecute
(
pRuntimeEnv
,
&
pCtx
[
k
],
functionId
))
{
aAggs
[
functionId
].
xFunction
(
&
pCtx
[
k
]);
}
...
...
@@ -1299,7 +1302,7 @@ static void doHashGroupbyAgg(SOperatorInfo* pOperator, SGroupbyOperatorInfo *pIn
}
int32_t
ret
=
setGroupResultOutputBuf
(
pRuntimeEnv
,
pInfo
,
pOperator
->
numOfOutput
,
val
,
type
,
bytes
,
item
->
groupIndex
);
setGroupResultOutputBuf
(
pRuntimeEnv
,
&
(
pInfo
->
binfo
)
,
pOperator
->
numOfOutput
,
val
,
type
,
bytes
,
item
->
groupIndex
);
if
(
ret
!=
TSDB_CODE_SUCCESS
)
{
// null data, too many state code
longjmp
(
pRuntimeEnv
->
env
,
TSDB_CODE_QRY_APP_ERROR
);
}
...
...
@@ -1338,12 +1341,16 @@ static void doSessionWindowAggImpl(SOperatorInfo* pOperator, SSWindowOperatorInf
pInfo
->
start
=
j
;
}
else
if
(
tsList
[
j
]
-
pInfo
->
prevTs
<=
gap
)
{
pInfo
->
curWindow
.
ekey
=
tsList
[
j
];
pInfo
->
prevTs
=
tsList
[
j
];
//
pInfo->prevTs = tsList[j];
pInfo
->
numOfRows
+=
1
;
pInfo
->
start
=
j
;
if
(
j
==
0
&&
pInfo
->
start
!=
0
)
{
pInfo
->
numOfRows
=
1
;
pInfo
->
start
=
0
;
}
}
else
{
// start a new session window
SResultRow
*
pResult
=
NULL
;
pInfo
->
curWindow
.
ekey
=
pInfo
->
curWindow
.
skey
;
int32_t
ret
=
setWindowOutputBufByKey
(
pRuntimeEnv
,
&
pBInfo
->
resultRowInfo
,
&
pInfo
->
curWindow
,
masterScan
,
&
pResult
,
item
->
groupIndex
,
pBInfo
->
pCtx
,
pOperator
->
numOfOutput
,
pBInfo
->
rowCellInfoOffset
);
...
...
@@ -1364,6 +1371,7 @@ static void doSessionWindowAggImpl(SOperatorInfo* pOperator, SSWindowOperatorInf
SResultRow
*
pResult
=
NULL
;
pInfo
->
curWindow
.
ekey
=
pInfo
->
curWindow
.
skey
;
int32_t
ret
=
setWindowOutputBufByKey
(
pRuntimeEnv
,
&
pBInfo
->
resultRowInfo
,
&
pInfo
->
curWindow
,
masterScan
,
&
pResult
,
item
->
groupIndex
,
pBInfo
->
pCtx
,
pOperator
->
numOfOutput
,
pBInfo
->
rowCellInfoOffset
);
...
...
@@ -1391,12 +1399,12 @@ static void setResultRowKey(SResultRow* pResultRow, char* pData, int16_t type) {
}
}
static
int32_t
setGroupResultOutputBuf
(
SQueryRuntimeEnv
*
pRuntimeEnv
,
S
GroupbyOperatorInfo
*
pI
nfo
,
int32_t
numOfCols
,
char
*
pData
,
int16_t
type
,
int16_t
bytes
,
int32_t
groupIndex
)
{
static
int32_t
setGroupResultOutputBuf
(
SQueryRuntimeEnv
*
pRuntimeEnv
,
S
OptrBasicInfo
*
bi
nfo
,
int32_t
numOfCols
,
char
*
pData
,
int16_t
type
,
int16_t
bytes
,
int32_t
groupIndex
)
{
SDiskbasedResultBuf
*
pResultBuf
=
pRuntimeEnv
->
pResultBuf
;
int32_t
*
rowCellInfoOffset
=
pInfo
->
binfo
.
rowCellInfoOffset
;
SResultRowInfo
*
pResultRowInfo
=
&
pInfo
->
binfo
.
resultRowInfo
;
SQLFunctionCtx
*
pCtx
=
pInfo
->
binfo
.
pCtx
;
int32_t
*
rowCellInfoOffset
=
binfo
->
rowCellInfoOffset
;
SResultRowInfo
*
pResultRowInfo
=
&
binfo
->
resultRowInfo
;
SQLFunctionCtx
*
pCtx
=
binfo
->
pCtx
;
// not assign result buffer yet, add new result buffer, TODO remove it
char
*
d
=
pData
;
...
...
@@ -1767,6 +1775,11 @@ static int32_t setupQueryRuntimeEnv(SQueryRuntimeEnv *pRuntimeEnv, int32_t numOf
}
break
;
}
case
OP_StateWindow
:
{
pRuntimeEnv
->
proot
=
createStatewindowOperatorInfo
(
pRuntimeEnv
,
pRuntimeEnv
->
proot
,
pQueryAttr
->
pExpr1
,
pQueryAttr
->
numOfOutput
);
setTableScanFilterOperatorInfo
(
pRuntimeEnv
->
proot
->
upstream
[
0
]
->
info
,
pRuntimeEnv
->
proot
);
break
;
}
case
OP_Limit
:
{
pRuntimeEnv
->
proot
=
createLimitOperatorInfo
(
pRuntimeEnv
,
pRuntimeEnv
->
proot
);
...
...
@@ -2109,6 +2122,8 @@ static bool onlyFirstQuery(SQueryAttr *pQueryAttr) { return onlyOneQueryType(pQu
static
bool
onlyLastQuery
(
SQueryAttr
*
pQueryAttr
)
{
return
onlyOneQueryType
(
pQueryAttr
,
TSDB_FUNC_LAST
,
TSDB_FUNC_LAST_DST
);
}
static
bool
notContainSessionOrStateWindow
(
SQueryAttr
*
pQueryAttr
)
{
return
!
(
pQueryAttr
->
sw
.
gap
>
0
||
pQueryAttr
->
stateWindow
);
}
static
int32_t
updateBlockLoadStatus
(
SQueryAttr
*
pQuery
,
int32_t
status
)
{
bool
hasFirstLastFunc
=
false
;
bool
hasOtherFunc
=
false
;
...
...
@@ -2212,7 +2227,7 @@ static void changeExecuteScanOrder(SQInfo *pQInfo, SQueryTableMsg* pQueryMsg, bo
}
pQueryAttr
->
order
.
order
=
TSDB_ORDER_ASC
;
}
else
if
(
onlyLastQuery
(
pQueryAttr
))
{
}
else
if
(
onlyLastQuery
(
pQueryAttr
)
&&
notContainSessionOrStateWindow
(
pQueryAttr
)
)
{
if
(
QUERY_IS_ASC_QUERY
(
pQueryAttr
))
{
qDebug
(
msg
,
pQInfo
,
"only-last"
,
pQueryAttr
->
order
.
order
,
TSDB_ORDER_DESC
,
pQueryAttr
->
window
.
skey
,
pQueryAttr
->
window
.
ekey
,
pQueryAttr
->
window
.
ekey
,
pQueryAttr
->
window
.
skey
);
...
...
@@ -3204,7 +3219,7 @@ void finalizeQueryResult(SOperatorInfo* pOperator, SQLFunctionCtx* pCtx, SResult
SQueryAttr
*
pQueryAttr
=
pRuntimeEnv
->
pQueryAttr
;
int32_t
numOfOutput
=
pOperator
->
numOfOutput
;
if
(
pQueryAttr
->
groupbyColumn
||
QUERY_IS_INTERVAL_QUERY
(
pQueryAttr
)
||
pQueryAttr
->
sw
.
gap
>
0
)
{
if
(
pQueryAttr
->
groupbyColumn
||
QUERY_IS_INTERVAL_QUERY
(
pQueryAttr
)
||
pQueryAttr
->
sw
.
gap
>
0
||
pQueryAttr
->
stateWindow
)
{
// for each group result, call the finalize function for each column
if
(
pQueryAttr
->
groupbyColumn
)
{
closeAllResultRows
(
pResultRowInfo
);
...
...
@@ -4514,6 +4529,12 @@ void setTableScanFilterOperatorInfo(STableScanInfo* pTableScanInfo, SOperatorInf
}
else
if
(
pDownstream
->
operatorType
==
OP_SessionWindow
)
{
SSWindowOperatorInfo
*
pInfo
=
pDownstream
->
info
;
pTableScanInfo
->
pCtx
=
pInfo
->
binfo
.
pCtx
;
pTableScanInfo
->
pResultRowInfo
=
&
pInfo
->
binfo
.
resultRowInfo
;
pTableScanInfo
->
rowCellInfoOffset
=
pInfo
->
binfo
.
rowCellInfoOffset
;
}
else
if
(
pDownstream
->
operatorType
==
OP_StateWindow
)
{
SStateWindowOperatorInfo
*
pInfo
=
pDownstream
->
info
;
pTableScanInfo
->
pCtx
=
pInfo
->
binfo
.
pCtx
;
pTableScanInfo
->
pResultRowInfo
=
&
pInfo
->
binfo
.
resultRowInfo
;
pTableScanInfo
->
rowCellInfoOffset
=
pInfo
->
binfo
.
rowCellInfoOffset
;
...
...
@@ -4625,7 +4646,6 @@ static void destroyGlobalAggOperatorInfo(void* param, int32_t numOfOutput) {
tfree
(
pInfo
->
prevRow
);
tfree
(
pInfo
->
currentGroupColData
);
}
static
void
destroySlimitOperatorInfo
(
void
*
param
,
int32_t
numOfOutput
)
{
SSLimitOperatorInfo
*
pInfo
=
(
SSLimitOperatorInfo
*
)
param
;
taosArrayDestroy
(
pInfo
->
orderColumnList
);
...
...
@@ -5131,6 +5151,130 @@ static SSDataBlock* doSTableIntervalAgg(void* param, bool* newgroup) {
return
pIntervalInfo
->
pRes
;
}
static
void
doStateWindowAggImpl
(
SOperatorInfo
*
pOperator
,
SStateWindowOperatorInfo
*
pInfo
,
SSDataBlock
*
pSDataBlock
)
{
SQueryRuntimeEnv
*
pRuntimeEnv
=
pOperator
->
pRuntimeEnv
;
STableQueryInfo
*
item
=
pRuntimeEnv
->
current
;
SColumnInfoData
*
pColInfoData
=
taosArrayGet
(
pSDataBlock
->
pDataBlock
,
pInfo
->
colIndex
);
SOptrBasicInfo
*
pBInfo
=
&
pInfo
->
binfo
;
bool
masterScan
=
IS_MASTER_SCAN
(
pRuntimeEnv
);
int16_t
bytes
=
pColInfoData
->
info
.
bytes
;
int16_t
type
=
pColInfoData
->
info
.
type
;
SColumnInfoData
*
pTsColInfoData
=
taosArrayGet
(
pSDataBlock
->
pDataBlock
,
0
);
TSKEY
*
tsList
=
(
TSKEY
*
)
pTsColInfoData
->
pData
;
pInfo
->
numOfRows
=
0
;
for
(
int32_t
j
=
0
;
j
<
pSDataBlock
->
info
.
rows
;
++
j
)
{
char
*
val
=
((
char
*
)
pColInfoData
->
pData
)
+
bytes
*
j
;
if
(
isNull
(
val
,
type
))
{
continue
;
}
if
(
pInfo
->
prevData
==
NULL
)
{
pInfo
->
prevData
=
malloc
(
bytes
);
memcpy
(
pInfo
->
prevData
,
val
,
bytes
);
pInfo
->
numOfRows
=
1
;
pInfo
->
curWindow
.
skey
=
tsList
[
j
];
pInfo
->
curWindow
.
ekey
=
tsList
[
j
];
pInfo
->
start
=
j
;
}
else
if
(
memcmp
(
pInfo
->
prevData
,
val
,
bytes
)
==
0
)
{
pInfo
->
curWindow
.
ekey
=
tsList
[
j
];
pInfo
->
numOfRows
+=
1
;
//pInfo->start = j;
if
(
j
==
0
&&
pInfo
->
start
!=
0
)
{
pInfo
->
numOfRows
=
1
;
pInfo
->
start
=
0
;
}
}
else
{
SResultRow
*
pResult
=
NULL
;
pInfo
->
curWindow
.
ekey
=
pInfo
->
curWindow
.
skey
;
int32_t
ret
=
setWindowOutputBufByKey
(
pRuntimeEnv
,
&
pBInfo
->
resultRowInfo
,
&
pInfo
->
curWindow
,
masterScan
,
&
pResult
,
item
->
groupIndex
,
pBInfo
->
pCtx
,
pOperator
->
numOfOutput
,
pBInfo
->
rowCellInfoOffset
);
if
(
ret
!=
TSDB_CODE_SUCCESS
)
{
// null data, too many state code
longjmp
(
pRuntimeEnv
->
env
,
TSDB_CODE_QRY_APP_ERROR
);
}
doApplyFunctions
(
pRuntimeEnv
,
pBInfo
->
pCtx
,
&
pInfo
->
curWindow
,
pInfo
->
start
,
pInfo
->
numOfRows
,
tsList
,
pSDataBlock
->
info
.
rows
,
pOperator
->
numOfOutput
);
pInfo
->
curWindow
.
skey
=
tsList
[
j
];
pInfo
->
curWindow
.
ekey
=
tsList
[
j
];
memcpy
(
pInfo
->
prevData
,
val
,
bytes
);
pInfo
->
numOfRows
=
1
;
pInfo
->
start
=
j
;
}
}
SResultRow
*
pResult
=
NULL
;
pInfo
->
curWindow
.
ekey
=
pInfo
->
curWindow
.
skey
;
int32_t
ret
=
setWindowOutputBufByKey
(
pRuntimeEnv
,
&
pBInfo
->
resultRowInfo
,
&
pInfo
->
curWindow
,
masterScan
,
&
pResult
,
item
->
groupIndex
,
pBInfo
->
pCtx
,
pOperator
->
numOfOutput
,
pBInfo
->
rowCellInfoOffset
);
if
(
ret
!=
TSDB_CODE_SUCCESS
)
{
// null data, too many state code
longjmp
(
pRuntimeEnv
->
env
,
TSDB_CODE_QRY_APP_ERROR
);
}
doApplyFunctions
(
pRuntimeEnv
,
pBInfo
->
pCtx
,
&
pInfo
->
curWindow
,
pInfo
->
start
,
pInfo
->
numOfRows
,
tsList
,
pSDataBlock
->
info
.
rows
,
pOperator
->
numOfOutput
);
}
static
SSDataBlock
*
doStateWindowAgg
(
void
*
param
,
bool
*
newgroup
)
{
SOperatorInfo
*
pOperator
=
(
SOperatorInfo
*
)
param
;
if
(
pOperator
->
status
==
OP_EXEC_DONE
)
{
return
NULL
;
}
SStateWindowOperatorInfo
*
pWindowInfo
=
pOperator
->
info
;
SOptrBasicInfo
*
pBInfo
=
&
pWindowInfo
->
binfo
;
SQueryRuntimeEnv
*
pRuntimeEnv
=
pOperator
->
pRuntimeEnv
;
if
(
pOperator
->
status
==
OP_RES_TO_RETURN
)
{
toSSDataBlock
(
&
pRuntimeEnv
->
groupResInfo
,
pRuntimeEnv
,
pBInfo
->
pRes
);
if
(
pBInfo
->
pRes
->
info
.
rows
==
0
||
!
hasRemainDataInCurrentGroup
(
&
pRuntimeEnv
->
groupResInfo
))
{
pOperator
->
status
=
OP_EXEC_DONE
;
}
return
pBInfo
->
pRes
;
}
SQueryAttr
*
pQueryAttr
=
pRuntimeEnv
->
pQueryAttr
;
int32_t
order
=
pQueryAttr
->
order
.
order
;
STimeWindow
win
=
pQueryAttr
->
window
;
SOperatorInfo
*
upstream
=
pOperator
->
upstream
[
0
];
while
(
1
)
{
SSDataBlock
*
pBlock
=
upstream
->
exec
(
upstream
,
newgroup
);
if
(
pBlock
==
NULL
)
{
break
;
}
setInputDataBlock
(
pOperator
,
pBInfo
->
pCtx
,
pBlock
,
pQueryAttr
->
order
.
order
);
if
(
pWindowInfo
->
colIndex
==
-
1
)
{
pWindowInfo
->
colIndex
=
getGroupbyColumnIndex
(
pRuntimeEnv
->
pQueryAttr
->
pGroupbyExpr
,
pBlock
);
}
doStateWindowAggImpl
(
pOperator
,
pWindowInfo
,
pBlock
);
}
// restore the value
pQueryAttr
->
order
.
order
=
order
;
pQueryAttr
->
window
=
win
;
pOperator
->
status
=
OP_RES_TO_RETURN
;
closeAllResultRows
(
&
pBInfo
->
resultRowInfo
);
setQueryStatus
(
pRuntimeEnv
,
QUERY_COMPLETED
);
finalizeQueryResult
(
pOperator
,
pBInfo
->
pCtx
,
&
pBInfo
->
resultRowInfo
,
pBInfo
->
rowCellInfoOffset
);
initGroupResInfo
(
&
pRuntimeEnv
->
groupResInfo
,
&
pBInfo
->
resultRowInfo
);
toSSDataBlock
(
&
pRuntimeEnv
->
groupResInfo
,
pRuntimeEnv
,
pBInfo
->
pRes
);
if
(
pBInfo
->
pRes
->
info
.
rows
==
0
||
!
hasRemainDataInCurrentGroup
(
&
pRuntimeEnv
->
groupResInfo
))
{
pOperator
->
status
=
OP_EXEC_DONE
;
}
return
pBInfo
->
pRes
->
info
.
rows
==
0
?
NULL
:
pBInfo
->
pRes
;
}
static
SSDataBlock
*
doSessionWindowAgg
(
void
*
param
,
bool
*
newgroup
)
{
SOperatorInfo
*
pOperator
=
(
SOperatorInfo
*
)
param
;
if
(
pOperator
->
status
==
OP_EXEC_DONE
)
{
...
...
@@ -5140,6 +5284,7 @@ static SSDataBlock* doSessionWindowAgg(void* param, bool* newgroup) {
SSWindowOperatorInfo
*
pWindowInfo
=
pOperator
->
info
;
SOptrBasicInfo
*
pBInfo
=
&
pWindowInfo
->
binfo
;
SQueryRuntimeEnv
*
pRuntimeEnv
=
pOperator
->
pRuntimeEnv
;
if
(
pOperator
->
status
==
OP_RES_TO_RETURN
)
{
toSSDataBlock
(
&
pRuntimeEnv
->
groupResInfo
,
pRuntimeEnv
,
pBInfo
->
pRes
);
...
...
@@ -5152,6 +5297,7 @@ static SSDataBlock* doSessionWindowAgg(void* param, bool* newgroup) {
}
SQueryAttr
*
pQueryAttr
=
pRuntimeEnv
->
pQueryAttr
;
//pQueryAttr->order.order = TSDB_ORDER_ASC;
int32_t
order
=
pQueryAttr
->
order
.
order
;
STimeWindow
win
=
pQueryAttr
->
window
;
...
...
@@ -5389,7 +5535,7 @@ SOperatorInfo* createAggregateOperatorInfo(SQueryRuntimeEnv* pRuntimeEnv, SOpera
pOperator
->
pRuntimeEnv
=
pRuntimeEnv
;
pOperator
->
exec
=
doAggregate
;
pOperator
->
cleanup
=
destroy
Basic
OperatorInfo
;
pOperator
->
cleanup
=
destroy
Agg
OperatorInfo
;
appendUpstream
(
pOperator
,
upstream
);
return
pOperator
;
...
...
@@ -5409,6 +5555,19 @@ static void destroyBasicOperatorInfo(void* param, int32_t numOfOutput) {
SOptrBasicInfo
*
pInfo
=
(
SOptrBasicInfo
*
)
param
;
doDestroyBasicInfo
(
pInfo
,
numOfOutput
);
}
static
void
destroyStateWindowOperatorInfo
(
void
*
param
,
int32_t
numOfOutput
)
{
SStateWindowOperatorInfo
*
pInfo
=
(
SStateWindowOperatorInfo
*
)
param
;
doDestroyBasicInfo
(
&
pInfo
->
binfo
,
numOfOutput
);
tfree
(
pInfo
->
prevData
);
}
static
void
destroyAggOperatorInfo
(
void
*
param
,
int32_t
numOfOutput
)
{
SAggOperatorInfo
*
pInfo
=
(
SAggOperatorInfo
*
)
param
;
doDestroyBasicInfo
(
&
pInfo
->
binfo
,
numOfOutput
);
}
static
void
destroySWindowOperatorInfo
(
void
*
param
,
int32_t
numOfOutput
)
{
SSWindowOperatorInfo
*
pInfo
=
(
SSWindowOperatorInfo
*
)
param
;
doDestroyBasicInfo
(
&
pInfo
->
binfo
,
numOfOutput
);
}
static
void
destroySFillOperatorInfo
(
void
*
param
,
int32_t
numOfOutput
)
{
SFillOperatorInfo
*
pInfo
=
(
SFillOperatorInfo
*
)
param
;
...
...
@@ -5463,7 +5622,7 @@ SOperatorInfo* createMultiTableAggOperatorInfo(SQueryRuntimeEnv* pRuntimeEnv, SO
pOperator
->
pRuntimeEnv
=
pRuntimeEnv
;
pOperator
->
exec
=
doSTableAggregate
;
pOperator
->
cleanup
=
destroy
Basic
OperatorInfo
;
pOperator
->
cleanup
=
destroy
Agg
OperatorInfo
;
appendUpstream
(
pOperator
,
upstream
);
return
pOperator
;
...
...
@@ -5589,7 +5748,29 @@ SOperatorInfo* createTimeIntervalOperatorInfo(SQueryRuntimeEnv* pRuntimeEnv, SOp
appendUpstream
(
pOperator
,
upstream
);
return
pOperator
;
}
SOperatorInfo
*
createStatewindowOperatorInfo
(
SQueryRuntimeEnv
*
pRuntimeEnv
,
SOperatorInfo
*
upstream
,
SExprInfo
*
pExpr
,
int32_t
numOfOutput
)
{
SStateWindowOperatorInfo
*
pInfo
=
calloc
(
1
,
sizeof
(
SStateWindowOperatorInfo
));
pInfo
->
colIndex
=
-
1
;
pInfo
->
binfo
.
pCtx
=
createSQLFunctionCtx
(
pRuntimeEnv
,
pExpr
,
numOfOutput
,
&
pInfo
->
binfo
.
rowCellInfoOffset
);
pInfo
->
binfo
.
pRes
=
createOutputBuf
(
pExpr
,
numOfOutput
,
pRuntimeEnv
->
resultInfo
.
capacity
);
initResultRowInfo
(
&
pInfo
->
binfo
.
resultRowInfo
,
8
,
TSDB_DATA_TYPE_INT
);
SOperatorInfo
*
pOperator
=
calloc
(
1
,
sizeof
(
SOperatorInfo
));
pOperator
->
name
=
"StateWindowOperator"
;
pOperator
->
operatorType
=
OP_StateWindow
;
pOperator
->
blockingOptr
=
true
;
pOperator
->
status
=
OP_IN_EXECUTING
;
pOperator
->
pExpr
=
pExpr
;
pOperator
->
numOfOutput
=
numOfOutput
;
pOperator
->
info
=
pInfo
;
pOperator
->
pRuntimeEnv
=
pRuntimeEnv
;
pOperator
->
exec
=
doStateWindowAgg
;
pOperator
->
cleanup
=
destroyStateWindowOperatorInfo
;
appendUpstream
(
pOperator
,
upstream
);
return
pOperator
;
}
SOperatorInfo
*
createSWindowOperatorInfo
(
SQueryRuntimeEnv
*
pRuntimeEnv
,
SOperatorInfo
*
upstream
,
SExprInfo
*
pExpr
,
int32_t
numOfOutput
)
{
SSWindowOperatorInfo
*
pInfo
=
calloc
(
1
,
sizeof
(
SSWindowOperatorInfo
));
...
...
@@ -5609,7 +5790,7 @@ SOperatorInfo* createSWindowOperatorInfo(SQueryRuntimeEnv* pRuntimeEnv, SOperato
pOperator
->
info
=
pInfo
;
pOperator
->
pRuntimeEnv
=
pRuntimeEnv
;
pOperator
->
exec
=
doSessionWindowAgg
;
pOperator
->
cleanup
=
destroy
Basic
OperatorInfo
;
pOperator
->
cleanup
=
destroy
SWindow
OperatorInfo
;
appendUpstream
(
pOperator
,
upstream
);
return
pOperator
;
...
...
@@ -6901,6 +7082,7 @@ SQInfo* createQInfoImpl(SQueryTableMsg* pQueryMsg, SGroupbyExpr* pGroupbyExpr, S
pQueryAttr
->
simpleAgg
=
pQueryMsg
->
simpleAgg
;
pQueryAttr
->
pointInterpQuery
=
pQueryMsg
->
pointInterpQuery
;
pQueryAttr
->
needReverseScan
=
pQueryMsg
->
needReverseScan
;
pQueryAttr
->
stateWindow
=
pQueryMsg
->
stateWindow
;
pQueryAttr
->
vgId
=
vgId
;
pQueryAttr
->
tableCols
=
calloc
(
numOfCols
,
sizeof
(
SSingleColumnFilterInfo
));
...
...
src/query/src/qPlan.c
浏览文件 @
b289b28a
...
...
@@ -592,6 +592,14 @@ SArray* createExecOperatorPlan(SQueryAttr* pQueryAttr) {
op
=
OP_SessionWindow
;
taosArrayPush
(
plan
,
&
op
);
if
(
pQueryAttr
->
pExpr2
!=
NULL
)
{
op
=
OP_Arithmetic
;
taosArrayPush
(
plan
,
&
op
);
}
}
else
if
(
pQueryAttr
->
stateWindow
)
{
op
=
OP_StateWindow
;
taosArrayPush
(
plan
,
&
op
);
if
(
pQueryAttr
->
pExpr2
!=
NULL
)
{
op
=
OP_Arithmetic
;
taosArrayPush
(
plan
,
&
op
);
...
...
src/query/src/qSqlParser.c
浏览文件 @
b289b28a
...
...
@@ -726,9 +726,9 @@ void tSetColumnType(TAOS_FIELD *pField, SStrToken *type) {
* extract the select info out of sql string
*/
SSqlNode
*
tSetQuerySqlNode
(
SStrToken
*
pSelectToken
,
SArray
*
pSelNodeList
,
SRelationInfo
*
pFrom
,
tSqlExpr
*
pWhere
,
SArray
*
pGroupby
,
SArray
*
pSortOrder
,
SIntervalVal
*
pInterval
,
SSessionWindowVal
*
pSession
,
SStrToken
*
pSliding
,
SArray
*
pFill
,
SLimitVal
*
pLimit
,
SLimitVal
*
ps
Limit
,
tSqlExpr
*
pHaving
)
{
SArray
*
pGroupby
,
SArray
*
pSortOrder
,
SIntervalVal
*
pInterval
,
SSessionWindowVal
*
pSession
,
SWindowStateVal
*
pWindowStateVal
,
SStrToken
*
pSliding
,
SArray
*
pFill
,
SLimitVal
*
p
Limit
,
SLimitVal
*
psLimit
,
tSqlExpr
*
pHaving
)
{
assert
(
pSelNodeList
!=
NULL
);
SSqlNode
*
pSqlNode
=
calloc
(
1
,
sizeof
(
SSqlNode
));
...
...
@@ -779,6 +779,12 @@ SSqlNode *tSetQuerySqlNode(SStrToken *pSelectToken, SArray *pSelNodeList, SRelat
TPARSER_SET_NONE_TOKEN
(
pSqlNode
->
sessionVal
.
col
);
}
if
(
pWindowStateVal
!=
NULL
)
{
pSqlNode
->
windowstateVal
=
*
pWindowStateVal
;
}
else
{
TPARSER_SET_NONE_TOKEN
(
pSqlNode
->
windowstateVal
.
col
);
}
return
pSqlNode
;
}
...
...
src/query/src/sql.c
浏览文件 @
b289b28a
...
...
@@ -97,27 +97,28 @@
#endif
/************* Begin control #defines *****************************************/
#define YYCODETYPE unsigned short int
#define YYNOCODE 26
5
#define YYNOCODE 26
7
#define YYACTIONTYPE unsigned short int
#define ParseTOKENTYPE SStrToken
typedef
union
{
int
yyinit
;
ParseTOKENTYPE
yy0
;
SCreatedTableInfo
yy96
;
SRelationInfo
*
yy148
;
tSqlExpr
*
yy178
;
SCreateAcctInfo
yy187
;
SArray
*
yy285
;
TAOS_FIELD
yy295
;
SSqlNode
*
yy344
;
tVariant
yy362
;
SIntervalVal
yy376
;
SLimitVal
yy438
;
int
yy460
;
SCreateTableSql
*
yy470
;
SSessionWindowVal
yy523
;
int64_t
yy525
;
SCreateDbInfo
yy526
;
TAOS_FIELD
yy27
;
SWindowStateVal
yy76
;
SCreateDbInfo
yy114
;
SSqlNode
*
yy124
;
SCreateAcctInfo
yy183
;
SCreatedTableInfo
yy192
;
SArray
*
yy193
;
SCreateTableSql
*
yy270
;
int
yy312
;
SRelationInfo
*
yy332
;
SIntervalVal
yy392
;
tVariant
yy442
;
SSessionWindowVal
yy447
;
tSqlExpr
*
yy454
;
int64_t
yy473
;
SLimitVal
yy482
;
}
YYMINORTYPE
;
#ifndef YYSTACKDEPTH
#define YYSTACKDEPTH 100
...
...
@@ -127,17 +128,17 @@ typedef union {
#define ParseARG_FETCH SSqlInfo* pInfo = yypParser->pInfo
#define ParseARG_STORE yypParser->pInfo = pInfo
#define YYFALLBACK 1
#define YYNSTATE 32
3
#define YYNRULE 27
3
#define YYNTOKEN 18
7
#define YY_MAX_SHIFT 32
2
#define YY_MIN_SHIFTREDUCE 5
18
#define YY_MAX_SHIFTREDUCE 79
0
#define YY_ERROR_ACTION 79
1
#define YY_ACCEPT_ACTION 79
2
#define YY_NO_ACTION
793
#define YY_MIN_REDUCE
794
#define YY_MAX_REDUCE 10
66
#define YYNSTATE 32
7
#define YYNRULE 27
5
#define YYNTOKEN 18
8
#define YY_MAX_SHIFT 32
6
#define YY_MIN_SHIFTREDUCE 5
23
#define YY_MAX_SHIFTREDUCE 79
7
#define YY_ERROR_ACTION 79
8
#define YY_ACCEPT_ACTION 79
9
#define YY_NO_ACTION
800
#define YY_MIN_REDUCE
801
#define YY_MAX_REDUCE 10
75
/************* End control #defines *******************************************/
/* Define the yytestcase() macro to be a no-op if is not already defined
...
...
@@ -203,266 +204,266 @@ typedef union {
** yy_default[] Default action for each state.
**
*********** Begin parsing tables **********************************************/
#define YY_ACTTAB_COUNT (
695
)
#define YY_ACTTAB_COUNT (
700
)
static
const
YYACTIONTYPE
yy_action
[]
=
{
/* 0 */
96
2
,
566
,
209
,
320
,
70
,
18
,
215
,
953
,
186
,
567
,
/* 10 */
79
2
,
322
,
184
,
48
,
49
,
144
,
52
,
53
,
218
,
1048
,
/* 20 */
22
1
,
42
,
212
,
51
,
270
,
56
,
54
,
58
,
55
,
927
,
/* 30 */
6
45
,
186
,
941
,
47
,
46
,
186
,
926
,
45
,
44
,
43
,
/* 40 */
48
,
49
,
10
47
,
52
,
53
,
217
,
1048
,
221
,
42
,
566
,
/* 50 */
51
,
27
0
,
56
,
54
,
58
,
55
,
953
,
567
,
296
,
295
,
/* 60 */
47
,
46
,
9
59
,
144
,
45
,
44
,
43
,
49
,
31
,
52
,
/* 70 */
53
,
248
,
137
,
221
,
42
,
83
,
51
,
270
,
56
,
54
,
/* 80 */
58
,
55
,
2
86
,
997
,
88
,
265
,
47
,
46
,
72
,
306
,
/* 90 */
45
,
44
,
43
,
5
19
,
520
,
521
,
522
,
523
,
524
,
525
,
/* 100 */
5
26
,
527
,
528
,
529
,
530
,
531
,
321
,
233
,
286
,
210
,
/* 110 */
71
,
5
66
,
937
,
48
,
49
,
31
,
52
,
53
,
929
,
567
,
/* 120 */
22
1
,
42
,
566
,
51
,
270
,
56
,
54
,
58
,
55
,
267
,
/* 130 */
567
,
81
,
734
,
47
,
46
,
255
,
254
,
45
,
44
,
43
,
/* 140 */
48
,
50
,
939
,
52
,
53
,
232
,
190
,
221
,
42
,
240
,
/* 150 */
51
,
27
0
,
56
,
54
,
58
,
55
,
211
,
244
,
243
,
938
,
/* 160 */
47
,
46
,
1
,
158
,
45
,
44
,
43
,
24
,
284
,
315
,
/* 170 */
31
4
,
283
,
282
,
281
,
313
,
280
,
312
,
311
,
310
,
279
,
/* 180 */
3
09
,
308
,
901
,
31
,
889
,
890
,
891
,
892
,
893
,
894
,
/* 190 */
895
,
896
,
897
,
898
,
899
,
900
,
902
,
903
,
52
,
53
,
/* 200 */
715
,
716
,
221
,
42
,
230
,
51
,
270
,
56
,
54
,
58
,
/* 210 */
55
,
935
,
19
,
1044
,
234
,
47
,
46
,
293
,
292
,
45
,
/* 220 */
44
,
43
,
22
0
,
749
,
224
,
25
,
738
,
938
,
741
,
195
,
/* 230 */
7
44
,
220
,
749
,
3
,
171
,
738
,
196
,
741
,
740
,
744
,
/* 240 */
743
,
121
,
120
,
194
,
45
,
44
,
43
,
1043
,
56
,
54
,
/* 250 */
58
,
55
,
681
,
227
,
205
,
206
,
47
,
46
,
269
,
8
,
/* 260 */
45
,
44
,
43
,
20
5
,
206
,
1042
,
77
,
739
,
24
,
742
,
/* 270 */
31
5
,
314
,
77
,
231
,
37
,
313
,
288
,
312
,
311
,
310
,
/* 280 */
37
,
3
09
,
308
,
909
,
108
,
669
,
907
,
908
,
666
,
306
,
/* 290 */
667
,
910
,
668
,
912
,
913
,
911
,
85
,
914
,
915
,
106
,
/* 300 */
10
0
,
111
,
247
,
203
,
69
,
31
,
110
,
116
,
119
,
109
,
/* 310 */
202
,
5
,
34
,
160
,
226
,
113
,
235
,
236
,
159
,
95
,
/* 320 */
90
,
94
,
228
,
31
,
31
,
57
,
684
,
924
,
925
,
30
,
/* 330 */
928
,
31
,
750
,
31
,
57
,
178
,
176
,
174
,
746
,
144
,
/* 340 */
941
,
750
,
173
,
124
,
123
,
122
,
225
,
746
,
941
,
938
,
/* 350 */
747
,
47
,
46
,
204
,
745
,
45
,
44
,
43
,
319
,
318
,
/* 360 */
12
9
,
316
,
144
,
745
,
289
,
290
,
271
,
938
,
938
,
135
,
/* 370 */
133
,
132
,
294
,
953
,
298
,
938
,
13
,
938
,
188
,
748
,
/* 380 */
87
,
840
,
84
,
736
,
74
,
170
,
849
,
941
,
213
,
841
,
/* 390 */
170
,
249
,
251
,
170
,
670
,
32
,
700
,
75
,
219
,
706
,
/* 400 */
139
,
189
,
707
,
61
,
688
,
251
,
21
,
996
,
770
,
62
,
/* 410 */
751
,
191
,
20
,
655
,
20
,
65
,
273
,
32
,
657
,
737
,
/* 420 */
32
,
275
,
61
,
1058
,
656
,
86
,
29
,
185
,
61
,
276
,
/* 430 */
82
,
63
,
940
,
99
,
98
,
66
,
15
,
14
,
192
,
105
,
/* 440 */
10
4
,
68
,
6
,
644
,
118
,
117
,
193
,
17
,
16
,
673
,
/* 450 */
19
9
,
674
,
200
,
671
,
198
,
672
,
183
,
197
,
187
,
100
7
,
/* 460 */
245
,
1006
,
753
,
222
,
40
,
1003
,
1002
,
223
,
297
,
136
,
/* 470 */
9
89
,
961
,
972
,
969
,
988
,
970
,
954
,
252
,
974
,
13
8
,
/* 480 */
9
36
,
142
,
154
,
134
,
256
,
214
,
905
,
155
,
699
,
150
,
/* 490 */
9
34
,
258
,
145
,
156
,
260
,
157
,
148
,
146
,
951
,
147
,
/* 500 */
59
,
852
,
67
,
278
,
263
,
38
,
181
,
64
,
35
,
268
,
/* 510 */
2
66
,
287
,
848
,
264
,
1063
,
96
,
1062
,
1060
,
161
,
291
,
/* 520 */
10
57
,
102
,
1056
,
1054
,
162
,
870
,
36
,
33
,
149
,
262
,
/* 530 */
39
,
182
,
837
,
112
,
835
,
114
,
115
,
833
,
832
,
237
,
/* 540 */
172
,
830
,
257
,
829
,
828
,
827
,
826
,
825
,
175
,
177
,
/* 550 */
82
2
,
820
,
818
,
816
,
179
,
813
,
180
,
41
,
250
,
73
,
/* 560 */
307
,
78
,
259
,
107
,
990
,
299
,
300
,
301
,
302
,
303
,
/* 570 */
304
,
207
,
305
,
229
,
317
,
277
,
790
,
238
,
239
,
789
,
/* 580 */
208
,
201
,
91
,
92
,
241
,
242
,
788
,
776
,
775
,
246
,
/* 590 */
831
,
251
,
272
,
125
,
126
,
824
,
165
,
164
,
871
,
168
,
/* 600 */
16
3
,
166
,
167
,
169
,
127
,
823
,
2
,
128
,
815
,
814
,
/* 610 */
9
,
26
,
4
,
676
,
76
,
701
,
216
,
151
,
152
,
153
,
/* 620 */
253
,
79
,
917
,
140
,
10
,
704
,
141
,
80
,
261
,
754
,
/* 630 */
7
08
,
143
,
11
,
89
,
752
,
27
,
7
,
28
,
12
,
22
,
/* 640 */
274
,
23
,
608
,
604
,
87
,
602
,
601
,
600
,
597
,
570
,
/* 650 */
285
,
93
,
97
,
32
,
647
,
60
,
646
,
643
,
592
,
590
,
/* 660 */
101
,
103
,
582
,
588
,
584
,
586
,
580
,
578
,
611
,
610
,
/* 670 */
609
,
607
,
606
,
605
,
603
,
599
,
598
,
61
,
568
,
535
,
/* 680 */
533
,
794
,
793
,
793
,
793
,
793
,
793
,
793
,
793
,
793
,
/* 690 */
793
,
793
,
793
,
130
,
131
,
/* 0 */
96
9
,
571
,
211
,
324
,
934
,
18
,
217
,
186
,
188
,
572
,
/* 10 */
79
9
,
326
,
192
,
48
,
49
,
145
,
52
,
53
,
220
,
1057
,
/* 20 */
22
3
,
42
,
275
,
51
,
274
,
56
,
54
,
58
,
55
,
1053
,
/* 30 */
6
50
,
188
,
948
,
47
,
46
,
188
,
228
,
45
,
44
,
43
,
/* 40 */
48
,
49
,
10
56
,
52
,
53
,
219
,
1057
,
223
,
42
,
571
,
/* 50 */
51
,
27
4
,
56
,
54
,
58
,
55
,
960
,
572
,
300
,
299
,
/* 60 */
47
,
46
,
9
48
,
966
,
45
,
44
,
43
,
49
,
31
,
52
,
/* 70 */
53
,
138
,
250
,
223
,
42
,
1067
,
51
,
274
,
56
,
54
,
/* 80 */
58
,
55
,
2
71
,
290
,
82
,
1052
,
47
,
46
,
89
,
234
,
/* 90 */
45
,
44
,
43
,
5
24
,
525
,
526
,
527
,
528
,
529
,
530
,
/* 100 */
5
31
,
532
,
533
,
534
,
535
,
536
,
325
,
571
,
290
,
212
,
/* 110 */
71
,
5
71
,
944
,
48
,
49
,
572
,
52
,
53
,
760
,
572
,
/* 120 */
22
3
,
42
,
936
,
51
,
274
,
56
,
54
,
58
,
55
,
45
,
/* 130 */
44
,
43
,
741
,
47
,
46
,
257
,
256
,
45
,
44
,
43
,
/* 140 */
48
,
50
,
145
,
52
,
53
,
1
,
160
,
223
,
42
,
145
,
/* 150 */
51
,
27
4
,
56
,
54
,
58
,
55
,
323
,
322
,
130
,
236
,
/* 160 */
47
,
46
,
297
,
296
,
45
,
44
,
43
,
24
,
288
,
319
,
/* 170 */
31
8
,
287
,
286
,
285
,
317
,
284
,
316
,
315
,
314
,
283
,
/* 180 */
3
13
,
312
,
908
,
31
,
896
,
897
,
898
,
899
,
900
,
901
,
/* 190 */
902
,
903
,
904
,
905
,
906
,
907
,
909
,
910
,
52
,
53
,
/* 200 */
847
,
960
,
223
,
42
,
172
,
51
,
274
,
56
,
54
,
58
,
/* 210 */
55
,
1005
,
19
,
86
,
25
,
47
,
46
,
214
,
83
,
45
,
/* 220 */
44
,
43
,
22
2
,
756
,
213
,
310
,
745
,
945
,
748
,
197
,
/* 230 */
7
51
,
222
,
756
,
230
,
13
,
745
,
198
,
748
,
88
,
751
,
/* 240 */
85
,
122
,
121
,
196
,
931
,
932
,
30
,
935
,
56
,
54
,
/* 250 */
58
,
55
,
3
,
173
,
207
,
208
,
47
,
46
,
273
,
94
8
,
/* 260 */
45
,
44
,
43
,
20
7
,
208
,
242
,
232
,
747
,
24
,
750
,
/* 270 */
31
9
,
318
,
77
,
246
,
245
,
317
,
689
,
316
,
315
,
314
,
/* 280 */
37
,
3
13
,
312
,
62
,
916
,
47
,
46
,
914
,
915
,
45
,
/* 290 */
44
,
43
,
917
,
942
,
919
,
920
,
918
,
145
,
921
,
922
,
/* 300 */
10
7
,
101
,
112
,
249
,
31
,
69
,
63
,
111
,
117
,
120
,
/* 310 */
110
,
204
,
674
,
109
,
235
,
671
,
114
,
672
,
310
,
673
,
/* 320 */
5
,
34
,
162
,
1051
,
70
,
57
,
31
,
161
,
96
,
91
,
/* 330 */
95
,
31
,
757
,
31
,
57
,
229
,
233
,
31
,
753
,
292
,
/* 340 */
746
,
757
,
749
,
237
,
238
,
226
,
31
,
753
,
945
,
946
,
/* 350 */
180
,
178
,
176
,
205
,
693
,
752
,
933
,
175
,
125
,
124
,
/* 360 */
12
3
,
136
,
134
,
133
,
752
,
77
,
1006
,
227
,
269
,
320
,
/* 370 */
945
,
84
,
293
,
37
,
294
,
945
,
856
,
945
,
298
,
754
,
/* 380 */
172
,
945
,
848
,
960
,
686
,
72
,
172
,
302
,
722
,
723
,
/* 390 */
945
,
8
,
251
,
743
,
74
,
948
,
32
,
75
,
221
,
215
,
/* 400 */
705
,
206
,
253
,
713
,
140
,
253
,
714
,
61
,
777
,
758
,
/* 410 */
21
,
65
,
20
,
20
,
660
,
678
,
277
,
679
,
32
,
662
,
/* 420 */
32
,
675
,
279
,
61
,
661
,
190
,
87
,
29
,
61
,
744
,
/* 430 */
280
,
191
,
66
,
100
,
99
,
15
,
14
,
119
,
118
,
106
,
/* 440 */
10
5
,
68
,
6
,
649
,
17
,
16
,
676
,
193
,
677
,
187
,
/* 450 */
19
4
,
195
,
755
,
201
,
202
,
200
,
185
,
199
,
189
,
94
7
,
/* 460 */
1016
,
1015
,
224
,
1012
,
1011
,
247
,
137
,
40
,
225
,
301
,
/* 470 */
9
68
,
979
,
976
,
977
,
981
,
139
,
143
,
961
,
254
,
99
8
,
/* 480 */
9
97
,
943
,
263
,
156
,
135
,
157
,
704
,
258
,
311
,
941
,
/* 490 */
9
12
,
306
,
108
,
303
,
155
,
150
,
148
,
958
,
158
,
159
,
/* 500 */
859
,
67
,
146
,
216
,
282
,
38
,
260
,
183
,
35
,
267
,
/* 510 */
2
91
,
64
,
855
,
1072
,
97
,
59
,
1071
,
1069
,
163
,
295
,
/* 520 */
10
66
,
103
,
1065
,
1063
,
164
,
877
,
36
,
272
,
33
,
270
,
/* 530 */
268
,
39
,
184
,
844
,
113
,
842
,
115
,
116
,
840
,
839
,
/* 540 */
239
,
174
,
837
,
836
,
835
,
834
,
833
,
832
,
177
,
179
,
/* 550 */
82
9
,
827
,
825
,
266
,
823
,
181
,
820
,
182
,
264
,
252
,
/* 560 */
73
,
78
,
262
,
261
,
999
,
259
,
41
,
304
,
305
,
307
,
/* 570 */
209
,
231
,
308
,
309
,
281
,
321
,
797
,
240
,
241
,
210
,
/* 580 */
796
,
92
,
93
,
203
,
244
,
243
,
795
,
783
,
782
,
838
,
/* 590 */
248
,
253
,
681
,
276
,
126
,
171
,
166
,
878
,
167
,
165
,
/* 600 */
16
8
,
169
,
831
,
170
,
9
,
127
,
128
,
830
,
76
,
129
,
/* 610 */
822
,
821
,
2
,
26
,
4
,
255
,
79
,
706
,
153
,
151
,
/* 620 */
149
,
147
,
152
,
154
,
141
,
924
,
709
,
142
,
80
,
218
,
/* 630 */
7
11
,
81
,
265
,
761
,
715
,
144
,
90
,
10
,
11
,
27
,
/* 640 */
759
,
28
,
7
,
12
,
22
,
88
,
23
,
613
,
278
,
609
,
/* 650 */
607
,
606
,
605
,
602
,
575
,
289
,
94
,
32
,
60
,
98
,
/* 660 */
652
,
651
,
648
,
102
,
597
,
595
,
104
,
587
,
593
,
589
,
/* 670 */
591
,
585
,
583
,
616
,
615
,
614
,
612
,
611
,
610
,
608
,
/* 680 */
604
,
603
,
573
,
540
,
538
,
61
,
801
,
800
,
800
,
800
,
/* 690 */
800
,
800
,
800
,
800
,
800
,
800
,
800
,
800
,
131
,
132
,
};
static
const
YYCODETYPE
yy_lookahead
[]
=
{
/* 0 */
19
1
,
1
,
190
,
191
,
197
,
252
,
210
,
234
,
252
,
9
,
/* 10 */
18
8
,
189
,
252
,
13
,
14
,
191
,
16
,
17
,
262
,
263
,
/* 20 */
20
,
21
,
249
,
23
,
24
,
25
,
26
,
27
,
28
,
0
,
/* 30 */
5
,
25
2
,
236
,
33
,
34
,
252
,
229
,
37
,
38
,
39
,
/* 40 */
13
,
14
,
26
3
,
16
,
17
,
262
,
263
,
20
,
21
,
1
,
/* 50 */
23
,
24
,
25
,
26
,
27
,
28
,
23
4
,
9
,
33
,
34
,
/* 60 */
33
,
34
,
2
53
,
191
,
37
,
38
,
39
,
14
,
191
,
16
,
/* 70 */
17
,
249
,
19
1
,
20
,
21
,
237
,
23
,
24
,
25
,
26
,
/* 80 */
27
,
28
,
79
,
259
,
197
,
261
,
33
,
34
,
250
,
81
,
/* 0 */
19
2
,
1
,
191
,
192
,
0
,
254
,
211
,
254
,
254
,
9
,
/* 10 */
18
9
,
190
,
254
,
13
,
14
,
192
,
16
,
17
,
264
,
265
,
/* 20 */
20
,
21
,
15
,
23
,
24
,
25
,
26
,
27
,
28
,
254
,
/* 30 */
5
,
25
4
,
237
,
33
,
34
,
254
,
211
,
37
,
38
,
39
,
/* 40 */
13
,
14
,
26
5
,
16
,
17
,
264
,
265
,
20
,
21
,
1
,
/* 50 */
23
,
24
,
25
,
26
,
27
,
28
,
23
5
,
9
,
33
,
34
,
/* 60 */
33
,
34
,
2
37
,
255
,
37
,
38
,
39
,
14
,
192
,
16
,
/* 70 */
17
,
192
,
25
1
,
20
,
21
,
237
,
23
,
24
,
25
,
26
,
/* 80 */
27
,
28
,
259
,
79
,
261
,
254
,
33
,
34
,
198
,
68
,
/* 90 */
37
,
38
,
39
,
45
,
46
,
47
,
48
,
49
,
50
,
51
,
/* 100 */
52
,
53
,
54
,
55
,
56
,
57
,
58
,
19
1
,
79
,
61
,
/* 110 */
110
,
1
,
23
5
,
13
,
14
,
191
,
16
,
17
,
23
1
,
9
,
/* 120 */
20
,
21
,
1
,
23
,
24
,
25
,
26
,
27
,
28
,
25
7
,
/* 130 */
9
,
259
,
105
,
33
,
34
,
254
,
255
,
37
,
38
,
39
,
/* 140 */
13
,
14
,
226
,
16
,
17
,
68
,
252
,
20
,
21
,
135
,
/* 150 */
23
,
24
,
25
,
26
,
27
,
28
,
232
,
143
,
144
,
235
,
/* 160 */
33
,
34
,
1
98
,
199
,
37
,
38
,
39
,
88
,
89
,
90
,
/* 100 */
52
,
53
,
54
,
55
,
56
,
57
,
58
,
1
,
79
,
61
,
/* 110 */
110
,
1
,
23
6
,
13
,
14
,
9
,
16
,
17
,
11
1
,
9
,
/* 120 */
20
,
21
,
232
,
23
,
24
,
25
,
26
,
27
,
28
,
3
7
,
/* 130 */
38
,
39
,
105
,
33
,
34
,
256
,
257
,
37
,
38
,
39
,
/* 140 */
13
,
14
,
192
,
16
,
17
,
199
,
200
,
20
,
21
,
192
,
/* 150 */
23
,
24
,
25
,
26
,
27
,
28
,
65
,
66
,
67
,
138
,
/* 160 */
33
,
34
,
1
41
,
142
,
37
,
38
,
39
,
88
,
89
,
90
,
/* 170 */
91
,
92
,
93
,
94
,
95
,
96
,
97
,
98
,
99
,
100
,
/* 180 */
101
,
102
,
2
09
,
191
,
211
,
212
,
213
,
214
,
215
,
216
,
/* 190 */
21
7
,
218
,
219
,
220
,
221
,
222
,
223
,
224
,
16
,
17
,
/* 200 */
1
24
,
125
,
20
,
21
,
68
,
23
,
24
,
25
,
26
,
27
,
/* 210 */
28
,
191
,
44
,
252
,
137
,
33
,
34
,
140
,
14
1
,
37
,
/* 220 */
38
,
39
,
1
,
2
,
23
2
,
104
,
5
,
235
,
7
,
61
,
/* 230 */
9
,
1
,
2
,
194
,
195
,
5
,
68
,
7
,
5
,
9
,
/* 240 */
7
,
73
,
74
,
75
,
37
,
38
,
39
,
25
2
,
25
,
26
,
/* 250 */
27
,
28
,
1
09
,
233
,
33
,
34
,
33
,
34
,
37
,
116
,
/* 260 */
37
,
38
,
39
,
33
,
34
,
252
,
104
,
5
,
88
,
7
,
/* 270 */
90
,
91
,
104
,
1
37
,
112
,
95
,
140
,
97
,
98
,
99
,
/* 280 */
112
,
101
,
102
,
209
,
76
,
2
,
212
,
213
,
5
,
81
,
/* 290 */
7
,
217
,
9
,
219
,
220
,
221
,
197
,
223
,
224
,
62
,
/* 300 */
6
3
,
64
,
134
,
252
,
136
,
191
,
69
,
70
,
71
,
72
,
/* 310 */
142
,
62
,
63
,
64
,
210
,
78
,
33
,
34
,
69
,
70
,
/* 320 */
71
,
72
,
210
,
191
,
191
,
104
,
37
,
228
,
229
,
230
,
/* 330 */
231
,
191
,
111
,
191
,
104
,
62
,
63
,
64
,
117
,
19
1
,
/* 340 */
236
,
111
,
69
,
70
,
71
,
72
,
232
,
117
,
236
,
235
,
/* 350 */
117
,
33
,
34
,
252
,
133
,
37
,
38
,
39
,
65
,
66
,
/* 360 */
67
,
210
,
191
,
133
,
232
,
232
,
15
,
235
,
235
,
62
,
/* 370 */
63
,
64
,
232
,
234
,
232
,
235
,
104
,
235
,
252
,
117
,
/* 380 */
108
,
196
,
110
,
1
,
105
,
200
,
196
,
236
,
249
,
19
6
,
/* 390 */
2
00
,
105
,
113
,
200
,
111
,
109
,
105
,
105
,
60
,
105
,
/* 400 */
10
9
,
252
,
105
,
109
,
115
,
113
,
109
,
259
,
105
,
109
,
/* 410 */
10
5
,
252
,
109
,
105
,
109
,
109
,
105
,
109
,
105
,
37
,
/* 420 */
109
,
1
05
,
109
,
236
,
105
,
109
,
104
,
252
,
109
,
10
7
,
/* 430 */
259
,
131
,
236
,
138
,
139
,
129
,
138
,
139
,
252
,
138
,
/* 440 */
1
39
,
104
,
104
,
106
,
76
,
77
,
252
,
138
,
139
,
5
,
/* 450 */
25
2
,
7
,
252
,
5
,
252
,
7
,
252
,
252
,
252
,
22
7
,
/* 460 */
191
,
227
,
111
,
227
,
251
,
227
,
227
,
227
,
227
,
191
,
/* 470 */
260
,
191
,
191
,
191
,
260
,
191
,
234
,
234
,
191
,
191
,
/* 480 */
2
34
,
191
,
238
,
60
,
256
,
256
,
225
,
191
,
117
,
24
2
,
/* 490 */
191
,
256
,
247
,
191
,
119
,
191
,
244
,
246
,
248
,
245
,
/* 500 */
1
27
,
191
,
128
,
191
,
256
,
191
,
191
,
130
,
191
,
122
,
/* 510 */
1
26
,
191
,
191
,
121
,
191
,
191
,
191
,
191
,
191
,
191
,
/* 520 */
19
1
,
191
,
191
,
191
,
191
,
191
,
191
,
191
,
243
,
120
,
/* 530 */
1
91
,
191
,
191
,
191
,
191
,
191
,
191
,
191
,
191
,
191
,
/* 540 */
19
1
,
191
,
118
,
191
,
191
,
191
,
191
,
191
,
191
,
191
,
/* 550 */
19
1
,
191
,
191
,
191
,
191
,
191
,
191
,
132
,
192
,
192
,
/* 560 */
1
03
,
192
,
192
,
87
,
192
,
86
,
50
,
83
,
85
,
54
,
/* 570 */
84
,
192
,
82
,
192
,
79
,
192
,
5
,
145
,
5
,
5
,
/* 580 */
192
,
192
,
197
,
197
,
145
,
5
,
5
,
90
,
89
,
135
,
/* 590 */
1
92
,
113
,
107
,
193
,
193
,
192
,
202
,
206
,
208
,
204
,
/* 600 */
20
7
,
205
,
203
,
201
,
193
,
192
,
198
,
193
,
192
,
192
,
/* 610 */
1
04
,
104
,
194
,
105
,
114
,
105
,
1
,
241
,
240
,
239
,
/* 620 */
109
,
109
,
225
,
104
,
123
,
105
,
109
,
104
,
104
,
11
1
,
/* 630 */
105
,
104
,
1
23
,
76
,
105
,
109
,
104
,
109
,
104
,
104
,
/* 640 */
10
7
,
104
,
9
,
5
,
108
,
5
,
5
,
5
,
5
,
80
,
/* 650 */
15
,
76
,
139
,
109
,
5
,
16
,
5
,
105
,
5
,
5
,
/* 660 */
139
,
139
,
5
,
5
,
5
,
5
,
5
,
5
,
5
,
5
,
/* 670 */
5
,
5
,
5
,
5
,
5
,
5
,
5
,
109
,
80
,
60
,
/* 680 */
59
,
0
,
264
,
264
,
264
,
264
,
264
,
264
,
264
,
264
,
/* 690 */
26
4
,
264
,
264
,
21
,
21
,
264
,
264
,
264
,
264
,
264
,
/* 700 */
26
4
,
264
,
264
,
264
,
264
,
264
,
264
,
264
,
264
,
264
,
/* 710 */
26
4
,
264
,
264
,
264
,
264
,
264
,
264
,
264
,
264
,
264
,
/* 720 */
26
4
,
264
,
264
,
264
,
264
,
264
,
264
,
264
,
264
,
264
,
/* 730 */
26
4
,
264
,
264
,
264
,
264
,
264
,
264
,
264
,
264
,
264
,
/* 740 */
26
4
,
264
,
264
,
264
,
264
,
264
,
264
,
264
,
264
,
264
,
/* 750 */
26
4
,
264
,
264
,
264
,
264
,
264
,
264
,
264
,
264
,
264
,
/* 760 */
26
4
,
264
,
264
,
264
,
264
,
264
,
264
,
264
,
264
,
264
,
/* 770 */
26
4
,
264
,
264
,
264
,
264
,
264
,
264
,
264
,
264
,
264
,
/* 780 */
26
4
,
264
,
264
,
264
,
264
,
264
,
264
,
264
,
264
,
264
,
/* 790 */
26
4
,
264
,
264
,
264
,
264
,
264
,
264
,
264
,
264
,
264
,
/* 800 */
26
4
,
264
,
264
,
264
,
264
,
264
,
264
,
264
,
264
,
264
,
/* 810 */
26
4
,
264
,
264
,
264
,
264
,
264
,
264
,
264
,
264
,
264
,
/* 820 */
26
4
,
264
,
264
,
264
,
264
,
264
,
264
,
264
,
264
,
264
,
/* 830 */
26
4
,
264
,
264
,
264
,
264
,
264
,
264
,
264
,
264
,
264
,
/* 840 */
26
4
,
264
,
264
,
264
,
264
,
264
,
264
,
264
,
264
,
264
,
/* 850 */
26
4
,
264
,
264
,
264
,
264
,
264
,
264
,
264
,
264
,
264
,
/* 860 */
26
4
,
264
,
264
,
264
,
264
,
264
,
264
,
264
,
264
,
264
,
/* 870 */
26
4
,
264
,
264
,
264
,
264
,
264
,
264
,
264
,
264
,
264
,
/* 880 */
26
4
,
264
,
/* 180 */
101
,
102
,
2
10
,
192
,
212
,
213
,
214
,
215
,
216
,
217
,
/* 190 */
21
8
,
219
,
220
,
221
,
222
,
223
,
224
,
225
,
16
,
17
,
/* 200 */
1
97
,
235
,
20
,
21
,
201
,
23
,
24
,
25
,
26
,
27
,
/* 210 */
28
,
261
,
44
,
198
,
104
,
33
,
34
,
251
,
26
1
,
37
,
/* 220 */
38
,
39
,
1
,
2
,
23
3
,
81
,
5
,
236
,
7
,
61
,
/* 230 */
9
,
1
,
2
,
211
,
104
,
5
,
68
,
7
,
108
,
9
,
/* 240 */
110
,
73
,
74
,
75
,
229
,
230
,
231
,
23
2
,
25
,
26
,
/* 250 */
27
,
28
,
1
95
,
196
,
33
,
34
,
33
,
34
,
37
,
237
,
/* 260 */
37
,
38
,
39
,
33
,
34
,
136
,
68
,
5
,
88
,
7
,
/* 270 */
90
,
91
,
104
,
1
44
,
145
,
95
,
37
,
97
,
98
,
99
,
/* 280 */
112
,
101
,
102
,
109
,
210
,
33
,
34
,
213
,
214
,
37
,
/* 290 */
38
,
39
,
218
,
192
,
220
,
221
,
222
,
192
,
224
,
225
,
/* 300 */
6
2
,
63
,
64
,
135
,
192
,
137
,
132
,
69
,
70
,
71
,
/* 310 */
72
,
143
,
2
,
76
,
192
,
5
,
78
,
7
,
81
,
9
,
/* 320 */
62
,
63
,
64
,
254
,
198
,
104
,
192
,
69
,
70
,
71
,
/* 330 */
72
,
192
,
111
,
192
,
104
,
234
,
138
,
192
,
117
,
14
1
,
/* 340 */
5
,
111
,
7
,
33
,
34
,
233
,
192
,
117
,
236
,
227
,
/* 350 */
62
,
63
,
64
,
254
,
115
,
134
,
230
,
69
,
70
,
71
,
/* 360 */
72
,
62
,
63
,
64
,
134
,
104
,
261
,
233
,
263
,
211
,
/* 370 */
236
,
238
,
233
,
112
,
233
,
236
,
197
,
236
,
233
,
117
,
/* 380 */
201
,
236
,
197
,
235
,
109
,
252
,
201
,
233
,
125
,
12
6
,
/* 390 */
2
36
,
116
,
105
,
1
,
105
,
237
,
109
,
105
,
60
,
251
,
/* 400 */
10
5
,
254
,
113
,
105
,
109
,
113
,
105
,
109
,
105
,
105
,
/* 410 */
10
9
,
109
,
109
,
109
,
105
,
5
,
105
,
7
,
109
,
105
,
/* 420 */
109
,
1
11
,
105
,
109
,
105
,
254
,
109
,
104
,
109
,
3
7
,
/* 430 */
107
,
254
,
130
,
139
,
140
,
139
,
140
,
76
,
77
,
139
,
/* 440 */
1
40
,
104
,
104
,
106
,
139
,
140
,
5
,
254
,
7
,
254
,
/* 450 */
25
4
,
254
,
117
,
254
,
254
,
254
,
254
,
254
,
254
,
23
7
,
/* 460 */
228
,
228
,
228
,
228
,
228
,
192
,
192
,
253
,
228
,
228
,
/* 470 */
192
,
192
,
192
,
192
,
192
,
192
,
192
,
235
,
235
,
262
,
/* 480 */
2
62
,
235
,
192
,
239
,
60
,
192
,
117
,
258
,
103
,
19
2
,
/* 490 */
226
,
85
,
87
,
86
,
240
,
245
,
247
,
250
,
192
,
192
,
/* 500 */
1
92
,
129
,
249
,
258
,
192
,
192
,
258
,
192
,
192
,
258
,
/* 510 */
1
92
,
131
,
192
,
192
,
192
,
128
,
192
,
192
,
192
,
192
,
/* 520 */
19
2
,
192
,
192
,
192
,
192
,
192
,
192
,
123
,
192
,
127
,
/* 530 */
1
22
,
192
,
192
,
192
,
192
,
192
,
192
,
192
,
192
,
192
,
/* 540 */
19
2
,
192
,
192
,
192
,
192
,
192
,
192
,
192
,
192
,
192
,
/* 550 */
19
2
,
192
,
192
,
121
,
192
,
192
,
192
,
192
,
120
,
193
,
/* 560 */
1
93
,
193
,
119
,
193
,
193
,
118
,
133
,
50
,
83
,
54
,
/* 570 */
193
,
193
,
84
,
82
,
193
,
79
,
5
,
146
,
5
,
193
,
/* 580 */
5
,
198
,
198
,
193
,
5
,
146
,
5
,
90
,
89
,
193
,
/* 590 */
1
36
,
113
,
105
,
107
,
194
,
202
,
207
,
209
,
203
,
208
,
/* 600 */
20
6
,
204
,
193
,
205
,
104
,
194
,
194
,
193
,
114
,
194
,
/* 610 */
1
93
,
193
,
199
,
104
,
195
,
109
,
109
,
105
,
242
,
244
,
/* 620 */
246
,
248
,
243
,
241
,
104
,
226
,
105
,
109
,
104
,
1
,
/* 630 */
105
,
104
,
1
04
,
111
,
105
,
104
,
76
,
124
,
124
,
109
,
/* 640 */
10
5
,
109
,
104
,
104
,
104
,
108
,
104
,
9
,
107
,
5
,
/* 650 */
5
,
5
,
5
,
5
,
80
,
15
,
76
,
109
,
16
,
140
,
/* 660 */
5
,
5
,
105
,
140
,
5
,
5
,
140
,
5
,
5
,
5
,
/* 670 */
5
,
5
,
5
,
5
,
5
,
5
,
5
,
5
,
5
,
5
,
/* 680 */
5
,
5
,
80
,
60
,
59
,
109
,
0
,
266
,
266
,
266
,
/* 690 */
26
6
,
266
,
266
,
266
,
266
,
266
,
266
,
266
,
21
,
21
,
/* 700 */
26
6
,
266
,
266
,
266
,
266
,
266
,
266
,
266
,
266
,
266
,
/* 710 */
26
6
,
266
,
266
,
266
,
266
,
266
,
266
,
266
,
266
,
266
,
/* 720 */
26
6
,
266
,
266
,
266
,
266
,
266
,
266
,
266
,
266
,
266
,
/* 730 */
26
6
,
266
,
266
,
266
,
266
,
266
,
266
,
266
,
266
,
266
,
/* 740 */
26
6
,
266
,
266
,
266
,
266
,
266
,
266
,
266
,
266
,
266
,
/* 750 */
26
6
,
266
,
266
,
266
,
266
,
266
,
266
,
266
,
266
,
266
,
/* 760 */
26
6
,
266
,
266
,
266
,
266
,
266
,
266
,
266
,
266
,
266
,
/* 770 */
26
6
,
266
,
266
,
266
,
266
,
266
,
266
,
266
,
266
,
266
,
/* 780 */
26
6
,
266
,
266
,
266
,
266
,
266
,
266
,
266
,
266
,
266
,
/* 790 */
26
6
,
266
,
266
,
266
,
266
,
266
,
266
,
266
,
266
,
266
,
/* 800 */
26
6
,
266
,
266
,
266
,
266
,
266
,
266
,
266
,
266
,
266
,
/* 810 */
26
6
,
266
,
266
,
266
,
266
,
266
,
266
,
266
,
266
,
266
,
/* 820 */
26
6
,
266
,
266
,
266
,
266
,
266
,
266
,
266
,
266
,
266
,
/* 830 */
26
6
,
266
,
266
,
266
,
266
,
266
,
266
,
266
,
266
,
266
,
/* 840 */
26
6
,
266
,
266
,
266
,
266
,
266
,
266
,
266
,
266
,
266
,
/* 850 */
26
6
,
266
,
266
,
266
,
266
,
266
,
266
,
266
,
266
,
266
,
/* 860 */
26
6
,
266
,
266
,
266
,
266
,
266
,
266
,
266
,
266
,
266
,
/* 870 */
26
6
,
266
,
266
,
266
,
266
,
266
,
266
,
266
,
266
,
266
,
/* 880 */
26
6
,
266
,
266
,
266
,
266
,
266
,
266
,
266
,
};
#define YY_SHIFT_COUNT (32
2
)
#define YY_SHIFT_COUNT (32
6
)
#define YY_SHIFT_MIN (0)
#define YY_SHIFT_MAX (68
1
)
#define YY_SHIFT_MAX (68
6
)
static
const
unsigned
short
int
yy_shift_ofst
[]
=
{
/* 0 */
168
,
79
,
79
,
180
,
180
,
3
,
221
,
230
,
121
,
110
,
/* 10 */
1
10
,
110
,
110
,
110
,
110
,
110
,
110
,
110
,
0
,
48
,
/* 20 */
230
,
283
,
283
,
283
,
283
,
162
,
162
,
110
,
110
,
110
,
/* 30 */
29
,
110
,
110
,
208
,
3
,
8
,
8
,
695
,
695
,
695
,
/* 0 */
168
,
79
,
79
,
180
,
180
,
29
,
221
,
230
,
110
,
106
,
/* 10 */
1
06
,
106
,
106
,
106
,
106
,
106
,
106
,
106
,
0
,
48
,
/* 20 */
230
,
310
,
310
,
310
,
310
,
261
,
261
,
106
,
106
,
106
,
/* 30 */
4
,
106
,
106
,
237
,
29
,
144
,
144
,
700
,
700
,
700
,
/* 40 */
230
,
230
,
230
,
230
,
230
,
230
,
230
,
230
,
230
,
230
,
/* 50 */
230
,
230
,
230
,
230
,
230
,
230
,
230
,
230
,
230
,
230
,
/* 60 */
283
,
283
,
25
,
25
,
25
,
25
,
25
,
25
,
25
,
110
,
/* 70 */
1
10
,
110
,
289
,
110
,
110
,
110
,
162
,
162
,
110
,
110
,
/* 80 */
1
10
,
76
,
76
,
143
,
162
,
110
,
110
,
110
,
110
,
110
,
/* 90 */
1
10
,
110
,
110
,
110
,
110
,
110
,
110
,
110
,
110
,
110
,
/* 100 */
1
10
,
110
,
110
,
110
,
110
,
110
,
110
,
110
,
110
,
110
,
/* 110 */
1
10
,
110
,
110
,
110
,
110
,
110
,
110
,
110
,
110
,
110
,
/* 120 */
1
10
,
110
,
110
,
110
,
110
,
110
,
110
,
110
,
110
,
110
,
/* 130 */
1
10
,
110
,
110
,
110
,
110
,
110
,
423
,
423
,
423
,
371
,
/* 140 */
3
71
,
371
,
423
,
371
,
423
,
374
,
377
,
373
,
387
,
38
4
,
/* 150 */
392
,
409
,
375
,
424
,
425
,
423
,
423
,
423
,
457
,
3
,
/* 160 */
3
,
423
,
423
,
476
,
479
,
516
,
484
,
483
,
515
,
48
6
,
/* 170 */
490
,
457
,
423
,
495
,
495
,
423
,
495
,
423
,
495
,
423
,
/* 180 */
4
23
,
695
,
695
,
27
,
100
,
127
,
100
,
100
,
53
,
182
,
/* 190 */
223
,
223
,
223
,
223
,
237
,
249
,
273
,
318
,
318
,
318
,
/* 200 */
318
,
77
,
14
,
207
,
207
,
233
,
262
,
272
,
136
,
293
,
/* 210 */
307
,
286
,
279
,
292
,
291
,
294
,
297
,
303
,
305
,
382
,
/* 220 */
3
38
,
351
,
300
,
306
,
308
,
311
,
313
,
316
,
319
,
322
,
/* 230 */
295
,
298
,
301
,
337
,
309
,
444
,
448
,
368
,
571
,
432
,
/* 240 */
57
3
,
574
,
439
,
580
,
581
,
497
,
499
,
454
,
478
,
485
,
/* 250 */
506
,
500
,
508
,
507
,
511
,
512
,
510
,
519
,
520
,
517
,
/* 260 */
52
3
,
615
,
524
,
525
,
527
,
526
,
501
,
528
,
509
,
529
,
/* 270 */
5
32
,
518
,
534
,
485
,
535
,
533
,
537
,
536
,
557
,
633
,
/* 280 */
638
,
640
,
641
,
642
,
643
,
569
,
635
,
575
,
513
,
54
4
,
/* 290 */
544
,
639
,
521
,
522
,
544
,
649
,
651
,
552
,
544
,
653
,
/* 300 */
65
4
,
657
,
658
,
659
,
660
,
661
,
662
,
663
,
664
,
665
,
/* 310 */
66
6
,
667
,
668
,
669
,
670
,
671
,
568
,
598
,
672
,
673
,
/* 320 */
619
,
621
,
681
,
/* 60 */
310
,
310
,
25
,
25
,
25
,
25
,
25
,
25
,
25
,
106
,
/* 70 */
1
06
,
106
,
239
,
106
,
106
,
106
,
261
,
261
,
106
,
106
,
/* 80 */
1
06
,
106
,
263
,
263
,
275
,
261
,
106
,
106
,
106
,
106
,
/* 90 */
1
06
,
106
,
106
,
106
,
106
,
106
,
106
,
106
,
106
,
106
,
/* 100 */
1
06
,
106
,
106
,
106
,
106
,
106
,
106
,
106
,
106
,
106
,
/* 110 */
1
06
,
106
,
106
,
106
,
106
,
106
,
106
,
106
,
106
,
106
,
/* 120 */
1
06
,
106
,
106
,
106
,
106
,
106
,
106
,
106
,
106
,
106
,
/* 130 */
1
06
,
106
,
106
,
106
,
106
,
106
,
106
,
424
,
424
,
424
,
/* 140 */
3
69
,
369
,
369
,
424
,
369
,
424
,
372
,
380
,
387
,
40
4
,
/* 150 */
402
,
408
,
432
,
438
,
443
,
447
,
433
,
424
,
424
,
424
,
/* 160 */
385
,
29
,
29
,
424
,
424
,
405
,
407
,
517
,
485
,
40
6
,
/* 170 */
515
,
488
,
491
,
385
,
424
,
496
,
496
,
424
,
496
,
424
,
/* 180 */
4
96
,
424
,
424
,
700
,
700
,
27
,
100
,
127
,
100
,
100
,
/* 190 */
53
,
182
,
223
,
223
,
223
,
223
,
238
,
258
,
288
,
252
,
/* 200 */
252
,
252
,
252
,
21
,
129
,
92
,
92
,
262
,
335
,
130
,
/* 210 */
198
,
91
,
299
,
287
,
289
,
292
,
295
,
298
,
301
,
303
,
/* 220 */
3
04
,
392
,
338
,
7
,
174
,
302
,
309
,
311
,
314
,
317
,
/* 230 */
319
,
323
,
294
,
296
,
300
,
337
,
305
,
410
,
441
,
361
,
/* 240 */
57
1
,
431
,
573
,
575
,
439
,
579
,
581
,
497
,
499
,
454
,
/* 250 */
478
,
486
,
500
,
494
,
487
,
509
,
506
,
507
,
512
,
520
,
/* 260 */
52
1
,
518
,
524
,
525
,
527
,
628
,
528
,
529
,
531
,
530
,
/* 270 */
5
13
,
532
,
514
,
535
,
538
,
522
,
539
,
486
,
540
,
541
,
/* 280 */
542
,
537
,
560
,
638
,
644
,
645
,
646
,
647
,
648
,
57
4
,
/* 290 */
640
,
580
,
519
,
548
,
548
,
642
,
523
,
526
,
548
,
655
,
/* 300 */
65
6
,
557
,
548
,
659
,
660
,
662
,
663
,
664
,
665
,
666
,
/* 310 */
66
7
,
668
,
669
,
670
,
671
,
672
,
673
,
674
,
675
,
676
,
/* 320 */
576
,
602
,
677
,
678
,
623
,
625
,
686
,
};
#define YY_REDUCE_COUNT (18
2
)
#define YY_REDUCE_MIN (-24
7
)
#define YY_REDUCE_MAX (41
8
)
#define YY_REDUCE_COUNT (18
4
)
#define YY_REDUCE_MIN (-24
9
)
#define YY_REDUCE_MAX (41
9
)
static
const
short
yy_reduce_ofst
[]
=
{
/* 0 */
-
17
8
,
-
27
,
-
27
,
74
,
74
,
99
,
-
244
,
-
217
,
-
119
,
-
76
,
/* 10 */
-
176
,
-
128
,
-
8
,
114
,
132
,
133
,
140
,
142
,
-
191
,
-
188
,
/* 20 */
-
22
1
,
-
204
,
104
,
112
,
151
,
-
227
,
139
,
148
,
171
,
20
,
/* 30 */
-
11
3
,
-
84
,
-
123
,
185
,
-
193
,
190
,
193
,
-
162
,
-
36
,
39
,
/* 40 */
-
24
7
,
-
240
,
-
106
,
-
39
,
-
5
,
13
,
51
,
101
,
126
,
149
,
/* 50 */
1
59
,
175
,
186
,
194
,
198
,
200
,
202
,
204
,
205
,
206
,
/* 60 */
187
,
196
,
232
,
234
,
236
,
238
,
239
,
240
,
241
,
269
,
/* 70 */
27
8
,
280
,
213
,
281
,
282
,
284
,
242
,
243
,
287
,
288
,
/* 80 */
2
90
,
210
,
214
,
244
,
246
,
296
,
299
,
302
,
304
,
310
,
/* 90 */
3
12
,
314
,
315
,
317
,
320
,
321
,
323
,
324
,
325
,
326
,
/* 100 */
32
7
,
328
,
329
,
330
,
331
,
332
,
333
,
334
,
335
,
336
,
/* 110 */
33
9
,
340
,
341
,
342
,
343
,
344
,
345
,
346
,
347
,
348
,
/* 120 */
34
9
,
350
,
352
,
353
,
354
,
355
,
356
,
357
,
358
,
359
,
/* 130 */
3
60
,
361
,
362
,
363
,
364
,
365
,
366
,
367
,
369
,
22
8
,
/* 140 */
229
,
2
35
,
370
,
248
,
372
,
250
,
245
,
251
,
254
,
252
,
/* 150 */
285
,
247
,
376
,
378
,
380
,
379
,
381
,
383
,
261
,
385
,
/* 160 */
386
,
388
,
389
,
390
,
393
,
391
,
394
,
396
,
399
,
395
,
/* 170 */
402
,
397
,
398
,
400
,
401
,
403
,
411
,
413
,
414
,
416
,
/* 180 */
41
7
,
408
,
418
,
/* 0 */
-
17
9
,
-
28
,
-
28
,
74
,
74
,
15
,
-
246
,
-
219
,
-
121
,
-
9
,
/* 10 */
105
,
-
177
,
112
,
134
,
139
,
141
,
145
,
154
,
-
192
,
-
189
,
/* 20 */
-
22
3
,
-
205
,
-
175
,
22
,
158
,
-
34
,
148
,
-
50
,
-
43
,
101
,
/* 30 */
-
11
0
,
122
,
-
124
,
3
,
126
,
179
,
185
,
133
,
-
54
,
57
,
/* 40 */
-
24
9
,
-
247
,
-
242
,
-
225
,
-
169
,
69
,
99
,
147
,
171
,
177
,
/* 50 */
1
93
,
195
,
196
,
197
,
199
,
200
,
201
,
202
,
203
,
204
,
/* 60 */
-
162
,
222
,
232
,
233
,
234
,
235
,
236
,
240
,
241
,
273
,
/* 70 */
27
4
,
278
,
214
,
279
,
280
,
281
,
242
,
243
,
282
,
283
,
/* 80 */
2
84
,
290
,
217
,
218
,
244
,
246
,
293
,
297
,
306
,
307
,
/* 90 */
3
08
,
312
,
313
,
315
,
316
,
318
,
320
,
321
,
322
,
324
,
/* 100 */
32
5
,
326
,
327
,
328
,
329
,
330
,
331
,
332
,
333
,
334
,
/* 110 */
33
6
,
339
,
340
,
341
,
342
,
343
,
344
,
345
,
346
,
347
,
/* 120 */
34
8
,
349
,
350
,
351
,
352
,
353
,
354
,
355
,
356
,
357
,
/* 130 */
3
58
,
359
,
360
,
362
,
363
,
364
,
365
,
366
,
367
,
36
8
,
/* 140 */
229
,
2
45
,
248
,
370
,
251
,
371
,
247
,
253
,
373
,
249
,
/* 150 */
374
,
250
,
375
,
379
,
376
,
382
,
254
,
377
,
378
,
381
,
/* 160 */
264
,
383
,
384
,
386
,
390
,
388
,
391
,
389
,
395
,
394
,
/* 170 */
397
,
398
,
393
,
399
,
396
,
400
,
411
,
409
,
412
,
414
,
/* 180 */
41
5
,
417
,
418
,
413
,
419
,
};
static
const
YYACTIONTYPE
yy_default
[]
=
{
/* 0 */
79
1
,
904
,
850
,
916
,
838
,
847
,
1050
,
1050
,
791
,
791
,
/* 10 */
79
1
,
791
,
791
,
791
,
791
,
791
,
791
,
791
,
963
,
810
,
/* 20 */
105
0
,
791
,
791
,
791
,
791
,
791
,
791
,
791
,
791
,
791
,
/* 30 */
8
47
,
791
,
791
,
853
,
847
,
853
,
853
,
958
,
888
,
906
,
/* 40 */
79
1
,
791
,
791
,
791
,
791
,
791
,
791
,
791
,
791
,
791
,
/* 50 */
79
1
,
791
,
791
,
791
,
791
,
791
,
791
,
791
,
791
,
791
,
/* 60 */
79
1
,
791
,
791
,
791
,
791
,
791
,
791
,
791
,
791
,
791
,
/* 70 */
79
1
,
791
,
965
,
971
,
968
,
791
,
791
,
791
,
973
,
791
,
/* 80 */
79
1
,
993
,
993
,
956
,
791
,
791
,
791
,
791
,
791
,
791
,
/* 90 */
79
1
,
791
,
791
,
791
,
791
,
791
,
791
,
791
,
791
,
791
,
/* 100 */
79
1
,
791
,
791
,
791
,
791
,
791
,
791
,
791
,
791
,
791
,
/* 110 */
79
1
,
791
,
836
,
791
,
834
,
791
,
791
,
791
,
791
,
791
,
/* 120 */
79
1
,
791
,
791
,
791
,
791
,
791
,
791
,
791
,
791
,
821
,
/* 130 */
791
,
791
,
791
,
791
,
791
,
791
,
812
,
812
,
812
,
791
,
/* 140 */
79
1
,
791
,
812
,
791
,
812
,
1000
,
1004
,
998
,
986
,
994
,
/* 150 */
985
,
981
,
979
,
978
,
1008
,
812
,
812
,
812
,
851
,
847
,
/* 160 */
8
47
,
812
,
812
,
869
,
867
,
865
,
857
,
863
,
859
,
861
,
/* 170 */
8
55
,
839
,
812
,
845
,
845
,
812
,
845
,
812
,
845
,
812
,
/* 180 */
8
12
,
888
,
906
,
791
,
1009
,
791
,
1049
,
999
,
1039
,
103
8
,
/* 190 */
104
5
,
1037
,
1036
,
1035
,
791
,
791
,
791
,
1031
,
1032
,
1034
,
/* 200 */
10
33
,
791
,
791
,
1041
,
1040
,
791
,
791
,
791
,
791
,
791
,
/* 210 */
79
1
,
791
,
791
,
791
,
791
,
791
,
791
,
791
,
791
,
791
,
/* 220 */
1011
,
791
,
1005
,
1001
,
791
,
791
,
791
,
791
,
791
,
791
,
/* 230 */
79
1
,
791
,
791
,
918
,
791
,
791
,
791
,
791
,
791
,
791
,
/* 240 */
79
1
,
791
,
791
,
791
,
791
,
791
,
791
,
791
,
955
,
791
,
/* 250 */
791
,
791
,
791
,
791
,
967
,
966
,
791
,
791
,
791
,
791
,
/* 260 */
79
1
,
791
,
791
,
791
,
791
,
995
,
791
,
987
,
791
,
791
,
/* 270 */
79
1
,
791
,
791
,
930
,
791
,
791
,
791
,
791
,
791
,
791
,
/* 280 */
79
1
,
791
,
791
,
791
,
791
,
791
,
791
,
791
,
791
,
1061
,
/* 290 */
1059
,
791
,
791
,
791
,
1055
,
791
,
791
,
791
,
1053
,
791
,
/* 300 */
79
1
,
791
,
791
,
791
,
791
,
791
,
791
,
791
,
791
,
791
,
/* 310 */
79
1
,
791
,
791
,
791
,
791
,
791
,
872
,
791
,
819
,
817
,
/* 320 */
791
,
808
,
791
,
/* 0 */
79
8
,
911
,
857
,
923
,
845
,
854
,
1059
,
1059
,
798
,
798
,
/* 10 */
79
8
,
798
,
798
,
798
,
798
,
798
,
798
,
798
,
970
,
817
,
/* 20 */
105
9
,
798
,
798
,
798
,
798
,
798
,
798
,
798
,
798
,
798
,
/* 30 */
8
54
,
798
,
798
,
860
,
854
,
860
,
860
,
965
,
895
,
913
,
/* 40 */
79
8
,
798
,
798
,
798
,
798
,
798
,
798
,
798
,
798
,
798
,
/* 50 */
79
8
,
798
,
798
,
798
,
798
,
798
,
798
,
798
,
798
,
798
,
/* 60 */
79
8
,
798
,
798
,
798
,
798
,
798
,
798
,
798
,
798
,
798
,
/* 70 */
79
8
,
798
,
972
,
978
,
975
,
798
,
798
,
798
,
980
,
798
,
/* 80 */
79
8
,
798
,
1002
,
1002
,
963
,
798
,
798
,
798
,
798
,
798
,
/* 90 */
79
8
,
798
,
798
,
798
,
798
,
798
,
798
,
798
,
798
,
798
,
/* 100 */
79
8
,
798
,
798
,
798
,
798
,
798
,
798
,
798
,
798
,
798
,
/* 110 */
79
8
,
798
,
798
,
843
,
798
,
841
,
798
,
798
,
798
,
798
,
/* 120 */
79
8
,
798
,
798
,
798
,
798
,
798
,
798
,
798
,
798
,
798
,
/* 130 */
828
,
798
,
798
,
798
,
798
,
798
,
798
,
819
,
819
,
819
,
/* 140 */
79
8
,
798
,
798
,
819
,
798
,
819
,
1009
,
1013
,
1007
,
995
,
/* 150 */
1003
,
994
,
990
,
988
,
986
,
985
,
1017
,
819
,
819
,
819
,
/* 160 */
8
58
,
854
,
854
,
819
,
819
,
876
,
874
,
872
,
864
,
870
,
/* 170 */
8
66
,
868
,
862
,
846
,
819
,
852
,
852
,
819
,
852
,
819
,
/* 180 */
8
52
,
819
,
819
,
895
,
913
,
798
,
1018
,
798
,
1058
,
100
8
,
/* 190 */
104
8
,
1047
,
1054
,
1046
,
1045
,
1044
,
798
,
798
,
798
,
1040
,
/* 200 */
10
41
,
1043
,
1042
,
798
,
798
,
1050
,
1049
,
798
,
798
,
798
,
/* 210 */
79
8
,
798
,
798
,
798
,
798
,
798
,
798
,
798
,
798
,
798
,
/* 220 */
798
,
798
,
1020
,
798
,
1014
,
1010
,
798
,
798
,
798
,
798
,
/* 230 */
79
8
,
798
,
798
,
798
,
798
,
925
,
798
,
798
,
798
,
798
,
/* 240 */
79
8
,
798
,
798
,
798
,
798
,
798
,
798
,
798
,
798
,
798
,
/* 250 */
962
,
798
,
798
,
798
,
798
,
798
,
974
,
973
,
798
,
798
,
/* 260 */
79
8
,
798
,
798
,
798
,
798
,
798
,
798
,
798
,
798
,
1004
,
/* 270 */
79
8
,
996
,
798
,
798
,
798
,
798
,
798
,
937
,
798
,
798
,
/* 280 */
79
8
,
798
,
798
,
798
,
798
,
798
,
798
,
798
,
798
,
798
,
/* 290 */
798
,
798
,
798
,
1070
,
1068
,
798
,
798
,
798
,
1064
,
798
,
/* 300 */
79
8
,
798
,
1062
,
798
,
798
,
798
,
798
,
798
,
798
,
798
,
/* 310 */
79
8
,
798
,
798
,
798
,
798
,
798
,
798
,
798
,
798
,
798
,
/* 320 */
879
,
798
,
826
,
824
,
798
,
815
,
798
,
};
/********** End of lemon-generated parsing tables *****************************/
...
...
@@ -602,6 +603,7 @@ static const YYCODETYPE yyFallback[] = {
0
,
/* VARIABLE => nothing */
0
,
/* INTERVAL => nothing */
0
,
/* SESSION => nothing */
0
,
/* STATE_WINDOW => nothing */
0
,
/* FILL => nothing */
0
,
/* SLIDING => nothing */
0
,
/* ORDER => nothing */
...
...
@@ -875,150 +877,152 @@ static const char *const yyTokenName[] = {
/* 117 */
"VARIABLE"
,
/* 118 */
"INTERVAL"
,
/* 119 */
"SESSION"
,
/* 120 */
"FILL"
,
/* 121 */
"SLIDING"
,
/* 122 */
"ORDER"
,
/* 123 */
"BY"
,
/* 124 */
"ASC"
,
/* 125 */
"DESC"
,
/* 126 */
"GROUP"
,
/* 127 */
"HAVING"
,
/* 128 */
"LIMIT"
,
/* 129 */
"OFFSET"
,
/* 130 */
"SLIMIT"
,
/* 131 */
"SOFFSET"
,
/* 132 */
"WHERE"
,
/* 133 */
"NOW"
,
/* 134 */
"RESET"
,
/* 135 */
"QUERY"
,
/* 136 */
"SYNCDB"
,
/* 137 */
"ADD"
,
/* 138 */
"COLUMN"
,
/* 139 */
"TAG"
,
/* 140 */
"CHANGE"
,
/* 141 */
"SET"
,
/* 142 */
"KILL"
,
/* 143 */
"CONNECTION"
,
/* 144 */
"STREAM"
,
/* 145 */
"COLON"
,
/* 146 */
"ABORT"
,
/* 147 */
"AFTER"
,
/* 148 */
"ATTACH"
,
/* 149 */
"BEFORE"
,
/* 150 */
"BEGIN"
,
/* 151 */
"CASCADE"
,
/* 152 */
"CLUSTER"
,
/* 153 */
"CONFLICT"
,
/* 154 */
"COPY"
,
/* 155 */
"DEFERRED"
,
/* 156 */
"DELIMITERS"
,
/* 157 */
"DETACH"
,
/* 158 */
"EACH"
,
/* 159 */
"END"
,
/* 160 */
"EXPLAIN"
,
/* 161 */
"FAIL"
,
/* 162 */
"FOR"
,
/* 163 */
"IGNORE"
,
/* 164 */
"IMMEDIATE"
,
/* 165 */
"INITIALLY"
,
/* 166 */
"INSTEAD"
,
/* 167 */
"MATCH"
,
/* 168 */
"KEY"
,
/* 169 */
"OF"
,
/* 170 */
"RAISE"
,
/* 171 */
"REPLACE"
,
/* 172 */
"RESTRICT"
,
/* 173 */
"ROW"
,
/* 174 */
"STATEMENT"
,
/* 175 */
"TRIGGER"
,
/* 176 */
"VIEW"
,
/* 177 */
"SEMI"
,
/* 178 */
"NONE"
,
/* 179 */
"PREV"
,
/* 180 */
"LINEAR"
,
/* 181 */
"IMPORT"
,
/* 182 */
"TBNAME"
,
/* 183 */
"JOIN"
,
/* 184 */
"INSERT"
,
/* 185 */
"INTO"
,
/* 186 */
"VALUES"
,
/* 187 */
"error"
,
/* 188 */
"program"
,
/* 189 */
"cmd"
,
/* 190 */
"dbPrefix"
,
/* 191 */
"ids"
,
/* 192 */
"cpxName"
,
/* 193 */
"ifexists"
,
/* 194 */
"alter_db_optr"
,
/* 195 */
"alter_topic_optr"
,
/* 196 */
"acct_optr"
,
/* 197 */
"ifnotexists"
,
/* 198 */
"db_optr"
,
/* 199 */
"topic_optr"
,
/* 200 */
"pps"
,
/* 201 */
"tseries"
,
/* 202 */
"dbs"
,
/* 203 */
"streams"
,
/* 204 */
"storage"
,
/* 205 */
"qtime"
,
/* 206 */
"users"
,
/* 207 */
"conns"
,
/* 208 */
"state"
,
/* 209 */
"keep"
,
/* 210 */
"tagitemlist"
,
/* 211 */
"cache"
,
/* 212 */
"replica"
,
/* 213 */
"quorum"
,
/* 214 */
"days"
,
/* 215 */
"minrows"
,
/* 216 */
"maxrows"
,
/* 217 */
"blocks"
,
/* 218 */
"ctime"
,
/* 219 */
"wal"
,
/* 220 */
"fsync"
,
/* 221 */
"comp"
,
/* 222 */
"prec"
,
/* 223 */
"update"
,
/* 224 */
"cachelast"
,
/* 225 */
"partitions"
,
/* 226 */
"typename"
,
/* 227 */
"signed"
,
/* 228 */
"create_table_args"
,
/* 229 */
"create_stable_args"
,
/* 230 */
"create_table_list"
,
/* 231 */
"create_from_stable"
,
/* 232 */
"columnlist"
,
/* 233 */
"tagNamelist"
,
/* 234 */
"select"
,
/* 235 */
"column"
,
/* 236 */
"tagitem"
,
/* 237 */
"selcollist"
,
/* 238 */
"from"
,
/* 239 */
"where_opt"
,
/* 240 */
"interval_opt"
,
/* 241 */
"session_option"
,
/* 242 */
"fill_opt"
,
/* 243 */
"sliding_opt"
,
/* 244 */
"groupby_opt"
,
/* 245 */
"orderby_opt"
,
/* 246 */
"having_opt"
,
/* 247 */
"slimit_opt"
,
/* 248 */
"limit_opt"
,
/* 249 */
"union"
,
/* 250 */
"sclp"
,
/* 251 */
"distinct"
,
/* 252 */
"expr"
,
/* 253 */
"as"
,
/* 254 */
"tablelist"
,
/* 255 */
"sub"
,
/* 256 */
"tmvar"
,
/* 257 */
"sortlist"
,
/* 258 */
"sortitem"
,
/* 259 */
"item"
,
/* 260 */
"sortorder"
,
/* 261 */
"grouplist"
,
/* 262 */
"exprlist"
,
/* 263 */
"expritem"
,
/* 120 */
"STATE_WINDOW"
,
/* 121 */
"FILL"
,
/* 122 */
"SLIDING"
,
/* 123 */
"ORDER"
,
/* 124 */
"BY"
,
/* 125 */
"ASC"
,
/* 126 */
"DESC"
,
/* 127 */
"GROUP"
,
/* 128 */
"HAVING"
,
/* 129 */
"LIMIT"
,
/* 130 */
"OFFSET"
,
/* 131 */
"SLIMIT"
,
/* 132 */
"SOFFSET"
,
/* 133 */
"WHERE"
,
/* 134 */
"NOW"
,
/* 135 */
"RESET"
,
/* 136 */
"QUERY"
,
/* 137 */
"SYNCDB"
,
/* 138 */
"ADD"
,
/* 139 */
"COLUMN"
,
/* 140 */
"TAG"
,
/* 141 */
"CHANGE"
,
/* 142 */
"SET"
,
/* 143 */
"KILL"
,
/* 144 */
"CONNECTION"
,
/* 145 */
"STREAM"
,
/* 146 */
"COLON"
,
/* 147 */
"ABORT"
,
/* 148 */
"AFTER"
,
/* 149 */
"ATTACH"
,
/* 150 */
"BEFORE"
,
/* 151 */
"BEGIN"
,
/* 152 */
"CASCADE"
,
/* 153 */
"CLUSTER"
,
/* 154 */
"CONFLICT"
,
/* 155 */
"COPY"
,
/* 156 */
"DEFERRED"
,
/* 157 */
"DELIMITERS"
,
/* 158 */
"DETACH"
,
/* 159 */
"EACH"
,
/* 160 */
"END"
,
/* 161 */
"EXPLAIN"
,
/* 162 */
"FAIL"
,
/* 163 */
"FOR"
,
/* 164 */
"IGNORE"
,
/* 165 */
"IMMEDIATE"
,
/* 166 */
"INITIALLY"
,
/* 167 */
"INSTEAD"
,
/* 168 */
"MATCH"
,
/* 169 */
"KEY"
,
/* 170 */
"OF"
,
/* 171 */
"RAISE"
,
/* 172 */
"REPLACE"
,
/* 173 */
"RESTRICT"
,
/* 174 */
"ROW"
,
/* 175 */
"STATEMENT"
,
/* 176 */
"TRIGGER"
,
/* 177 */
"VIEW"
,
/* 178 */
"SEMI"
,
/* 179 */
"NONE"
,
/* 180 */
"PREV"
,
/* 181 */
"LINEAR"
,
/* 182 */
"IMPORT"
,
/* 183 */
"TBNAME"
,
/* 184 */
"JOIN"
,
/* 185 */
"INSERT"
,
/* 186 */
"INTO"
,
/* 187 */
"VALUES"
,
/* 188 */
"error"
,
/* 189 */
"program"
,
/* 190 */
"cmd"
,
/* 191 */
"dbPrefix"
,
/* 192 */
"ids"
,
/* 193 */
"cpxName"
,
/* 194 */
"ifexists"
,
/* 195 */
"alter_db_optr"
,
/* 196 */
"alter_topic_optr"
,
/* 197 */
"acct_optr"
,
/* 198 */
"ifnotexists"
,
/* 199 */
"db_optr"
,
/* 200 */
"topic_optr"
,
/* 201 */
"pps"
,
/* 202 */
"tseries"
,
/* 203 */
"dbs"
,
/* 204 */
"streams"
,
/* 205 */
"storage"
,
/* 206 */
"qtime"
,
/* 207 */
"users"
,
/* 208 */
"conns"
,
/* 209 */
"state"
,
/* 210 */
"keep"
,
/* 211 */
"tagitemlist"
,
/* 212 */
"cache"
,
/* 213 */
"replica"
,
/* 214 */
"quorum"
,
/* 215 */
"days"
,
/* 216 */
"minrows"
,
/* 217 */
"maxrows"
,
/* 218 */
"blocks"
,
/* 219 */
"ctime"
,
/* 220 */
"wal"
,
/* 221 */
"fsync"
,
/* 222 */
"comp"
,
/* 223 */
"prec"
,
/* 224 */
"update"
,
/* 225 */
"cachelast"
,
/* 226 */
"partitions"
,
/* 227 */
"typename"
,
/* 228 */
"signed"
,
/* 229 */
"create_table_args"
,
/* 230 */
"create_stable_args"
,
/* 231 */
"create_table_list"
,
/* 232 */
"create_from_stable"
,
/* 233 */
"columnlist"
,
/* 234 */
"tagNamelist"
,
/* 235 */
"select"
,
/* 236 */
"column"
,
/* 237 */
"tagitem"
,
/* 238 */
"selcollist"
,
/* 239 */
"from"
,
/* 240 */
"where_opt"
,
/* 241 */
"interval_opt"
,
/* 242 */
"session_option"
,
/* 243 */
"windowstate_option"
,
/* 244 */
"fill_opt"
,
/* 245 */
"sliding_opt"
,
/* 246 */
"groupby_opt"
,
/* 247 */
"orderby_opt"
,
/* 248 */
"having_opt"
,
/* 249 */
"slimit_opt"
,
/* 250 */
"limit_opt"
,
/* 251 */
"union"
,
/* 252 */
"sclp"
,
/* 253 */
"distinct"
,
/* 254 */
"expr"
,
/* 255 */
"as"
,
/* 256 */
"tablelist"
,
/* 257 */
"sub"
,
/* 258 */
"tmvar"
,
/* 259 */
"sortlist"
,
/* 260 */
"sortitem"
,
/* 261 */
"item"
,
/* 262 */
"sortorder"
,
/* 263 */
"grouplist"
,
/* 264 */
"exprlist"
,
/* 265 */
"expritem"
,
};
#endif
/* defined(YYCOVERAGE) || !defined(NDEBUG) */
...
...
@@ -1183,7 +1187,7 @@ static const char *const yyRuleName[] = {
/* 154 */
"tagitem ::= MINUS FLOAT"
,
/* 155 */
"tagitem ::= PLUS INTEGER"
,
/* 156 */
"tagitem ::= PLUS FLOAT"
,
/* 157 */
"select ::= SELECT selcollist from where_opt interval_opt session_option fill_opt sliding_opt groupby_opt orderby_opt having_opt slimit_opt limit_opt"
,
/* 157 */
"select ::= SELECT selcollist from where_opt interval_opt session_option
windowstate_option
fill_opt sliding_opt groupby_opt orderby_opt having_opt slimit_opt limit_opt"
,
/* 158 */
"select ::= LP select RP"
,
/* 159 */
"union ::= select"
,
/* 160 */
"union ::= union UNION ALL select"
,
...
...
@@ -1213,92 +1217,94 @@ static const char *const yyRuleName[] = {
/* 184 */
"interval_opt ::="
,
/* 185 */
"session_option ::="
,
/* 186 */
"session_option ::= SESSION LP ids cpxName COMMA tmvar RP"
,
/* 187 */
"fill_opt ::="
,
/* 188 */
"fill_opt ::= FILL LP ID COMMA tagitemlist RP"
,
/* 189 */
"fill_opt ::= FILL LP ID RP"
,
/* 190 */
"sliding_opt ::= SLIDING LP tmvar RP"
,
/* 191 */
"sliding_opt ::="
,
/* 192 */
"orderby_opt ::="
,
/* 193 */
"orderby_opt ::= ORDER BY sortlist"
,
/* 194 */
"sortlist ::= sortlist COMMA item sortorder"
,
/* 195 */
"sortlist ::= item sortorder"
,
/* 196 */
"item ::= ids cpxName"
,
/* 197 */
"sortorder ::= ASC"
,
/* 198 */
"sortorder ::= DESC"
,
/* 199 */
"sortorder ::="
,
/* 200 */
"groupby_opt ::="
,
/* 201 */
"groupby_opt ::= GROUP BY grouplist"
,
/* 202 */
"grouplist ::= grouplist COMMA item"
,
/* 203 */
"grouplist ::= item"
,
/* 204 */
"having_opt ::="
,
/* 205 */
"having_opt ::= HAVING expr"
,
/* 206 */
"limit_opt ::="
,
/* 207 */
"limit_opt ::= LIMIT signed"
,
/* 208 */
"limit_opt ::= LIMIT signed OFFSET signed"
,
/* 209 */
"limit_opt ::= LIMIT signed COMMA signed"
,
/* 210 */
"slimit_opt ::="
,
/* 211 */
"slimit_opt ::= SLIMIT signed"
,
/* 212 */
"slimit_opt ::= SLIMIT signed SOFFSET signed"
,
/* 213 */
"slimit_opt ::= SLIMIT signed COMMA signed"
,
/* 214 */
"where_opt ::="
,
/* 215 */
"where_opt ::= WHERE expr"
,
/* 216 */
"expr ::= LP expr RP"
,
/* 217 */
"expr ::= ID"
,
/* 218 */
"expr ::= ID DOT ID"
,
/* 219 */
"expr ::= ID DOT STAR"
,
/* 220 */
"expr ::= INTEGER"
,
/* 221 */
"expr ::= MINUS INTEGER"
,
/* 222 */
"expr ::= PLUS INTEGER"
,
/* 223 */
"expr ::= FLOAT"
,
/* 224 */
"expr ::= MINUS FLOAT"
,
/* 225 */
"expr ::= PLUS FLOAT"
,
/* 226 */
"expr ::= STRING"
,
/* 227 */
"expr ::= NOW"
,
/* 228 */
"expr ::= VARIABLE"
,
/* 229 */
"expr ::= PLUS VARIABLE"
,
/* 230 */
"expr ::= MINUS VARIABLE"
,
/* 231 */
"expr ::= BOOL"
,
/* 232 */
"expr ::= NULL"
,
/* 233 */
"expr ::= ID LP exprlist RP"
,
/* 234 */
"expr ::= ID LP STAR RP"
,
/* 235 */
"expr ::= expr IS NULL"
,
/* 236 */
"expr ::= expr IS NOT NULL"
,
/* 237 */
"expr ::= expr LT expr"
,
/* 238 */
"expr ::= expr GT expr"
,
/* 239 */
"expr ::= expr LE expr"
,
/* 240 */
"expr ::= expr GE expr"
,
/* 241 */
"expr ::= expr NE expr"
,
/* 242 */
"expr ::= expr EQ expr"
,
/* 243 */
"expr ::= expr BETWEEN expr AND expr"
,
/* 244 */
"expr ::= expr AND expr"
,
/* 245 */
"expr ::= expr OR expr"
,
/* 246 */
"expr ::= expr PLUS expr"
,
/* 247 */
"expr ::= expr MINUS expr"
,
/* 248 */
"expr ::= expr STAR expr"
,
/* 249 */
"expr ::= expr SLASH expr"
,
/* 250 */
"expr ::= expr REM expr"
,
/* 251 */
"expr ::= expr LIKE expr"
,
/* 252 */
"expr ::= expr IN LP exprlist RP"
,
/* 253 */
"exprlist ::= exprlist COMMA expritem"
,
/* 254 */
"exprlist ::= expritem"
,
/* 255 */
"expritem ::= expr"
,
/* 256 */
"expritem ::="
,
/* 257 */
"cmd ::= RESET QUERY CACHE"
,
/* 258 */
"cmd ::= SYNCDB ids REPLICA"
,
/* 259 */
"cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist"
,
/* 260 */
"cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids"
,
/* 261 */
"cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist"
,
/* 262 */
"cmd ::= ALTER TABLE ids cpxName DROP TAG ids"
,
/* 263 */
"cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids"
,
/* 264 */
"cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem"
,
/* 265 */
"cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist"
,
/* 266 */
"cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids"
,
/* 267 */
"cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist"
,
/* 268 */
"cmd ::= ALTER STABLE ids cpxName DROP TAG ids"
,
/* 269 */
"cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids"
,
/* 270 */
"cmd ::= KILL CONNECTION INTEGER"
,
/* 271 */
"cmd ::= KILL STREAM INTEGER COLON INTEGER"
,
/* 272 */
"cmd ::= KILL QUERY INTEGER COLON INTEGER"
,
/* 187 */
"windowstate_option ::="
,
/* 188 */
"windowstate_option ::= STATE_WINDOW LP ids RP"
,
/* 189 */
"fill_opt ::="
,
/* 190 */
"fill_opt ::= FILL LP ID COMMA tagitemlist RP"
,
/* 191 */
"fill_opt ::= FILL LP ID RP"
,
/* 192 */
"sliding_opt ::= SLIDING LP tmvar RP"
,
/* 193 */
"sliding_opt ::="
,
/* 194 */
"orderby_opt ::="
,
/* 195 */
"orderby_opt ::= ORDER BY sortlist"
,
/* 196 */
"sortlist ::= sortlist COMMA item sortorder"
,
/* 197 */
"sortlist ::= item sortorder"
,
/* 198 */
"item ::= ids cpxName"
,
/* 199 */
"sortorder ::= ASC"
,
/* 200 */
"sortorder ::= DESC"
,
/* 201 */
"sortorder ::="
,
/* 202 */
"groupby_opt ::="
,
/* 203 */
"groupby_opt ::= GROUP BY grouplist"
,
/* 204 */
"grouplist ::= grouplist COMMA item"
,
/* 205 */
"grouplist ::= item"
,
/* 206 */
"having_opt ::="
,
/* 207 */
"having_opt ::= HAVING expr"
,
/* 208 */
"limit_opt ::="
,
/* 209 */
"limit_opt ::= LIMIT signed"
,
/* 210 */
"limit_opt ::= LIMIT signed OFFSET signed"
,
/* 211 */
"limit_opt ::= LIMIT signed COMMA signed"
,
/* 212 */
"slimit_opt ::="
,
/* 213 */
"slimit_opt ::= SLIMIT signed"
,
/* 214 */
"slimit_opt ::= SLIMIT signed SOFFSET signed"
,
/* 215 */
"slimit_opt ::= SLIMIT signed COMMA signed"
,
/* 216 */
"where_opt ::="
,
/* 217 */
"where_opt ::= WHERE expr"
,
/* 218 */
"expr ::= LP expr RP"
,
/* 219 */
"expr ::= ID"
,
/* 220 */
"expr ::= ID DOT ID"
,
/* 221 */
"expr ::= ID DOT STAR"
,
/* 222 */
"expr ::= INTEGER"
,
/* 223 */
"expr ::= MINUS INTEGER"
,
/* 224 */
"expr ::= PLUS INTEGER"
,
/* 225 */
"expr ::= FLOAT"
,
/* 226 */
"expr ::= MINUS FLOAT"
,
/* 227 */
"expr ::= PLUS FLOAT"
,
/* 228 */
"expr ::= STRING"
,
/* 229 */
"expr ::= NOW"
,
/* 230 */
"expr ::= VARIABLE"
,
/* 231 */
"expr ::= PLUS VARIABLE"
,
/* 232 */
"expr ::= MINUS VARIABLE"
,
/* 233 */
"expr ::= BOOL"
,
/* 234 */
"expr ::= NULL"
,
/* 235 */
"expr ::= ID LP exprlist RP"
,
/* 236 */
"expr ::= ID LP STAR RP"
,
/* 237 */
"expr ::= expr IS NULL"
,
/* 238 */
"expr ::= expr IS NOT NULL"
,
/* 239 */
"expr ::= expr LT expr"
,
/* 240 */
"expr ::= expr GT expr"
,
/* 241 */
"expr ::= expr LE expr"
,
/* 242 */
"expr ::= expr GE expr"
,
/* 243 */
"expr ::= expr NE expr"
,
/* 244 */
"expr ::= expr EQ expr"
,
/* 245 */
"expr ::= expr BETWEEN expr AND expr"
,
/* 246 */
"expr ::= expr AND expr"
,
/* 247 */
"expr ::= expr OR expr"
,
/* 248 */
"expr ::= expr PLUS expr"
,
/* 249 */
"expr ::= expr MINUS expr"
,
/* 250 */
"expr ::= expr STAR expr"
,
/* 251 */
"expr ::= expr SLASH expr"
,
/* 252 */
"expr ::= expr REM expr"
,
/* 253 */
"expr ::= expr LIKE expr"
,
/* 254 */
"expr ::= expr IN LP exprlist RP"
,
/* 255 */
"exprlist ::= exprlist COMMA expritem"
,
/* 256 */
"exprlist ::= expritem"
,
/* 257 */
"expritem ::= expr"
,
/* 258 */
"expritem ::="
,
/* 259 */
"cmd ::= RESET QUERY CACHE"
,
/* 260 */
"cmd ::= SYNCDB ids REPLICA"
,
/* 261 */
"cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist"
,
/* 262 */
"cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids"
,
/* 263 */
"cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist"
,
/* 264 */
"cmd ::= ALTER TABLE ids cpxName DROP TAG ids"
,
/* 265 */
"cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids"
,
/* 266 */
"cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem"
,
/* 267 */
"cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist"
,
/* 268 */
"cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids"
,
/* 269 */
"cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist"
,
/* 270 */
"cmd ::= ALTER STABLE ids cpxName DROP TAG ids"
,
/* 271 */
"cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids"
,
/* 272 */
"cmd ::= KILL CONNECTION INTEGER"
,
/* 273 */
"cmd ::= KILL STREAM INTEGER COLON INTEGER"
,
/* 274 */
"cmd ::= KILL QUERY INTEGER COLON INTEGER"
,
};
#endif
/* NDEBUG */
...
...
@@ -1419,59 +1425,59 @@ static void yy_destructor(
** inside the C code.
*/
/********* Begin destructor definitions ***************************************/
case
2
09
:
/* keep */
case
21
0
:
/* tagitemlist */
case
23
2
:
/* columnlist */
case
23
3
:
/* tagNamelist */
case
24
2
:
/* fill_opt */
case
24
4
:
/* groupby_opt */
case
24
5
:
/* orderby_opt */
case
25
7
:
/* sortlist */
case
26
1
:
/* grouplist */
case
2
10
:
/* keep */
case
21
1
:
/* tagitemlist */
case
23
3
:
/* columnlist */
case
23
4
:
/* tagNamelist */
case
24
4
:
/* fill_opt */
case
24
6
:
/* groupby_opt */
case
24
7
:
/* orderby_opt */
case
25
9
:
/* sortlist */
case
26
3
:
/* grouplist */
{
taosArrayDestroy
((
yypminor
->
yy
285
));
taosArrayDestroy
((
yypminor
->
yy
193
));
}
break
;
case
23
0
:
/* create_table_list */
case
23
1
:
/* create_table_list */
{
destroyCreateTableSql
((
yypminor
->
yy
4
70
));
destroyCreateTableSql
((
yypminor
->
yy
2
70
));
}
break
;
case
23
4
:
/* select */
case
23
5
:
/* select */
{
destroySqlNode
((
yypminor
->
yy
34
4
));
destroySqlNode
((
yypminor
->
yy
12
4
));
}
break
;
case
23
7
:
/* selcollist */
case
25
0
:
/* sclp */
case
26
2
:
/* exprlist */
case
23
8
:
/* selcollist */
case
25
2
:
/* sclp */
case
26
4
:
/* exprlist */
{
tSqlExprListDestroy
((
yypminor
->
yy
285
));
tSqlExprListDestroy
((
yypminor
->
yy
193
));
}
break
;
case
23
8
:
/* from */
case
25
4
:
/* tablelist */
case
25
5
:
/* sub */
case
23
9
:
/* from */
case
25
6
:
/* tablelist */
case
25
7
:
/* sub */
{
destroyRelationInfo
((
yypminor
->
yy
148
));
destroyRelationInfo
((
yypminor
->
yy
332
));
}
break
;
case
2
39
:
/* where_opt */
case
24
6
:
/* having_opt */
case
25
2
:
/* expr */
case
26
3
:
/* expritem */
case
2
40
:
/* where_opt */
case
24
8
:
/* having_opt */
case
25
4
:
/* expr */
case
26
5
:
/* expritem */
{
tSqlExprDestroy
((
yypminor
->
yy
178
));
tSqlExprDestroy
((
yypminor
->
yy
454
));
}
break
;
case
2
49
:
/* union */
case
2
51
:
/* union */
{
destroyAllSqlNode
((
yypminor
->
yy
285
));
destroyAllSqlNode
((
yypminor
->
yy
193
));
}
break
;
case
2
58
:
/* sortitem */
case
2
60
:
/* sortitem */
{
tVariantDestroy
(
&
(
yypminor
->
yy
36
2
));
tVariantDestroy
(
&
(
yypminor
->
yy
44
2
));
}
break
;
/********* End destructor definitions *****************************************/
...
...
@@ -1765,279 +1771,281 @@ static const struct {
YYCODETYPE
lhs
;
/* Symbol on the left-hand side of the rule */
signed
char
nrhs
;
/* Negative of the number of RHS symbols in the rule */
}
yyRuleInfo
[]
=
{
{
188
,
-
1
},
/* (0) program ::= cmd */
{
189
,
-
2
},
/* (1) cmd ::= SHOW DATABASES */
{
189
,
-
2
},
/* (2) cmd ::= SHOW TOPICS */
{
189
,
-
2
},
/* (3) cmd ::= SHOW MNODES */
{
189
,
-
2
},
/* (4) cmd ::= SHOW DNODES */
{
189
,
-
2
},
/* (5) cmd ::= SHOW ACCOUNTS */
{
189
,
-
2
},
/* (6) cmd ::= SHOW USERS */
{
189
,
-
2
},
/* (7) cmd ::= SHOW MODULES */
{
189
,
-
2
},
/* (8) cmd ::= SHOW QUERIES */
{
189
,
-
2
},
/* (9) cmd ::= SHOW CONNECTIONS */
{
189
,
-
2
},
/* (10) cmd ::= SHOW STREAMS */
{
189
,
-
2
},
/* (11) cmd ::= SHOW VARIABLES */
{
189
,
-
2
},
/* (12) cmd ::= SHOW SCORES */
{
189
,
-
2
},
/* (13) cmd ::= SHOW GRANTS */
{
189
,
-
2
},
/* (14) cmd ::= SHOW VNODES */
{
189
,
-
3
},
/* (15) cmd ::= SHOW VNODES IPTOKEN */
{
190
,
0
},
/* (16) dbPrefix ::= */
{
190
,
-
2
},
/* (17) dbPrefix ::= ids DOT */
{
192
,
0
},
/* (18) cpxName ::= */
{
192
,
-
2
},
/* (19) cpxName ::= DOT ids */
{
189
,
-
5
},
/* (20) cmd ::= SHOW CREATE TABLE ids cpxName */
{
189
,
-
5
},
/* (21) cmd ::= SHOW CREATE STABLE ids cpxName */
{
189
,
-
4
},
/* (22) cmd ::= SHOW CREATE DATABASE ids */
{
189
,
-
3
},
/* (23) cmd ::= SHOW dbPrefix TABLES */
{
189
,
-
5
},
/* (24) cmd ::= SHOW dbPrefix TABLES LIKE ids */
{
189
,
-
3
},
/* (25) cmd ::= SHOW dbPrefix STABLES */
{
189
,
-
5
},
/* (26) cmd ::= SHOW dbPrefix STABLES LIKE ids */
{
189
,
-
3
},
/* (27) cmd ::= SHOW dbPrefix VGROUPS */
{
189
,
-
4
},
/* (28) cmd ::= SHOW dbPrefix VGROUPS ids */
{
189
,
-
5
},
/* (29) cmd ::= DROP TABLE ifexists ids cpxName */
{
189
,
-
5
},
/* (30) cmd ::= DROP STABLE ifexists ids cpxName */
{
189
,
-
4
},
/* (31) cmd ::= DROP DATABASE ifexists ids */
{
189
,
-
4
},
/* (32) cmd ::= DROP TOPIC ifexists ids */
{
189
,
-
3
},
/* (33) cmd ::= DROP DNODE ids */
{
189
,
-
3
},
/* (34) cmd ::= DROP USER ids */
{
189
,
-
3
},
/* (35) cmd ::= DROP ACCOUNT ids */
{
189
,
-
2
},
/* (36) cmd ::= USE ids */
{
189
,
-
3
},
/* (37) cmd ::= DESCRIBE ids cpxName */
{
189
,
-
5
},
/* (38) cmd ::= ALTER USER ids PASS ids */
{
189
,
-
5
},
/* (39) cmd ::= ALTER USER ids PRIVILEGE ids */
{
189
,
-
4
},
/* (40) cmd ::= ALTER DNODE ids ids */
{
189
,
-
5
},
/* (41) cmd ::= ALTER DNODE ids ids ids */
{
189
,
-
3
},
/* (42) cmd ::= ALTER LOCAL ids */
{
189
,
-
4
},
/* (43) cmd ::= ALTER LOCAL ids ids */
{
189
,
-
4
},
/* (44) cmd ::= ALTER DATABASE ids alter_db_optr */
{
189
,
-
4
},
/* (45) cmd ::= ALTER TOPIC ids alter_topic_optr */
{
189
,
-
4
},
/* (46) cmd ::= ALTER ACCOUNT ids acct_optr */
{
189
,
-
6
},
/* (47) cmd ::= ALTER ACCOUNT ids PASS ids acct_optr */
{
191
,
-
1
},
/* (48) ids ::= ID */
{
191
,
-
1
},
/* (49) ids ::= STRING */
{
193
,
-
2
},
/* (50) ifexists ::= IF EXISTS */
{
193
,
0
},
/* (51) ifexists ::= */
{
197
,
-
3
},
/* (52) ifnotexists ::= IF NOT EXISTS */
{
197
,
0
},
/* (53) ifnotexists ::= */
{
189
,
-
3
},
/* (54) cmd ::= CREATE DNODE ids */
{
189
,
-
6
},
/* (55) cmd ::= CREATE ACCOUNT ids PASS ids acct_optr */
{
189
,
-
5
},
/* (56) cmd ::= CREATE DATABASE ifnotexists ids db_optr */
{
189
,
-
5
},
/* (57) cmd ::= CREATE TOPIC ifnotexists ids topic_optr */
{
189
,
-
5
},
/* (58) cmd ::= CREATE USER ids PASS ids */
{
200
,
0
},
/* (59) pps ::= */
{
200
,
-
2
},
/* (60) pps ::= PPS INTEGER */
{
201
,
0
},
/* (61) tseries ::= */
{
201
,
-
2
},
/* (62) tseries ::= TSERIES INTEGER */
{
202
,
0
},
/* (63) dbs ::= */
{
202
,
-
2
},
/* (64) dbs ::= DBS INTEGER */
{
203
,
0
},
/* (65) streams ::= */
{
203
,
-
2
},
/* (66) streams ::= STREAMS INTEGER */
{
204
,
0
},
/* (67) storage ::= */
{
204
,
-
2
},
/* (68) storage ::= STORAGE INTEGER */
{
205
,
0
},
/* (69) qtime ::= */
{
205
,
-
2
},
/* (70) qtime ::= QTIME INTEGER */
{
206
,
0
},
/* (71) users ::= */
{
206
,
-
2
},
/* (72) users ::= USERS INTEGER */
{
207
,
0
},
/* (73) conns ::= */
{
207
,
-
2
},
/* (74) conns ::= CONNS INTEGER */
{
208
,
0
},
/* (75) state ::= */
{
208
,
-
2
},
/* (76) state ::= STATE ids */
{
196
,
-
9
},
/* (77) acct_optr ::= pps tseries storage streams qtime dbs users conns state */
{
209
,
-
2
},
/* (78) keep ::= KEEP tagitemlist */
{
211
,
-
2
},
/* (79) cache ::= CACHE INTEGER */
{
212
,
-
2
},
/* (80) replica ::= REPLICA INTEGER */
{
213
,
-
2
},
/* (81) quorum ::= QUORUM INTEGER */
{
214
,
-
2
},
/* (82) days ::= DAYS INTEGER */
{
215
,
-
2
},
/* (83) minrows ::= MINROWS INTEGER */
{
216
,
-
2
},
/* (84) maxrows ::= MAXROWS INTEGER */
{
217
,
-
2
},
/* (85) blocks ::= BLOCKS INTEGER */
{
218
,
-
2
},
/* (86) ctime ::= CTIME INTEGER */
{
219
,
-
2
},
/* (87) wal ::= WAL INTEGER */
{
220
,
-
2
},
/* (88) fsync ::= FSYNC INTEGER */
{
221
,
-
2
},
/* (89) comp ::= COMP INTEGER */
{
222
,
-
2
},
/* (90) prec ::= PRECISION STRING */
{
223
,
-
2
},
/* (91) update ::= UPDATE INTEGER */
{
224
,
-
2
},
/* (92) cachelast ::= CACHELAST INTEGER */
{
225
,
-
2
},
/* (93) partitions ::= PARTITIONS INTEGER */
{
198
,
0
},
/* (94) db_optr ::= */
{
198
,
-
2
},
/* (95) db_optr ::= db_optr cache */
{
198
,
-
2
},
/* (96) db_optr ::= db_optr replica */
{
198
,
-
2
},
/* (97) db_optr ::= db_optr quorum */
{
198
,
-
2
},
/* (98) db_optr ::= db_optr days */
{
198
,
-
2
},
/* (99) db_optr ::= db_optr minrows */
{
198
,
-
2
},
/* (100) db_optr ::= db_optr maxrows */
{
198
,
-
2
},
/* (101) db_optr ::= db_optr blocks */
{
198
,
-
2
},
/* (102) db_optr ::= db_optr ctime */
{
198
,
-
2
},
/* (103) db_optr ::= db_optr wal */
{
198
,
-
2
},
/* (104) db_optr ::= db_optr fsync */
{
198
,
-
2
},
/* (105) db_optr ::= db_optr comp */
{
198
,
-
2
},
/* (106) db_optr ::= db_optr prec */
{
198
,
-
2
},
/* (107) db_optr ::= db_optr keep */
{
198
,
-
2
},
/* (108) db_optr ::= db_optr update */
{
198
,
-
2
},
/* (109) db_optr ::= db_optr cachelast */
{
199
,
-
1
},
/* (110) topic_optr ::= db_optr */
{
199
,
-
2
},
/* (111) topic_optr ::= topic_optr partitions */
{
194
,
0
},
/* (112) alter_db_optr ::= */
{
194
,
-
2
},
/* (113) alter_db_optr ::= alter_db_optr replica */
{
194
,
-
2
},
/* (114) alter_db_optr ::= alter_db_optr quorum */
{
194
,
-
2
},
/* (115) alter_db_optr ::= alter_db_optr keep */
{
194
,
-
2
},
/* (116) alter_db_optr ::= alter_db_optr blocks */
{
194
,
-
2
},
/* (117) alter_db_optr ::= alter_db_optr comp */
{
194
,
-
2
},
/* (118) alter_db_optr ::= alter_db_optr wal */
{
194
,
-
2
},
/* (119) alter_db_optr ::= alter_db_optr fsync */
{
194
,
-
2
},
/* (120) alter_db_optr ::= alter_db_optr update */
{
194
,
-
2
},
/* (121) alter_db_optr ::= alter_db_optr cachelast */
{
195
,
-
1
},
/* (122) alter_topic_optr ::= alter_db_optr */
{
195
,
-
2
},
/* (123) alter_topic_optr ::= alter_topic_optr partitions */
{
226
,
-
1
},
/* (124) typename ::= ids */
{
226
,
-
4
},
/* (125) typename ::= ids LP signed RP */
{
226
,
-
2
},
/* (126) typename ::= ids UNSIGNED */
{
227
,
-
1
},
/* (127) signed ::= INTEGER */
{
227
,
-
2
},
/* (128) signed ::= PLUS INTEGER */
{
227
,
-
2
},
/* (129) signed ::= MINUS INTEGER */
{
189
,
-
3
},
/* (130) cmd ::= CREATE TABLE create_table_args */
{
189
,
-
3
},
/* (131) cmd ::= CREATE TABLE create_stable_args */
{
189
,
-
3
},
/* (132) cmd ::= CREATE STABLE create_stable_args */
{
189
,
-
3
},
/* (133) cmd ::= CREATE TABLE create_table_list */
{
230
,
-
1
},
/* (134) create_table_list ::= create_from_stable */
{
230
,
-
2
},
/* (135) create_table_list ::= create_table_list create_from_stable */
{
228
,
-
6
},
/* (136) create_table_args ::= ifnotexists ids cpxName LP columnlist RP */
{
229
,
-
10
},
/* (137) create_stable_args ::= ifnotexists ids cpxName LP columnlist RP TAGS LP columnlist RP */
{
231
,
-
10
},
/* (138) create_from_stable ::= ifnotexists ids cpxName USING ids cpxName TAGS LP tagitemlist RP */
{
231
,
-
13
},
/* (139) create_from_stable ::= ifnotexists ids cpxName USING ids cpxName LP tagNamelist RP TAGS LP tagitemlist RP */
{
233
,
-
3
},
/* (140) tagNamelist ::= tagNamelist COMMA ids */
{
233
,
-
1
},
/* (141) tagNamelist ::= ids */
{
228
,
-
5
},
/* (142) create_table_args ::= ifnotexists ids cpxName AS select */
{
232
,
-
3
},
/* (143) columnlist ::= columnlist COMMA column */
{
232
,
-
1
},
/* (144) columnlist ::= column */
{
235
,
-
2
},
/* (145) column ::= ids typename */
{
210
,
-
3
},
/* (146) tagitemlist ::= tagitemlist COMMA tagitem */
{
210
,
-
1
},
/* (147) tagitemlist ::= tagitem */
{
236
,
-
1
},
/* (148) tagitem ::= INTEGER */
{
236
,
-
1
},
/* (149) tagitem ::= FLOAT */
{
236
,
-
1
},
/* (150) tagitem ::= STRING */
{
236
,
-
1
},
/* (151) tagitem ::= BOOL */
{
236
,
-
1
},
/* (152) tagitem ::= NULL */
{
236
,
-
2
},
/* (153) tagitem ::= MINUS INTEGER */
{
236
,
-
2
},
/* (154) tagitem ::= MINUS FLOAT */
{
236
,
-
2
},
/* (155) tagitem ::= PLUS INTEGER */
{
236
,
-
2
},
/* (156) tagitem ::= PLUS FLOAT */
{
234
,
-
13
},
/* (157) select ::= SELECT selcollist from where_opt interval_opt session_option fill_opt sliding_opt groupby_opt orderby_opt having_opt slimit_opt limit_opt */
{
234
,
-
3
},
/* (158) select ::= LP select RP */
{
249
,
-
1
},
/* (159) union ::= select */
{
249
,
-
4
},
/* (160) union ::= union UNION ALL select */
{
189
,
-
1
},
/* (161) cmd ::= union */
{
234
,
-
2
},
/* (162) select ::= SELECT selcollist */
{
250
,
-
2
},
/* (163) sclp ::= selcollist COMMA */
{
250
,
0
},
/* (164) sclp ::= */
{
237
,
-
4
},
/* (165) selcollist ::= sclp distinct expr as */
{
237
,
-
2
},
/* (166) selcollist ::= sclp STAR */
{
253
,
-
2
},
/* (167) as ::= AS ids */
{
253
,
-
1
},
/* (168) as ::= ids */
{
253
,
0
},
/* (169) as ::= */
{
251
,
-
1
},
/* (170) distinct ::= DISTINCT */
{
251
,
0
},
/* (171) distinct ::= */
{
238
,
-
2
},
/* (172) from ::= FROM tablelist */
{
238
,
-
2
},
/* (173) from ::= FROM sub */
{
255
,
-
3
},
/* (174) sub ::= LP union RP */
{
255
,
-
4
},
/* (175) sub ::= LP union RP ids */
{
255
,
-
6
},
/* (176) sub ::= sub COMMA LP union RP ids */
{
254
,
-
2
},
/* (177) tablelist ::= ids cpxName */
{
254
,
-
3
},
/* (178) tablelist ::= ids cpxName ids */
{
254
,
-
4
},
/* (179) tablelist ::= tablelist COMMA ids cpxName */
{
254
,
-
5
},
/* (180) tablelist ::= tablelist COMMA ids cpxName ids */
{
256
,
-
1
},
/* (181) tmvar ::= VARIABLE */
{
240
,
-
4
},
/* (182) interval_opt ::= INTERVAL LP tmvar RP */
{
240
,
-
6
},
/* (183) interval_opt ::= INTERVAL LP tmvar COMMA tmvar RP */
{
240
,
0
},
/* (184) interval_opt ::= */
{
241
,
0
},
/* (185) session_option ::= */
{
241
,
-
7
},
/* (186) session_option ::= SESSION LP ids cpxName COMMA tmvar RP */
{
242
,
0
},
/* (187) fill_opt ::= */
{
242
,
-
6
},
/* (188) fill_opt ::= FILL LP ID COMMA tagitemlist RP */
{
242
,
-
4
},
/* (189) fill_opt ::= FILL LP ID RP */
{
243
,
-
4
},
/* (190) sliding_opt ::= SLIDING LP tmvar RP */
{
243
,
0
},
/* (191) sliding_opt ::= */
{
245
,
0
},
/* (192) orderby_opt ::= */
{
245
,
-
3
},
/* (193) orderby_opt ::= ORDER BY sortlist */
{
257
,
-
4
},
/* (194) sortlist ::= sortlist COMMA item sortorder */
{
257
,
-
2
},
/* (195) sortlist ::= item sortorder */
{
259
,
-
2
},
/* (196) item ::= ids cpxName */
{
260
,
-
1
},
/* (197) sortorder ::= ASC */
{
260
,
-
1
},
/* (198) sortorder ::= DESC */
{
260
,
0
},
/* (199) sortorder ::= */
{
244
,
0
},
/* (200) groupby_opt ::= */
{
244
,
-
3
},
/* (201) groupby_opt ::= GROUP BY grouplist */
{
261
,
-
3
},
/* (202) grouplist ::= grouplist COMMA item */
{
261
,
-
1
},
/* (203) grouplist ::= item */
{
246
,
0
},
/* (204) having_opt ::= */
{
246
,
-
2
},
/* (205) having_opt ::= HAVING expr */
{
248
,
0
},
/* (206) limit_opt ::= */
{
248
,
-
2
},
/* (207) limit_opt ::= LIMIT signed */
{
248
,
-
4
},
/* (208) limit_opt ::= LIMIT signed OFFSET signed */
{
248
,
-
4
},
/* (209) limit_opt ::= LIMIT signed COMMA signed */
{
247
,
0
},
/* (210) slimit_opt ::= */
{
247
,
-
2
},
/* (211) slimit_opt ::= SLIMIT signed */
{
247
,
-
4
},
/* (212) slimit_opt ::= SLIMIT signed SOFFSET signed */
{
247
,
-
4
},
/* (213) slimit_opt ::= SLIMIT signed COMMA signed */
{
239
,
0
},
/* (214) where_opt ::= */
{
239
,
-
2
},
/* (215) where_opt ::= WHERE expr */
{
252
,
-
3
},
/* (216) expr ::= LP expr RP */
{
252
,
-
1
},
/* (217) expr ::= ID */
{
252
,
-
3
},
/* (218) expr ::= ID DOT ID */
{
252
,
-
3
},
/* (219) expr ::= ID DOT STAR */
{
252
,
-
1
},
/* (220) expr ::= INTEGER */
{
252
,
-
2
},
/* (221) expr ::= MINUS INTEGER */
{
252
,
-
2
},
/* (222) expr ::= PLUS INTEGER */
{
252
,
-
1
},
/* (223) expr ::= FLOAT */
{
252
,
-
2
},
/* (224) expr ::= MINUS FLOAT */
{
252
,
-
2
},
/* (225) expr ::= PLUS FLOAT */
{
252
,
-
1
},
/* (226) expr ::= STRING */
{
252
,
-
1
},
/* (227) expr ::= NOW */
{
252
,
-
1
},
/* (228) expr ::= VARIABLE */
{
252
,
-
2
},
/* (229) expr ::= PLUS VARIABLE */
{
252
,
-
2
},
/* (230) expr ::= MINUS VARIABLE */
{
252
,
-
1
},
/* (231) expr ::= BOOL */
{
252
,
-
1
},
/* (232) expr ::= NULL */
{
252
,
-
4
},
/* (233) expr ::= ID LP exprlist RP */
{
252
,
-
4
},
/* (234) expr ::= ID LP STAR RP */
{
252
,
-
3
},
/* (235) expr ::= expr IS NULL */
{
252
,
-
4
},
/* (236) expr ::= expr IS NOT NULL */
{
252
,
-
3
},
/* (237) expr ::= expr LT expr */
{
252
,
-
3
},
/* (238) expr ::= expr GT expr */
{
252
,
-
3
},
/* (239) expr ::= expr LE expr */
{
252
,
-
3
},
/* (240) expr ::= expr GE expr */
{
252
,
-
3
},
/* (241) expr ::= expr NE expr */
{
252
,
-
3
},
/* (242) expr ::= expr EQ expr */
{
252
,
-
5
},
/* (243) expr ::= expr BETWEEN expr AND expr */
{
252
,
-
3
},
/* (244) expr ::= expr AND expr */
{
252
,
-
3
},
/* (245) expr ::= expr OR expr */
{
252
,
-
3
},
/* (246) expr ::= expr PLUS expr */
{
252
,
-
3
},
/* (247) expr ::= expr MINUS expr */
{
252
,
-
3
},
/* (248) expr ::= expr STAR expr */
{
252
,
-
3
},
/* (249) expr ::= expr SLASH expr */
{
252
,
-
3
},
/* (250) expr ::= expr REM expr */
{
252
,
-
3
},
/* (251) expr ::= expr LIKE expr */
{
252
,
-
5
},
/* (252) expr ::= expr IN LP exprlist RP */
{
262
,
-
3
},
/* (253) exprlist ::= exprlist COMMA expritem */
{
262
,
-
1
},
/* (254) exprlist ::= expritem */
{
263
,
-
1
},
/* (255) expritem ::= expr */
{
263
,
0
},
/* (256) expritem ::= */
{
189
,
-
3
},
/* (257) cmd ::= RESET QUERY CACHE */
{
189
,
-
3
},
/* (258) cmd ::= SYNCDB ids REPLICA */
{
189
,
-
7
},
/* (259) cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */
{
189
,
-
7
},
/* (260) cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */
{
189
,
-
7
},
/* (261) cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */
{
189
,
-
7
},
/* (262) cmd ::= ALTER TABLE ids cpxName DROP TAG ids */
{
189
,
-
8
},
/* (263) cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */
{
189
,
-
9
},
/* (264) cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */
{
189
,
-
7
},
/* (265) cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */
{
189
,
-
7
},
/* (266) cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */
{
189
,
-
7
},
/* (267) cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */
{
189
,
-
7
},
/* (268) cmd ::= ALTER STABLE ids cpxName DROP TAG ids */
{
189
,
-
8
},
/* (269) cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */
{
189
,
-
3
},
/* (270) cmd ::= KILL CONNECTION INTEGER */
{
189
,
-
5
},
/* (271) cmd ::= KILL STREAM INTEGER COLON INTEGER */
{
189
,
-
5
},
/* (272) cmd ::= KILL QUERY INTEGER COLON INTEGER */
{
189
,
-
1
},
/* (0) program ::= cmd */
{
190
,
-
2
},
/* (1) cmd ::= SHOW DATABASES */
{
190
,
-
2
},
/* (2) cmd ::= SHOW TOPICS */
{
190
,
-
2
},
/* (3) cmd ::= SHOW MNODES */
{
190
,
-
2
},
/* (4) cmd ::= SHOW DNODES */
{
190
,
-
2
},
/* (5) cmd ::= SHOW ACCOUNTS */
{
190
,
-
2
},
/* (6) cmd ::= SHOW USERS */
{
190
,
-
2
},
/* (7) cmd ::= SHOW MODULES */
{
190
,
-
2
},
/* (8) cmd ::= SHOW QUERIES */
{
190
,
-
2
},
/* (9) cmd ::= SHOW CONNECTIONS */
{
190
,
-
2
},
/* (10) cmd ::= SHOW STREAMS */
{
190
,
-
2
},
/* (11) cmd ::= SHOW VARIABLES */
{
190
,
-
2
},
/* (12) cmd ::= SHOW SCORES */
{
190
,
-
2
},
/* (13) cmd ::= SHOW GRANTS */
{
190
,
-
2
},
/* (14) cmd ::= SHOW VNODES */
{
190
,
-
3
},
/* (15) cmd ::= SHOW VNODES IPTOKEN */
{
191
,
0
},
/* (16) dbPrefix ::= */
{
191
,
-
2
},
/* (17) dbPrefix ::= ids DOT */
{
193
,
0
},
/* (18) cpxName ::= */
{
193
,
-
2
},
/* (19) cpxName ::= DOT ids */
{
190
,
-
5
},
/* (20) cmd ::= SHOW CREATE TABLE ids cpxName */
{
190
,
-
5
},
/* (21) cmd ::= SHOW CREATE STABLE ids cpxName */
{
190
,
-
4
},
/* (22) cmd ::= SHOW CREATE DATABASE ids */
{
190
,
-
3
},
/* (23) cmd ::= SHOW dbPrefix TABLES */
{
190
,
-
5
},
/* (24) cmd ::= SHOW dbPrefix TABLES LIKE ids */
{
190
,
-
3
},
/* (25) cmd ::= SHOW dbPrefix STABLES */
{
190
,
-
5
},
/* (26) cmd ::= SHOW dbPrefix STABLES LIKE ids */
{
190
,
-
3
},
/* (27) cmd ::= SHOW dbPrefix VGROUPS */
{
190
,
-
4
},
/* (28) cmd ::= SHOW dbPrefix VGROUPS ids */
{
190
,
-
5
},
/* (29) cmd ::= DROP TABLE ifexists ids cpxName */
{
190
,
-
5
},
/* (30) cmd ::= DROP STABLE ifexists ids cpxName */
{
190
,
-
4
},
/* (31) cmd ::= DROP DATABASE ifexists ids */
{
190
,
-
4
},
/* (32) cmd ::= DROP TOPIC ifexists ids */
{
190
,
-
3
},
/* (33) cmd ::= DROP DNODE ids */
{
190
,
-
3
},
/* (34) cmd ::= DROP USER ids */
{
190
,
-
3
},
/* (35) cmd ::= DROP ACCOUNT ids */
{
190
,
-
2
},
/* (36) cmd ::= USE ids */
{
190
,
-
3
},
/* (37) cmd ::= DESCRIBE ids cpxName */
{
190
,
-
5
},
/* (38) cmd ::= ALTER USER ids PASS ids */
{
190
,
-
5
},
/* (39) cmd ::= ALTER USER ids PRIVILEGE ids */
{
190
,
-
4
},
/* (40) cmd ::= ALTER DNODE ids ids */
{
190
,
-
5
},
/* (41) cmd ::= ALTER DNODE ids ids ids */
{
190
,
-
3
},
/* (42) cmd ::= ALTER LOCAL ids */
{
190
,
-
4
},
/* (43) cmd ::= ALTER LOCAL ids ids */
{
190
,
-
4
},
/* (44) cmd ::= ALTER DATABASE ids alter_db_optr */
{
190
,
-
4
},
/* (45) cmd ::= ALTER TOPIC ids alter_topic_optr */
{
190
,
-
4
},
/* (46) cmd ::= ALTER ACCOUNT ids acct_optr */
{
190
,
-
6
},
/* (47) cmd ::= ALTER ACCOUNT ids PASS ids acct_optr */
{
192
,
-
1
},
/* (48) ids ::= ID */
{
192
,
-
1
},
/* (49) ids ::= STRING */
{
194
,
-
2
},
/* (50) ifexists ::= IF EXISTS */
{
194
,
0
},
/* (51) ifexists ::= */
{
198
,
-
3
},
/* (52) ifnotexists ::= IF NOT EXISTS */
{
198
,
0
},
/* (53) ifnotexists ::= */
{
190
,
-
3
},
/* (54) cmd ::= CREATE DNODE ids */
{
190
,
-
6
},
/* (55) cmd ::= CREATE ACCOUNT ids PASS ids acct_optr */
{
190
,
-
5
},
/* (56) cmd ::= CREATE DATABASE ifnotexists ids db_optr */
{
190
,
-
5
},
/* (57) cmd ::= CREATE TOPIC ifnotexists ids topic_optr */
{
190
,
-
5
},
/* (58) cmd ::= CREATE USER ids PASS ids */
{
201
,
0
},
/* (59) pps ::= */
{
201
,
-
2
},
/* (60) pps ::= PPS INTEGER */
{
202
,
0
},
/* (61) tseries ::= */
{
202
,
-
2
},
/* (62) tseries ::= TSERIES INTEGER */
{
203
,
0
},
/* (63) dbs ::= */
{
203
,
-
2
},
/* (64) dbs ::= DBS INTEGER */
{
204
,
0
},
/* (65) streams ::= */
{
204
,
-
2
},
/* (66) streams ::= STREAMS INTEGER */
{
205
,
0
},
/* (67) storage ::= */
{
205
,
-
2
},
/* (68) storage ::= STORAGE INTEGER */
{
206
,
0
},
/* (69) qtime ::= */
{
206
,
-
2
},
/* (70) qtime ::= QTIME INTEGER */
{
207
,
0
},
/* (71) users ::= */
{
207
,
-
2
},
/* (72) users ::= USERS INTEGER */
{
208
,
0
},
/* (73) conns ::= */
{
208
,
-
2
},
/* (74) conns ::= CONNS INTEGER */
{
209
,
0
},
/* (75) state ::= */
{
209
,
-
2
},
/* (76) state ::= STATE ids */
{
197
,
-
9
},
/* (77) acct_optr ::= pps tseries storage streams qtime dbs users conns state */
{
210
,
-
2
},
/* (78) keep ::= KEEP tagitemlist */
{
212
,
-
2
},
/* (79) cache ::= CACHE INTEGER */
{
213
,
-
2
},
/* (80) replica ::= REPLICA INTEGER */
{
214
,
-
2
},
/* (81) quorum ::= QUORUM INTEGER */
{
215
,
-
2
},
/* (82) days ::= DAYS INTEGER */
{
216
,
-
2
},
/* (83) minrows ::= MINROWS INTEGER */
{
217
,
-
2
},
/* (84) maxrows ::= MAXROWS INTEGER */
{
218
,
-
2
},
/* (85) blocks ::= BLOCKS INTEGER */
{
219
,
-
2
},
/* (86) ctime ::= CTIME INTEGER */
{
220
,
-
2
},
/* (87) wal ::= WAL INTEGER */
{
221
,
-
2
},
/* (88) fsync ::= FSYNC INTEGER */
{
222
,
-
2
},
/* (89) comp ::= COMP INTEGER */
{
223
,
-
2
},
/* (90) prec ::= PRECISION STRING */
{
224
,
-
2
},
/* (91) update ::= UPDATE INTEGER */
{
225
,
-
2
},
/* (92) cachelast ::= CACHELAST INTEGER */
{
226
,
-
2
},
/* (93) partitions ::= PARTITIONS INTEGER */
{
199
,
0
},
/* (94) db_optr ::= */
{
199
,
-
2
},
/* (95) db_optr ::= db_optr cache */
{
199
,
-
2
},
/* (96) db_optr ::= db_optr replica */
{
199
,
-
2
},
/* (97) db_optr ::= db_optr quorum */
{
199
,
-
2
},
/* (98) db_optr ::= db_optr days */
{
199
,
-
2
},
/* (99) db_optr ::= db_optr minrows */
{
199
,
-
2
},
/* (100) db_optr ::= db_optr maxrows */
{
199
,
-
2
},
/* (101) db_optr ::= db_optr blocks */
{
199
,
-
2
},
/* (102) db_optr ::= db_optr ctime */
{
199
,
-
2
},
/* (103) db_optr ::= db_optr wal */
{
199
,
-
2
},
/* (104) db_optr ::= db_optr fsync */
{
199
,
-
2
},
/* (105) db_optr ::= db_optr comp */
{
199
,
-
2
},
/* (106) db_optr ::= db_optr prec */
{
199
,
-
2
},
/* (107) db_optr ::= db_optr keep */
{
199
,
-
2
},
/* (108) db_optr ::= db_optr update */
{
199
,
-
2
},
/* (109) db_optr ::= db_optr cachelast */
{
200
,
-
1
},
/* (110) topic_optr ::= db_optr */
{
200
,
-
2
},
/* (111) topic_optr ::= topic_optr partitions */
{
195
,
0
},
/* (112) alter_db_optr ::= */
{
195
,
-
2
},
/* (113) alter_db_optr ::= alter_db_optr replica */
{
195
,
-
2
},
/* (114) alter_db_optr ::= alter_db_optr quorum */
{
195
,
-
2
},
/* (115) alter_db_optr ::= alter_db_optr keep */
{
195
,
-
2
},
/* (116) alter_db_optr ::= alter_db_optr blocks */
{
195
,
-
2
},
/* (117) alter_db_optr ::= alter_db_optr comp */
{
195
,
-
2
},
/* (118) alter_db_optr ::= alter_db_optr wal */
{
195
,
-
2
},
/* (119) alter_db_optr ::= alter_db_optr fsync */
{
195
,
-
2
},
/* (120) alter_db_optr ::= alter_db_optr update */
{
195
,
-
2
},
/* (121) alter_db_optr ::= alter_db_optr cachelast */
{
196
,
-
1
},
/* (122) alter_topic_optr ::= alter_db_optr */
{
196
,
-
2
},
/* (123) alter_topic_optr ::= alter_topic_optr partitions */
{
227
,
-
1
},
/* (124) typename ::= ids */
{
227
,
-
4
},
/* (125) typename ::= ids LP signed RP */
{
227
,
-
2
},
/* (126) typename ::= ids UNSIGNED */
{
228
,
-
1
},
/* (127) signed ::= INTEGER */
{
228
,
-
2
},
/* (128) signed ::= PLUS INTEGER */
{
228
,
-
2
},
/* (129) signed ::= MINUS INTEGER */
{
190
,
-
3
},
/* (130) cmd ::= CREATE TABLE create_table_args */
{
190
,
-
3
},
/* (131) cmd ::= CREATE TABLE create_stable_args */
{
190
,
-
3
},
/* (132) cmd ::= CREATE STABLE create_stable_args */
{
190
,
-
3
},
/* (133) cmd ::= CREATE TABLE create_table_list */
{
231
,
-
1
},
/* (134) create_table_list ::= create_from_stable */
{
231
,
-
2
},
/* (135) create_table_list ::= create_table_list create_from_stable */
{
229
,
-
6
},
/* (136) create_table_args ::= ifnotexists ids cpxName LP columnlist RP */
{
230
,
-
10
},
/* (137) create_stable_args ::= ifnotexists ids cpxName LP columnlist RP TAGS LP columnlist RP */
{
232
,
-
10
},
/* (138) create_from_stable ::= ifnotexists ids cpxName USING ids cpxName TAGS LP tagitemlist RP */
{
232
,
-
13
},
/* (139) create_from_stable ::= ifnotexists ids cpxName USING ids cpxName LP tagNamelist RP TAGS LP tagitemlist RP */
{
234
,
-
3
},
/* (140) tagNamelist ::= tagNamelist COMMA ids */
{
234
,
-
1
},
/* (141) tagNamelist ::= ids */
{
229
,
-
5
},
/* (142) create_table_args ::= ifnotexists ids cpxName AS select */
{
233
,
-
3
},
/* (143) columnlist ::= columnlist COMMA column */
{
233
,
-
1
},
/* (144) columnlist ::= column */
{
236
,
-
2
},
/* (145) column ::= ids typename */
{
211
,
-
3
},
/* (146) tagitemlist ::= tagitemlist COMMA tagitem */
{
211
,
-
1
},
/* (147) tagitemlist ::= tagitem */
{
237
,
-
1
},
/* (148) tagitem ::= INTEGER */
{
237
,
-
1
},
/* (149) tagitem ::= FLOAT */
{
237
,
-
1
},
/* (150) tagitem ::= STRING */
{
237
,
-
1
},
/* (151) tagitem ::= BOOL */
{
237
,
-
1
},
/* (152) tagitem ::= NULL */
{
237
,
-
2
},
/* (153) tagitem ::= MINUS INTEGER */
{
237
,
-
2
},
/* (154) tagitem ::= MINUS FLOAT */
{
237
,
-
2
},
/* (155) tagitem ::= PLUS INTEGER */
{
237
,
-
2
},
/* (156) tagitem ::= PLUS FLOAT */
{
235
,
-
14
},
/* (157) select ::= SELECT selcollist from where_opt interval_opt session_option windowstate_option fill_opt sliding_opt groupby_opt orderby_opt having_opt slimit_opt limit_opt */
{
235
,
-
3
},
/* (158) select ::= LP select RP */
{
251
,
-
1
},
/* (159) union ::= select */
{
251
,
-
4
},
/* (160) union ::= union UNION ALL select */
{
190
,
-
1
},
/* (161) cmd ::= union */
{
235
,
-
2
},
/* (162) select ::= SELECT selcollist */
{
252
,
-
2
},
/* (163) sclp ::= selcollist COMMA */
{
252
,
0
},
/* (164) sclp ::= */
{
238
,
-
4
},
/* (165) selcollist ::= sclp distinct expr as */
{
238
,
-
2
},
/* (166) selcollist ::= sclp STAR */
{
255
,
-
2
},
/* (167) as ::= AS ids */
{
255
,
-
1
},
/* (168) as ::= ids */
{
255
,
0
},
/* (169) as ::= */
{
253
,
-
1
},
/* (170) distinct ::= DISTINCT */
{
253
,
0
},
/* (171) distinct ::= */
{
239
,
-
2
},
/* (172) from ::= FROM tablelist */
{
239
,
-
2
},
/* (173) from ::= FROM sub */
{
257
,
-
3
},
/* (174) sub ::= LP union RP */
{
257
,
-
4
},
/* (175) sub ::= LP union RP ids */
{
257
,
-
6
},
/* (176) sub ::= sub COMMA LP union RP ids */
{
256
,
-
2
},
/* (177) tablelist ::= ids cpxName */
{
256
,
-
3
},
/* (178) tablelist ::= ids cpxName ids */
{
256
,
-
4
},
/* (179) tablelist ::= tablelist COMMA ids cpxName */
{
256
,
-
5
},
/* (180) tablelist ::= tablelist COMMA ids cpxName ids */
{
258
,
-
1
},
/* (181) tmvar ::= VARIABLE */
{
241
,
-
4
},
/* (182) interval_opt ::= INTERVAL LP tmvar RP */
{
241
,
-
6
},
/* (183) interval_opt ::= INTERVAL LP tmvar COMMA tmvar RP */
{
241
,
0
},
/* (184) interval_opt ::= */
{
242
,
0
},
/* (185) session_option ::= */
{
242
,
-
7
},
/* (186) session_option ::= SESSION LP ids cpxName COMMA tmvar RP */
{
243
,
0
},
/* (187) windowstate_option ::= */
{
243
,
-
4
},
/* (188) windowstate_option ::= STATE_WINDOW LP ids RP */
{
244
,
0
},
/* (189) fill_opt ::= */
{
244
,
-
6
},
/* (190) fill_opt ::= FILL LP ID COMMA tagitemlist RP */
{
244
,
-
4
},
/* (191) fill_opt ::= FILL LP ID RP */
{
245
,
-
4
},
/* (192) sliding_opt ::= SLIDING LP tmvar RP */
{
245
,
0
},
/* (193) sliding_opt ::= */
{
247
,
0
},
/* (194) orderby_opt ::= */
{
247
,
-
3
},
/* (195) orderby_opt ::= ORDER BY sortlist */
{
259
,
-
4
},
/* (196) sortlist ::= sortlist COMMA item sortorder */
{
259
,
-
2
},
/* (197) sortlist ::= item sortorder */
{
261
,
-
2
},
/* (198) item ::= ids cpxName */
{
262
,
-
1
},
/* (199) sortorder ::= ASC */
{
262
,
-
1
},
/* (200) sortorder ::= DESC */
{
262
,
0
},
/* (201) sortorder ::= */
{
246
,
0
},
/* (202) groupby_opt ::= */
{
246
,
-
3
},
/* (203) groupby_opt ::= GROUP BY grouplist */
{
263
,
-
3
},
/* (204) grouplist ::= grouplist COMMA item */
{
263
,
-
1
},
/* (205) grouplist ::= item */
{
248
,
0
},
/* (206) having_opt ::= */
{
248
,
-
2
},
/* (207) having_opt ::= HAVING expr */
{
250
,
0
},
/* (208) limit_opt ::= */
{
250
,
-
2
},
/* (209) limit_opt ::= LIMIT signed */
{
250
,
-
4
},
/* (210) limit_opt ::= LIMIT signed OFFSET signed */
{
250
,
-
4
},
/* (211) limit_opt ::= LIMIT signed COMMA signed */
{
249
,
0
},
/* (212) slimit_opt ::= */
{
249
,
-
2
},
/* (213) slimit_opt ::= SLIMIT signed */
{
249
,
-
4
},
/* (214) slimit_opt ::= SLIMIT signed SOFFSET signed */
{
249
,
-
4
},
/* (215) slimit_opt ::= SLIMIT signed COMMA signed */
{
240
,
0
},
/* (216) where_opt ::= */
{
240
,
-
2
},
/* (217) where_opt ::= WHERE expr */
{
254
,
-
3
},
/* (218) expr ::= LP expr RP */
{
254
,
-
1
},
/* (219) expr ::= ID */
{
254
,
-
3
},
/* (220) expr ::= ID DOT ID */
{
254
,
-
3
},
/* (221) expr ::= ID DOT STAR */
{
254
,
-
1
},
/* (222) expr ::= INTEGER */
{
254
,
-
2
},
/* (223) expr ::= MINUS INTEGER */
{
254
,
-
2
},
/* (224) expr ::= PLUS INTEGER */
{
254
,
-
1
},
/* (225) expr ::= FLOAT */
{
254
,
-
2
},
/* (226) expr ::= MINUS FLOAT */
{
254
,
-
2
},
/* (227) expr ::= PLUS FLOAT */
{
254
,
-
1
},
/* (228) expr ::= STRING */
{
254
,
-
1
},
/* (229) expr ::= NOW */
{
254
,
-
1
},
/* (230) expr ::= VARIABLE */
{
254
,
-
2
},
/* (231) expr ::= PLUS VARIABLE */
{
254
,
-
2
},
/* (232) expr ::= MINUS VARIABLE */
{
254
,
-
1
},
/* (233) expr ::= BOOL */
{
254
,
-
1
},
/* (234) expr ::= NULL */
{
254
,
-
4
},
/* (235) expr ::= ID LP exprlist RP */
{
254
,
-
4
},
/* (236) expr ::= ID LP STAR RP */
{
254
,
-
3
},
/* (237) expr ::= expr IS NULL */
{
254
,
-
4
},
/* (238) expr ::= expr IS NOT NULL */
{
254
,
-
3
},
/* (239) expr ::= expr LT expr */
{
254
,
-
3
},
/* (240) expr ::= expr GT expr */
{
254
,
-
3
},
/* (241) expr ::= expr LE expr */
{
254
,
-
3
},
/* (242) expr ::= expr GE expr */
{
254
,
-
3
},
/* (243) expr ::= expr NE expr */
{
254
,
-
3
},
/* (244) expr ::= expr EQ expr */
{
254
,
-
5
},
/* (245) expr ::= expr BETWEEN expr AND expr */
{
254
,
-
3
},
/* (246) expr ::= expr AND expr */
{
254
,
-
3
},
/* (247) expr ::= expr OR expr */
{
254
,
-
3
},
/* (248) expr ::= expr PLUS expr */
{
254
,
-
3
},
/* (249) expr ::= expr MINUS expr */
{
254
,
-
3
},
/* (250) expr ::= expr STAR expr */
{
254
,
-
3
},
/* (251) expr ::= expr SLASH expr */
{
254
,
-
3
},
/* (252) expr ::= expr REM expr */
{
254
,
-
3
},
/* (253) expr ::= expr LIKE expr */
{
254
,
-
5
},
/* (254) expr ::= expr IN LP exprlist RP */
{
264
,
-
3
},
/* (255) exprlist ::= exprlist COMMA expritem */
{
264
,
-
1
},
/* (256) exprlist ::= expritem */
{
265
,
-
1
},
/* (257) expritem ::= expr */
{
265
,
0
},
/* (258) expritem ::= */
{
190
,
-
3
},
/* (259) cmd ::= RESET QUERY CACHE */
{
190
,
-
3
},
/* (260) cmd ::= SYNCDB ids REPLICA */
{
190
,
-
7
},
/* (261) cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */
{
190
,
-
7
},
/* (262) cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */
{
190
,
-
7
},
/* (263) cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */
{
190
,
-
7
},
/* (264) cmd ::= ALTER TABLE ids cpxName DROP TAG ids */
{
190
,
-
8
},
/* (265) cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */
{
190
,
-
9
},
/* (266) cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */
{
190
,
-
7
},
/* (267) cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */
{
190
,
-
7
},
/* (268) cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */
{
190
,
-
7
},
/* (269) cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */
{
190
,
-
7
},
/* (270) cmd ::= ALTER STABLE ids cpxName DROP TAG ids */
{
190
,
-
8
},
/* (271) cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */
{
190
,
-
3
},
/* (272) cmd ::= KILL CONNECTION INTEGER */
{
190
,
-
5
},
/* (273) cmd ::= KILL STREAM INTEGER COLON INTEGER */
{
190
,
-
5
},
/* (274) cmd ::= KILL QUERY INTEGER COLON INTEGER */
};
static
void
yy_accept
(
yyParser
*
);
/* Forward Declaration */
...
...
@@ -2290,13 +2298,13 @@ static void yy_reduce(
break
;
case
44
:
/* cmd ::= ALTER DATABASE ids alter_db_optr */
case
45
:
/* cmd ::= ALTER TOPIC ids alter_topic_optr */
yytestcase
(
yyruleno
==
45
);
{
SStrToken
t
=
{
0
};
setCreateDbInfo
(
pInfo
,
TSDB_SQL_ALTER_DB
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy
526
,
&
t
);}
{
SStrToken
t
=
{
0
};
setCreateDbInfo
(
pInfo
,
TSDB_SQL_ALTER_DB
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy
114
,
&
t
);}
break
;
case
46
:
/* cmd ::= ALTER ACCOUNT ids acct_optr */
{
setCreateAcctSql
(
pInfo
,
TSDB_SQL_ALTER_ACCT
,
&
yymsp
[
-
1
].
minor
.
yy0
,
NULL
,
&
yymsp
[
0
].
minor
.
yy18
7
);}
{
setCreateAcctSql
(
pInfo
,
TSDB_SQL_ALTER_ACCT
,
&
yymsp
[
-
1
].
minor
.
yy0
,
NULL
,
&
yymsp
[
0
].
minor
.
yy18
3
);}
break
;
case
47
:
/* cmd ::= ALTER ACCOUNT ids PASS ids acct_optr */
{
setCreateAcctSql
(
pInfo
,
TSDB_SQL_ALTER_ACCT
,
&
yymsp
[
-
3
].
minor
.
yy0
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy18
7
);}
{
setCreateAcctSql
(
pInfo
,
TSDB_SQL_ALTER_ACCT
,
&
yymsp
[
-
3
].
minor
.
yy0
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy18
3
);}
break
;
case
48
:
/* ids ::= ID */
case
49
:
/* ids ::= STRING */
yytestcase
(
yyruleno
==
49
);
...
...
@@ -2318,11 +2326,11 @@ static void yy_reduce(
{
setDCLSqlElems
(
pInfo
,
TSDB_SQL_CREATE_DNODE
,
1
,
&
yymsp
[
0
].
minor
.
yy0
);}
break
;
case
55
:
/* cmd ::= CREATE ACCOUNT ids PASS ids acct_optr */
{
setCreateAcctSql
(
pInfo
,
TSDB_SQL_CREATE_ACCT
,
&
yymsp
[
-
3
].
minor
.
yy0
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy18
7
);}
{
setCreateAcctSql
(
pInfo
,
TSDB_SQL_CREATE_ACCT
,
&
yymsp
[
-
3
].
minor
.
yy0
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy18
3
);}
break
;
case
56
:
/* cmd ::= CREATE DATABASE ifnotexists ids db_optr */
case
57
:
/* cmd ::= CREATE TOPIC ifnotexists ids topic_optr */
yytestcase
(
yyruleno
==
57
);
{
setCreateDbInfo
(
pInfo
,
TSDB_SQL_CREATE_DB
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy
526
,
&
yymsp
[
-
2
].
minor
.
yy0
);}
{
setCreateDbInfo
(
pInfo
,
TSDB_SQL_CREATE_DB
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy
114
,
&
yymsp
[
-
2
].
minor
.
yy0
);}
break
;
case
58
:
/* cmd ::= CREATE USER ids PASS ids */
{
setCreateUserSql
(
pInfo
,
&
yymsp
[
-
2
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
);}
...
...
@@ -2351,20 +2359,20 @@ static void yy_reduce(
break
;
case
77
:
/* acct_optr ::= pps tseries storage streams qtime dbs users conns state */
{
yylhsminor
.
yy18
7
.
maxUsers
=
(
yymsp
[
-
2
].
minor
.
yy0
.
n
>
0
)
?
atoi
(
yymsp
[
-
2
].
minor
.
yy0
.
z
)
:-
1
;
yylhsminor
.
yy18
7
.
maxDbs
=
(
yymsp
[
-
3
].
minor
.
yy0
.
n
>
0
)
?
atoi
(
yymsp
[
-
3
].
minor
.
yy0
.
z
)
:-
1
;
yylhsminor
.
yy18
7
.
maxTimeSeries
=
(
yymsp
[
-
7
].
minor
.
yy0
.
n
>
0
)
?
atoi
(
yymsp
[
-
7
].
minor
.
yy0
.
z
)
:-
1
;
yylhsminor
.
yy18
7
.
maxStreams
=
(
yymsp
[
-
5
].
minor
.
yy0
.
n
>
0
)
?
atoi
(
yymsp
[
-
5
].
minor
.
yy0
.
z
)
:-
1
;
yylhsminor
.
yy18
7
.
maxPointsPerSecond
=
(
yymsp
[
-
8
].
minor
.
yy0
.
n
>
0
)
?
atoi
(
yymsp
[
-
8
].
minor
.
yy0
.
z
)
:-
1
;
yylhsminor
.
yy18
7
.
maxStorage
=
(
yymsp
[
-
6
].
minor
.
yy0
.
n
>
0
)
?
strtoll
(
yymsp
[
-
6
].
minor
.
yy0
.
z
,
NULL
,
10
)
:-
1
;
yylhsminor
.
yy18
7
.
maxQueryTime
=
(
yymsp
[
-
4
].
minor
.
yy0
.
n
>
0
)
?
strtoll
(
yymsp
[
-
4
].
minor
.
yy0
.
z
,
NULL
,
10
)
:-
1
;
yylhsminor
.
yy18
7
.
maxConnections
=
(
yymsp
[
-
1
].
minor
.
yy0
.
n
>
0
)
?
atoi
(
yymsp
[
-
1
].
minor
.
yy0
.
z
)
:-
1
;
yylhsminor
.
yy18
7
.
stat
=
yymsp
[
0
].
minor
.
yy0
;
}
yymsp
[
-
8
].
minor
.
yy18
7
=
yylhsminor
.
yy187
;
yylhsminor
.
yy18
3
.
maxUsers
=
(
yymsp
[
-
2
].
minor
.
yy0
.
n
>
0
)
?
atoi
(
yymsp
[
-
2
].
minor
.
yy0
.
z
)
:-
1
;
yylhsminor
.
yy18
3
.
maxDbs
=
(
yymsp
[
-
3
].
minor
.
yy0
.
n
>
0
)
?
atoi
(
yymsp
[
-
3
].
minor
.
yy0
.
z
)
:-
1
;
yylhsminor
.
yy18
3
.
maxTimeSeries
=
(
yymsp
[
-
7
].
minor
.
yy0
.
n
>
0
)
?
atoi
(
yymsp
[
-
7
].
minor
.
yy0
.
z
)
:-
1
;
yylhsminor
.
yy18
3
.
maxStreams
=
(
yymsp
[
-
5
].
minor
.
yy0
.
n
>
0
)
?
atoi
(
yymsp
[
-
5
].
minor
.
yy0
.
z
)
:-
1
;
yylhsminor
.
yy18
3
.
maxPointsPerSecond
=
(
yymsp
[
-
8
].
minor
.
yy0
.
n
>
0
)
?
atoi
(
yymsp
[
-
8
].
minor
.
yy0
.
z
)
:-
1
;
yylhsminor
.
yy18
3
.
maxStorage
=
(
yymsp
[
-
6
].
minor
.
yy0
.
n
>
0
)
?
strtoll
(
yymsp
[
-
6
].
minor
.
yy0
.
z
,
NULL
,
10
)
:-
1
;
yylhsminor
.
yy18
3
.
maxQueryTime
=
(
yymsp
[
-
4
].
minor
.
yy0
.
n
>
0
)
?
strtoll
(
yymsp
[
-
4
].
minor
.
yy0
.
z
,
NULL
,
10
)
:-
1
;
yylhsminor
.
yy18
3
.
maxConnections
=
(
yymsp
[
-
1
].
minor
.
yy0
.
n
>
0
)
?
atoi
(
yymsp
[
-
1
].
minor
.
yy0
.
z
)
:-
1
;
yylhsminor
.
yy18
3
.
stat
=
yymsp
[
0
].
minor
.
yy0
;
}
yymsp
[
-
8
].
minor
.
yy18
3
=
yylhsminor
.
yy183
;
break
;
case
78
:
/* keep ::= KEEP tagitemlist */
{
yymsp
[
-
1
].
minor
.
yy
285
=
yymsp
[
0
].
minor
.
yy285
;
}
{
yymsp
[
-
1
].
minor
.
yy
193
=
yymsp
[
0
].
minor
.
yy193
;
}
break
;
case
79
:
/* cache ::= CACHE INTEGER */
case
80
:
/* replica ::= REPLICA INTEGER */
yytestcase
(
yyruleno
==
80
);
...
...
@@ -2384,234 +2392,234 @@ static void yy_reduce(
{
yymsp
[
-
1
].
minor
.
yy0
=
yymsp
[
0
].
minor
.
yy0
;
}
break
;
case
94
:
/* db_optr ::= */
{
setDefaultCreateDbOption
(
&
yymsp
[
1
].
minor
.
yy
526
);
yymsp
[
1
].
minor
.
yy526
.
dbType
=
TSDB_DB_TYPE_DEFAULT
;}
{
setDefaultCreateDbOption
(
&
yymsp
[
1
].
minor
.
yy
114
);
yymsp
[
1
].
minor
.
yy114
.
dbType
=
TSDB_DB_TYPE_DEFAULT
;}
break
;
case
95
:
/* db_optr ::= db_optr cache */
{
yylhsminor
.
yy
526
=
yymsp
[
-
1
].
minor
.
yy526
;
yylhsminor
.
yy526
.
cacheBlockSize
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
-
1
].
minor
.
yy
526
=
yylhsminor
.
yy526
;
{
yylhsminor
.
yy
114
=
yymsp
[
-
1
].
minor
.
yy114
;
yylhsminor
.
yy114
.
cacheBlockSize
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
-
1
].
minor
.
yy
114
=
yylhsminor
.
yy114
;
break
;
case
96
:
/* db_optr ::= db_optr replica */
case
113
:
/* alter_db_optr ::= alter_db_optr replica */
yytestcase
(
yyruleno
==
113
);
{
yylhsminor
.
yy
526
=
yymsp
[
-
1
].
minor
.
yy526
;
yylhsminor
.
yy526
.
replica
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
-
1
].
minor
.
yy
526
=
yylhsminor
.
yy526
;
{
yylhsminor
.
yy
114
=
yymsp
[
-
1
].
minor
.
yy114
;
yylhsminor
.
yy114
.
replica
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
-
1
].
minor
.
yy
114
=
yylhsminor
.
yy114
;
break
;
case
97
:
/* db_optr ::= db_optr quorum */
case
114
:
/* alter_db_optr ::= alter_db_optr quorum */
yytestcase
(
yyruleno
==
114
);
{
yylhsminor
.
yy
526
=
yymsp
[
-
1
].
minor
.
yy526
;
yylhsminor
.
yy526
.
quorum
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
-
1
].
minor
.
yy
526
=
yylhsminor
.
yy526
;
{
yylhsminor
.
yy
114
=
yymsp
[
-
1
].
minor
.
yy114
;
yylhsminor
.
yy114
.
quorum
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
-
1
].
minor
.
yy
114
=
yylhsminor
.
yy114
;
break
;
case
98
:
/* db_optr ::= db_optr days */
{
yylhsminor
.
yy
526
=
yymsp
[
-
1
].
minor
.
yy526
;
yylhsminor
.
yy526
.
daysPerFile
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
-
1
].
minor
.
yy
526
=
yylhsminor
.
yy526
;
{
yylhsminor
.
yy
114
=
yymsp
[
-
1
].
minor
.
yy114
;
yylhsminor
.
yy114
.
daysPerFile
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
-
1
].
minor
.
yy
114
=
yylhsminor
.
yy114
;
break
;
case
99
:
/* db_optr ::= db_optr minrows */
{
yylhsminor
.
yy
526
=
yymsp
[
-
1
].
minor
.
yy526
;
yylhsminor
.
yy526
.
minRowsPerBlock
=
strtod
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
);
}
yymsp
[
-
1
].
minor
.
yy
526
=
yylhsminor
.
yy526
;
{
yylhsminor
.
yy
114
=
yymsp
[
-
1
].
minor
.
yy114
;
yylhsminor
.
yy114
.
minRowsPerBlock
=
strtod
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
);
}
yymsp
[
-
1
].
minor
.
yy
114
=
yylhsminor
.
yy114
;
break
;
case
100
:
/* db_optr ::= db_optr maxrows */
{
yylhsminor
.
yy
526
=
yymsp
[
-
1
].
minor
.
yy526
;
yylhsminor
.
yy526
.
maxRowsPerBlock
=
strtod
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
);
}
yymsp
[
-
1
].
minor
.
yy
526
=
yylhsminor
.
yy526
;
{
yylhsminor
.
yy
114
=
yymsp
[
-
1
].
minor
.
yy114
;
yylhsminor
.
yy114
.
maxRowsPerBlock
=
strtod
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
);
}
yymsp
[
-
1
].
minor
.
yy
114
=
yylhsminor
.
yy114
;
break
;
case
101
:
/* db_optr ::= db_optr blocks */
case
116
:
/* alter_db_optr ::= alter_db_optr blocks */
yytestcase
(
yyruleno
==
116
);
{
yylhsminor
.
yy
526
=
yymsp
[
-
1
].
minor
.
yy526
;
yylhsminor
.
yy526
.
numOfBlocks
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
-
1
].
minor
.
yy
526
=
yylhsminor
.
yy526
;
{
yylhsminor
.
yy
114
=
yymsp
[
-
1
].
minor
.
yy114
;
yylhsminor
.
yy114
.
numOfBlocks
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
-
1
].
minor
.
yy
114
=
yylhsminor
.
yy114
;
break
;
case
102
:
/* db_optr ::= db_optr ctime */
{
yylhsminor
.
yy
526
=
yymsp
[
-
1
].
minor
.
yy526
;
yylhsminor
.
yy526
.
commitTime
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
-
1
].
minor
.
yy
526
=
yylhsminor
.
yy526
;
{
yylhsminor
.
yy
114
=
yymsp
[
-
1
].
minor
.
yy114
;
yylhsminor
.
yy114
.
commitTime
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
-
1
].
minor
.
yy
114
=
yylhsminor
.
yy114
;
break
;
case
103
:
/* db_optr ::= db_optr wal */
case
118
:
/* alter_db_optr ::= alter_db_optr wal */
yytestcase
(
yyruleno
==
118
);
{
yylhsminor
.
yy
526
=
yymsp
[
-
1
].
minor
.
yy526
;
yylhsminor
.
yy526
.
walLevel
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
-
1
].
minor
.
yy
526
=
yylhsminor
.
yy526
;
{
yylhsminor
.
yy
114
=
yymsp
[
-
1
].
minor
.
yy114
;
yylhsminor
.
yy114
.
walLevel
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
-
1
].
minor
.
yy
114
=
yylhsminor
.
yy114
;
break
;
case
104
:
/* db_optr ::= db_optr fsync */
case
119
:
/* alter_db_optr ::= alter_db_optr fsync */
yytestcase
(
yyruleno
==
119
);
{
yylhsminor
.
yy
526
=
yymsp
[
-
1
].
minor
.
yy526
;
yylhsminor
.
yy526
.
fsyncPeriod
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
-
1
].
minor
.
yy
526
=
yylhsminor
.
yy526
;
{
yylhsminor
.
yy
114
=
yymsp
[
-
1
].
minor
.
yy114
;
yylhsminor
.
yy114
.
fsyncPeriod
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
-
1
].
minor
.
yy
114
=
yylhsminor
.
yy114
;
break
;
case
105
:
/* db_optr ::= db_optr comp */
case
117
:
/* alter_db_optr ::= alter_db_optr comp */
yytestcase
(
yyruleno
==
117
);
{
yylhsminor
.
yy
526
=
yymsp
[
-
1
].
minor
.
yy526
;
yylhsminor
.
yy526
.
compressionLevel
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
-
1
].
minor
.
yy
526
=
yylhsminor
.
yy526
;
{
yylhsminor
.
yy
114
=
yymsp
[
-
1
].
minor
.
yy114
;
yylhsminor
.
yy114
.
compressionLevel
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
-
1
].
minor
.
yy
114
=
yylhsminor
.
yy114
;
break
;
case
106
:
/* db_optr ::= db_optr prec */
{
yylhsminor
.
yy
526
=
yymsp
[
-
1
].
minor
.
yy526
;
yylhsminor
.
yy526
.
precision
=
yymsp
[
0
].
minor
.
yy0
;
}
yymsp
[
-
1
].
minor
.
yy
526
=
yylhsminor
.
yy526
;
{
yylhsminor
.
yy
114
=
yymsp
[
-
1
].
minor
.
yy114
;
yylhsminor
.
yy114
.
precision
=
yymsp
[
0
].
minor
.
yy0
;
}
yymsp
[
-
1
].
minor
.
yy
114
=
yylhsminor
.
yy114
;
break
;
case
107
:
/* db_optr ::= db_optr keep */
case
115
:
/* alter_db_optr ::= alter_db_optr keep */
yytestcase
(
yyruleno
==
115
);
{
yylhsminor
.
yy
526
=
yymsp
[
-
1
].
minor
.
yy526
;
yylhsminor
.
yy526
.
keep
=
yymsp
[
0
].
minor
.
yy285
;
}
yymsp
[
-
1
].
minor
.
yy
526
=
yylhsminor
.
yy526
;
{
yylhsminor
.
yy
114
=
yymsp
[
-
1
].
minor
.
yy114
;
yylhsminor
.
yy114
.
keep
=
yymsp
[
0
].
minor
.
yy193
;
}
yymsp
[
-
1
].
minor
.
yy
114
=
yylhsminor
.
yy114
;
break
;
case
108
:
/* db_optr ::= db_optr update */
case
120
:
/* alter_db_optr ::= alter_db_optr update */
yytestcase
(
yyruleno
==
120
);
{
yylhsminor
.
yy
526
=
yymsp
[
-
1
].
minor
.
yy526
;
yylhsminor
.
yy526
.
update
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
-
1
].
minor
.
yy
526
=
yylhsminor
.
yy526
;
{
yylhsminor
.
yy
114
=
yymsp
[
-
1
].
minor
.
yy114
;
yylhsminor
.
yy114
.
update
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
-
1
].
minor
.
yy
114
=
yylhsminor
.
yy114
;
break
;
case
109
:
/* db_optr ::= db_optr cachelast */
case
121
:
/* alter_db_optr ::= alter_db_optr cachelast */
yytestcase
(
yyruleno
==
121
);
{
yylhsminor
.
yy
526
=
yymsp
[
-
1
].
minor
.
yy526
;
yylhsminor
.
yy526
.
cachelast
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
-
1
].
minor
.
yy
526
=
yylhsminor
.
yy526
;
{
yylhsminor
.
yy
114
=
yymsp
[
-
1
].
minor
.
yy114
;
yylhsminor
.
yy114
.
cachelast
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
-
1
].
minor
.
yy
114
=
yylhsminor
.
yy114
;
break
;
case
110
:
/* topic_optr ::= db_optr */
case
122
:
/* alter_topic_optr ::= alter_db_optr */
yytestcase
(
yyruleno
==
122
);
{
yylhsminor
.
yy
526
=
yymsp
[
0
].
minor
.
yy526
;
yylhsminor
.
yy526
.
dbType
=
TSDB_DB_TYPE_TOPIC
;
}
yymsp
[
0
].
minor
.
yy
526
=
yylhsminor
.
yy526
;
{
yylhsminor
.
yy
114
=
yymsp
[
0
].
minor
.
yy114
;
yylhsminor
.
yy114
.
dbType
=
TSDB_DB_TYPE_TOPIC
;
}
yymsp
[
0
].
minor
.
yy
114
=
yylhsminor
.
yy114
;
break
;
case
111
:
/* topic_optr ::= topic_optr partitions */
case
123
:
/* alter_topic_optr ::= alter_topic_optr partitions */
yytestcase
(
yyruleno
==
123
);
{
yylhsminor
.
yy
526
=
yymsp
[
-
1
].
minor
.
yy526
;
yylhsminor
.
yy526
.
partitions
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
-
1
].
minor
.
yy
526
=
yylhsminor
.
yy526
;
{
yylhsminor
.
yy
114
=
yymsp
[
-
1
].
minor
.
yy114
;
yylhsminor
.
yy114
.
partitions
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
-
1
].
minor
.
yy
114
=
yylhsminor
.
yy114
;
break
;
case
112
:
/* alter_db_optr ::= */
{
setDefaultCreateDbOption
(
&
yymsp
[
1
].
minor
.
yy
526
);
yymsp
[
1
].
minor
.
yy526
.
dbType
=
TSDB_DB_TYPE_DEFAULT
;}
{
setDefaultCreateDbOption
(
&
yymsp
[
1
].
minor
.
yy
114
);
yymsp
[
1
].
minor
.
yy114
.
dbType
=
TSDB_DB_TYPE_DEFAULT
;}
break
;
case
124
:
/* typename ::= ids */
{
yymsp
[
0
].
minor
.
yy0
.
type
=
0
;
tSetColumnType
(
&
yylhsminor
.
yy2
95
,
&
yymsp
[
0
].
minor
.
yy0
);
tSetColumnType
(
&
yylhsminor
.
yy2
7
,
&
yymsp
[
0
].
minor
.
yy0
);
}
yymsp
[
0
].
minor
.
yy2
95
=
yylhsminor
.
yy295
;
yymsp
[
0
].
minor
.
yy2
7
=
yylhsminor
.
yy27
;
break
;
case
125
:
/* typename ::= ids LP signed RP */
{
if
(
yymsp
[
-
1
].
minor
.
yy
525
<=
0
)
{
if
(
yymsp
[
-
1
].
minor
.
yy
473
<=
0
)
{
yymsp
[
-
3
].
minor
.
yy0
.
type
=
0
;
tSetColumnType
(
&
yylhsminor
.
yy2
95
,
&
yymsp
[
-
3
].
minor
.
yy0
);
tSetColumnType
(
&
yylhsminor
.
yy2
7
,
&
yymsp
[
-
3
].
minor
.
yy0
);
}
else
{
yymsp
[
-
3
].
minor
.
yy0
.
type
=
-
yymsp
[
-
1
].
minor
.
yy
525
;
// negative value of name length
tSetColumnType
(
&
yylhsminor
.
yy2
95
,
&
yymsp
[
-
3
].
minor
.
yy0
);
yymsp
[
-
3
].
minor
.
yy0
.
type
=
-
yymsp
[
-
1
].
minor
.
yy
473
;
// negative value of name length
tSetColumnType
(
&
yylhsminor
.
yy2
7
,
&
yymsp
[
-
3
].
minor
.
yy0
);
}
}
yymsp
[
-
3
].
minor
.
yy2
95
=
yylhsminor
.
yy295
;
yymsp
[
-
3
].
minor
.
yy2
7
=
yylhsminor
.
yy27
;
break
;
case
126
:
/* typename ::= ids UNSIGNED */
{
yymsp
[
-
1
].
minor
.
yy0
.
type
=
0
;
yymsp
[
-
1
].
minor
.
yy0
.
n
=
((
yymsp
[
0
].
minor
.
yy0
.
z
+
yymsp
[
0
].
minor
.
yy0
.
n
)
-
yymsp
[
-
1
].
minor
.
yy0
.
z
);
tSetColumnType
(
&
yylhsminor
.
yy2
95
,
&
yymsp
[
-
1
].
minor
.
yy0
);
tSetColumnType
(
&
yylhsminor
.
yy2
7
,
&
yymsp
[
-
1
].
minor
.
yy0
);
}
yymsp
[
-
1
].
minor
.
yy2
95
=
yylhsminor
.
yy295
;
yymsp
[
-
1
].
minor
.
yy2
7
=
yylhsminor
.
yy27
;
break
;
case
127
:
/* signed ::= INTEGER */
{
yylhsminor
.
yy
525
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
0
].
minor
.
yy
525
=
yylhsminor
.
yy525
;
{
yylhsminor
.
yy
473
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
0
].
minor
.
yy
473
=
yylhsminor
.
yy473
;
break
;
case
128
:
/* signed ::= PLUS INTEGER */
{
yymsp
[
-
1
].
minor
.
yy
525
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
{
yymsp
[
-
1
].
minor
.
yy
473
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
break
;
case
129
:
/* signed ::= MINUS INTEGER */
{
yymsp
[
-
1
].
minor
.
yy
525
=
-
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);}
{
yymsp
[
-
1
].
minor
.
yy
473
=
-
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);}
break
;
case
133
:
/* cmd ::= CREATE TABLE create_table_list */
{
pInfo
->
type
=
TSDB_SQL_CREATE_TABLE
;
pInfo
->
pCreateTableInfo
=
yymsp
[
0
].
minor
.
yy
4
70
;}
{
pInfo
->
type
=
TSDB_SQL_CREATE_TABLE
;
pInfo
->
pCreateTableInfo
=
yymsp
[
0
].
minor
.
yy
2
70
;}
break
;
case
134
:
/* create_table_list ::= create_from_stable */
{
SCreateTableSql
*
pCreateTable
=
calloc
(
1
,
sizeof
(
SCreateTableSql
));
pCreateTable
->
childTableInfo
=
taosArrayInit
(
4
,
sizeof
(
SCreatedTableInfo
));
taosArrayPush
(
pCreateTable
->
childTableInfo
,
&
yymsp
[
0
].
minor
.
yy
96
);
taosArrayPush
(
pCreateTable
->
childTableInfo
,
&
yymsp
[
0
].
minor
.
yy
192
);
pCreateTable
->
type
=
TSQL_CREATE_TABLE_FROM_STABLE
;
yylhsminor
.
yy
4
70
=
pCreateTable
;
yylhsminor
.
yy
2
70
=
pCreateTable
;
}
yymsp
[
0
].
minor
.
yy
470
=
yylhsminor
.
yy4
70
;
yymsp
[
0
].
minor
.
yy
270
=
yylhsminor
.
yy2
70
;
break
;
case
135
:
/* create_table_list ::= create_table_list create_from_stable */
{
taosArrayPush
(
yymsp
[
-
1
].
minor
.
yy
470
->
childTableInfo
,
&
yymsp
[
0
].
minor
.
yy96
);
yylhsminor
.
yy
470
=
yymsp
[
-
1
].
minor
.
yy4
70
;
taosArrayPush
(
yymsp
[
-
1
].
minor
.
yy
270
->
childTableInfo
,
&
yymsp
[
0
].
minor
.
yy192
);
yylhsminor
.
yy
270
=
yymsp
[
-
1
].
minor
.
yy2
70
;
}
yymsp
[
-
1
].
minor
.
yy
470
=
yylhsminor
.
yy4
70
;
yymsp
[
-
1
].
minor
.
yy
270
=
yylhsminor
.
yy2
70
;
break
;
case
136
:
/* create_table_args ::= ifnotexists ids cpxName LP columnlist RP */
{
yylhsminor
.
yy
470
=
tSetCreateTableInfo
(
yymsp
[
-
1
].
minor
.
yy285
,
NULL
,
NULL
,
TSQL_CREATE_TABLE
);
setSqlInfo
(
pInfo
,
yylhsminor
.
yy
4
70
,
NULL
,
TSDB_SQL_CREATE_TABLE
);
yylhsminor
.
yy
270
=
tSetCreateTableInfo
(
yymsp
[
-
1
].
minor
.
yy193
,
NULL
,
NULL
,
TSQL_CREATE_TABLE
);
setSqlInfo
(
pInfo
,
yylhsminor
.
yy
2
70
,
NULL
,
TSDB_SQL_CREATE_TABLE
);
yymsp
[
-
4
].
minor
.
yy0
.
n
+=
yymsp
[
-
3
].
minor
.
yy0
.
n
;
setCreatedTableName
(
pInfo
,
&
yymsp
[
-
4
].
minor
.
yy0
,
&
yymsp
[
-
5
].
minor
.
yy0
);
}
yymsp
[
-
5
].
minor
.
yy
470
=
yylhsminor
.
yy4
70
;
yymsp
[
-
5
].
minor
.
yy
270
=
yylhsminor
.
yy2
70
;
break
;
case
137
:
/* create_stable_args ::= ifnotexists ids cpxName LP columnlist RP TAGS LP columnlist RP */
{
yylhsminor
.
yy
470
=
tSetCreateTableInfo
(
yymsp
[
-
5
].
minor
.
yy285
,
yymsp
[
-
1
].
minor
.
yy285
,
NULL
,
TSQL_CREATE_STABLE
);
setSqlInfo
(
pInfo
,
yylhsminor
.
yy
4
70
,
NULL
,
TSDB_SQL_CREATE_TABLE
);
yylhsminor
.
yy
270
=
tSetCreateTableInfo
(
yymsp
[
-
5
].
minor
.
yy193
,
yymsp
[
-
1
].
minor
.
yy193
,
NULL
,
TSQL_CREATE_STABLE
);
setSqlInfo
(
pInfo
,
yylhsminor
.
yy
2
70
,
NULL
,
TSDB_SQL_CREATE_TABLE
);
yymsp
[
-
8
].
minor
.
yy0
.
n
+=
yymsp
[
-
7
].
minor
.
yy0
.
n
;
setCreatedTableName
(
pInfo
,
&
yymsp
[
-
8
].
minor
.
yy0
,
&
yymsp
[
-
9
].
minor
.
yy0
);
}
yymsp
[
-
9
].
minor
.
yy
470
=
yylhsminor
.
yy4
70
;
yymsp
[
-
9
].
minor
.
yy
270
=
yylhsminor
.
yy2
70
;
break
;
case
138
:
/* create_from_stable ::= ifnotexists ids cpxName USING ids cpxName TAGS LP tagitemlist RP */
{
yymsp
[
-
5
].
minor
.
yy0
.
n
+=
yymsp
[
-
4
].
minor
.
yy0
.
n
;
yymsp
[
-
8
].
minor
.
yy0
.
n
+=
yymsp
[
-
7
].
minor
.
yy0
.
n
;
yylhsminor
.
yy
96
=
createNewChildTableInfo
(
&
yymsp
[
-
5
].
minor
.
yy0
,
NULL
,
yymsp
[
-
1
].
minor
.
yy285
,
&
yymsp
[
-
8
].
minor
.
yy0
,
&
yymsp
[
-
9
].
minor
.
yy0
);
yylhsminor
.
yy
192
=
createNewChildTableInfo
(
&
yymsp
[
-
5
].
minor
.
yy0
,
NULL
,
yymsp
[
-
1
].
minor
.
yy193
,
&
yymsp
[
-
8
].
minor
.
yy0
,
&
yymsp
[
-
9
].
minor
.
yy0
);
}
yymsp
[
-
9
].
minor
.
yy
96
=
yylhsminor
.
yy96
;
yymsp
[
-
9
].
minor
.
yy
192
=
yylhsminor
.
yy192
;
break
;
case
139
:
/* create_from_stable ::= ifnotexists ids cpxName USING ids cpxName LP tagNamelist RP TAGS LP tagitemlist RP */
{
yymsp
[
-
8
].
minor
.
yy0
.
n
+=
yymsp
[
-
7
].
minor
.
yy0
.
n
;
yymsp
[
-
11
].
minor
.
yy0
.
n
+=
yymsp
[
-
10
].
minor
.
yy0
.
n
;
yylhsminor
.
yy
96
=
createNewChildTableInfo
(
&
yymsp
[
-
8
].
minor
.
yy0
,
yymsp
[
-
5
].
minor
.
yy285
,
yymsp
[
-
1
].
minor
.
yy285
,
&
yymsp
[
-
11
].
minor
.
yy0
,
&
yymsp
[
-
12
].
minor
.
yy0
);
yylhsminor
.
yy
192
=
createNewChildTableInfo
(
&
yymsp
[
-
8
].
minor
.
yy0
,
yymsp
[
-
5
].
minor
.
yy193
,
yymsp
[
-
1
].
minor
.
yy193
,
&
yymsp
[
-
11
].
minor
.
yy0
,
&
yymsp
[
-
12
].
minor
.
yy0
);
}
yymsp
[
-
12
].
minor
.
yy
96
=
yylhsminor
.
yy96
;
yymsp
[
-
12
].
minor
.
yy
192
=
yylhsminor
.
yy192
;
break
;
case
140
:
/* tagNamelist ::= tagNamelist COMMA ids */
{
taosArrayPush
(
yymsp
[
-
2
].
minor
.
yy
285
,
&
yymsp
[
0
].
minor
.
yy0
);
yylhsminor
.
yy285
=
yymsp
[
-
2
].
minor
.
yy285
;
}
yymsp
[
-
2
].
minor
.
yy
285
=
yylhsminor
.
yy285
;
{
taosArrayPush
(
yymsp
[
-
2
].
minor
.
yy
193
,
&
yymsp
[
0
].
minor
.
yy0
);
yylhsminor
.
yy193
=
yymsp
[
-
2
].
minor
.
yy193
;
}
yymsp
[
-
2
].
minor
.
yy
193
=
yylhsminor
.
yy193
;
break
;
case
141
:
/* tagNamelist ::= ids */
{
yylhsminor
.
yy
285
=
taosArrayInit
(
4
,
sizeof
(
SStrToken
));
taosArrayPush
(
yylhsminor
.
yy285
,
&
yymsp
[
0
].
minor
.
yy0
);}
yymsp
[
0
].
minor
.
yy
285
=
yylhsminor
.
yy285
;
{
yylhsminor
.
yy
193
=
taosArrayInit
(
4
,
sizeof
(
SStrToken
));
taosArrayPush
(
yylhsminor
.
yy193
,
&
yymsp
[
0
].
minor
.
yy0
);}
yymsp
[
0
].
minor
.
yy
193
=
yylhsminor
.
yy193
;
break
;
case
142
:
/* create_table_args ::= ifnotexists ids cpxName AS select */
{
yylhsminor
.
yy
470
=
tSetCreateTableInfo
(
NULL
,
NULL
,
yymsp
[
0
].
minor
.
yy34
4
,
TSQL_CREATE_STREAM
);
setSqlInfo
(
pInfo
,
yylhsminor
.
yy
4
70
,
NULL
,
TSDB_SQL_CREATE_TABLE
);
yylhsminor
.
yy
270
=
tSetCreateTableInfo
(
NULL
,
NULL
,
yymsp
[
0
].
minor
.
yy12
4
,
TSQL_CREATE_STREAM
);
setSqlInfo
(
pInfo
,
yylhsminor
.
yy
2
70
,
NULL
,
TSDB_SQL_CREATE_TABLE
);
yymsp
[
-
3
].
minor
.
yy0
.
n
+=
yymsp
[
-
2
].
minor
.
yy0
.
n
;
setCreatedTableName
(
pInfo
,
&
yymsp
[
-
3
].
minor
.
yy0
,
&
yymsp
[
-
4
].
minor
.
yy0
);
}
yymsp
[
-
4
].
minor
.
yy
470
=
yylhsminor
.
yy4
70
;
yymsp
[
-
4
].
minor
.
yy
270
=
yylhsminor
.
yy2
70
;
break
;
case
143
:
/* columnlist ::= columnlist COMMA column */
{
taosArrayPush
(
yymsp
[
-
2
].
minor
.
yy
285
,
&
yymsp
[
0
].
minor
.
yy295
);
yylhsminor
.
yy285
=
yymsp
[
-
2
].
minor
.
yy285
;
}
yymsp
[
-
2
].
minor
.
yy
285
=
yylhsminor
.
yy285
;
{
taosArrayPush
(
yymsp
[
-
2
].
minor
.
yy
193
,
&
yymsp
[
0
].
minor
.
yy27
);
yylhsminor
.
yy193
=
yymsp
[
-
2
].
minor
.
yy193
;
}
yymsp
[
-
2
].
minor
.
yy
193
=
yylhsminor
.
yy193
;
break
;
case
144
:
/* columnlist ::= column */
{
yylhsminor
.
yy
285
=
taosArrayInit
(
4
,
sizeof
(
TAOS_FIELD
));
taosArrayPush
(
yylhsminor
.
yy285
,
&
yymsp
[
0
].
minor
.
yy295
);}
yymsp
[
0
].
minor
.
yy
285
=
yylhsminor
.
yy285
;
{
yylhsminor
.
yy
193
=
taosArrayInit
(
4
,
sizeof
(
TAOS_FIELD
));
taosArrayPush
(
yylhsminor
.
yy193
,
&
yymsp
[
0
].
minor
.
yy27
);}
yymsp
[
0
].
minor
.
yy
193
=
yylhsminor
.
yy193
;
break
;
case
145
:
/* column ::= ids typename */
{
tSetColumnInfo
(
&
yylhsminor
.
yy2
95
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy295
);
tSetColumnInfo
(
&
yylhsminor
.
yy2
7
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy27
);
}
yymsp
[
-
1
].
minor
.
yy2
95
=
yylhsminor
.
yy295
;
yymsp
[
-
1
].
minor
.
yy2
7
=
yylhsminor
.
yy27
;
break
;
case
146
:
/* tagitemlist ::= tagitemlist COMMA tagitem */
{
yylhsminor
.
yy
285
=
tVariantListAppend
(
yymsp
[
-
2
].
minor
.
yy285
,
&
yymsp
[
0
].
minor
.
yy36
2
,
-
1
);
}
yymsp
[
-
2
].
minor
.
yy
285
=
yylhsminor
.
yy285
;
{
yylhsminor
.
yy
193
=
tVariantListAppend
(
yymsp
[
-
2
].
minor
.
yy193
,
&
yymsp
[
0
].
minor
.
yy44
2
,
-
1
);
}
yymsp
[
-
2
].
minor
.
yy
193
=
yylhsminor
.
yy193
;
break
;
case
147
:
/* tagitemlist ::= tagitem */
{
yylhsminor
.
yy
285
=
tVariantListAppend
(
NULL
,
&
yymsp
[
0
].
minor
.
yy36
2
,
-
1
);
}
yymsp
[
0
].
minor
.
yy
285
=
yylhsminor
.
yy285
;
{
yylhsminor
.
yy
193
=
tVariantListAppend
(
NULL
,
&
yymsp
[
0
].
minor
.
yy44
2
,
-
1
);
}
yymsp
[
0
].
minor
.
yy
193
=
yylhsminor
.
yy193
;
break
;
case
148
:
/* tagitem ::= INTEGER */
case
149
:
/* tagitem ::= FLOAT */
yytestcase
(
yyruleno
==
149
);
case
150
:
/* tagitem ::= STRING */
yytestcase
(
yyruleno
==
150
);
case
151
:
/* tagitem ::= BOOL */
yytestcase
(
yyruleno
==
151
);
{
toTSDBType
(
yymsp
[
0
].
minor
.
yy0
.
type
);
tVariantCreate
(
&
yylhsminor
.
yy
36
2
,
&
yymsp
[
0
].
minor
.
yy0
);
}
yymsp
[
0
].
minor
.
yy
362
=
yylhsminor
.
yy36
2
;
{
toTSDBType
(
yymsp
[
0
].
minor
.
yy0
.
type
);
tVariantCreate
(
&
yylhsminor
.
yy
44
2
,
&
yymsp
[
0
].
minor
.
yy0
);
}
yymsp
[
0
].
minor
.
yy
442
=
yylhsminor
.
yy44
2
;
break
;
case
152
:
/* tagitem ::= NULL */
{
yymsp
[
0
].
minor
.
yy0
.
type
=
0
;
tVariantCreate
(
&
yylhsminor
.
yy
36
2
,
&
yymsp
[
0
].
minor
.
yy0
);
}
yymsp
[
0
].
minor
.
yy
362
=
yylhsminor
.
yy36
2
;
{
yymsp
[
0
].
minor
.
yy0
.
type
=
0
;
tVariantCreate
(
&
yylhsminor
.
yy
44
2
,
&
yymsp
[
0
].
minor
.
yy0
);
}
yymsp
[
0
].
minor
.
yy
442
=
yylhsminor
.
yy44
2
;
break
;
case
153
:
/* tagitem ::= MINUS INTEGER */
case
154
:
/* tagitem ::= MINUS FLOAT */
yytestcase
(
yyruleno
==
154
);
...
...
@@ -2621,56 +2629,56 @@ static void yy_reduce(
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
yymsp
[
-
1
].
minor
.
yy0
.
type
=
yymsp
[
0
].
minor
.
yy0
.
type
;
toTSDBType
(
yymsp
[
-
1
].
minor
.
yy0
.
type
);
tVariantCreate
(
&
yylhsminor
.
yy
36
2
,
&
yymsp
[
-
1
].
minor
.
yy0
);
tVariantCreate
(
&
yylhsminor
.
yy
44
2
,
&
yymsp
[
-
1
].
minor
.
yy0
);
}
yymsp
[
-
1
].
minor
.
yy
362
=
yylhsminor
.
yy36
2
;
yymsp
[
-
1
].
minor
.
yy
442
=
yylhsminor
.
yy44
2
;
break
;
case
157
:
/* select ::= SELECT selcollist from where_opt interval_opt session_option fill_opt sliding_opt groupby_opt orderby_opt having_opt slimit_opt limit_opt */
case
157
:
/* select ::= SELECT selcollist from where_opt interval_opt session_option
windowstate_option
fill_opt sliding_opt groupby_opt orderby_opt having_opt slimit_opt limit_opt */
{
yylhsminor
.
yy
344
=
tSetQuerySqlNode
(
&
yymsp
[
-
12
].
minor
.
yy0
,
yymsp
[
-
11
].
minor
.
yy285
,
yymsp
[
-
10
].
minor
.
yy148
,
yymsp
[
-
9
].
minor
.
yy178
,
yymsp
[
-
4
].
minor
.
yy285
,
yymsp
[
-
3
].
minor
.
yy285
,
&
yymsp
[
-
8
].
minor
.
yy376
,
&
yymsp
[
-
7
].
minor
.
yy523
,
&
yymsp
[
-
5
].
minor
.
yy0
,
yymsp
[
-
6
].
minor
.
yy285
,
&
yymsp
[
0
].
minor
.
yy438
,
&
yymsp
[
-
1
].
minor
.
yy438
,
yymsp
[
-
2
].
minor
.
yy178
);
yylhsminor
.
yy
124
=
tSetQuerySqlNode
(
&
yymsp
[
-
13
].
minor
.
yy0
,
yymsp
[
-
12
].
minor
.
yy193
,
yymsp
[
-
11
].
minor
.
yy332
,
yymsp
[
-
10
].
minor
.
yy454
,
yymsp
[
-
4
].
minor
.
yy193
,
yymsp
[
-
3
].
minor
.
yy193
,
&
yymsp
[
-
9
].
minor
.
yy392
,
&
yymsp
[
-
8
].
minor
.
yy447
,
&
yymsp
[
-
7
].
minor
.
yy76
,
&
yymsp
[
-
5
].
minor
.
yy0
,
yymsp
[
-
6
].
minor
.
yy193
,
&
yymsp
[
0
].
minor
.
yy482
,
&
yymsp
[
-
1
].
minor
.
yy482
,
yymsp
[
-
2
].
minor
.
yy454
);
}
yymsp
[
-
1
2
].
minor
.
yy344
=
yylhsminor
.
yy34
4
;
yymsp
[
-
1
3
].
minor
.
yy124
=
yylhsminor
.
yy12
4
;
break
;
case
158
:
/* select ::= LP select RP */
{
yymsp
[
-
2
].
minor
.
yy
344
=
yymsp
[
-
1
].
minor
.
yy34
4
;}
{
yymsp
[
-
2
].
minor
.
yy
124
=
yymsp
[
-
1
].
minor
.
yy12
4
;}
break
;
case
159
:
/* union ::= select */
{
yylhsminor
.
yy
285
=
setSubclause
(
NULL
,
yymsp
[
0
].
minor
.
yy34
4
);
}
yymsp
[
0
].
minor
.
yy
285
=
yylhsminor
.
yy285
;
{
yylhsminor
.
yy
193
=
setSubclause
(
NULL
,
yymsp
[
0
].
minor
.
yy12
4
);
}
yymsp
[
0
].
minor
.
yy
193
=
yylhsminor
.
yy193
;
break
;
case
160
:
/* union ::= union UNION ALL select */
{
yylhsminor
.
yy
285
=
appendSelectClause
(
yymsp
[
-
3
].
minor
.
yy285
,
yymsp
[
0
].
minor
.
yy34
4
);
}
yymsp
[
-
3
].
minor
.
yy
285
=
yylhsminor
.
yy285
;
{
yylhsminor
.
yy
193
=
appendSelectClause
(
yymsp
[
-
3
].
minor
.
yy193
,
yymsp
[
0
].
minor
.
yy12
4
);
}
yymsp
[
-
3
].
minor
.
yy
193
=
yylhsminor
.
yy193
;
break
;
case
161
:
/* cmd ::= union */
{
setSqlInfo
(
pInfo
,
yymsp
[
0
].
minor
.
yy
285
,
NULL
,
TSDB_SQL_SELECT
);
}
{
setSqlInfo
(
pInfo
,
yymsp
[
0
].
minor
.
yy
193
,
NULL
,
TSDB_SQL_SELECT
);
}
break
;
case
162
:
/* select ::= SELECT selcollist */
{
yylhsminor
.
yy
344
=
tSetQuerySqlNode
(
&
yymsp
[
-
1
].
minor
.
yy0
,
yymsp
[
0
].
minor
.
yy285
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
);
yylhsminor
.
yy
124
=
tSetQuerySqlNode
(
&
yymsp
[
-
1
].
minor
.
yy0
,
yymsp
[
0
].
minor
.
yy193
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
);
}
yymsp
[
-
1
].
minor
.
yy
344
=
yylhsminor
.
yy34
4
;
yymsp
[
-
1
].
minor
.
yy
124
=
yylhsminor
.
yy12
4
;
break
;
case
163
:
/* sclp ::= selcollist COMMA */
{
yylhsminor
.
yy
285
=
yymsp
[
-
1
].
minor
.
yy285
;}
yymsp
[
-
1
].
minor
.
yy
285
=
yylhsminor
.
yy285
;
{
yylhsminor
.
yy
193
=
yymsp
[
-
1
].
minor
.
yy193
;}
yymsp
[
-
1
].
minor
.
yy
193
=
yylhsminor
.
yy193
;
break
;
case
164
:
/* sclp ::= */
case
19
2
:
/* orderby_opt ::= */
yytestcase
(
yyruleno
==
192
);
{
yymsp
[
1
].
minor
.
yy
285
=
0
;}
case
19
4
:
/* orderby_opt ::= */
yytestcase
(
yyruleno
==
194
);
{
yymsp
[
1
].
minor
.
yy
193
=
0
;}
break
;
case
165
:
/* selcollist ::= sclp distinct expr as */
{
yylhsminor
.
yy
285
=
tSqlExprListAppend
(
yymsp
[
-
3
].
minor
.
yy285
,
yymsp
[
-
1
].
minor
.
yy178
,
yymsp
[
-
2
].
minor
.
yy0
.
n
?
&
yymsp
[
-
2
].
minor
.
yy0
:
0
,
yymsp
[
0
].
minor
.
yy0
.
n
?&
yymsp
[
0
].
minor
.
yy0
:
0
);
yylhsminor
.
yy
193
=
tSqlExprListAppend
(
yymsp
[
-
3
].
minor
.
yy193
,
yymsp
[
-
1
].
minor
.
yy454
,
yymsp
[
-
2
].
minor
.
yy0
.
n
?
&
yymsp
[
-
2
].
minor
.
yy0
:
0
,
yymsp
[
0
].
minor
.
yy0
.
n
?&
yymsp
[
0
].
minor
.
yy0
:
0
);
}
yymsp
[
-
3
].
minor
.
yy
285
=
yylhsminor
.
yy285
;
yymsp
[
-
3
].
minor
.
yy
193
=
yylhsminor
.
yy193
;
break
;
case
166
:
/* selcollist ::= sclp STAR */
{
tSqlExpr
*
pNode
=
tSqlExprCreateIdValue
(
NULL
,
TK_ALL
);
yylhsminor
.
yy
285
=
tSqlExprListAppend
(
yymsp
[
-
1
].
minor
.
yy285
,
pNode
,
0
,
0
);
yylhsminor
.
yy
193
=
tSqlExprListAppend
(
yymsp
[
-
1
].
minor
.
yy193
,
pNode
,
0
,
0
);
}
yymsp
[
-
1
].
minor
.
yy
285
=
yylhsminor
.
yy285
;
yymsp
[
-
1
].
minor
.
yy
193
=
yylhsminor
.
yy193
;
break
;
case
167
:
/* as ::= AS ids */
{
yymsp
[
-
1
].
minor
.
yy0
=
yymsp
[
0
].
minor
.
yy0
;
}
...
...
@@ -2688,339 +2696,347 @@ static void yy_reduce(
break
;
case
172
:
/* from ::= FROM tablelist */
case
173
:
/* from ::= FROM sub */
yytestcase
(
yyruleno
==
173
);
{
yymsp
[
-
1
].
minor
.
yy
148
=
yymsp
[
0
].
minor
.
yy148
;}
{
yymsp
[
-
1
].
minor
.
yy
332
=
yymsp
[
0
].
minor
.
yy332
;}
break
;
case
174
:
/* sub ::= LP union RP */
{
yymsp
[
-
2
].
minor
.
yy
148
=
addSubqueryElem
(
NULL
,
yymsp
[
-
1
].
minor
.
yy285
,
NULL
);}
{
yymsp
[
-
2
].
minor
.
yy
332
=
addSubqueryElem
(
NULL
,
yymsp
[
-
1
].
minor
.
yy193
,
NULL
);}
break
;
case
175
:
/* sub ::= LP union RP ids */
{
yymsp
[
-
3
].
minor
.
yy
148
=
addSubqueryElem
(
NULL
,
yymsp
[
-
2
].
minor
.
yy285
,
&
yymsp
[
0
].
minor
.
yy0
);}
{
yymsp
[
-
3
].
minor
.
yy
332
=
addSubqueryElem
(
NULL
,
yymsp
[
-
2
].
minor
.
yy193
,
&
yymsp
[
0
].
minor
.
yy0
);}
break
;
case
176
:
/* sub ::= sub COMMA LP union RP ids */
{
yylhsminor
.
yy
148
=
addSubqueryElem
(
yymsp
[
-
5
].
minor
.
yy148
,
yymsp
[
-
2
].
minor
.
yy285
,
&
yymsp
[
0
].
minor
.
yy0
);}
yymsp
[
-
5
].
minor
.
yy
148
=
yylhsminor
.
yy148
;
{
yylhsminor
.
yy
332
=
addSubqueryElem
(
yymsp
[
-
5
].
minor
.
yy332
,
yymsp
[
-
2
].
minor
.
yy193
,
&
yymsp
[
0
].
minor
.
yy0
);}
yymsp
[
-
5
].
minor
.
yy
332
=
yylhsminor
.
yy332
;
break
;
case
177
:
/* tablelist ::= ids cpxName */
{
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
yylhsminor
.
yy
148
=
setTableNameList
(
NULL
,
&
yymsp
[
-
1
].
minor
.
yy0
,
NULL
);
yylhsminor
.
yy
332
=
setTableNameList
(
NULL
,
&
yymsp
[
-
1
].
minor
.
yy0
,
NULL
);
}
yymsp
[
-
1
].
minor
.
yy
148
=
yylhsminor
.
yy148
;
yymsp
[
-
1
].
minor
.
yy
332
=
yylhsminor
.
yy332
;
break
;
case
178
:
/* tablelist ::= ids cpxName ids */
{
yymsp
[
-
2
].
minor
.
yy0
.
n
+=
yymsp
[
-
1
].
minor
.
yy0
.
n
;
yylhsminor
.
yy
148
=
setTableNameList
(
NULL
,
&
yymsp
[
-
2
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
);
yylhsminor
.
yy
332
=
setTableNameList
(
NULL
,
&
yymsp
[
-
2
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
);
}
yymsp
[
-
2
].
minor
.
yy
148
=
yylhsminor
.
yy148
;
yymsp
[
-
2
].
minor
.
yy
332
=
yylhsminor
.
yy332
;
break
;
case
179
:
/* tablelist ::= tablelist COMMA ids cpxName */
{
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
yylhsminor
.
yy
148
=
setTableNameList
(
yymsp
[
-
3
].
minor
.
yy148
,
&
yymsp
[
-
1
].
minor
.
yy0
,
NULL
);
yylhsminor
.
yy
332
=
setTableNameList
(
yymsp
[
-
3
].
minor
.
yy332
,
&
yymsp
[
-
1
].
minor
.
yy0
,
NULL
);
}
yymsp
[
-
3
].
minor
.
yy
148
=
yylhsminor
.
yy148
;
yymsp
[
-
3
].
minor
.
yy
332
=
yylhsminor
.
yy332
;
break
;
case
180
:
/* tablelist ::= tablelist COMMA ids cpxName ids */
{
yymsp
[
-
2
].
minor
.
yy0
.
n
+=
yymsp
[
-
1
].
minor
.
yy0
.
n
;
yylhsminor
.
yy
148
=
setTableNameList
(
yymsp
[
-
4
].
minor
.
yy148
,
&
yymsp
[
-
2
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
);
yylhsminor
.
yy
332
=
setTableNameList
(
yymsp
[
-
4
].
minor
.
yy332
,
&
yymsp
[
-
2
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
);
}
yymsp
[
-
4
].
minor
.
yy
148
=
yylhsminor
.
yy148
;
yymsp
[
-
4
].
minor
.
yy
332
=
yylhsminor
.
yy332
;
break
;
case
181
:
/* tmvar ::= VARIABLE */
{
yylhsminor
.
yy0
=
yymsp
[
0
].
minor
.
yy0
;}
yymsp
[
0
].
minor
.
yy0
=
yylhsminor
.
yy0
;
break
;
case
182
:
/* interval_opt ::= INTERVAL LP tmvar RP */
{
yymsp
[
-
3
].
minor
.
yy3
76
.
interval
=
yymsp
[
-
1
].
minor
.
yy0
;
yymsp
[
-
3
].
minor
.
yy376
.
offset
.
n
=
0
;}
{
yymsp
[
-
3
].
minor
.
yy3
92
.
interval
=
yymsp
[
-
1
].
minor
.
yy0
;
yymsp
[
-
3
].
minor
.
yy392
.
offset
.
n
=
0
;}
break
;
case
183
:
/* interval_opt ::= INTERVAL LP tmvar COMMA tmvar RP */
{
yymsp
[
-
5
].
minor
.
yy3
76
.
interval
=
yymsp
[
-
3
].
minor
.
yy0
;
yymsp
[
-
5
].
minor
.
yy376
.
offset
=
yymsp
[
-
1
].
minor
.
yy0
;}
{
yymsp
[
-
5
].
minor
.
yy3
92
.
interval
=
yymsp
[
-
3
].
minor
.
yy0
;
yymsp
[
-
5
].
minor
.
yy392
.
offset
=
yymsp
[
-
1
].
minor
.
yy0
;}
break
;
case
184
:
/* interval_opt ::= */
{
memset
(
&
yymsp
[
1
].
minor
.
yy3
76
,
0
,
sizeof
(
yymsp
[
1
].
minor
.
yy376
));}
{
memset
(
&
yymsp
[
1
].
minor
.
yy3
92
,
0
,
sizeof
(
yymsp
[
1
].
minor
.
yy392
));}
break
;
case
185
:
/* session_option ::= */
{
yymsp
[
1
].
minor
.
yy
523
.
col
.
n
=
0
;
yymsp
[
1
].
minor
.
yy523
.
gap
.
n
=
0
;}
{
yymsp
[
1
].
minor
.
yy
447
.
col
.
n
=
0
;
yymsp
[
1
].
minor
.
yy447
.
gap
.
n
=
0
;}
break
;
case
186
:
/* session_option ::= SESSION LP ids cpxName COMMA tmvar RP */
{
yymsp
[
-
4
].
minor
.
yy0
.
n
+=
yymsp
[
-
3
].
minor
.
yy0
.
n
;
yymsp
[
-
6
].
minor
.
yy
523
.
col
=
yymsp
[
-
4
].
minor
.
yy0
;
yymsp
[
-
6
].
minor
.
yy
523
.
gap
=
yymsp
[
-
1
].
minor
.
yy0
;
yymsp
[
-
6
].
minor
.
yy
447
.
col
=
yymsp
[
-
4
].
minor
.
yy0
;
yymsp
[
-
6
].
minor
.
yy
447
.
gap
=
yymsp
[
-
1
].
minor
.
yy0
;
}
break
;
case
187
:
/*
fill_opt
::= */
{
yymsp
[
1
].
minor
.
yy285
=
0
;
}
case
187
:
/*
windowstate_option
::= */
{
yymsp
[
1
].
minor
.
yy76
.
col
.
n
=
0
;
}
break
;
case
188
:
/* fill_opt ::= FILL LP ID COMMA tagitemlist RP */
case
188
:
/* windowstate_option ::= STATE_WINDOW LP ids RP */
{
yymsp
[
-
3
].
minor
.
yy76
.
col
=
yymsp
[
-
1
].
minor
.
yy0
;
}
break
;
case
189
:
/* fill_opt ::= */
{
yymsp
[
1
].
minor
.
yy193
=
0
;
}
break
;
case
190
:
/* fill_opt ::= FILL LP ID COMMA tagitemlist RP */
{
tVariant
A
=
{
0
};
toTSDBType
(
yymsp
[
-
3
].
minor
.
yy0
.
type
);
tVariantCreate
(
&
A
,
&
yymsp
[
-
3
].
minor
.
yy0
);
tVariantListInsert
(
yymsp
[
-
1
].
minor
.
yy
285
,
&
A
,
-
1
,
0
);
yymsp
[
-
5
].
minor
.
yy
285
=
yymsp
[
-
1
].
minor
.
yy285
;
tVariantListInsert
(
yymsp
[
-
1
].
minor
.
yy
193
,
&
A
,
-
1
,
0
);
yymsp
[
-
5
].
minor
.
yy
193
=
yymsp
[
-
1
].
minor
.
yy193
;
}
break
;
case
1
89
:
/* fill_opt ::= FILL LP ID RP */
case
1
91
:
/* fill_opt ::= FILL LP ID RP */
{
toTSDBType
(
yymsp
[
-
1
].
minor
.
yy0
.
type
);
yymsp
[
-
3
].
minor
.
yy
285
=
tVariantListAppendToken
(
NULL
,
&
yymsp
[
-
1
].
minor
.
yy0
,
-
1
);
yymsp
[
-
3
].
minor
.
yy
193
=
tVariantListAppendToken
(
NULL
,
&
yymsp
[
-
1
].
minor
.
yy0
,
-
1
);
}
break
;
case
19
0
:
/* sliding_opt ::= SLIDING LP tmvar RP */
case
19
2
:
/* sliding_opt ::= SLIDING LP tmvar RP */
{
yymsp
[
-
3
].
minor
.
yy0
=
yymsp
[
-
1
].
minor
.
yy0
;
}
break
;
case
19
1
:
/* sliding_opt ::= */
case
19
3
:
/* sliding_opt ::= */
{
yymsp
[
1
].
minor
.
yy0
.
n
=
0
;
yymsp
[
1
].
minor
.
yy0
.
z
=
NULL
;
yymsp
[
1
].
minor
.
yy0
.
type
=
0
;
}
break
;
case
19
3
:
/* orderby_opt ::= ORDER BY sortlist */
{
yymsp
[
-
2
].
minor
.
yy
285
=
yymsp
[
0
].
minor
.
yy285
;}
case
19
5
:
/* orderby_opt ::= ORDER BY sortlist */
{
yymsp
[
-
2
].
minor
.
yy
193
=
yymsp
[
0
].
minor
.
yy193
;}
break
;
case
19
4
:
/* sortlist ::= sortlist COMMA item sortorder */
case
19
6
:
/* sortlist ::= sortlist COMMA item sortorder */
{
yylhsminor
.
yy
285
=
tVariantListAppend
(
yymsp
[
-
3
].
minor
.
yy285
,
&
yymsp
[
-
1
].
minor
.
yy362
,
yymsp
[
0
].
minor
.
yy460
);
yylhsminor
.
yy
193
=
tVariantListAppend
(
yymsp
[
-
3
].
minor
.
yy193
,
&
yymsp
[
-
1
].
minor
.
yy442
,
yymsp
[
0
].
minor
.
yy312
);
}
yymsp
[
-
3
].
minor
.
yy
285
=
yylhsminor
.
yy285
;
yymsp
[
-
3
].
minor
.
yy
193
=
yylhsminor
.
yy193
;
break
;
case
19
5
:
/* sortlist ::= item sortorder */
case
19
7
:
/* sortlist ::= item sortorder */
{
yylhsminor
.
yy
285
=
tVariantListAppend
(
NULL
,
&
yymsp
[
-
1
].
minor
.
yy362
,
yymsp
[
0
].
minor
.
yy460
);
yylhsminor
.
yy
193
=
tVariantListAppend
(
NULL
,
&
yymsp
[
-
1
].
minor
.
yy442
,
yymsp
[
0
].
minor
.
yy312
);
}
yymsp
[
-
1
].
minor
.
yy
285
=
yylhsminor
.
yy285
;
yymsp
[
-
1
].
minor
.
yy
193
=
yylhsminor
.
yy193
;
break
;
case
19
6
:
/* item ::= ids cpxName */
case
19
8
:
/* item ::= ids cpxName */
{
toTSDBType
(
yymsp
[
-
1
].
minor
.
yy0
.
type
);
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
tVariantCreate
(
&
yylhsminor
.
yy
36
2
,
&
yymsp
[
-
1
].
minor
.
yy0
);
tVariantCreate
(
&
yylhsminor
.
yy
44
2
,
&
yymsp
[
-
1
].
minor
.
yy0
);
}
yymsp
[
-
1
].
minor
.
yy
362
=
yylhsminor
.
yy36
2
;
yymsp
[
-
1
].
minor
.
yy
442
=
yylhsminor
.
yy44
2
;
break
;
case
19
7
:
/* sortorder ::= ASC */
{
yymsp
[
0
].
minor
.
yy
460
=
TSDB_ORDER_ASC
;
}
case
19
9
:
/* sortorder ::= ASC */
{
yymsp
[
0
].
minor
.
yy
312
=
TSDB_ORDER_ASC
;
}
break
;
case
198
:
/* sortorder ::= DESC */
{
yymsp
[
0
].
minor
.
yy
460
=
TSDB_ORDER_DESC
;}
case
200
:
/* sortorder ::= DESC */
{
yymsp
[
0
].
minor
.
yy
312
=
TSDB_ORDER_DESC
;}
break
;
case
199
:
/* sortorder ::= */
{
yymsp
[
1
].
minor
.
yy
460
=
TSDB_ORDER_ASC
;
}
case
201
:
/* sortorder ::= */
{
yymsp
[
1
].
minor
.
yy
312
=
TSDB_ORDER_ASC
;
}
break
;
case
20
0
:
/* groupby_opt ::= */
{
yymsp
[
1
].
minor
.
yy
285
=
0
;}
case
20
2
:
/* groupby_opt ::= */
{
yymsp
[
1
].
minor
.
yy
193
=
0
;}
break
;
case
20
1
:
/* groupby_opt ::= GROUP BY grouplist */
{
yymsp
[
-
2
].
minor
.
yy
285
=
yymsp
[
0
].
minor
.
yy285
;}
case
20
3
:
/* groupby_opt ::= GROUP BY grouplist */
{
yymsp
[
-
2
].
minor
.
yy
193
=
yymsp
[
0
].
minor
.
yy193
;}
break
;
case
20
2
:
/* grouplist ::= grouplist COMMA item */
case
20
4
:
/* grouplist ::= grouplist COMMA item */
{
yylhsminor
.
yy
285
=
tVariantListAppend
(
yymsp
[
-
2
].
minor
.
yy285
,
&
yymsp
[
0
].
minor
.
yy36
2
,
-
1
);
yylhsminor
.
yy
193
=
tVariantListAppend
(
yymsp
[
-
2
].
minor
.
yy193
,
&
yymsp
[
0
].
minor
.
yy44
2
,
-
1
);
}
yymsp
[
-
2
].
minor
.
yy
285
=
yylhsminor
.
yy285
;
yymsp
[
-
2
].
minor
.
yy
193
=
yylhsminor
.
yy193
;
break
;
case
20
3
:
/* grouplist ::= item */
case
20
5
:
/* grouplist ::= item */
{
yylhsminor
.
yy
285
=
tVariantListAppend
(
NULL
,
&
yymsp
[
0
].
minor
.
yy36
2
,
-
1
);
yylhsminor
.
yy
193
=
tVariantListAppend
(
NULL
,
&
yymsp
[
0
].
minor
.
yy44
2
,
-
1
);
}
yymsp
[
0
].
minor
.
yy
285
=
yylhsminor
.
yy285
;
yymsp
[
0
].
minor
.
yy
193
=
yylhsminor
.
yy193
;
break
;
case
20
4
:
/* having_opt ::= */
case
21
4
:
/* where_opt ::= */
yytestcase
(
yyruleno
==
214
);
case
25
6
:
/* expritem ::= */
yytestcase
(
yyruleno
==
256
);
{
yymsp
[
1
].
minor
.
yy
178
=
0
;}
case
20
6
:
/* having_opt ::= */
case
21
6
:
/* where_opt ::= */
yytestcase
(
yyruleno
==
216
);
case
25
8
:
/* expritem ::= */
yytestcase
(
yyruleno
==
258
);
{
yymsp
[
1
].
minor
.
yy
454
=
0
;}
break
;
case
20
5
:
/* having_opt ::= HAVING expr */
case
21
5
:
/* where_opt ::= WHERE expr */
yytestcase
(
yyruleno
==
215
);
{
yymsp
[
-
1
].
minor
.
yy
178
=
yymsp
[
0
].
minor
.
yy178
;}
case
20
7
:
/* having_opt ::= HAVING expr */
case
21
7
:
/* where_opt ::= WHERE expr */
yytestcase
(
yyruleno
==
217
);
{
yymsp
[
-
1
].
minor
.
yy
454
=
yymsp
[
0
].
minor
.
yy454
;}
break
;
case
20
6
:
/* limit_opt ::= */
case
21
0
:
/* slimit_opt ::= */
yytestcase
(
yyruleno
==
210
);
{
yymsp
[
1
].
minor
.
yy4
38
.
limit
=
-
1
;
yymsp
[
1
].
minor
.
yy438
.
offset
=
0
;}
case
20
8
:
/* limit_opt ::= */
case
21
2
:
/* slimit_opt ::= */
yytestcase
(
yyruleno
==
212
);
{
yymsp
[
1
].
minor
.
yy4
82
.
limit
=
-
1
;
yymsp
[
1
].
minor
.
yy482
.
offset
=
0
;}
break
;
case
20
7
:
/* limit_opt ::= LIMIT signed */
case
21
1
:
/* slimit_opt ::= SLIMIT signed */
yytestcase
(
yyruleno
==
211
);
{
yymsp
[
-
1
].
minor
.
yy4
38
.
limit
=
yymsp
[
0
].
minor
.
yy525
;
yymsp
[
-
1
].
minor
.
yy438
.
offset
=
0
;}
case
20
9
:
/* limit_opt ::= LIMIT signed */
case
21
3
:
/* slimit_opt ::= SLIMIT signed */
yytestcase
(
yyruleno
==
213
);
{
yymsp
[
-
1
].
minor
.
yy4
82
.
limit
=
yymsp
[
0
].
minor
.
yy473
;
yymsp
[
-
1
].
minor
.
yy482
.
offset
=
0
;}
break
;
case
2
08
:
/* limit_opt ::= LIMIT signed OFFSET signed */
{
yymsp
[
-
3
].
minor
.
yy4
38
.
limit
=
yymsp
[
-
2
].
minor
.
yy525
;
yymsp
[
-
3
].
minor
.
yy438
.
offset
=
yymsp
[
0
].
minor
.
yy525
;}
case
2
10
:
/* limit_opt ::= LIMIT signed OFFSET signed */
{
yymsp
[
-
3
].
minor
.
yy4
82
.
limit
=
yymsp
[
-
2
].
minor
.
yy473
;
yymsp
[
-
3
].
minor
.
yy482
.
offset
=
yymsp
[
0
].
minor
.
yy473
;}
break
;
case
2
09
:
/* limit_opt ::= LIMIT signed COMMA signed */
{
yymsp
[
-
3
].
minor
.
yy4
38
.
limit
=
yymsp
[
0
].
minor
.
yy525
;
yymsp
[
-
3
].
minor
.
yy438
.
offset
=
yymsp
[
-
2
].
minor
.
yy525
;}
case
2
11
:
/* limit_opt ::= LIMIT signed COMMA signed */
{
yymsp
[
-
3
].
minor
.
yy4
82
.
limit
=
yymsp
[
0
].
minor
.
yy473
;
yymsp
[
-
3
].
minor
.
yy482
.
offset
=
yymsp
[
-
2
].
minor
.
yy473
;}
break
;
case
21
2
:
/* slimit_opt ::= SLIMIT signed SOFFSET signed */
{
yymsp
[
-
3
].
minor
.
yy4
38
.
limit
=
yymsp
[
-
2
].
minor
.
yy525
;
yymsp
[
-
3
].
minor
.
yy438
.
offset
=
yymsp
[
0
].
minor
.
yy525
;}
case
21
4
:
/* slimit_opt ::= SLIMIT signed SOFFSET signed */
{
yymsp
[
-
3
].
minor
.
yy4
82
.
limit
=
yymsp
[
-
2
].
minor
.
yy473
;
yymsp
[
-
3
].
minor
.
yy482
.
offset
=
yymsp
[
0
].
minor
.
yy473
;}
break
;
case
21
3
:
/* slimit_opt ::= SLIMIT signed COMMA signed */
{
yymsp
[
-
3
].
minor
.
yy4
38
.
limit
=
yymsp
[
0
].
minor
.
yy525
;
yymsp
[
-
3
].
minor
.
yy438
.
offset
=
yymsp
[
-
2
].
minor
.
yy525
;}
case
21
5
:
/* slimit_opt ::= SLIMIT signed COMMA signed */
{
yymsp
[
-
3
].
minor
.
yy4
82
.
limit
=
yymsp
[
0
].
minor
.
yy473
;
yymsp
[
-
3
].
minor
.
yy482
.
offset
=
yymsp
[
-
2
].
minor
.
yy473
;}
break
;
case
21
6
:
/* expr ::= LP expr RP */
{
yylhsminor
.
yy
178
=
yymsp
[
-
1
].
minor
.
yy178
;
yylhsminor
.
yy178
->
token
.
z
=
yymsp
[
-
2
].
minor
.
yy0
.
z
;
yylhsminor
.
yy178
->
token
.
n
=
(
yymsp
[
0
].
minor
.
yy0
.
z
-
yymsp
[
-
2
].
minor
.
yy0
.
z
+
1
);}
yymsp
[
-
2
].
minor
.
yy
178
=
yylhsminor
.
yy178
;
case
21
8
:
/* expr ::= LP expr RP */
{
yylhsminor
.
yy
454
=
yymsp
[
-
1
].
minor
.
yy454
;
yylhsminor
.
yy454
->
token
.
z
=
yymsp
[
-
2
].
minor
.
yy0
.
z
;
yylhsminor
.
yy454
->
token
.
n
=
(
yymsp
[
0
].
minor
.
yy0
.
z
-
yymsp
[
-
2
].
minor
.
yy0
.
z
+
1
);}
yymsp
[
-
2
].
minor
.
yy
454
=
yylhsminor
.
yy454
;
break
;
case
21
7
:
/* expr ::= ID */
{
yylhsminor
.
yy
178
=
tSqlExprCreateIdValue
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_ID
);}
yymsp
[
0
].
minor
.
yy
178
=
yylhsminor
.
yy178
;
case
21
9
:
/* expr ::= ID */
{
yylhsminor
.
yy
454
=
tSqlExprCreateIdValue
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_ID
);}
yymsp
[
0
].
minor
.
yy
454
=
yylhsminor
.
yy454
;
break
;
case
2
18
:
/* expr ::= ID DOT ID */
{
yymsp
[
-
2
].
minor
.
yy0
.
n
+=
(
1
+
yymsp
[
0
].
minor
.
yy0
.
n
);
yylhsminor
.
yy
178
=
tSqlExprCreateIdValue
(
&
yymsp
[
-
2
].
minor
.
yy0
,
TK_ID
);}
yymsp
[
-
2
].
minor
.
yy
178
=
yylhsminor
.
yy178
;
case
2
20
:
/* expr ::= ID DOT ID */
{
yymsp
[
-
2
].
minor
.
yy0
.
n
+=
(
1
+
yymsp
[
0
].
minor
.
yy0
.
n
);
yylhsminor
.
yy
454
=
tSqlExprCreateIdValue
(
&
yymsp
[
-
2
].
minor
.
yy0
,
TK_ID
);}
yymsp
[
-
2
].
minor
.
yy
454
=
yylhsminor
.
yy454
;
break
;
case
2
19
:
/* expr ::= ID DOT STAR */
{
yymsp
[
-
2
].
minor
.
yy0
.
n
+=
(
1
+
yymsp
[
0
].
minor
.
yy0
.
n
);
yylhsminor
.
yy
178
=
tSqlExprCreateIdValue
(
&
yymsp
[
-
2
].
minor
.
yy0
,
TK_ALL
);}
yymsp
[
-
2
].
minor
.
yy
178
=
yylhsminor
.
yy178
;
case
2
21
:
/* expr ::= ID DOT STAR */
{
yymsp
[
-
2
].
minor
.
yy0
.
n
+=
(
1
+
yymsp
[
0
].
minor
.
yy0
.
n
);
yylhsminor
.
yy
454
=
tSqlExprCreateIdValue
(
&
yymsp
[
-
2
].
minor
.
yy0
,
TK_ALL
);}
yymsp
[
-
2
].
minor
.
yy
454
=
yylhsminor
.
yy454
;
break
;
case
22
0
:
/* expr ::= INTEGER */
{
yylhsminor
.
yy
178
=
tSqlExprCreateIdValue
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_INTEGER
);}
yymsp
[
0
].
minor
.
yy
178
=
yylhsminor
.
yy178
;
case
22
2
:
/* expr ::= INTEGER */
{
yylhsminor
.
yy
454
=
tSqlExprCreateIdValue
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_INTEGER
);}
yymsp
[
0
].
minor
.
yy
454
=
yylhsminor
.
yy454
;
break
;
case
22
1
:
/* expr ::= MINUS INTEGER */
case
22
2
:
/* expr ::= PLUS INTEGER */
yytestcase
(
yyruleno
==
222
);
{
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
yymsp
[
-
1
].
minor
.
yy0
.
type
=
TK_INTEGER
;
yylhsminor
.
yy
178
=
tSqlExprCreateIdValue
(
&
yymsp
[
-
1
].
minor
.
yy0
,
TK_INTEGER
);}
yymsp
[
-
1
].
minor
.
yy
178
=
yylhsminor
.
yy178
;
case
22
3
:
/* expr ::= MINUS INTEGER */
case
22
4
:
/* expr ::= PLUS INTEGER */
yytestcase
(
yyruleno
==
224
);
{
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
yymsp
[
-
1
].
minor
.
yy0
.
type
=
TK_INTEGER
;
yylhsminor
.
yy
454
=
tSqlExprCreateIdValue
(
&
yymsp
[
-
1
].
minor
.
yy0
,
TK_INTEGER
);}
yymsp
[
-
1
].
minor
.
yy
454
=
yylhsminor
.
yy454
;
break
;
case
22
3
:
/* expr ::= FLOAT */
{
yylhsminor
.
yy
178
=
tSqlExprCreateIdValue
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_FLOAT
);}
yymsp
[
0
].
minor
.
yy
178
=
yylhsminor
.
yy178
;
case
22
5
:
/* expr ::= FLOAT */
{
yylhsminor
.
yy
454
=
tSqlExprCreateIdValue
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_FLOAT
);}
yymsp
[
0
].
minor
.
yy
454
=
yylhsminor
.
yy454
;
break
;
case
22
4
:
/* expr ::= MINUS FLOAT */
case
22
5
:
/* expr ::= PLUS FLOAT */
yytestcase
(
yyruleno
==
225
);
{
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
yymsp
[
-
1
].
minor
.
yy0
.
type
=
TK_FLOAT
;
yylhsminor
.
yy
178
=
tSqlExprCreateIdValue
(
&
yymsp
[
-
1
].
minor
.
yy0
,
TK_FLOAT
);}
yymsp
[
-
1
].
minor
.
yy
178
=
yylhsminor
.
yy178
;
case
22
6
:
/* expr ::= MINUS FLOAT */
case
22
7
:
/* expr ::= PLUS FLOAT */
yytestcase
(
yyruleno
==
227
);
{
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
yymsp
[
-
1
].
minor
.
yy0
.
type
=
TK_FLOAT
;
yylhsminor
.
yy
454
=
tSqlExprCreateIdValue
(
&
yymsp
[
-
1
].
minor
.
yy0
,
TK_FLOAT
);}
yymsp
[
-
1
].
minor
.
yy
454
=
yylhsminor
.
yy454
;
break
;
case
22
6
:
/* expr ::= STRING */
{
yylhsminor
.
yy
178
=
tSqlExprCreateIdValue
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_STRING
);}
yymsp
[
0
].
minor
.
yy
178
=
yylhsminor
.
yy178
;
case
22
8
:
/* expr ::= STRING */
{
yylhsminor
.
yy
454
=
tSqlExprCreateIdValue
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_STRING
);}
yymsp
[
0
].
minor
.
yy
454
=
yylhsminor
.
yy454
;
break
;
case
22
7
:
/* expr ::= NOW */
{
yylhsminor
.
yy
178
=
tSqlExprCreateIdValue
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_NOW
);
}
yymsp
[
0
].
minor
.
yy
178
=
yylhsminor
.
yy178
;
case
22
9
:
/* expr ::= NOW */
{
yylhsminor
.
yy
454
=
tSqlExprCreateIdValue
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_NOW
);
}
yymsp
[
0
].
minor
.
yy
454
=
yylhsminor
.
yy454
;
break
;
case
2
28
:
/* expr ::= VARIABLE */
{
yylhsminor
.
yy
178
=
tSqlExprCreateIdValue
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_VARIABLE
);}
yymsp
[
0
].
minor
.
yy
178
=
yylhsminor
.
yy178
;
case
2
30
:
/* expr ::= VARIABLE */
{
yylhsminor
.
yy
454
=
tSqlExprCreateIdValue
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_VARIABLE
);}
yymsp
[
0
].
minor
.
yy
454
=
yylhsminor
.
yy454
;
break
;
case
2
29
:
/* expr ::= PLUS VARIABLE */
case
23
0
:
/* expr ::= MINUS VARIABLE */
yytestcase
(
yyruleno
==
230
);
{
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
yymsp
[
-
1
].
minor
.
yy0
.
type
=
TK_VARIABLE
;
yylhsminor
.
yy
178
=
tSqlExprCreateIdValue
(
&
yymsp
[
-
1
].
minor
.
yy0
,
TK_VARIABLE
);}
yymsp
[
-
1
].
minor
.
yy
178
=
yylhsminor
.
yy178
;
case
2
31
:
/* expr ::= PLUS VARIABLE */
case
23
2
:
/* expr ::= MINUS VARIABLE */
yytestcase
(
yyruleno
==
232
);
{
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
yymsp
[
-
1
].
minor
.
yy0
.
type
=
TK_VARIABLE
;
yylhsminor
.
yy
454
=
tSqlExprCreateIdValue
(
&
yymsp
[
-
1
].
minor
.
yy0
,
TK_VARIABLE
);}
yymsp
[
-
1
].
minor
.
yy
454
=
yylhsminor
.
yy454
;
break
;
case
23
1
:
/* expr ::= BOOL */
{
yylhsminor
.
yy
178
=
tSqlExprCreateIdValue
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_BOOL
);}
yymsp
[
0
].
minor
.
yy
178
=
yylhsminor
.
yy178
;
case
23
3
:
/* expr ::= BOOL */
{
yylhsminor
.
yy
454
=
tSqlExprCreateIdValue
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_BOOL
);}
yymsp
[
0
].
minor
.
yy
454
=
yylhsminor
.
yy454
;
break
;
case
23
2
:
/* expr ::= NULL */
{
yylhsminor
.
yy
178
=
tSqlExprCreateIdValue
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_NULL
);}
yymsp
[
0
].
minor
.
yy
178
=
yylhsminor
.
yy178
;
case
23
4
:
/* expr ::= NULL */
{
yylhsminor
.
yy
454
=
tSqlExprCreateIdValue
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_NULL
);}
yymsp
[
0
].
minor
.
yy
454
=
yylhsminor
.
yy454
;
break
;
case
23
3
:
/* expr ::= ID LP exprlist RP */
{
yylhsminor
.
yy
178
=
tSqlExprCreateFunction
(
yymsp
[
-
1
].
minor
.
yy285
,
&
yymsp
[
-
3
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
,
yymsp
[
-
3
].
minor
.
yy0
.
type
);
}
yymsp
[
-
3
].
minor
.
yy
178
=
yylhsminor
.
yy178
;
case
23
5
:
/* expr ::= ID LP exprlist RP */
{
yylhsminor
.
yy
454
=
tSqlExprCreateFunction
(
yymsp
[
-
1
].
minor
.
yy193
,
&
yymsp
[
-
3
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
,
yymsp
[
-
3
].
minor
.
yy0
.
type
);
}
yymsp
[
-
3
].
minor
.
yy
454
=
yylhsminor
.
yy454
;
break
;
case
23
4
:
/* expr ::= ID LP STAR RP */
{
yylhsminor
.
yy
178
=
tSqlExprCreateFunction
(
NULL
,
&
yymsp
[
-
3
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
,
yymsp
[
-
3
].
minor
.
yy0
.
type
);
}
yymsp
[
-
3
].
minor
.
yy
178
=
yylhsminor
.
yy178
;
case
23
6
:
/* expr ::= ID LP STAR RP */
{
yylhsminor
.
yy
454
=
tSqlExprCreateFunction
(
NULL
,
&
yymsp
[
-
3
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
,
yymsp
[
-
3
].
minor
.
yy0
.
type
);
}
yymsp
[
-
3
].
minor
.
yy
454
=
yylhsminor
.
yy454
;
break
;
case
23
5
:
/* expr ::= expr IS NULL */
{
yylhsminor
.
yy
178
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy178
,
NULL
,
TK_ISNULL
);}
yymsp
[
-
2
].
minor
.
yy
178
=
yylhsminor
.
yy178
;
case
23
7
:
/* expr ::= expr IS NULL */
{
yylhsminor
.
yy
454
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy454
,
NULL
,
TK_ISNULL
);}
yymsp
[
-
2
].
minor
.
yy
454
=
yylhsminor
.
yy454
;
break
;
case
23
6
:
/* expr ::= expr IS NOT NULL */
{
yylhsminor
.
yy
178
=
tSqlExprCreate
(
yymsp
[
-
3
].
minor
.
yy178
,
NULL
,
TK_NOTNULL
);}
yymsp
[
-
3
].
minor
.
yy
178
=
yylhsminor
.
yy178
;
case
23
8
:
/* expr ::= expr IS NOT NULL */
{
yylhsminor
.
yy
454
=
tSqlExprCreate
(
yymsp
[
-
3
].
minor
.
yy454
,
NULL
,
TK_NOTNULL
);}
yymsp
[
-
3
].
minor
.
yy
454
=
yylhsminor
.
yy454
;
break
;
case
23
7
:
/* expr ::= expr LT expr */
{
yylhsminor
.
yy
178
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy178
,
yymsp
[
0
].
minor
.
yy178
,
TK_LT
);}
yymsp
[
-
2
].
minor
.
yy
178
=
yylhsminor
.
yy178
;
case
23
9
:
/* expr ::= expr LT expr */
{
yylhsminor
.
yy
454
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy454
,
yymsp
[
0
].
minor
.
yy454
,
TK_LT
);}
yymsp
[
-
2
].
minor
.
yy
454
=
yylhsminor
.
yy454
;
break
;
case
2
38
:
/* expr ::= expr GT expr */
{
yylhsminor
.
yy
178
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy178
,
yymsp
[
0
].
minor
.
yy178
,
TK_GT
);}
yymsp
[
-
2
].
minor
.
yy
178
=
yylhsminor
.
yy178
;
case
2
40
:
/* expr ::= expr GT expr */
{
yylhsminor
.
yy
454
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy454
,
yymsp
[
0
].
minor
.
yy454
,
TK_GT
);}
yymsp
[
-
2
].
minor
.
yy
454
=
yylhsminor
.
yy454
;
break
;
case
2
39
:
/* expr ::= expr LE expr */
{
yylhsminor
.
yy
178
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy178
,
yymsp
[
0
].
minor
.
yy178
,
TK_LE
);}
yymsp
[
-
2
].
minor
.
yy
178
=
yylhsminor
.
yy178
;
case
2
41
:
/* expr ::= expr LE expr */
{
yylhsminor
.
yy
454
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy454
,
yymsp
[
0
].
minor
.
yy454
,
TK_LE
);}
yymsp
[
-
2
].
minor
.
yy
454
=
yylhsminor
.
yy454
;
break
;
case
24
0
:
/* expr ::= expr GE expr */
{
yylhsminor
.
yy
178
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy178
,
yymsp
[
0
].
minor
.
yy178
,
TK_GE
);}
yymsp
[
-
2
].
minor
.
yy
178
=
yylhsminor
.
yy178
;
case
24
2
:
/* expr ::= expr GE expr */
{
yylhsminor
.
yy
454
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy454
,
yymsp
[
0
].
minor
.
yy454
,
TK_GE
);}
yymsp
[
-
2
].
minor
.
yy
454
=
yylhsminor
.
yy454
;
break
;
case
24
1
:
/* expr ::= expr NE expr */
{
yylhsminor
.
yy
178
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy178
,
yymsp
[
0
].
minor
.
yy178
,
TK_NE
);}
yymsp
[
-
2
].
minor
.
yy
178
=
yylhsminor
.
yy178
;
case
24
3
:
/* expr ::= expr NE expr */
{
yylhsminor
.
yy
454
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy454
,
yymsp
[
0
].
minor
.
yy454
,
TK_NE
);}
yymsp
[
-
2
].
minor
.
yy
454
=
yylhsminor
.
yy454
;
break
;
case
24
2
:
/* expr ::= expr EQ expr */
{
yylhsminor
.
yy
178
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy178
,
yymsp
[
0
].
minor
.
yy178
,
TK_EQ
);}
yymsp
[
-
2
].
minor
.
yy
178
=
yylhsminor
.
yy178
;
case
24
4
:
/* expr ::= expr EQ expr */
{
yylhsminor
.
yy
454
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy454
,
yymsp
[
0
].
minor
.
yy454
,
TK_EQ
);}
yymsp
[
-
2
].
minor
.
yy
454
=
yylhsminor
.
yy454
;
break
;
case
24
3
:
/* expr ::= expr BETWEEN expr AND expr */
{
tSqlExpr
*
X2
=
tSqlExprClone
(
yymsp
[
-
4
].
minor
.
yy
178
);
yylhsminor
.
yy178
=
tSqlExprCreate
(
tSqlExprCreate
(
yymsp
[
-
4
].
minor
.
yy178
,
yymsp
[
-
2
].
minor
.
yy178
,
TK_GE
),
tSqlExprCreate
(
X2
,
yymsp
[
0
].
minor
.
yy178
,
TK_LE
),
TK_AND
);}
yymsp
[
-
4
].
minor
.
yy
178
=
yylhsminor
.
yy178
;
case
24
5
:
/* expr ::= expr BETWEEN expr AND expr */
{
tSqlExpr
*
X2
=
tSqlExprClone
(
yymsp
[
-
4
].
minor
.
yy
454
);
yylhsminor
.
yy454
=
tSqlExprCreate
(
tSqlExprCreate
(
yymsp
[
-
4
].
minor
.
yy454
,
yymsp
[
-
2
].
minor
.
yy454
,
TK_GE
),
tSqlExprCreate
(
X2
,
yymsp
[
0
].
minor
.
yy454
,
TK_LE
),
TK_AND
);}
yymsp
[
-
4
].
minor
.
yy
454
=
yylhsminor
.
yy454
;
break
;
case
24
4
:
/* expr ::= expr AND expr */
{
yylhsminor
.
yy
178
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy178
,
yymsp
[
0
].
minor
.
yy178
,
TK_AND
);}
yymsp
[
-
2
].
minor
.
yy
178
=
yylhsminor
.
yy178
;
case
24
6
:
/* expr ::= expr AND expr */
{
yylhsminor
.
yy
454
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy454
,
yymsp
[
0
].
minor
.
yy454
,
TK_AND
);}
yymsp
[
-
2
].
minor
.
yy
454
=
yylhsminor
.
yy454
;
break
;
case
24
5
:
/* expr ::= expr OR expr */
{
yylhsminor
.
yy
178
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy178
,
yymsp
[
0
].
minor
.
yy178
,
TK_OR
);
}
yymsp
[
-
2
].
minor
.
yy
178
=
yylhsminor
.
yy178
;
case
24
7
:
/* expr ::= expr OR expr */
{
yylhsminor
.
yy
454
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy454
,
yymsp
[
0
].
minor
.
yy454
,
TK_OR
);
}
yymsp
[
-
2
].
minor
.
yy
454
=
yylhsminor
.
yy454
;
break
;
case
24
6
:
/* expr ::= expr PLUS expr */
{
yylhsminor
.
yy
178
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy178
,
yymsp
[
0
].
minor
.
yy178
,
TK_PLUS
);
}
yymsp
[
-
2
].
minor
.
yy
178
=
yylhsminor
.
yy178
;
case
24
8
:
/* expr ::= expr PLUS expr */
{
yylhsminor
.
yy
454
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy454
,
yymsp
[
0
].
minor
.
yy454
,
TK_PLUS
);
}
yymsp
[
-
2
].
minor
.
yy
454
=
yylhsminor
.
yy454
;
break
;
case
24
7
:
/* expr ::= expr MINUS expr */
{
yylhsminor
.
yy
178
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy178
,
yymsp
[
0
].
minor
.
yy178
,
TK_MINUS
);
}
yymsp
[
-
2
].
minor
.
yy
178
=
yylhsminor
.
yy178
;
case
24
9
:
/* expr ::= expr MINUS expr */
{
yylhsminor
.
yy
454
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy454
,
yymsp
[
0
].
minor
.
yy454
,
TK_MINUS
);
}
yymsp
[
-
2
].
minor
.
yy
454
=
yylhsminor
.
yy454
;
break
;
case
2
48
:
/* expr ::= expr STAR expr */
{
yylhsminor
.
yy
178
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy178
,
yymsp
[
0
].
minor
.
yy178
,
TK_STAR
);
}
yymsp
[
-
2
].
minor
.
yy
178
=
yylhsminor
.
yy178
;
case
2
50
:
/* expr ::= expr STAR expr */
{
yylhsminor
.
yy
454
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy454
,
yymsp
[
0
].
minor
.
yy454
,
TK_STAR
);
}
yymsp
[
-
2
].
minor
.
yy
454
=
yylhsminor
.
yy454
;
break
;
case
2
49
:
/* expr ::= expr SLASH expr */
{
yylhsminor
.
yy
178
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy178
,
yymsp
[
0
].
minor
.
yy178
,
TK_DIVIDE
);}
yymsp
[
-
2
].
minor
.
yy
178
=
yylhsminor
.
yy178
;
case
2
51
:
/* expr ::= expr SLASH expr */
{
yylhsminor
.
yy
454
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy454
,
yymsp
[
0
].
minor
.
yy454
,
TK_DIVIDE
);}
yymsp
[
-
2
].
minor
.
yy
454
=
yylhsminor
.
yy454
;
break
;
case
25
0
:
/* expr ::= expr REM expr */
{
yylhsminor
.
yy
178
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy178
,
yymsp
[
0
].
minor
.
yy178
,
TK_REM
);
}
yymsp
[
-
2
].
minor
.
yy
178
=
yylhsminor
.
yy178
;
case
25
2
:
/* expr ::= expr REM expr */
{
yylhsminor
.
yy
454
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy454
,
yymsp
[
0
].
minor
.
yy454
,
TK_REM
);
}
yymsp
[
-
2
].
minor
.
yy
454
=
yylhsminor
.
yy454
;
break
;
case
25
1
:
/* expr ::= expr LIKE expr */
{
yylhsminor
.
yy
178
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy178
,
yymsp
[
0
].
minor
.
yy178
,
TK_LIKE
);
}
yymsp
[
-
2
].
minor
.
yy
178
=
yylhsminor
.
yy178
;
case
25
3
:
/* expr ::= expr LIKE expr */
{
yylhsminor
.
yy
454
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy454
,
yymsp
[
0
].
minor
.
yy454
,
TK_LIKE
);
}
yymsp
[
-
2
].
minor
.
yy
454
=
yylhsminor
.
yy454
;
break
;
case
25
2
:
/* expr ::= expr IN LP exprlist RP */
{
yylhsminor
.
yy
178
=
tSqlExprCreate
(
yymsp
[
-
4
].
minor
.
yy178
,
(
tSqlExpr
*
)
yymsp
[
-
1
].
minor
.
yy285
,
TK_IN
);
}
yymsp
[
-
4
].
minor
.
yy
178
=
yylhsminor
.
yy178
;
case
25
4
:
/* expr ::= expr IN LP exprlist RP */
{
yylhsminor
.
yy
454
=
tSqlExprCreate
(
yymsp
[
-
4
].
minor
.
yy454
,
(
tSqlExpr
*
)
yymsp
[
-
1
].
minor
.
yy193
,
TK_IN
);
}
yymsp
[
-
4
].
minor
.
yy
454
=
yylhsminor
.
yy454
;
break
;
case
25
3
:
/* exprlist ::= exprlist COMMA expritem */
{
yylhsminor
.
yy
285
=
tSqlExprListAppend
(
yymsp
[
-
2
].
minor
.
yy285
,
yymsp
[
0
].
minor
.
yy178
,
0
,
0
);}
yymsp
[
-
2
].
minor
.
yy
285
=
yylhsminor
.
yy285
;
case
25
5
:
/* exprlist ::= exprlist COMMA expritem */
{
yylhsminor
.
yy
193
=
tSqlExprListAppend
(
yymsp
[
-
2
].
minor
.
yy193
,
yymsp
[
0
].
minor
.
yy454
,
0
,
0
);}
yymsp
[
-
2
].
minor
.
yy
193
=
yylhsminor
.
yy193
;
break
;
case
25
4
:
/* exprlist ::= expritem */
{
yylhsminor
.
yy
285
=
tSqlExprListAppend
(
0
,
yymsp
[
0
].
minor
.
yy178
,
0
,
0
);}
yymsp
[
0
].
minor
.
yy
285
=
yylhsminor
.
yy285
;
case
25
6
:
/* exprlist ::= expritem */
{
yylhsminor
.
yy
193
=
tSqlExprListAppend
(
0
,
yymsp
[
0
].
minor
.
yy454
,
0
,
0
);}
yymsp
[
0
].
minor
.
yy
193
=
yylhsminor
.
yy193
;
break
;
case
25
5
:
/* expritem ::= expr */
{
yylhsminor
.
yy
178
=
yymsp
[
0
].
minor
.
yy178
;}
yymsp
[
0
].
minor
.
yy
178
=
yylhsminor
.
yy178
;
case
25
7
:
/* expritem ::= expr */
{
yylhsminor
.
yy
454
=
yymsp
[
0
].
minor
.
yy454
;}
yymsp
[
0
].
minor
.
yy
454
=
yylhsminor
.
yy454
;
break
;
case
25
7
:
/* cmd ::= RESET QUERY CACHE */
case
25
9
:
/* cmd ::= RESET QUERY CACHE */
{
setDCLSqlElems
(
pInfo
,
TSDB_SQL_RESET_CACHE
,
0
);}
break
;
case
2
58
:
/* cmd ::= SYNCDB ids REPLICA */
case
2
60
:
/* cmd ::= SYNCDB ids REPLICA */
{
setDCLSqlElems
(
pInfo
,
TSDB_SQL_SYNC_DB_REPLICA
,
1
,
&
yymsp
[
-
1
].
minor
.
yy0
);}
break
;
case
2
59
:
/* cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */
case
2
61
:
/* cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */
{
yymsp
[
-
4
].
minor
.
yy0
.
n
+=
yymsp
[
-
3
].
minor
.
yy0
.
n
;
SAlterTableInfo
*
pAlterTable
=
tSetAlterTableInfo
(
&
yymsp
[
-
4
].
minor
.
yy0
,
yymsp
[
0
].
minor
.
yy
285
,
NULL
,
TSDB_ALTER_TABLE_ADD_COLUMN
,
-
1
);
SAlterTableInfo
*
pAlterTable
=
tSetAlterTableInfo
(
&
yymsp
[
-
4
].
minor
.
yy0
,
yymsp
[
0
].
minor
.
yy
193
,
NULL
,
TSDB_ALTER_TABLE_ADD_COLUMN
,
-
1
);
setSqlInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
break
;
case
26
0
:
/* cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */
case
26
2
:
/* cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */
{
yymsp
[
-
4
].
minor
.
yy0
.
n
+=
yymsp
[
-
3
].
minor
.
yy0
.
n
;
...
...
@@ -3031,14 +3047,14 @@ static void yy_reduce(
setSqlInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
break
;
case
26
1
:
/* cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */
case
26
3
:
/* cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */
{
yymsp
[
-
4
].
minor
.
yy0
.
n
+=
yymsp
[
-
3
].
minor
.
yy0
.
n
;
SAlterTableInfo
*
pAlterTable
=
tSetAlterTableInfo
(
&
yymsp
[
-
4
].
minor
.
yy0
,
yymsp
[
0
].
minor
.
yy
285
,
NULL
,
TSDB_ALTER_TABLE_ADD_TAG_COLUMN
,
-
1
);
SAlterTableInfo
*
pAlterTable
=
tSetAlterTableInfo
(
&
yymsp
[
-
4
].
minor
.
yy0
,
yymsp
[
0
].
minor
.
yy
193
,
NULL
,
TSDB_ALTER_TABLE_ADD_TAG_COLUMN
,
-
1
);
setSqlInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
break
;
case
26
2
:
/* cmd ::= ALTER TABLE ids cpxName DROP TAG ids */
case
26
4
:
/* cmd ::= ALTER TABLE ids cpxName DROP TAG ids */
{
yymsp
[
-
4
].
minor
.
yy0
.
n
+=
yymsp
[
-
3
].
minor
.
yy0
.
n
;
...
...
@@ -3049,7 +3065,7 @@ static void yy_reduce(
setSqlInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
break
;
case
26
3
:
/* cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */
case
26
5
:
/* cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */
{
yymsp
[
-
5
].
minor
.
yy0
.
n
+=
yymsp
[
-
4
].
minor
.
yy0
.
n
;
...
...
@@ -3063,26 +3079,26 @@ static void yy_reduce(
setSqlInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
break
;
case
26
4
:
/* cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */
case
26
6
:
/* cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */
{
yymsp
[
-
6
].
minor
.
yy0
.
n
+=
yymsp
[
-
5
].
minor
.
yy0
.
n
;
toTSDBType
(
yymsp
[
-
2
].
minor
.
yy0
.
type
);
SArray
*
A
=
tVariantListAppendToken
(
NULL
,
&
yymsp
[
-
2
].
minor
.
yy0
,
-
1
);
A
=
tVariantListAppend
(
A
,
&
yymsp
[
0
].
minor
.
yy
36
2
,
-
1
);
A
=
tVariantListAppend
(
A
,
&
yymsp
[
0
].
minor
.
yy
44
2
,
-
1
);
SAlterTableInfo
*
pAlterTable
=
tSetAlterTableInfo
(
&
yymsp
[
-
6
].
minor
.
yy0
,
NULL
,
A
,
TSDB_ALTER_TABLE_UPDATE_TAG_VAL
,
-
1
);
setSqlInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
break
;
case
26
5
:
/* cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */
case
26
7
:
/* cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */
{
yymsp
[
-
4
].
minor
.
yy0
.
n
+=
yymsp
[
-
3
].
minor
.
yy0
.
n
;
SAlterTableInfo
*
pAlterTable
=
tSetAlterTableInfo
(
&
yymsp
[
-
4
].
minor
.
yy0
,
yymsp
[
0
].
minor
.
yy
285
,
NULL
,
TSDB_ALTER_TABLE_ADD_COLUMN
,
TSDB_SUPER_TABLE
);
SAlterTableInfo
*
pAlterTable
=
tSetAlterTableInfo
(
&
yymsp
[
-
4
].
minor
.
yy0
,
yymsp
[
0
].
minor
.
yy
193
,
NULL
,
TSDB_ALTER_TABLE_ADD_COLUMN
,
TSDB_SUPER_TABLE
);
setSqlInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
break
;
case
26
6
:
/* cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */
case
26
8
:
/* cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */
{
yymsp
[
-
4
].
minor
.
yy0
.
n
+=
yymsp
[
-
3
].
minor
.
yy0
.
n
;
...
...
@@ -3093,14 +3109,14 @@ static void yy_reduce(
setSqlInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
break
;
case
26
7
:
/* cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */
case
26
9
:
/* cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */
{
yymsp
[
-
4
].
minor
.
yy0
.
n
+=
yymsp
[
-
3
].
minor
.
yy0
.
n
;
SAlterTableInfo
*
pAlterTable
=
tSetAlterTableInfo
(
&
yymsp
[
-
4
].
minor
.
yy0
,
yymsp
[
0
].
minor
.
yy
285
,
NULL
,
TSDB_ALTER_TABLE_ADD_TAG_COLUMN
,
TSDB_SUPER_TABLE
);
SAlterTableInfo
*
pAlterTable
=
tSetAlterTableInfo
(
&
yymsp
[
-
4
].
minor
.
yy0
,
yymsp
[
0
].
minor
.
yy
193
,
NULL
,
TSDB_ALTER_TABLE_ADD_TAG_COLUMN
,
TSDB_SUPER_TABLE
);
setSqlInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
break
;
case
2
68
:
/* cmd ::= ALTER STABLE ids cpxName DROP TAG ids */
case
2
70
:
/* cmd ::= ALTER STABLE ids cpxName DROP TAG ids */
{
yymsp
[
-
4
].
minor
.
yy0
.
n
+=
yymsp
[
-
3
].
minor
.
yy0
.
n
;
...
...
@@ -3111,7 +3127,7 @@ static void yy_reduce(
setSqlInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
break
;
case
2
69
:
/* cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */
case
2
71
:
/* cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */
{
yymsp
[
-
5
].
minor
.
yy0
.
n
+=
yymsp
[
-
4
].
minor
.
yy0
.
n
;
...
...
@@ -3125,13 +3141,13 @@ static void yy_reduce(
setSqlInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
break
;
case
27
0
:
/* cmd ::= KILL CONNECTION INTEGER */
case
27
2
:
/* cmd ::= KILL CONNECTION INTEGER */
{
setKillSql
(
pInfo
,
TSDB_SQL_KILL_CONNECTION
,
&
yymsp
[
0
].
minor
.
yy0
);}
break
;
case
27
1
:
/* cmd ::= KILL STREAM INTEGER COLON INTEGER */
case
27
3
:
/* cmd ::= KILL STREAM INTEGER COLON INTEGER */
{
yymsp
[
-
2
].
minor
.
yy0
.
n
+=
(
yymsp
[
-
1
].
minor
.
yy0
.
n
+
yymsp
[
0
].
minor
.
yy0
.
n
);
setKillSql
(
pInfo
,
TSDB_SQL_KILL_STREAM
,
&
yymsp
[
-
2
].
minor
.
yy0
);}
break
;
case
27
2
:
/* cmd ::= KILL QUERY INTEGER COLON INTEGER */
case
27
4
:
/* cmd ::= KILL QUERY INTEGER COLON INTEGER */
{
yymsp
[
-
2
].
minor
.
yy0
.
n
+=
(
yymsp
[
-
1
].
minor
.
yy0
.
n
+
yymsp
[
0
].
minor
.
yy0
.
n
);
setKillSql
(
pInfo
,
TSDB_SQL_KILL_QUERY
,
&
yymsp
[
-
2
].
minor
.
yy0
);}
break
;
default:
...
...
src/util/src/ttokenizer.c
浏览文件 @
b289b28a
...
...
@@ -141,6 +141,7 @@ static SKeyword keywordTable[] = {
{
"VARIABLE"
,
TK_VARIABLE
},
{
"INTERVAL"
,
TK_INTERVAL
},
{
"SESSION"
,
TK_SESSION
},
{
"STATE_WINDOW"
,
TK_STATE_WINDOW
},
{
"FILL"
,
TK_FILL
},
{
"SLIDING"
,
TK_SLIDING
},
{
"ORDER"
,
TK_ORDER
},
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录