Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
ceb2aa72
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看板
未验证
提交
ceb2aa72
编写于
6月 21, 2021
作者:
H
Haojun Liao
提交者:
GitHub
6月 21, 2021
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #6510 from taosdata/origin/feature/TD-3086
[TD-3085] tags support timestamp
上级
1ecdcf8e
d3702a7d
变更
14
显示空白变更内容
内联
并排
Showing
14 changed file
with
913 addition
and
718 deletion
+913
-718
src/client/src/tscSQLParser.c
src/client/src/tscSQLParser.c
+108
-49
src/common/src/texpr.c
src/common/src/texpr.c
+8
-1
src/common/src/tvariant.c
src/common/src/tvariant.c
+4
-0
src/inc/ttokendef.h
src/inc/ttokendef.h
+23
-23
src/query/inc/sql.y
src/query/inc/sql.y
+1
-0
src/query/src/qExecutor.c
src/query/src/qExecutor.c
+3
-1
src/query/src/qFilterfunc.c
src/query/src/qFilterfunc.c
+11
-3
src/query/src/sql.c
src/query/src/sql.c
+640
-634
src/tsdb/src/tsdbRead.c
src/tsdb/src/tsdbRead.c
+7
-2
tests/pytest/fulltest.sh
tests/pytest/fulltest.sh
+1
-0
tests/pytest/functions/function_operations.py
tests/pytest/functions/function_operations.py
+1
-1
tests/pytest/tag_lite/timestamp.py
tests/pytest/tag_lite/timestamp.py
+102
-0
tests/script/general/parser/create_mt.sim
tests/script/general/parser/create_mt.sim
+2
-2
tests/script/general/parser/where.sim
tests/script/general/parser/where.sim
+2
-2
未找到文件。
src/client/src/tscSQLParser.c
浏览文件 @
ceb2aa72
...
...
@@ -63,7 +63,8 @@ static SExprInfo* doAddProjectCol(SQueryInfo* pQueryInfo, int32_t colIndex, int3
static
int32_t
setShowInfo
(
SSqlObj
*
pSql
,
SSqlInfo
*
pInfo
);
static
char
*
getAccountId
(
SSqlObj
*
pSql
);
static
bool
serializeExprListToVariant
(
SArray
*
pList
,
tVariant
**
dest
,
int16_t
colType
);
static
int
convertTimestampStrToInt64
(
tVariant
*
pVar
,
int32_t
precision
);
static
bool
serializeExprListToVariant
(
SArray
*
pList
,
tVariant
**
dest
,
int16_t
colType
,
uint8_t
precision
);
static
int32_t
validateParamOfRelationIn
(
tVariant
*
pVar
,
int32_t
colType
);
static
bool
has
(
SArray
*
pFieldList
,
int32_t
startIdx
,
const
char
*
name
);
...
...
@@ -149,7 +150,7 @@ int16_t getNewResColId(SSqlCmd* pCmd) {
// serialize expr in exprlist to binary
// formate "type | size | value"
bool
serializeExprListToVariant
(
SArray
*
pList
,
tVariant
**
dst
,
int16_t
colType
)
{
bool
serializeExprListToVariant
(
SArray
*
pList
,
tVariant
**
dst
,
int16_t
colType
,
uint8_t
precision
)
{
bool
ret
=
false
;
if
(
!
pList
||
pList
->
size
<=
0
||
colType
<
0
)
{
return
ret
;
...
...
@@ -159,14 +160,17 @@ bool serializeExprListToVariant(SArray* pList, tVariant **dst, int16_t colType)
int32_t
firstTokenType
=
item
->
pNode
->
token
.
type
;
int32_t
type
=
firstTokenType
;
//nchar to binary and
//nchar to binary and
other xxint to bigint
toTSDBType
(
type
);
if
(
colType
!=
TSDB_DATA_TYPE_TIMESTAMP
&&
!
IS_UNSIGNED_NUMERIC_TYPE
(
colType
))
{
if
(
type
!=
colType
&&
(
type
!=
TSDB_DATA_TYPE_BINARY
||
colType
!=
TSDB_DATA_TYPE_NCHAR
))
{
return
false
;
}
}
type
=
colType
;
SBufferWriter
bw
=
tbufInitWriter
(
NULL
,
false
);
SBufferWriter
bw
=
tbufInitWriter
(
NULL
,
false
);
tbufEnsureCapacity
(
&
bw
,
512
);
int32_t
size
=
(
int32_t
)(
pList
->
size
);
...
...
@@ -180,15 +184,22 @@ bool serializeExprListToVariant(SArray* pList, tVariant **dst, int16_t colType)
if
(
firstTokenType
!=
pSub
->
token
.
type
)
{
break
;
}
toTSDBType
(
pSub
->
token
.
type
);
tVariant
var
;
tVariantCreate
(
&
var
,
&
pSub
->
token
);
if
(
type
==
TSDB_DATA_TYPE_BOOL
||
type
==
TSDB_DATA_TYPE_TINYINT
||
type
==
TSDB_DATA_TYPE_SMALLINT
||
type
==
TSDB_DATA_TYPE_BIGINT
||
type
==
TSDB_DATA_TYPE_INT
)
{
if
(
type
==
TSDB_DATA_TYPE_BOOL
||
IS_SIGNED_NUMERIC_TYPE
(
type
))
{
tbufWriteInt64
(
&
bw
,
var
.
i64
);
}
else
if
(
type
==
TSDB_DATA_TYPE_DOUBLE
||
type
==
TSDB_DATA_TYPE_FLOAT
)
{
}
else
if
(
IS_UNSIGNED_NUMERIC_TYPE
(
type
))
{
// ugly code, refactor later
if
(
IS_UNSIGNED_NUMERIC_TYPE
(
pSub
->
token
.
type
)
||
IS_SIGNED_NUMERIC_TYPE
(
pSub
->
token
.
type
))
{
tbufWriteUint64
(
&
bw
,
var
.
i64
);
}
else
{
tVariantDestroy
(
&
var
);
break
;
}
}
else
if
(
type
==
TSDB_DATA_TYPE_DOUBLE
||
type
==
TSDB_DATA_TYPE_FLOAT
)
{
tbufWriteDouble
(
&
bw
,
var
.
dKey
);
}
else
if
(
type
==
TSDB_DATA_TYPE_BINARY
){
tbufWriteBinary
(
&
bw
,
var
.
pz
,
var
.
nLen
);
...
...
@@ -201,6 +212,16 @@ bool serializeExprListToVariant(SArray* pList, tVariant **dst, int16_t colType)
}
tbufWriteBinary
(
&
bw
,
buf
,
twcslen
((
wchar_t
*
)
buf
)
*
TSDB_NCHAR_SIZE
);
free
(
buf
);
}
else
if
(
type
==
TSDB_DATA_TYPE_TIMESTAMP
)
{
if
(
var
.
nType
==
TSDB_DATA_TYPE_BINARY
)
{
if
(
convertTimestampStrToInt64
(
&
var
,
precision
)
<
0
)
{
tVariantDestroy
(
&
var
);
break
;
}
tbufWriteInt64
(
&
bw
,
var
.
i64
);
}
else
if
(
var
.
nType
==
TSDB_DATA_TYPE_BIGINT
)
{
tbufWriteInt64
(
&
bw
,
var
.
i64
);
}
}
tVariantDestroy
(
&
var
);
...
...
@@ -286,29 +307,33 @@ static int32_t invalidOperationMsg(char* dstBuffer, const char* errMsg) {
return
tscInvalidOperationMsg
(
dstBuffer
,
errMsg
,
NULL
);
}
static
int
setColumnFilterInfoForTimestamp
(
SSqlCmd
*
pCmd
,
SQueryInfo
*
pQueryInfo
,
tVariant
*
pVar
)
{
static
int
convertTimestampStrToInt64
(
tVariant
*
pVar
,
int32_t
precision
)
{
int64_t
time
=
0
;
const
char
*
msg
=
"invalid timestamp"
;
strdequote
(
pVar
->
pz
);
char
*
seg
=
strnchr
(
pVar
->
pz
,
'-'
,
pVar
->
nLen
,
false
);
STableMetaInfo
*
pTableMetaInfo
=
tscGetMetaInfo
(
pQueryInfo
,
0
);
STableComInfo
tinfo
=
tscGetTableInfo
(
pTableMetaInfo
->
pTableMeta
);
char
*
seg
=
strnchr
(
pVar
->
pz
,
'-'
,
pVar
->
nLen
,
false
);
if
(
seg
!=
NULL
)
{
if
(
taosParseTime
(
pVar
->
pz
,
&
time
,
pVar
->
nLen
,
tinfo
.
precision
,
tsDaylight
)
!=
TSDB_CODE_SUCCESS
)
{
return
invalidOperationMsg
(
tscGetErrorMsgPayload
(
pCmd
),
msg
)
;
if
(
taosParseTime
(
pVar
->
pz
,
&
time
,
pVar
->
nLen
,
precision
,
tsDaylight
)
!=
TSDB_CODE_SUCCESS
)
{
return
-
1
;
}
}
else
{
if
(
tVariantDump
(
pVar
,
(
char
*
)
&
time
,
TSDB_DATA_TYPE_BIGINT
,
true
))
{
return
invalidOperationMsg
(
tscGetErrorMsgPayload
(
pCmd
),
msg
)
;
return
-
1
;
}
}
tVariantDestroy
(
pVar
);
tVariantCreateFromBinary
(
pVar
,
(
char
*
)
&
time
,
0
,
TSDB_DATA_TYPE_BIGINT
);
return
0
;
}
static
int
setColumnFilterInfoForTimestamp
(
SSqlCmd
*
pCmd
,
SQueryInfo
*
pQueryInfo
,
tVariant
*
pVar
)
{
const
char
*
msg
=
"invalid timestamp"
;
STableMetaInfo
*
pTableMetaInfo
=
tscGetMetaInfo
(
pQueryInfo
,
0
);
STableComInfo
tinfo
=
tscGetTableInfo
(
pTableMetaInfo
->
pTableMeta
);
if
(
convertTimestampStrToInt64
(
pVar
,
tinfo
.
precision
)
<
-
1
)
{
return
invalidOperationMsg
(
tscGetErrorMsgPayload
(
pCmd
),
msg
);
}
return
TSDB_CODE_SUCCESS
;
}
...
...
@@ -1282,7 +1307,7 @@ static bool validateTagParams(SArray* pTagsList, SArray* pFieldList, SSqlCmd* pC
const
char
*
msg1
=
"invalid number of tag columns"
;
const
char
*
msg2
=
"tag length too long"
;
const
char
*
msg3
=
"duplicated column names"
;
const
char
*
msg4
=
"timestamp not allowed in tags"
;
//
const char* msg4 = "timestamp not allowed in tags";
const
char
*
msg5
=
"invalid data type in tags"
;
const
char
*
msg6
=
"invalid tag name"
;
const
char
*
msg7
=
"invalid binary/nchar tag length"
;
...
...
@@ -1298,10 +1323,10 @@ static bool validateTagParams(SArray* pTagsList, SArray* pFieldList, SSqlCmd* pC
for
(
int32_t
i
=
0
;
i
<
numOfTags
;
++
i
)
{
TAOS_FIELD
*
p
=
taosArrayGet
(
pTagsList
,
i
);
if
(
p
->
type
==
TSDB_DATA_TYPE_TIMESTAMP
)
{
invalidOperationMsg
(
tscGetErrorMsgPayload
(
pCmd
),
msg4
);
return
false
;
}
//
if (p->type == TSDB_DATA_TYPE_TIMESTAMP) {
//
invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg4);
//
return false;
//
}
if
(
!
isValidDataType
(
p
->
type
))
{
invalidOperationMsg
(
tscGetErrorMsgPayload
(
pCmd
),
msg5
);
...
...
@@ -1359,7 +1384,7 @@ static bool validateTagParams(SArray* pTagsList, SArray* pFieldList, SSqlCmd* pC
* tags name /column name is truncated in sql.y
*/
bool
validateOneTags
(
SSqlCmd
*
pCmd
,
TAOS_FIELD
*
pTagField
)
{
const
char
*
msg1
=
"timestamp not allowed in tags"
;
//
const char* msg1 = "timestamp not allowed in tags";
const
char
*
msg2
=
"duplicated column names"
;
const
char
*
msg3
=
"tag length too long"
;
const
char
*
msg4
=
"invalid tag name"
;
...
...
@@ -1382,10 +1407,10 @@ bool validateOneTags(SSqlCmd* pCmd, TAOS_FIELD* pTagField) {
}
// no timestamp allowable
if
(
pTagField
->
type
==
TSDB_DATA_TYPE_TIMESTAMP
)
{
invalidOperationMsg
(
tscGetErrorMsgPayload
(
pCmd
),
msg1
);
return
false
;
}
//
if (pTagField->type == TSDB_DATA_TYPE_TIMESTAMP) {
//
invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg1);
//
return false;
//
}
if
((
pTagField
->
type
<
TSDB_DATA_TYPE_BOOL
)
||
(
pTagField
->
type
>
TSDB_DATA_TYPE_UBIGINT
))
{
invalidOperationMsg
(
tscGetErrorMsgPayload
(
pCmd
),
msg6
);
...
...
@@ -3338,7 +3363,7 @@ static int32_t doExtractColumnFilterInfo(SSqlCmd* pCmd, SQueryInfo* pQueryInfo,
// TK_GT,TK_GE,TK_EQ,TK_NE are based on the pColumn->lowerBndd
}
else
if
(
pExpr
->
tokenId
==
TK_IN
)
{
tVariant
*
pVal
;
if
(
pRight
->
tokenId
!=
TK_SET
||
!
serializeExprListToVariant
(
pRight
->
pParam
,
&
pVal
,
colType
)
||
colType
==
TSDB_DATA_TYPE_TIMESTAMP
)
{
if
(
pRight
->
tokenId
!=
TK_SET
||
!
serializeExprListToVariant
(
pRight
->
pParam
,
&
pVal
,
colType
,
timePrecision
)
)
{
return
invalidOperationMsg
(
tscGetErrorMsgPayload
(
pCmd
),
msg
);
}
if
(
validateParamOfRelationIn
(
pVal
,
colType
)
!=
TSDB_CODE_SUCCESS
)
{
...
...
@@ -3350,7 +3375,6 @@ static int32_t doExtractColumnFilterInfo(SSqlCmd* pCmd, SQueryInfo* pQueryInfo,
pColumnFilter
->
len
=
pVal
->
nLen
;
pColumnFilter
->
filterstr
=
1
;
memcpy
((
char
*
)(
pColumnFilter
->
pz
),
(
char
*
)(
pVal
->
pz
),
pVal
->
nLen
);
//retVal = tVariantDump(pVal, (char *)(pColumnFilter->pz), TSDB_DATA_TYPE_BINARY, false);
tVariantDestroy
(
pVal
);
free
(
pVal
);
...
...
@@ -3483,6 +3507,7 @@ static int32_t extractColumnFilterInfo(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, SC
const
char
*
msg1
=
"non binary column not support like operator"
;
const
char
*
msg2
=
"binary column not support this operator"
;
const
char
*
msg3
=
"bool column not support this operator"
;
const
char
*
msg4
=
"primary key not support this operator"
;
SColumn
*
pColumn
=
tscColumnListInsert
(
pQueryInfo
->
colList
,
pIndex
->
columnIndex
,
pTableMeta
->
id
.
uid
,
pSchema
);
SColumnFilterInfo
*
pColFilter
=
NULL
;
...
...
@@ -3539,6 +3564,9 @@ static int32_t extractColumnFilterInfo(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, SC
pColumn
->
columnIndex
=
pIndex
->
columnIndex
;
pColumn
->
tableUid
=
pTableMeta
->
id
.
uid
;
if
(
pColumn
->
columnIndex
==
PRIMARYKEY_TIMESTAMP_COL_INDEX
&&
pExpr
->
tokenId
==
TK_IN
)
{
return
invalidOperationMsg
(
tscGetErrorMsgPayload
(
pCmd
),
msg4
);
}
STableComInfo
tinfo
=
tscGetTableInfo
(
pTableMeta
);
return
doExtractColumnFilterInfo
(
pCmd
,
pQueryInfo
,
tinfo
.
precision
,
pColFilter
,
pSchema
->
type
,
pExpr
);
...
...
@@ -6837,6 +6865,7 @@ int32_t doCheckForCreateFromStable(SSqlObj* pSql, SSqlInfo* pInfo) {
// too long tag values will return invalid sql, not be truncated automatically
SSchema
*
pTagSchema
=
tscGetTableTagSchema
(
pStableMetaInfo
->
pTableMeta
);
STableComInfo
tinfo
=
tscGetTableInfo
(
pStableMetaInfo
->
pTableMeta
);
STagData
*
pTag
=
&
pCreateTableInfo
->
tagdata
;
SKVRowBuilder
kvRowBuilder
=
{
0
};
...
...
@@ -6886,6 +6915,15 @@ int32_t doCheckForCreateFromStable(SSqlObj* pSql, SSqlInfo* pInfo) {
tdDestroyKVRowBuilder
(
&
kvRowBuilder
);
return
invalidOperationMsg
(
tscGetErrorMsgPayload
(
pCmd
),
msg3
);
}
}
else
if
(
pSchema
->
type
==
TSDB_DATA_TYPE_TIMESTAMP
)
{
if
(
pItem
->
pVar
.
nType
==
TSDB_DATA_TYPE_BINARY
)
{
ret
=
convertTimestampStrToInt64
(
&
(
pItem
->
pVar
),
tinfo
.
precision
);
if
(
ret
!=
TSDB_CODE_SUCCESS
)
{
return
invalidOperationMsg
(
tscGetErrorMsgPayload
(
pCmd
),
msg4
);
}
}
else
if
(
pItem
->
pVar
.
nType
==
TSDB_DATA_TYPE_TIMESTAMP
)
{
pItem
->
pVar
.
i64
=
convertTimePrecision
(
pItem
->
pVar
.
i64
,
TSDB_TIME_PRECISION_NANO
,
tinfo
.
precision
);
}
}
ret
=
tVariantDump
(
&
(
pItem
->
pVar
),
tagVal
,
pSchema
->
type
,
true
);
...
...
@@ -6932,8 +6970,18 @@ int32_t doCheckForCreateFromStable(SSqlObj* pSql, SSqlInfo* pInfo) {
tdDestroyKVRowBuilder
(
&
kvRowBuilder
);
return
invalidOperationMsg
(
tscGetErrorMsgPayload
(
pCmd
),
msg3
);
}
}
else
if
(
pSchema
->
type
==
TSDB_DATA_TYPE_TIMESTAMP
)
{
if
(
pItem
->
pVar
.
nType
==
TSDB_DATA_TYPE_BINARY
)
{
ret
=
convertTimestampStrToInt64
(
&
(
pItem
->
pVar
),
tinfo
.
precision
);
if
(
ret
!=
TSDB_CODE_SUCCESS
)
{
return
invalidOperationMsg
(
tscGetErrorMsgPayload
(
pCmd
),
msg4
);
}
}
else
if
(
pItem
->
pVar
.
nType
==
TSDB_DATA_TYPE_TIMESTAMP
)
{
pItem
->
pVar
.
i64
=
convertTimePrecision
(
pItem
->
pVar
.
i64
,
TSDB_TIME_PRECISION_NANO
,
tinfo
.
precision
);
}
}
ret
=
tVariantDump
(
&
(
pItem
->
pVar
),
tagVal
,
pSchema
->
type
,
true
);
// check again after the convert since it may be converted from binary to nchar.
...
...
@@ -8030,12 +8078,22 @@ int32_t exprTreeFromSqlExpr(SSqlCmd* pCmd, tExprNode **pExpr, const tSqlExpr* pS
assert
(
pSqlExpr
->
pRight
==
NULL
);
if
(
pSqlExpr
->
type
==
SQL_NODE_VALUE
)
{
int32_t
ret
=
TSDB_CODE_SUCCESS
;
*
pExpr
=
calloc
(
1
,
sizeof
(
tExprNode
));
(
*
pExpr
)
->
nodeType
=
TSQL_NODE_VALUE
;
(
*
pExpr
)
->
pVal
=
calloc
(
1
,
sizeof
(
tVariant
));
tVariantAssign
((
*
pExpr
)
->
pVal
,
&
pSqlExpr
->
value
);
return
TSDB_CODE_SUCCESS
;
STableMeta
*
pTableMeta
=
tscGetMetaInfo
(
pQueryInfo
,
0
)
->
pTableMeta
;
if
(
pCols
!=
NULL
&&
taosArrayGetSize
(
pCols
)
>
0
)
{
SColIndex
*
idx
=
taosArrayGet
(
pCols
,
0
);
SSchema
*
pSchema
=
tscGetTableColumnSchema
(
pTableMeta
,
idx
->
colIndex
);
// convert time by precision
if
(
pSchema
!=
NULL
&&
TSDB_DATA_TYPE_TIMESTAMP
==
pSchema
->
type
&&
TSDB_DATA_TYPE_BINARY
==
(
*
pExpr
)
->
pVal
->
nType
)
{
ret
=
setColumnFilterInfoForTimestamp
(
pCmd
,
pQueryInfo
,
(
*
pExpr
)
->
pVal
);
}
}
return
ret
;
}
else
if
(
pSqlExpr
->
type
==
SQL_NODE_SQLFUNCTION
)
{
// arithmetic expression on the results of aggregation functions
*
pExpr
=
calloc
(
1
,
sizeof
(
tExprNode
));
...
...
@@ -8092,21 +8150,22 @@ int32_t exprTreeFromSqlExpr(SSqlCmd* pCmd, tExprNode **pExpr, const tSqlExpr* pS
}
else
if
(
pSqlExpr
->
tokenId
==
TK_SET
)
{
int32_t
colType
=
-
1
;
STableMeta
*
pTableMeta
=
tscGetMetaInfo
(
pQueryInfo
,
0
)
->
pTableMeta
;
if
(
pCols
!=
NULL
)
{
if
(
pCols
!=
NULL
&&
taosArrayGetSize
(
pCols
)
>
0
)
{
SColIndex
*
idx
=
taosArrayGet
(
pCols
,
0
);
SSchema
*
pSchema
=
tscGetTableColumnSchema
(
pTableMeta
,
idx
->
colIndex
);
if
(
pSchema
!=
NULL
)
{
colType
=
pSchema
->
type
;
}
}
tVariant
*
pVal
;
if
(
colType
>=
TSDB_DATA_TYPE_TINYINT
&&
colType
<=
TSDB_DATA_TYPE_BIGINT
)
{
colType
=
TSDB_DATA_TYPE_BIGINT
;
}
else
if
(
colType
==
TSDB_DATA_TYPE_FLOAT
||
colType
==
TSDB_DATA_TYPE_DOUBLE
)
{
colType
=
TSDB_DATA_TYPE_DOUBLE
;
}
if
(
serializeExprListToVariant
(
pSqlExpr
->
pParam
,
&
pVal
,
colType
)
==
false
)
{
STableMetaInfo
*
pTableMetaInfo
=
tscGetMetaInfo
(
pQueryInfo
,
0
);
STableComInfo
tinfo
=
tscGetTableInfo
(
pTableMetaInfo
->
pTableMeta
);
if
(
serializeExprListToVariant
(
pSqlExpr
->
pParam
,
&
pVal
,
colType
,
tinfo
.
precision
)
==
false
)
{
return
invalidOperationMsg
(
tscGetErrorMsgPayload
(
pCmd
),
"not support filter expression"
);
}
*
pExpr
=
calloc
(
1
,
sizeof
(
tExprNode
));
...
...
src/common/src/texpr.c
浏览文件 @
ceb2aa72
...
...
@@ -476,7 +476,14 @@ void buildFilterSetFromBinary(void **q, const char *buf, int32_t len) {
int
dummy
=
-
1
;
int32_t
sz
=
tbufReadInt32
(
&
br
);
for
(
int32_t
i
=
0
;
i
<
sz
;
i
++
)
{
if
(
type
==
TSDB_DATA_TYPE_BOOL
||
type
==
TSDB_DATA_TYPE_TINYINT
||
type
==
TSDB_DATA_TYPE_SMALLINT
||
type
==
TSDB_DATA_TYPE_BIGINT
||
type
==
TSDB_DATA_TYPE_INT
)
{
if
(
type
==
TSDB_DATA_TYPE_BOOL
||
IS_SIGNED_NUMERIC_TYPE
(
type
))
{
int64_t
val
=
tbufReadInt64
(
&
br
);
taosHashPut
(
pObj
,
(
char
*
)
&
val
,
sizeof
(
val
),
&
dummy
,
sizeof
(
dummy
));
}
else
if
(
IS_UNSIGNED_NUMERIC_TYPE
(
type
))
{
uint64_t
val
=
tbufReadUint64
(
&
br
);
taosHashPut
(
pObj
,
(
char
*
)
&
val
,
sizeof
(
val
),
&
dummy
,
sizeof
(
dummy
));
}
else
if
(
type
==
TSDB_DATA_TYPE_TIMESTAMP
)
{
int64_t
val
=
tbufReadInt64
(
&
br
);
taosHashPut
(
pObj
,
(
char
*
)
&
val
,
sizeof
(
val
),
&
dummy
,
sizeof
(
dummy
));
}
else
if
(
type
==
TSDB_DATA_TYPE_DOUBLE
||
type
==
TSDB_DATA_TYPE_FLOAT
)
{
...
...
src/common/src/tvariant.c
浏览文件 @
ceb2aa72
...
...
@@ -77,6 +77,10 @@ void tVariantCreate(tVariant *pVar, SStrToken *token) {
pVar
->
nLen
=
strRmquote
(
pVar
->
pz
,
token
->
n
);
break
;
}
case
TSDB_DATA_TYPE_TIMESTAMP
:
{
pVar
->
i64
=
taosGetTimestamp
(
TSDB_TIME_PRECISION_NANO
);
break
;
}
default:
{
// nType == 0 means the null value
type
=
TSDB_DATA_TYPE_NULL
;
...
...
src/inc/ttokendef.h
浏览文件 @
ceb2aa72
...
...
@@ -128,29 +128,29 @@
#define TK_USING 110
#define TK_AS 111
#define TK_NULL 112
#define TK_
SELECT
113
#define TK_
UNION
114
#define TK_
ALL
115
#define TK_
DISTINCT
116
#define TK_
FROM
117
#define TK_
VARIABLE
118
#define TK_
INTERVAL
119
#define TK_
SESSION
120
#define TK_S
TATE_WINDOW
121
#define TK_
FILL
122
#define TK_
SLIDING
123
#define TK_
ORDER
124
#define TK_
BY
125
#define TK_
ASC
126
#define TK_
DESC
127
#define TK_
GROUP
128
#define TK_
HAVING
129
#define TK_
LIMIT
130
#define TK_
OFFSET
131
#define TK_
SLIMI
T 132
#define TK_S
OFFSET
133
#define TK_
WHERE
134
#define TK_
NOW
135
#define TK_
NOW
113
#define TK_
SELECT
114
#define TK_
UNION
115
#define TK_
ALL
116
#define TK_
DISTINCT
117
#define TK_
FROM
118
#define TK_
VARIABLE
119
#define TK_
INTERVAL
120
#define TK_S
ESSION
121
#define TK_
STATE_WINDOW
122
#define TK_
FILL
123
#define TK_
SLIDING
124
#define TK_
ORDER
125
#define TK_
BY
126
#define TK_
ASC
127
#define TK_
DESC
128
#define TK_
GROUP
129
#define TK_
HAVING
130
#define TK_
LIMIT
131
#define TK_
OFFSE
T 132
#define TK_S
LIMIT
133
#define TK_
SOFFSET
134
#define TK_
WHERE
135
#define TK_RESET 136
#define TK_QUERY 137
#define TK_SYNCDB 138
...
...
src/query/inc/sql.y
浏览文件 @
ceb2aa72
...
...
@@ -437,6 +437,7 @@ tagitem(A) ::= FLOAT(X). { toTSDBType(X.type); tVariantCreate(&A, &X); }
tagitem(A) ::= STRING(X). { toTSDBType(X.type); tVariantCreate(&A, &X); }
tagitem(A) ::= BOOL(X). { toTSDBType(X.type); tVariantCreate(&A, &X); }
tagitem(A) ::= NULL(X). { X.type = 0; tVariantCreate(&A, &X); }
tagitem(A) ::= NOW(X). { X.type = TSDB_DATA_TYPE_TIMESTAMP; tVariantCreate(&A, &X);}
tagitem(A) ::= MINUS(X) INTEGER(Y).{
X.n += Y.n;
...
...
src/query/src/qExecutor.c
浏览文件 @
ceb2aa72
...
...
@@ -2891,7 +2891,9 @@ void setTagValue(SOperatorInfo* pOperatorInfo, void *pTable, SQLFunctionCtx* pCt
doSetTagValueInParam
(
pTable
,
pLocalExprInfo
->
base
.
colInfo
.
colId
,
&
pCtx
[
idx
].
tag
,
pLocalExprInfo
->
base
.
resType
,
pLocalExprInfo
->
base
.
resBytes
);
if
(
IS_NUMERIC_TYPE
(
pLocalExprInfo
->
base
.
resType
)
||
pLocalExprInfo
->
base
.
resType
==
TSDB_DATA_TYPE_BOOL
)
{
if
(
IS_NUMERIC_TYPE
(
pLocalExprInfo
->
base
.
resType
)
||
pLocalExprInfo
->
base
.
resType
==
TSDB_DATA_TYPE_BOOL
||
pLocalExprInfo
->
base
.
resType
==
TSDB_DATA_TYPE_TIMESTAMP
)
{
memcpy
(
pRuntimeEnv
->
tagVal
+
offset
,
&
pCtx
[
idx
].
tag
.
i64
,
pLocalExprInfo
->
base
.
resBytes
);
}
else
{
memcpy
(
pRuntimeEnv
->
tagVal
+
offset
,
pCtx
[
idx
].
tag
.
pz
,
pCtx
[
idx
].
tag
.
nLen
);
...
...
src/query/src/qFilterfunc.c
浏览文件 @
ceb2aa72
...
...
@@ -254,15 +254,23 @@ bool notNullOperator(SColumnFilterElem *pFilter, const char* minval, const char*
return
true
;
}
bool
inOperator
(
SColumnFilterElem
*
pFilter
,
const
char
*
minval
,
const
char
*
maxval
,
int16_t
type
)
{
if
(
type
==
TSDB_DATA_TYPE_BOOL
||
type
==
TSDB_DATA_TYPE_TINYINT
||
type
==
TSDB_DATA_TYPE_SMALLINT
||
type
==
TSDB_DATA_TYPE_BIGINT
||
type
==
TSDB_DATA_TYPE_INT
)
{
if
(
type
==
TSDB_DATA_TYPE_BOOL
||
IS_SIGNED_NUMERIC_TYPE
(
type
)
||
type
==
TSDB_DATA_TYPE_TIMESTAMP
)
{
int64_t
minv
=
-
1
,
maxv
=
-
1
;
GET_TYPED_DATA
(
minv
,
int64_t
,
type
,
minval
);
GET_TYPED_DATA
(
maxv
,
int64_t
,
type
,
maxval
);
if
(
minv
==
maxv
)
{
return
NULL
!=
taosHashGet
((
SHashObj
*
)
pFilter
->
q
,
(
char
*
)
&
minv
,
sizeof
(
minv
));
}
return
true
;
}
else
if
(
type
==
TSDB_DATA_TYPE_DOUBLE
||
type
==
TSDB_DATA_TYPE_FLOAT
)
{
return
false
;
}
else
if
(
IS_UNSIGNED_NUMERIC_TYPE
(
type
))
{
uint64_t
minv
=
0
,
maxv
=
0
;
GET_TYPED_DATA
(
minv
,
uint64_t
,
type
,
minval
);
GET_TYPED_DATA
(
maxv
,
uint64_t
,
type
,
maxval
);
if
(
minv
==
maxv
)
{
return
NULL
!=
taosHashGet
((
SHashObj
*
)
pFilter
->
q
,
(
char
*
)
&
minv
,
sizeof
(
minv
));
}
return
false
;
}
else
if
(
type
==
TSDB_DATA_TYPE_DOUBLE
||
type
==
TSDB_DATA_TYPE_FLOAT
)
{
double
v
;
GET_TYPED_DATA
(
v
,
double
,
type
,
minval
);
return
NULL
!=
taosHashGet
((
SHashObj
*
)
pFilter
->
q
,
(
char
*
)
&
v
,
sizeof
(
v
));
...
...
src/query/src/sql.c
浏览文件 @
ceb2aa72
...
...
@@ -129,16 +129,16 @@ typedef union {
#define ParseARG_STORE yypParser->pInfo = pInfo
#define YYFALLBACK 1
#define YYNSTATE 347
#define YYNRULE 28
4
#define YYNRULE 28
5
#define YYNTOKEN 190
#define YY_MAX_SHIFT 346
#define YY_MIN_SHIFTREDUCE 54
8
#define YY_MAX_SHIFTREDUCE 83
1
#define YY_ERROR_ACTION 83
2
#define YY_ACCEPT_ACTION 83
3
#define YY_NO_ACTION 83
4
#define YY_MIN_REDUCE 83
5
#define YY_MAX_REDUCE 11
18
#define YY_MIN_SHIFTREDUCE 54
9
#define YY_MAX_SHIFTREDUCE 83
3
#define YY_ERROR_ACTION 83
4
#define YY_ACCEPT_ACTION 83
5
#define YY_NO_ACTION 83
6
#define YY_MIN_REDUCE 83
7
#define YY_MAX_REDUCE 11
21
/************* End control #defines *******************************************/
/* Define the yytestcase() macro to be a no-op if is not already defined
...
...
@@ -204,82 +204,82 @@ typedef union {
** yy_default[] Default action for each state.
**
*********** Begin parsing tables **********************************************/
#define YY_ACTTAB_COUNT (73
4
)
#define YY_ACTTAB_COUNT (73
5
)
static
const
YYACTIONTYPE
yy_action
[]
=
{
/* 0 */
23
,
59
7
,
1007
,
597
,
219
,
344
,
194
,
833
,
346
,
598
,
/* 10 */
59
7
,
598
,
197
,
54
,
55
,
225
,
58
,
59
,
598
,
986
,
/* 20 */
239
,
48
,
109
4
,
57
,
300
,
62
,
60
,
63
,
61
,
998
,
/* 30 */
998
,
231
,
233
,
53
,
52
,
986
,
986
,
51
,
50
,
49
,
/* 40 */
54
,
55
,
35
,
58
,
59
,
222
,
223
,
239
,
48
,
59
7
,
/* 50 */
57
,
300
,
62
,
60
,
63
,
61
,
998
,
598
,
152
,
236
,
/* 60 */
53
,
52
,
235
,
152
,
51
,
50
,
49
,
55
,
100
4
,
58
,
/* 70 */
59
,
772
,
261
,
239
,
48
,
240
,
57
,
300
,
62
,
60
,
/* 80 */
63
,
61
,
29
,
195
,
83
,
221
,
53
,
52
,
145
,
983
,
/* 90 */
51
,
50
,
49
,
5
49
,
550
,
551
,
552
,
553
,
554
,
555
,
/* 100 */
55
6
,
557
,
558
,
559
,
560
,
561
,
345
,
773
,
770
,
220
,
/* 0 */
23
,
59
8
,
1010
,
598
,
219
,
344
,
194
,
835
,
346
,
599
,
/* 10 */
59
8
,
599
,
197
,
54
,
55
,
225
,
58
,
59
,
599
,
988
,
/* 20 */
239
,
48
,
109
7
,
57
,
300
,
62
,
60
,
63
,
61
,
1001
,
/* 30 */
1001
,
231
,
233
,
53
,
52
,
988
,
988
,
51
,
50
,
49
,
/* 40 */
54
,
55
,
35
,
58
,
59
,
222
,
223
,
239
,
48
,
59
8
,
/* 50 */
57
,
300
,
62
,
60
,
63
,
61
,
1001
,
599
,
152
,
236
,
/* 60 */
53
,
52
,
235
,
152
,
51
,
50
,
49
,
55
,
100
7
,
58
,
/* 70 */
59
,
630
,
261
,
239
,
48
,
240
,
57
,
300
,
62
,
60
,
/* 80 */
63
,
61
,
29
,
83
,
982
,
221
,
53
,
52
,
145
,
985
,
/* 90 */
51
,
50
,
49
,
5
50
,
551
,
552
,
553
,
554
,
555
,
556
,
/* 100 */
55
7
,
558
,
559
,
560
,
561
,
562
,
345
,
80
,
772
,
220
,
/* 110 */
95
,
77
,
54
,
55
,
35
,
58
,
59
,
42
,
197
,
239
,
/* 120 */
48
,
197
,
57
,
300
,
62
,
60
,
63
,
61
,
109
5
,
298
,
/* 130 */
104
3
,
1095
,
53
,
52
,
197
,
89
,
51
,
50
,
49
,
54
,
/* 140 */
56
,
330
,
58
,
59
,
1095
,
974
,
239
,
48
,
629
,
57
,
/* 150 */
300
,
62
,
60
,
63
,
61
,
268
,
267
,
229
,
152
,
53
,
/* 160 */
52
,
98
3
,
248
,
51
,
50
,
49
,
41
,
296
,
339
,
338
,
/* 120 */
48
,
197
,
57
,
300
,
62
,
60
,
63
,
61
,
109
8
,
232
,
/* 130 */
104
6
,
1098
,
53
,
52
,
197
,
89
,
51
,
50
,
49
,
54
,
/* 140 */
56
,
264
,
58
,
59
,
1098
,
976
,
239
,
48
,
974
,
57
,
/* 150 */
300
,
62
,
60
,
63
,
61
,
268
,
267
,
229
,
298
,
53
,
/* 160 */
52
,
98
5
,
248
,
51
,
50
,
49
,
41
,
296
,
339
,
338
,
/* 170 */
295
,
294
,
293
,
337
,
292
,
336
,
335
,
334
,
291
,
333
,
/* 180 */
332
,
94
6
,
934
,
935
,
936
,
937
,
938
,
939
,
940
,
941
,
/* 190 */
94
2
,
943
,
944
,
945
,
947
,
948
,
58
,
59
,
24
,
984
,
/* 200 */
239
,
48
,
35
,
57
,
300
,
62
,
60
,
63
,
61
,
51
,
/* 210 */
50
,
49
,
972
,
53
,
52
,
205
,
881
,
51
,
50
,
49
,
/* 220 */
76
,
179
,
206
,
35
,
340
,
915
,
92
,
129
,
128
,
204
,
/* 230 */
1044
,
237
,
280
,
305
,
83
,
200
,
238
,
785
,
35
,
776
,
/* 240 */
774
,
779
,
777
,
980
,
780
,
230
,
238
,
785
,
715
,
983
,
/* 250 */
774
,
6
,
777
,
971
,
780
,
114
,
108
,
119
,
969
,
970
,
/* 260 */
34
,
973
,
118
,
124
,
127
,
117
,
309
,
42
,
217
,
218
,
/* 270 */
983
,
121
,
301
,
41
,
9
,
339
,
338
,
35
,
217
,
218
,
/* 280 */
33
7
,
310
,
336
,
335
,
334
,
983
,
333
,
332
,
232
,
116
,
/* 290 */
260
,
262
,
75
,
954
,
298
,
952
,
953
,
330
,
242
,
213
,
/* 300 */
95
5
,
36
,
957
,
958
,
956
,
718
,
959
,
960
,
62
,
60
,
/* 310 */
6
3
,
61
,
775
,
152
,
778
,
64
,
53
,
52
,
14
,
247
,
/* 320 */
51
,
50
,
49
,
703
,
982
,
64
,
700
,
1091
,
701
,
35
,
/* 330 */
702
,
5
,
38
,
169
,
35
,
188
,
186
,
184
,
168
,
102
,
/* 340 */
97
,
101
,
183
,
132
,
131
,
130
,
35
,
786
,
94
,
91
,
/* 350 */
679
,
1090
,
783
,
782
,
244
,
245
,
35
,
786
,
35
,
35
,
/* 360 */
53
,
52
,
891
,
782
,
51
,
50
,
49
,
179
,
90
,
243
,
/* 370 */
781
,
241
,
311
,
308
,
307
,
1089
,
983
,
312
,
320
,
319
,
/* 380 */
781
,
983
,
78
,
282
,
722
,
88
,
882
,
253
,
71
,
316
,
/* 390 */
249
,
179
,
246
,
983
,
315
,
314
,
257
,
256
,
80
,
317
,
/* 400 */
68
,
318
,
322
,
983
,
81
,
983
,
983
,
343
,
342
,
137
,
/* 410 */
143
,
141
,
140
,
1
,
167
,
3
,
180
,
751
,
752
,
734
,
/* 420 */
742
,
302
,
743
,
1054
,
689
,
784
,
33
,
215
,
72
,
147
,
/* 430 */
65
,
264
,
26
,
704
,
36
,
285
,
691
,
264
,
287
,
690
,
/* 440 */
806
,
787
,
69
,
596
,
74
,
36
,
65
,
216
,
93
,
65
,
/* 450 */
25
,
25
,
16
,
25
,
15
,
288
,
107
,
198
,
106
,
18
,
/* 460 */
707
,
17
,
708
,
199
,
705
,
20
,
706
,
19
,
201
,
113
,
/* 470 */
985
,
112
,
678
,
22
,
196
,
21
,
126
,
125
,
202
,
203
,
/* 480 */
208
,
209
,
210
,
207
,
193
,
1
114
,
1106
,
1053
,
227
,
1050
,
/* 490 */
1049
,
228
,
321
,
258
,
144
,
1006
,
1017
,
45
,
1014
,
1015
,
/* 500 */
10
19
,
999
,
265
,
1036
,
146
,
150
,
981
,
274
,
1035
,
163
,
/* 510 */
142
,
269
,
164
,
157
,
979
,
733
,
165
,
224
,
789
,
26
3
,
/* 520 */
166
,
153
,
894
,
283
,
290
,
43
,
191
,
271
,
39
,
299
,
/* 530 */
890
,
306
,
73
,
278
,
1113
,
996
,
70
,
47
,
104
,
154
,
/* 540 */
15
5
,
1112
,
281
,
1109
,
170
,
313
,
1105
,
110
,
279
,
156
,
/* 550 */
1104
,
277
,
158
,
275
,
273
,
1101
,
159
,
171
,
270
,
912
,
/* 560 */
40
,
37
,
44
,
192
,
878
,
120
,
876
,
122
,
123
,
874
,
/* 570 */
873
,
250
,
182
,
871
,
870
,
869
,
868
,
867
,
866
,
185
,
/* 580 */
187
,
86
3
,
861
,
859
,
857
,
189
,
854
,
190
,
46
,
79
,
/* 590 */
84
,
272
,
331
,
1037
,
115
,
323
,
324
,
325
,
326
,
327
,
/* 600 */
32
8
,
329
,
214
,
341
,
234
,
289
,
831
,
252
,
251
,
830
,
/* 610 */
2
11
,
212
,
254
,
98
,
99
,
255
,
829
,
812
,
811
,
259
,
/* 620 */
10
,
264
,
872
,
284
,
133
,
710
,
174
,
134
,
173
,
913
,
/* 630 */
172
,
175
,
177
,
176
,
135
,
178
,
865
,
914
,
864
,
2
,
/* 640 */
13
6
,
950
,
856
,
855
,
82
,
30
,
4
,
266
,
160
,
161
,
/* 650 */
162
,
962
,
85
,
735
,
148
,
149
,
738
,
86
,
226
,
740
,
/* 660 */
87
,
2
76
,
31
,
744
,
151
,
13
,
11
,
32
,
12
,
27
,
/* 670 */
2
8
,
286
,
96
,
94
,
642
,
638
,
636
,
635
,
634
,
631
,
/* 680 */
6
01
,
297
,
100
,
7
,
303
,
790
,
788
,
8
,
304
,
103
,
/* 690 */
10
5
,
66
,
67
,
109
,
111
,
681
,
680
,
677
,
623
,
36
,
/* 700 */
62
1
,
613
,
619
,
615
,
617
,
611
,
609
,
645
,
644
,
643
,
/* 710 */
64
1
,
640
,
639
,
637
,
633
,
632
,
181
,
599
,
565
,
835
,
/* 720 */
56
3
,
834
,
834
,
834
,
834
,
834
,
834
,
834
,
834
,
834
,
/* 730 */
83
4
,
834
,
138
,
139
,
/* 180 */
332
,
94
8
,
936
,
937
,
938
,
939
,
940
,
941
,
942
,
943
,
/* 190 */
94
4
,
945
,
946
,
947
,
949
,
950
,
58
,
59
,
24
,
986
,
/* 200 */
239
,
48
,
253
,
57
,
300
,
62
,
60
,
63
,
61
,
35
,
/* 210 */
195
,
257
,
256
,
53
,
52
,
205
,
330
,
51
,
50
,
49
,
/* 220 */
53
,
52
,
206
,
14
,
51
,
50
,
49
,
129
,
128
,
204
,
/* 230 */
298
,
238
,
787
,
305
,
83
,
776
,
81
,
779
,
116
,
782
,
/* 240 */
200
,
238
,
787
,
883
,
35
,
776
,
330
,
779
,
179
,
782
,
/* 250 */
114
,
108
,
119
,
94
,
91
,
1094
,
984
,
118
,
124
,
127
,
/* 260 */
117
,
987
,
35
,
217
,
218
,
152
,
121
,
301
,
42
,
41
,
/* 270 */
264
,
339
,
338
,
217
,
218
,
242
,
337
,
1093
,
336
,
335
,
/* 280 */
33
4
,
704
,
333
,
332
,
701
,
1117
,
702
,
230
,
703
,
1092
,
/* 290 */
260
,
985
,
75
,
956
,
680
,
954
,
955
,
340
,
917
,
213
,
/* 300 */
95
7
,
247
,
959
,
960
,
958
,
309
,
961
,
962
,
152
,
985
,
/* 310 */
6
4
,
35
,
244
,
245
,
1
,
167
,
62
,
60
,
63
,
61
,
/* 320 */
64
,
893
,
320
,
319
,
53
,
52
,
179
,
1109
,
51
,
50
,
/* 330 */
49
,
5
,
38
,
169
,
92
,
282
,
215
,
88
,
168
,
102
,
/* 340 */
97
,
101
,
788
,
783
,
720
,
76
,
243
,
35
,
241
,
784
,
/* 350 */
308
,
307
,
788
,
783
,
310
,
188
,
186
,
184
,
985
,
784
,
/* 360 */
35
,
35
,
183
,
132
,
131
,
130
,
971
,
972
,
34
,
975
,
/* 370 */
35
,
68
,
249
,
35
,
246
,
35
,
315
,
314
,
973
,
778
,
/* 380 */
1047
,
781
,
280
,
884
,
51
,
50
,
49
,
777
,
179
,
780
,
/* 390 */
311
,
705
,
706
,
71
,
985
,
343
,
342
,
137
,
143
,
141
,
/* 400 */
140
,
90
,
717
,
312
,
316
,
3
,
180
,
985
,
985
,
753
,
/* 410 */
754
,
774
,
33
,
317
,
69
,
78
,
318
,
985
,
322
,
302
,
/* 420 */
985
,
262
,
985
,
736
,
724
,
744
,
745
,
690
,
216
,
9
,
/* 430 */
285
,
36
,
692
,
147
,
72
,
65
,
26
,
36
,
287
,
691
,
/* 440 */
36
,
288
,
65
,
808
,
789
,
237
,
597
,
775
,
93
,
65
,
/* 450 */
16
,
74
,
15
,
25
,
25
,
107
,
25
,
106
,
18
,
709
,
/* 460 */
17
,
710
,
707
,
198
,
708
,
6
,
20
,
113
,
19
,
112
,
/* 470 */
199
,
22
,
201
,
21
,
126
,
125
,
196
,
202
,
203
,
679
,
/* 480 */
208
,
209
,
210
,
207
,
193
,
1
057
,
1056
,
227
,
1053
,
1052
,
/* 490 */
228
,
321
,
258
,
785
,
144
,
1009
,
45
,
1020
,
1017
,
1018
,
/* 500 */
10
02
,
786
,
265
,
1022
,
1039
,
163
,
146
,
150
,
274
,
1038
,
/* 510 */
983
,
164
,
142
,
981
,
165
,
166
,
791
,
896
,
290
,
4
3
,
/* 520 */
735
,
999
,
191
,
39
,
279
,
154
,
269
,
299
,
892
,
306
,
/* 530 */
224
,
1116
,
104
,
1115
,
271
,
1112
,
278
,
170
,
73
,
70
,
/* 540 */
15
3
,
47
,
313
,
283
,
1108
,
281
,
110
,
1107
,
1104
,
171
,
/* 550 */
914
,
155
,
277
,
40
,
37
,
44
,
275
,
156
,
192
,
273
,
/* 560 */
880
,
120
,
878
,
122
,
123
,
158
,
876
,
875
,
270
,
250
,
/* 570 */
182
,
873
,
872
,
871
,
870
,
869
,
46
,
868
,
185
,
331
,
/* 580 */
187
,
86
5
,
863
,
861
,
859
,
189
,
856
,
190
,
115
,
263
,
/* 590 */
79
,
84
,
272
,
323
,
1040
,
324
,
325
,
326
,
327
,
328
,
/* 600 */
32
9
,
341
,
833
,
252
,
214
,
832
,
251
,
254
,
234
,
289
,
/* 610 */
2
55
,
831
,
814
,
813
,
259
,
211
,
212
,
264
,
98
,
10
,
/* 620 */
99
,
82
,
284
,
712
,
266
,
85
,
30
,
874
,
737
,
148
,
/* 630 */
867
,
174
,
133
,
173
,
915
,
172
,
175
,
176
,
178
,
177
,
/* 640 */
13
4
,
135
,
916
,
136
,
866
,
952
,
858
,
4
,
857
,
740
,
/* 650 */
162
,
159
,
157
,
149
,
86
,
160
,
964
,
2
,
161
,
742
,
/* 660 */
87
,
2
26
,
276
,
31
,
746
,
151
,
11
,
32
,
13
,
12
,
/* 670 */
2
7
,
28
,
286
,
643
,
94
,
96
,
639
,
637
,
636
,
635
,
/* 680 */
6
32
,
297
,
7
,
100
,
602
,
790
,
303
,
792
,
8
,
304
,
/* 690 */
10
3
,
682
,
66
,
105
,
36
,
67
,
109
,
111
,
681
,
678
,
/* 700 */
62
4
,
622
,
614
,
620
,
616
,
618
,
612
,
610
,
646
,
645
,
/* 710 */
64
4
,
642
,
641
,
640
,
638
,
634
,
633
,
181
,
600
,
566
,
/* 720 */
56
4
,
837
,
836
,
836
,
836
,
836
,
836
,
836
,
836
,
836
,
/* 730 */
83
6
,
836
,
836
,
138
,
139
,
};
static
const
YYCODETYPE
yy_lookahead
[]
=
{
/* 0 */
259
,
1
,
194
,
1
,
193
,
194
,
259
,
191
,
192
,
9
,
...
...
@@ -289,73 +289,73 @@ static const YYCODETYPE yy_lookahead[] = {
/* 40 */
13
,
14
,
194
,
16
,
17
,
256
,
256
,
20
,
21
,
1
,
/* 50 */
23
,
24
,
25
,
26
,
27
,
28
,
240
,
9
,
194
,
200
,
/* 60 */
33
,
34
,
200
,
194
,
37
,
38
,
39
,
14
,
260
,
16
,
/* 70 */
17
,
1
,
256
,
20
,
21
,
200
,
23
,
24
,
25
,
26
,
/* 80 */
27
,
28
,
80
,
259
,
80
,
237
,
33
,
34
,
194
,
241
,
/* 70 */
17
,
5
,
256
,
20
,
21
,
200
,
23
,
24
,
25
,
26
,
/* 80 */
27
,
28
,
80
,
80
,
194
,
237
,
33
,
34
,
194
,
241
,
/* 90 */
37
,
38
,
39
,
45
,
46
,
47
,
48
,
49
,
50
,
51
,
/* 100 */
52
,
53
,
54
,
55
,
56
,
57
,
58
,
37
,
81
,
61
,
/* 110 */
201
,
111
,
13
,
14
,
194
,
16
,
17
,
11
3
,
259
,
20
,
/* 120 */
21
,
259
,
23
,
24
,
25
,
26
,
27
,
28
,
269
,
82
,
/* 100 */
52
,
53
,
54
,
55
,
56
,
57
,
58
,
81
,
81
,
61
,
/* 110 */
201
,
111
,
13
,
14
,
194
,
16
,
17
,
11
4
,
259
,
20
,
/* 120 */
21
,
259
,
23
,
24
,
25
,
26
,
27
,
28
,
269
,
239
,
/* 130 */
266
,
269
,
33
,
34
,
259
,
266
,
37
,
38
,
39
,
13
,
/* 140 */
14
,
84
,
16
,
17
,
269
,
236
,
20
,
21
,
5
,
23
,
/* 150 */
24
,
25
,
26
,
27
,
28
,
261
,
262
,
237
,
194
,
33
,
/* 140 */
14
,
115
,
16
,
17
,
269
,
236
,
20
,
21
,
0
,
23
,
/* 150 */
24
,
25
,
26
,
27
,
28
,
261
,
262
,
237
,
82
,
33
,
/* 160 */
34
,
241
,
194
,
37
,
38
,
39
,
92
,
93
,
94
,
95
,
/* 170 */
96
,
97
,
98
,
99
,
100
,
101
,
102
,
103
,
104
,
105
,
/* 180 */
106
,
215
,
216
,
217
,
218
,
219
,
220
,
221
,
222
,
223
,
/* 190 */
224
,
225
,
226
,
227
,
228
,
229
,
16
,
17
,
44
,
231
,
/* 200 */
20
,
21
,
1
94
,
23
,
24
,
25
,
26
,
27
,
28
,
37
,
/* 210 */
38
,
39
,
0
,
33
,
34
,
61
,
199
,
37
,
38
,
39
,
/* 220 */
201
,
204
,
68
,
194
,
213
,
214
,
201
,
73
,
74
,
75
,
/* 230 */
266
,
60
,
268
,
79
,
80
,
259
,
1
,
2
,
194
,
5
,
/* 240 */
5
,
7
,
7
,
194
,
9
,
237
,
1
,
2
,
91
,
241
,
/* 250 */
5
,
80
,
7
,
234
,
9
,
62
,
63
,
64
,
233
,
234
,
/* 260 */
235
,
236
,
69
,
70
,
71
,
72
,
237
,
113
,
33
,
34
,
/* 270 */
241
,
78
,
37
,
92
,
117
,
94
,
95
,
194
,
33
,
34
,
/* 280 */
99
,
237
,
101
,
102
,
103
,
241
,
105
,
106
,
239
,
76
,
/* 290 */
136
,
81
,
138
,
215
,
82
,
217
,
218
,
84
,
68
,
145
,
/* 300 */
222
,
91
,
224
,
225
,
226
,
37
,
228
,
229
,
25
,
26
,
/* 310 */
27
,
28
,
5
,
194
,
7
,
80
,
33
,
34
,
80
,
6
8
,
/* 320 */
37
,
38
,
39
,
2
,
241
,
80
,
5
,
259
,
7
,
194
,
/* 330 */
9
,
62
,
63
,
64
,
194
,
62
,
63
,
64
,
69
,
70
,
/* 340 */
71
,
72
,
69
,
70
,
71
,
72
,
194
,
112
,
110
,
111
,
/* 350 */
5
,
259
,
118
,
118
,
33
,
34
,
194
,
112
,
194
,
194
,
/* 360 */
33
,
34
,
199
,
118
,
37
,
38
,
39
,
204
,
243
,
139
,
/* 370 */
1
35
,
141
,
237
,
143
,
144
,
259
,
241
,
237
,
33
,
34
,
/* 380 */
135
,
241
,
257
,
264
,
116
,
266
,
199
,
137
,
91
,
23
7
,
/* 390 */
139
,
204
,
141
,
241
,
143
,
144
,
146
,
147
,
81
,
237
,
/* 400 */
91
,
237
,
237
,
241
,
81
,
241
,
241
,
65
,
66
,
6
7
,
/* 410 */
62
,
63
,
64
,
202
,
203
,
197
,
198
,
126
,
127
,
81
,
/* 420 */
81
,
15
,
81
,
232
,
81
,
118
,
80
,
259
,
131
,
91
,
/* 430 */
91
,
114
,
91
,
112
,
91
,
81
,
81
,
114
,
81
,
81
,
/* 440 */
81
,
81
,
133
,
81
,
80
,
91
,
91
,
259
,
91
,
91
,
/* 450 */
91
,
91
,
140
,
91
,
142
,
109
,
140
,
259
,
142
,
140
,
/* 460 */
5
,
142
,
7
,
259
,
5
,
140
,
7
,
142
,
259
,
140
,
/* 470 */
2
42
,
142
,
108
,
140
,
259
,
142
,
76
,
77
,
259
,
259
,
/* 480 */
259
,
259
,
259
,
259
,
259
,
2
42
,
24
2
,
232
,
232
,
232
,
/* 490 */
232
,
232
,
232
,
194
,
194
,
194
,
194
,
258
,
194
,
194
,
/* 500 */
194
,
240
,
240
,
267
,
194
,
194
,
240
,
194
,
267
,
244
,
/* 510 */
60
,
263
,
194
,
250
,
194
,
118
,
194
,
263
,
112
,
195
,
/* 520 */
1
94
,
254
,
194
,
124
,
194
,
194
,
194
,
263
,
194
,
194
,
/* 530 */
194
,
194
,
130
,
263
,
194
,
255
,
132
,
129
,
194
,
25
3
,
/* 540 */
25
2
,
194
,
128
,
194
,
194
,
194
,
194
,
194
,
123
,
251
,
/* 550 */
194
,
122
,
249
,
121
,
120
,
194
,
248
,
194
,
119
,
194
,
/* 560 */
194
,
194
,
194
,
194
,
194
,
194
,
194
,
194
,
194
,
194
,
/* 570 */
194
,
194
,
194
,
194
,
194
,
194
,
1
94
,
194
,
194
,
194
,
/* 580 */
194
,
194
,
194
,
194
,
194
,
194
,
194
,
194
,
134
,
195
,
/* 590 */
195
,
195
,
1
07
,
195
,
90
,
89
,
50
,
86
,
88
,
54
,
/* 600 */
8
7
,
85
,
195
,
82
,
195
,
195
,
5
,
5
,
148
,
5
,
/* 610 */
195
,
195
,
148
,
201
,
201
,
5
,
5
,
94
,
93
,
137
,
/* 620 */
80
,
114
,
195
,
109
,
196
,
81
,
206
,
196
,
210
,
212
,
/* 630 */
211
,
209
,
208
,
207
,
196
,
205
,
195
,
214
,
195
,
202
,
/* 640 */
196
,
230
,
195
,
195
,
115
,
80
,
197
,
91
,
247
,
246
,
/* 650 */
245
,
2
30
,
91
,
81
,
80
,
91
,
81
,
80
,
1
,
81
,
/* 660 */
80
,
80
,
91
,
81
,
80
,
80
,
125
,
91
,
125
,
80
,
/* 670 */
80
,
109
,
76
,
110
,
9
,
5
,
5
,
5
,
5
,
5
,
/* 680 */
83
,
15
,
76
,
80
,
24
,
112
,
81
,
80
,
58
,
142
,
/* 690 */
142
,
16
,
16
,
142
,
142
,
5
,
5
,
81
,
5
,
9
1
,
/* 200 */
20
,
21
,
1
37
,
23
,
24
,
25
,
26
,
27
,
28
,
194
,
/* 210 */
259
,
146
,
147
,
33
,
34
,
61
,
84
,
37
,
38
,
39
,
/* 220 */
33
,
34
,
68
,
80
,
37
,
38
,
39
,
73
,
74
,
75
,
/* 230 */
82
,
1
,
2
,
79
,
80
,
5
,
81
,
7
,
76
,
9
,
/* 240 */
259
,
1
,
2
,
199
,
194
,
5
,
84
,
7
,
204
,
9
,
/* 250 */
62
,
63
,
64
,
110
,
111
,
259
,
241
,
69
,
70
,
71
,
/* 260 */
72
,
242
,
194
,
33
,
34
,
194
,
78
,
37
,
114
,
92
,
/* 270 */
115
,
94
,
95
,
33
,
34
,
68
,
99
,
259
,
101
,
102
,
/* 280 */
103
,
2
,
105
,
106
,
5
,
242
,
7
,
237
,
9
,
259
,
/* 290 */
136
,
241
,
138
,
215
,
5
,
217
,
218
,
213
,
214
,
145
,
/* 300 */
222
,
68
,
224
,
225
,
226
,
237
,
228
,
229
,
194
,
241
,
/* 310 */
80
,
194
,
33
,
34
,
202
,
203
,
25
,
26
,
27
,
2
8
,
/* 320 */
80
,
199
,
33
,
34
,
33
,
34
,
204
,
242
,
37
,
38
,
/* 330 */
39
,
62
,
63
,
64
,
201
,
264
,
259
,
266
,
69
,
70
,
/* 340 */
71
,
72
,
112
,
113
,
37
,
201
,
139
,
194
,
141
,
119
,
/* 350 */
143
,
144
,
112
,
113
,
237
,
62
,
63
,
64
,
241
,
119
,
/* 360 */
194
,
194
,
69
,
70
,
71
,
72
,
233
,
234
,
235
,
236
,
/* 370 */
1
94
,
91
,
139
,
194
,
141
,
194
,
143
,
144
,
234
,
5
,
/* 380 */
266
,
7
,
268
,
199
,
37
,
38
,
39
,
5
,
204
,
7
,
/* 390 */
237
,
112
,
113
,
91
,
241
,
65
,
66
,
67
,
62
,
63
,
/* 400 */
64
,
243
,
91
,
237
,
237
,
197
,
198
,
241
,
241
,
12
7
,
/* 410 */
128
,
1
,
80
,
237
,
134
,
257
,
237
,
241
,
237
,
15
,
/* 420 */
241
,
81
,
241
,
81
,
117
,
81
,
81
,
81
,
259
,
118
,
/* 430 */
81
,
91
,
81
,
91
,
132
,
91
,
91
,
91
,
81
,
81
,
/* 440 */
91
,
109
,
91
,
81
,
81
,
60
,
81
,
37
,
91
,
91
,
/* 450 */
140
,
80
,
142
,
91
,
91
,
140
,
91
,
142
,
140
,
5
,
/* 460 */
142
,
7
,
5
,
259
,
7
,
80
,
140
,
140
,
142
,
142
,
/* 470 */
2
59
,
140
,
259
,
142
,
76
,
77
,
259
,
259
,
259
,
108
,
/* 480 */
259
,
259
,
259
,
259
,
259
,
2
32
,
23
2
,
232
,
232
,
232
,
/* 490 */
232
,
232
,
194
,
119
,
194
,
194
,
258
,
194
,
194
,
194
,
/* 500 */
240
,
119
,
240
,
194
,
267
,
244
,
194
,
194
,
194
,
267
,
/* 510 */
240
,
194
,
60
,
194
,
194
,
194
,
112
,
194
,
194
,
194
,
/* 520 */
1
19
,
255
,
194
,
194
,
124
,
253
,
263
,
194
,
194
,
194
,
/* 530 */
263
,
194
,
194
,
194
,
263
,
194
,
263
,
194
,
131
,
13
3
,
/* 540 */
25
4
,
130
,
194
,
125
,
194
,
129
,
194
,
194
,
194
,
194
,
/* 550 */
194
,
252
,
123
,
194
,
194
,
194
,
122
,
251
,
194
,
121
,
/* 560 */
194
,
194
,
194
,
194
,
194
,
249
,
194
,
194
,
120
,
194
,
/* 570 */
194
,
194
,
194
,
194
,
194
,
194
,
1
35
,
194
,
194
,
107
,
/* 580 */
194
,
194
,
194
,
194
,
194
,
194
,
194
,
194
,
90
,
195
,
/* 590 */
195
,
195
,
1
95
,
89
,
195
,
50
,
86
,
88
,
54
,
87
,
/* 600 */
8
5
,
82
,
5
,
5
,
195
,
5
,
148
,
148
,
195
,
19
5
,
/* 610 */
5
,
5
,
94
,
93
,
137
,
195
,
195
,
115
,
201
,
80
,
/* 620 */
201
,
116
,
109
,
81
,
91
,
91
,
80
,
195
,
81
,
80
,
/* 630 */
195
,
206
,
196
,
210
,
212
,
211
,
209
,
207
,
205
,
208
,
/* 640 */
196
,
196
,
214
,
196
,
195
,
230
,
195
,
197
,
195
,
81
,
/* 650 */
245
,
2
48
,
250
,
91
,
80
,
247
,
230
,
202
,
246
,
81
,
/* 660 */
80
,
1
,
80
,
91
,
81
,
80
,
126
,
91
,
80
,
126
,
/* 670 */
80
,
80
,
109
,
9
,
110
,
76
,
5
,
5
,
5
,
5
,
/* 680 */
5
,
15
,
80
,
76
,
83
,
81
,
24
,
112
,
80
,
58
,
/* 690 */
142
,
5
,
16
,
142
,
91
,
16
,
142
,
142
,
5
,
8
1
,
/* 700 */
5
,
5
,
5
,
5
,
5
,
5
,
5
,
5
,
5
,
5
,
/* 710 */
5
,
5
,
5
,
5
,
5
,
5
,
91
,
83
,
60
,
0
,
/* 720 */
59
,
27
0
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
/* 730 */
270
,
270
,
21
,
21
,
270
,
270
,
270
,
270
,
270
,
270
,
/* 710 */
5
,
5
,
5
,
5
,
5
,
5
,
5
,
91
,
83
,
6
0
,
/* 720 */
59
,
0
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
/* 730 */
270
,
270
,
270
,
21
,
21
,
270
,
270
,
270
,
270
,
270
,
/* 740 */
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
/* 750 */
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
/* 760 */
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
...
...
@@ -374,109 +374,109 @@ static const YYCODETYPE yy_lookahead[] = {
/* 890 */
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
/* 900 */
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
/* 910 */
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
/* 920 */
270
,
270
,
270
,
270
,
/* 920 */
270
,
270
,
270
,
270
,
270
,
};
#define YY_SHIFT_COUNT (346)
#define YY_SHIFT_MIN (0)
#define YY_SHIFT_MAX (7
19
)
#define YY_SHIFT_MAX (7
21
)
static
const
unsigned
short
int
yy_shift_ofst
[]
=
{
/* 0 */
154
,
74
,
74
,
1
81
,
181
,
47
,
235
,
245
,
245
,
2
,
/* 0 */
154
,
74
,
74
,
1
77
,
177
,
76
,
230
,
240
,
240
,
2
,
/* 10 */
9
,
9
,
9
,
9
,
9
,
9
,
9
,
9
,
9
,
9
,
/* 20 */
9
,
9
,
9
,
0
,
48
,
24
5
,
321
,
321
,
321
,
4
,
/* 30 */
4
,
9
,
9
,
9
,
212
,
9
,
9
,
213
,
47
,
57
,
/* 40 */
57
,
143
,
734
,
734
,
734
,
245
,
245
,
245
,
245
,
245
,
/* 50 */
24
5
,
245
,
245
,
245
,
245
,
245
,
245
,
245
,
245
,
245
,
/* 60 */
24
5
,
245
,
245
,
245
,
245
,
321
,
321
,
321
,
345
,
345
,
/* 70 */
345
,
345
,
345
,
345
,
345
,
9
,
9
,
9
,
268
,
9
,
/* 80 */
9
,
9
,
4
,
4
,
9
,
9
,
9
,
9
,
291
,
291
,
/* 90 */
157
,
4
,
9
,
9
,
9
,
9
,
9
,
9
,
9
,
9
,
/* 20 */
9
,
9
,
9
,
0
,
48
,
24
0
,
279
,
279
,
279
,
3
,
/* 30 */
3
,
9
,
9
,
9
,
148
,
9
,
9
,
162
,
76
,
132
,
/* 40 */
132
,
66
,
735
,
735
,
735
,
240
,
240
,
240
,
240
,
240
,
/* 50 */
24
0
,
240
,
240
,
240
,
240
,
240
,
240
,
240
,
240
,
240
,
/* 60 */
24
0
,
240
,
240
,
240
,
240
,
279
,
279
,
279
,
289
,
289
,
/* 70 */
289
,
289
,
289
,
289
,
289
,
9
,
9
,
9
,
307
,
9
,
/* 80 */
9
,
9
,
3
,
3
,
9
,
9
,
9
,
9
,
282
,
282
,
/* 90 */
311
,
3
,
9
,
9
,
9
,
9
,
9
,
9
,
9
,
9
,
/* 100 */
9
,
9
,
9
,
9
,
9
,
9
,
9
,
9
,
9
,
9
,
/* 110 */
9
,
9
,
9
,
9
,
9
,
9
,
9
,
9
,
9
,
9
,
/* 120 */
9
,
9
,
9
,
9
,
9
,
9
,
9
,
9
,
9
,
9
,
/* 130 */
9
,
9
,
9
,
9
,
9
,
9
,
9
,
9
,
9
,
9
,
/* 140 */
9
,
9
,
9
,
9
,
45
0
,
450
,
450
,
397
,
397
,
397
,
/* 150 */
45
0
,
397
,
450
,
402
,
404
,
408
,
399
,
414
,
425
,
429
,
/* 160 */
43
2
,
434
,
439
,
454
,
450
,
450
,
450
,
485
,
47
,
47
,
/* 170 */
45
0
,
450
,
504
,
506
,
546
,
511
,
510
,
545
,
513
,
516
,
/* 180 */
4
85
,
143
,
450
,
521
,
521
,
450
,
521
,
450
,
521
,
450
,
/* 190 */
45
0
,
734
,
734
,
27
,
99
,
99
,
126
,
99
,
53
,
180
,
/* 200 */
2
83
,
283
,
283
,
283
,
193
,
269
,
273
,
327
,
327
,
32
7
,
/* 210 */
327
,
230
,
251
,
250
,
238
,
172
,
172
,
234
,
307
,
342
,
/* 220 */
3
48
,
210
,
317
,
323
,
338
,
339
,
341
,
309
,
297
,
343
,
/* 230 */
3
54
,
355
,
357
,
358
,
346
,
359
,
360
,
70
,
171
,
406
,
/* 240 */
36
2
,
312
,
316
,
319
,
455
,
459
,
325
,
329
,
364
,
333
,
/* 250 */
400
,
601
,
460
,
602
,
604
,
464
,
610
,
611
,
523
,
525
,
/* 260 */
4
82
,
507
,
514
,
540
,
529
,
544
,
565
,
556
,
561
,
572
,
/* 270 */
5
74
,
575
,
564
,
577
,
578
,
580
,
657
,
581
,
582
,
584
,
/* 280 */
57
1
,
541
,
576
,
543
,
585
,
514
,
589
,
562
,
590
,
563
,
/* 290 */
59
6
,
665
,
670
,
671
,
672
,
673
,
674
,
597
,
666
,
606
,
/* 300 */
60
3
,
605
,
573
,
607
,
660
,
630
,
675
,
547
,
548
,
608
,
/* 310 */
60
8
,
608
,
608
,
676
,
551
,
552
,
608
,
608
,
608
,
690
,
/* 320 */
69
1
,
616
,
608
,
693
,
695
,
696
,
697
,
698
,
699
,
700
,
/* 330 */
70
1
,
702
,
703
,
704
,
705
,
706
,
707
,
708
,
709
,
710
,
/* 340 */
62
5
,
634
,
711
,
712
,
658
,
661
,
719
,
/* 140 */
9
,
9
,
9
,
9
,
45
2
,
452
,
452
,
401
,
401
,
401
,
/* 150 */
45
2
,
401
,
452
,
407
,
406
,
411
,
418
,
416
,
400
,
429
,
/* 160 */
43
4
,
438
,
448
,
441
,
452
,
452
,
452
,
472
,
76
,
76
,
/* 170 */
45
2
,
452
,
498
,
504
,
545
,
510
,
509
,
544
,
512
,
515
,
/* 180 */
4
72
,
66
,
452
,
519
,
519
,
452
,
519
,
452
,
519
,
452
,
/* 190 */
45
2
,
735
,
735
,
27
,
99
,
99
,
126
,
99
,
53
,
180
,
/* 200 */
2
91
,
291
,
291
,
291
,
188
,
269
,
293
,
187
,
187
,
18
7
,
/* 210 */
187
,
207
,
233
,
65
,
143
,
347
,
347
,
374
,
382
,
330
,
/* 220 */
3
36
,
340
,
26
,
155
,
342
,
344
,
345
,
280
,
302
,
346
,
/* 230 */
3
49
,
351
,
357
,
358
,
332
,
362
,
363
,
410
,
385
,
404
,
/* 240 */
36
5
,
310
,
315
,
318
,
454
,
457
,
326
,
327
,
371
,
331
,
/* 250 */
398
,
597
,
458
,
598
,
600
,
459
,
605
,
606
,
518
,
520
,
/* 260 */
4
77
,
502
,
513
,
539
,
505
,
542
,
546
,
533
,
534
,
547
,
/* 270 */
5
49
,
568
,
562
,
574
,
578
,
580
,
660
,
582
,
583
,
585
,
/* 280 */
57
2
,
540
,
576
,
543
,
588
,
513
,
590
,
563
,
591
,
564
,
/* 290 */
59
9
,
664
,
671
,
672
,
673
,
674
,
675
,
601
,
666
,
607
,
/* 300 */
60
2
,
604
,
575
,
608
,
662
,
631
,
676
,
548
,
551
,
603
,
/* 310 */
60
3
,
603
,
603
,
679
,
554
,
555
,
603
,
603
,
603
,
686
,
/* 320 */
69
3
,
618
,
603
,
695
,
696
,
697
,
698
,
699
,
700
,
701
,
/* 330 */
70
2
,
703
,
704
,
705
,
706
,
707
,
708
,
709
,
710
,
711
,
/* 340 */
62
6
,
635
,
712
,
713
,
659
,
661
,
721
,
};
#define YY_REDUCE_COUNT (192)
#define YY_REDUCE_MIN (-259)
#define YY_REDUCE_MAX (4
49
)
#define YY_REDUCE_MAX (4
55
)
static
const
short
yy_reduce_ofst
[]
=
{
/* 0 */
-
184
,
-
34
,
-
34
,
78
,
78
,
25
,
-
141
,
-
138
,
-
125
,
-
106
,
/* 10 */
-
152
,
-
36
,
119
,
-
80
,
8
,
29
,
44
,
135
,
140
,
152
,
/* 20 */
1
62
,
164
,
165
,
-
192
,
-
189
,
-
247
,
-
223
,
-
207
,
-
206
,
-
211
,
/* 30 */
-
210
,
-
136
,
-
131
,
49
,
-
91
,
-
32
,
83
,
17
,
19
,
163
,
/* 40 */
18
7
,
11
,
125
,
211
,
218
,
-
259
,
-
253
,
-
176
,
-
24
,
68
,
/* 50 */
92
,
116
,
168
,
188
,
198
,
204
,
209
,
215
,
219
,
220
,
/* 60 */
221
,
222
,
223
,
224
,
225
,
228
,
243
,
244
,
191
,
255
,
/* 70 */
25
6
,
257
,
258
,
259
,
260
,
299
,
300
,
301
,
239
,
302
,
/* 80 */
304
,
305
,
26
1
,
262
,
306
,
310
,
311
,
313
,
236
,
241
,
/* 90 */
26
5
,
266
,
318
,
320
,
322
,
326
,
328
,
330
,
331
,
332
,
/* 100 */
3
34
,
335
,
336
,
337
,
340
,
344
,
347
,
349
,
350
,
351
,
/* 110 */
35
2
,
353
,
356
,
361
,
363
,
365
,
366
,
367
,
368
,
369
,
/* 120 */
3
70
,
371
,
372
,
373
,
374
,
375
,
376
,
377
,
378
,
379
,
/* 130 */
3
80
,
381
,
382
,
383
,
384
,
385
,
386
,
387
,
388
,
389
,
/* 140 */
390
,
391
,
392
,
393
,
3
24
,
394
,
395
,
248
,
254
,
264
,
/* 150 */
39
6
,
270
,
398
,
280
,
267
,
286
,
288
,
298
,
263
,
303
,
/* 160 */
308
,
401
,
403
,
405
,
407
,
409
,
410
,
411
,
412
,
413
,
/* 170 */
4
15
,
416
,
417
,
419
,
418
,
420
,
422
,
426
,
424
,
430
,
/* 180 */
42
1
,
423
,
427
,
428
,
431
,
441
,
438
,
443
,
444
,
447
,
/* 190 */
4
48
,
437
,
449
,
/* 0 */
-
184
,
-
34
,
-
34
,
78
,
78
,
133
,
-
141
,
-
138
,
-
125
,
-
106
,
/* 10 */
-
152
,
114
,
71
,
-
80
,
50
,
68
,
117
,
153
,
166
,
167
,
/* 20 */
1
76
,
179
,
181
,
-
192
,
-
189
,
-
247
,
-
223
,
-
207
,
-
206
,
-
211
,
/* 30 */
-
210
,
-
136
,
-
131
,
-
110
,
-
91
,
-
32
,
15
,
44
,
144
,
122
,
/* 40 */
18
4
,
84
,
158
,
112
,
208
,
-
259
,
-
253
,
-
49
,
-
19
,
-
4
,
/* 50 */
18
,
30
,
77
,
169
,
204
,
211
,
213
,
217
,
218
,
219
,
/* 60 */
221
,
222
,
223
,
224
,
225
,
19
,
43
,
85
,
253
,
254
,
/* 70 */
25
5
,
256
,
257
,
258
,
259
,
298
,
300
,
301
,
238
,
303
,
/* 80 */
304
,
305
,
26
0
,
262
,
309
,
312
,
313
,
314
,
237
,
242
,
/* 90 */
26
1
,
270
,
317
,
319
,
320
,
321
,
323
,
324
,
325
,
328
,
/* 100 */
3
29
,
333
,
334
,
335
,
337
,
338
,
339
,
341
,
343
,
348
,
/* 110 */
35
0
,
352
,
353
,
354
,
355
,
356
,
359
,
360
,
361
,
364
,
/* 120 */
3
66
,
367
,
368
,
369
,
370
,
372
,
373
,
375
,
376
,
377
,
/* 130 */
3
78
,
379
,
380
,
381
,
383
,
384
,
386
,
387
,
388
,
389
,
/* 140 */
390
,
391
,
392
,
393
,
3
94
,
395
,
396
,
263
,
267
,
271
,
/* 150 */
39
7
,
273
,
399
,
266
,
286
,
272
,
299
,
306
,
402
,
316
,
/* 160 */
403
,
408
,
412
,
405
,
409
,
413
,
414
,
415
,
417
,
419
,
/* 170 */
4
20
,
421
,
422
,
424
,
423
,
425
,
427
,
430
,
431
,
433
,
/* 180 */
42
6
,
428
,
432
,
436
,
444
,
435
,
445
,
449
,
447
,
451
,
/* 190 */
4
53
,
455
,
450
,
};
static
const
YYACTIONTYPE
yy_default
[]
=
{
/* 0 */
83
2
,
949
,
892
,
961
,
879
,
889
,
1097
,
1097
,
1097
,
832
,
/* 10 */
83
2
,
832
,
832
,
832
,
832
,
832
,
832
,
832
,
832
,
832
,
/* 20 */
83
2
,
832
,
832
,
1008
,
851
,
1097
,
832
,
832
,
832
,
832
,
/* 30 */
83
2
,
832
,
832
,
832
,
889
,
832
,
832
,
895
,
889
,
895
,
/* 40 */
89
5
,
832
,
1003
,
933
,
951
,
832
,
832
,
832
,
832
,
832
,
/* 50 */
83
2
,
832
,
832
,
832
,
832
,
832
,
832
,
832
,
832
,
832
,
/* 60 */
83
2
,
832
,
832
,
832
,
832
,
832
,
832
,
832
,
832
,
832
,
/* 70 */
83
2
,
832
,
832
,
832
,
832
,
832
,
832
,
832
,
1010
,
1016
,
/* 80 */
101
3
,
832
,
832
,
832
,
1018
,
832
,
832
,
832
,
1040
,
1040
,
/* 90 */
100
1
,
832
,
832
,
832
,
832
,
832
,
832
,
832
,
832
,
832
,
/* 100 */
83
2
,
832
,
832
,
832
,
832
,
832
,
832
,
832
,
832
,
832
,
/* 110 */
83
2
,
832
,
832
,
832
,
832
,
832
,
832
,
832
,
832
,
832
,
/* 120 */
87
7
,
832
,
875
,
832
,
832
,
832
,
832
,
832
,
832
,
832
,
/* 130 */
83
2
,
832
,
832
,
832
,
832
,
832
,
832
,
862
,
832
,
832
,
/* 140 */
83
2
,
832
,
832
,
832
,
853
,
853
,
853
,
832
,
832
,
832
,
/* 150 */
85
3
,
832
,
853
,
1047
,
1051
,
1045
,
1033
,
1041
,
1032
,
1028
,
/* 160 */
102
6
,
1024
,
1023
,
1055
,
853
,
853
,
853
,
893
,
889
,
889
,
/* 170 */
85
3
,
853
,
911
,
909
,
907
,
899
,
905
,
901
,
903
,
897
,
/* 180 */
88
0
,
832
,
853
,
887
,
887
,
853
,
887
,
853
,
887
,
853
,
/* 190 */
85
3
,
933
,
951
,
832
,
1056
,
1046
,
832
,
1096
,
1086
,
1085
,
/* 200 */
109
2
,
1084
,
1083
,
1082
,
832
,
832
,
832
,
1078
,
1081
,
1080
,
/* 210 */
10
79
,
832
,
832
,
832
,
832
,
1088
,
1087
,
832
,
832
,
832
,
/* 220 */
83
2
,
832
,
832
,
832
,
832
,
832
,
832
,
1052
,
1048
,
832
,
/* 230 */
83
2
,
832
,
832
,
832
,
832
,
832
,
832
,
832
,
1058
,
832
,
/* 240 */
83
2
,
832
,
832
,
832
,
832
,
832
,
832
,
832
,
963
,
832
,
/* 250 */
83
2
,
832
,
832
,
832
,
832
,
832
,
832
,
832
,
832
,
832
,
/* 260 */
83
2
,
1000
,
832
,
832
,
832
,
832
,
832
,
1012
,
1011
,
832
,
/* 270 */
83
2
,
832
,
832
,
832
,
832
,
832
,
832
,
832
,
832
,
832
,
/* 280 */
104
2
,
832
,
1034
,
832
,
832
,
975
,
832
,
832
,
832
,
832
,
/* 290 */
83
2
,
832
,
832
,
832
,
832
,
832
,
832
,
832
,
832
,
832
,
/* 300 */
83
2
,
832
,
832
,
832
,
832
,
832
,
832
,
832
,
832
,
1115
,
/* 310 */
111
0
,
1111
,
1108
,
832
,
832
,
832
,
1107
,
1102
,
1103
,
832
,
/* 320 */
83
2
,
832
,
1100
,
832
,
832
,
832
,
832
,
832
,
832
,
832
,
/* 330 */
83
2
,
832
,
832
,
832
,
832
,
832
,
832
,
832
,
832
,
832
,
/* 340 */
91
7
,
832
,
860
,
858
,
832
,
849
,
832
,
/* 0 */
83
4
,
951
,
894
,
963
,
881
,
891
,
1100
,
1100
,
1100
,
834
,
/* 10 */
83
4
,
834
,
834
,
834
,
834
,
834
,
834
,
834
,
834
,
834
,
/* 20 */
83
4
,
834
,
834
,
1011
,
853
,
1100
,
834
,
834
,
834
,
834
,
/* 30 */
83
4
,
834
,
834
,
834
,
891
,
834
,
834
,
897
,
891
,
897
,
/* 40 */
89
7
,
834
,
1006
,
935
,
953
,
834
,
834
,
834
,
834
,
834
,
/* 50 */
83
4
,
834
,
834
,
834
,
834
,
834
,
834
,
834
,
834
,
834
,
/* 60 */
83
4
,
834
,
834
,
834
,
834
,
834
,
834
,
834
,
834
,
834
,
/* 70 */
83
4
,
834
,
834
,
834
,
834
,
834
,
834
,
834
,
1013
,
1019
,
/* 80 */
101
6
,
834
,
834
,
834
,
1021
,
834
,
834
,
834
,
1043
,
1043
,
/* 90 */
100
4
,
834
,
834
,
834
,
834
,
834
,
834
,
834
,
834
,
834
,
/* 100 */
83
4
,
834
,
834
,
834
,
834
,
834
,
834
,
834
,
834
,
834
,
/* 110 */
83
4
,
834
,
834
,
834
,
834
,
834
,
834
,
834
,
834
,
834
,
/* 120 */
87
9
,
834
,
877
,
834
,
834
,
834
,
834
,
834
,
834
,
834
,
/* 130 */
83
4
,
834
,
834
,
834
,
834
,
834
,
834
,
864
,
834
,
834
,
/* 140 */
83
4
,
834
,
834
,
834
,
855
,
855
,
855
,
834
,
834
,
834
,
/* 150 */
85
5
,
834
,
855
,
1050
,
1054
,
1048
,
1036
,
1044
,
1035
,
1031
,
/* 160 */
102
9
,
1027
,
1026
,
1058
,
855
,
855
,
855
,
895
,
891
,
891
,
/* 170 */
85
5
,
855
,
913
,
911
,
909
,
901
,
907
,
903
,
905
,
899
,
/* 180 */
88
2
,
834
,
855
,
889
,
889
,
855
,
889
,
855
,
889
,
855
,
/* 190 */
85
5
,
935
,
953
,
834
,
1059
,
1049
,
834
,
1099
,
1089
,
1088
,
/* 200 */
109
5
,
1087
,
1086
,
1085
,
834
,
834
,
834
,
1081
,
1084
,
1083
,
/* 210 */
10
82
,
834
,
834
,
834
,
834
,
1091
,
1090
,
834
,
834
,
834
,
/* 220 */
83
4
,
834
,
834
,
834
,
834
,
834
,
834
,
1055
,
1051
,
834
,
/* 230 */
83
4
,
834
,
834
,
834
,
834
,
834
,
834
,
834
,
1061
,
834
,
/* 240 */
83
4
,
834
,
834
,
834
,
834
,
834
,
834
,
834
,
965
,
834
,
/* 250 */
83
4
,
834
,
834
,
834
,
834
,
834
,
834
,
834
,
834
,
834
,
/* 260 */
83
4
,
1003
,
834
,
834
,
834
,
834
,
834
,
1015
,
1014
,
834
,
/* 270 */
83
4
,
834
,
834
,
834
,
834
,
834
,
834
,
834
,
834
,
834
,
/* 280 */
104
5
,
834
,
1037
,
834
,
834
,
977
,
834
,
834
,
834
,
834
,
/* 290 */
83
4
,
834
,
834
,
834
,
834
,
834
,
834
,
834
,
834
,
834
,
/* 300 */
83
4
,
834
,
834
,
834
,
834
,
834
,
834
,
834
,
834
,
1118
,
/* 310 */
111
3
,
1114
,
1111
,
834
,
834
,
834
,
1110
,
1105
,
1106
,
834
,
/* 320 */
83
4
,
834
,
1103
,
834
,
834
,
834
,
834
,
834
,
834
,
834
,
/* 330 */
83
4
,
834
,
834
,
834
,
834
,
834
,
834
,
834
,
834
,
834
,
/* 340 */
91
9
,
834
,
862
,
860
,
834
,
851
,
834
,
};
/********** End of lemon-generated parsing tables *****************************/
...
...
@@ -609,6 +609,7 @@ static const YYCODETYPE yyFallback[] = {
0
,
/* USING => nothing */
0
,
/* AS => nothing */
1
,
/* NULL => ID */
1
,
/* NOW => ID */
0
,
/* SELECT => nothing */
0
,
/* UNION => nothing */
1
,
/* ALL => ID */
...
...
@@ -631,7 +632,6 @@ static const YYCODETYPE yyFallback[] = {
0
,
/* SLIMIT => nothing */
0
,
/* SOFFSET => nothing */
0
,
/* WHERE => nothing */
1
,
/* NOW => ID */
0
,
/* RESET => nothing */
0
,
/* QUERY => nothing */
0
,
/* SYNCDB => nothing */
...
...
@@ -885,29 +885,29 @@ static const char *const yyTokenName[] = {
/* 110 */
"USING"
,
/* 111 */
"AS"
,
/* 112 */
"NULL"
,
/* 113 */
"
SELECT
"
,
/* 114 */
"
UNION
"
,
/* 115 */
"
ALL
"
,
/* 116 */
"
DISTINCT
"
,
/* 117 */
"
FROM
"
,
/* 118 */
"
VARIABLE
"
,
/* 119 */
"
INTERVAL
"
,
/* 120 */
"
SESSION
"
,
/* 121 */
"S
TATE_WINDOW
"
,
/* 122 */
"
FILL
"
,
/* 123 */
"
SLIDING
"
,
/* 124 */
"
ORDER
"
,
/* 125 */
"
BY
"
,
/* 126 */
"
ASC
"
,
/* 127 */
"
DE
SC"
,
/* 128 */
"
GROUP
"
,
/* 129 */
"
HAVING
"
,
/* 130 */
"
LIMIT
"
,
/* 131 */
"
OFFSE
T"
,
/* 132 */
"
SLIMI
T"
,
/* 133 */
"S
OFFSE
T"
,
/* 134 */
"
WHERE
"
,
/* 135 */
"
NOW
"
,
/* 113 */
"
NOW
"
,
/* 114 */
"
SELECT
"
,
/* 115 */
"
UNION
"
,
/* 116 */
"
ALL
"
,
/* 117 */
"
DISTINCT
"
,
/* 118 */
"
FROM
"
,
/* 119 */
"
VARIABLE
"
,
/* 120 */
"
INTERVAL
"
,
/* 121 */
"S
ESSION
"
,
/* 122 */
"
STATE_WINDOW
"
,
/* 123 */
"
FILL
"
,
/* 124 */
"
SLIDING
"
,
/* 125 */
"
ORDER
"
,
/* 126 */
"
BY
"
,
/* 127 */
"
A
SC"
,
/* 128 */
"
DESC
"
,
/* 129 */
"
GROUP
"
,
/* 130 */
"
HAVING
"
,
/* 131 */
"
LIMI
T"
,
/* 132 */
"
OFFSE
T"
,
/* 133 */
"S
LIMI
T"
,
/* 134 */
"
SOFFSET
"
,
/* 135 */
"
WHERE
"
,
/* 136 */
"RESET"
,
/* 137 */
"QUERY"
,
/* 138 */
"SYNCDB"
,
...
...
@@ -1206,133 +1206,134 @@ static const char *const yyRuleName[] = {
/* 154 */
"tagitem ::= STRING"
,
/* 155 */
"tagitem ::= BOOL"
,
/* 156 */
"tagitem ::= NULL"
,
/* 157 */
"tagitem ::= MINUS INTEGER"
,
/* 158 */
"tagitem ::= MINUS FLOAT"
,
/* 159 */
"tagitem ::= PLUS INTEGER"
,
/* 160 */
"tagitem ::= PLUS FLOAT"
,
/* 161 */
"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"
,
/* 162 */
"select ::= LP select RP"
,
/* 163 */
"union ::= select"
,
/* 164 */
"union ::= union UNION ALL select"
,
/* 165 */
"cmd ::= union"
,
/* 166 */
"select ::= SELECT selcollist"
,
/* 167 */
"sclp ::= selcollist COMMA"
,
/* 168 */
"sclp ::="
,
/* 169 */
"selcollist ::= sclp distinct expr as"
,
/* 170 */
"selcollist ::= sclp STAR"
,
/* 171 */
"as ::= AS ids"
,
/* 172 */
"as ::= ids"
,
/* 173 */
"as ::="
,
/* 174 */
"distinct ::= DISTINCT"
,
/* 175 */
"distinct ::="
,
/* 176 */
"from ::= FROM tablelist"
,
/* 177 */
"from ::= FROM sub"
,
/* 178 */
"sub ::= LP union RP"
,
/* 179 */
"sub ::= LP union RP ids"
,
/* 180 */
"sub ::= sub COMMA LP union RP ids"
,
/* 181 */
"tablelist ::= ids cpxName"
,
/* 182 */
"tablelist ::= ids cpxName ids"
,
/* 183 */
"tablelist ::= tablelist COMMA ids cpxName"
,
/* 184 */
"tablelist ::= tablelist COMMA ids cpxName ids"
,
/* 185 */
"tmvar ::= VARIABLE"
,
/* 186 */
"interval_opt ::= INTERVAL LP tmvar RP"
,
/* 187 */
"interval_opt ::= INTERVAL LP tmvar COMMA tmvar RP"
,
/* 188 */
"interval_opt ::="
,
/* 189 */
"session_option ::="
,
/* 190 */
"session_option ::= SESSION LP ids cpxName COMMA tmvar RP"
,
/* 191 */
"windowstate_option ::="
,
/* 192 */
"windowstate_option ::= STATE_WINDOW LP ids RP"
,
/* 193 */
"fill_opt ::="
,
/* 194 */
"fill_opt ::= FILL LP ID COMMA tagitemlist RP"
,
/* 195 */
"fill_opt ::= FILL LP ID RP"
,
/* 196 */
"sliding_opt ::= SLIDING LP tmvar RP"
,
/* 197 */
"sliding_opt ::="
,
/* 198 */
"orderby_opt ::="
,
/* 199 */
"orderby_opt ::= ORDER BY sortlist"
,
/* 200 */
"sortlist ::= sortlist COMMA item sortorder"
,
/* 201 */
"sortlist ::= item sortorder"
,
/* 202 */
"item ::= ids cpxName"
,
/* 203 */
"sortorder ::= ASC"
,
/* 204 */
"sortorder ::= DESC"
,
/* 205 */
"sortorder ::="
,
/* 206 */
"groupby_opt ::="
,
/* 207 */
"groupby_opt ::= GROUP BY grouplist"
,
/* 208 */
"grouplist ::= grouplist COMMA item"
,
/* 209 */
"grouplist ::= item"
,
/* 210 */
"having_opt ::="
,
/* 211 */
"having_opt ::= HAVING expr"
,
/* 212 */
"limit_opt ::="
,
/* 213 */
"limit_opt ::= LIMIT signed"
,
/* 214 */
"limit_opt ::= LIMIT signed OFFSET signed"
,
/* 215 */
"limit_opt ::= LIMIT signed COMMA signed"
,
/* 216 */
"slimit_opt ::="
,
/* 217 */
"slimit_opt ::= SLIMIT signed"
,
/* 218 */
"slimit_opt ::= SLIMIT signed SOFFSET signed"
,
/* 219 */
"slimit_opt ::= SLIMIT signed COMMA signed"
,
/* 220 */
"where_opt ::="
,
/* 221 */
"where_opt ::= WHERE expr"
,
/* 222 */
"expr ::= LP expr RP"
,
/* 223 */
"expr ::= ID"
,
/* 224 */
"expr ::= ID DOT ID"
,
/* 225 */
"expr ::= ID DOT STAR"
,
/* 226 */
"expr ::= INTEGER"
,
/* 227 */
"expr ::= MINUS INTEGER"
,
/* 228 */
"expr ::= PLUS INTEGER"
,
/* 229 */
"expr ::= FLOAT"
,
/* 230 */
"expr ::= MINUS FLOAT"
,
/* 231 */
"expr ::= PLUS FLOAT"
,
/* 232 */
"expr ::= STRING"
,
/* 233 */
"expr ::= NOW"
,
/* 234 */
"expr ::= VARIABLE"
,
/* 235 */
"expr ::= PLUS VARIABLE"
,
/* 236 */
"expr ::= MINUS VARIABLE"
,
/* 237 */
"expr ::= BOOL"
,
/* 238 */
"expr ::= NULL"
,
/* 239 */
"expr ::= ID LP exprlist RP"
,
/* 240 */
"expr ::= ID LP STAR RP"
,
/* 241 */
"expr ::= expr IS NULL"
,
/* 242 */
"expr ::= expr IS NOT NULL"
,
/* 243 */
"expr ::= expr LT expr"
,
/* 244 */
"expr ::= expr GT expr"
,
/* 245 */
"expr ::= expr LE expr"
,
/* 246 */
"expr ::= expr GE expr"
,
/* 247 */
"expr ::= expr NE expr"
,
/* 248 */
"expr ::= expr EQ expr"
,
/* 249 */
"expr ::= expr BETWEEN expr AND expr"
,
/* 250 */
"expr ::= expr AND expr"
,
/* 251 */
"expr ::= expr OR expr"
,
/* 252 */
"expr ::= expr PLUS expr"
,
/* 253 */
"expr ::= expr MINUS expr"
,
/* 254 */
"expr ::= expr STAR expr"
,
/* 255 */
"expr ::= expr SLASH expr"
,
/* 256 */
"expr ::= expr REM expr"
,
/* 257 */
"expr ::= expr LIKE expr"
,
/* 258 */
"expr ::= expr IN LP exprlist RP"
,
/* 259 */
"exprlist ::= exprlist COMMA expritem"
,
/* 260 */
"exprlist ::= expritem"
,
/* 261 */
"expritem ::= expr"
,
/* 262 */
"expritem ::="
,
/* 263 */
"cmd ::= RESET QUERY CACHE"
,
/* 264 */
"cmd ::= SYNCDB ids REPLICA"
,
/* 265 */
"cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist"
,
/* 266 */
"cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids"
,
/* 267 */
"cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist"
,
/* 268 */
"cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist"
,
/* 269 */
"cmd ::= ALTER TABLE ids cpxName DROP TAG ids"
,
/* 270 */
"cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids"
,
/* 271 */
"cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem"
,
/* 272 */
"cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist"
,
/* 273 */
"cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist"
,
/* 274 */
"cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids"
,
/* 275 */
"cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist"
,
/* 276 */
"cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist"
,
/* 277 */
"cmd ::= ALTER STABLE ids cpxName DROP TAG ids"
,
/* 278 */
"cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids"
,
/* 279 */
"cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem"
,
/* 280 */
"cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist"
,
/* 281 */
"cmd ::= KILL CONNECTION INTEGER"
,
/* 282 */
"cmd ::= KILL STREAM INTEGER COLON INTEGER"
,
/* 283 */
"cmd ::= KILL QUERY INTEGER COLON INTEGER"
,
/* 157 */
"tagitem ::= NOW"
,
/* 158 */
"tagitem ::= MINUS INTEGER"
,
/* 159 */
"tagitem ::= MINUS FLOAT"
,
/* 160 */
"tagitem ::= PLUS INTEGER"
,
/* 161 */
"tagitem ::= PLUS FLOAT"
,
/* 162 */
"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"
,
/* 163 */
"select ::= LP select RP"
,
/* 164 */
"union ::= select"
,
/* 165 */
"union ::= union UNION ALL select"
,
/* 166 */
"cmd ::= union"
,
/* 167 */
"select ::= SELECT selcollist"
,
/* 168 */
"sclp ::= selcollist COMMA"
,
/* 169 */
"sclp ::="
,
/* 170 */
"selcollist ::= sclp distinct expr as"
,
/* 171 */
"selcollist ::= sclp STAR"
,
/* 172 */
"as ::= AS ids"
,
/* 173 */
"as ::= ids"
,
/* 174 */
"as ::="
,
/* 175 */
"distinct ::= DISTINCT"
,
/* 176 */
"distinct ::="
,
/* 177 */
"from ::= FROM tablelist"
,
/* 178 */
"from ::= FROM sub"
,
/* 179 */
"sub ::= LP union RP"
,
/* 180 */
"sub ::= LP union RP ids"
,
/* 181 */
"sub ::= sub COMMA LP union RP ids"
,
/* 182 */
"tablelist ::= ids cpxName"
,
/* 183 */
"tablelist ::= ids cpxName ids"
,
/* 184 */
"tablelist ::= tablelist COMMA ids cpxName"
,
/* 185 */
"tablelist ::= tablelist COMMA ids cpxName ids"
,
/* 186 */
"tmvar ::= VARIABLE"
,
/* 187 */
"interval_opt ::= INTERVAL LP tmvar RP"
,
/* 188 */
"interval_opt ::= INTERVAL LP tmvar COMMA tmvar RP"
,
/* 189 */
"interval_opt ::="
,
/* 190 */
"session_option ::="
,
/* 191 */
"session_option ::= SESSION LP ids cpxName COMMA tmvar RP"
,
/* 192 */
"windowstate_option ::="
,
/* 193 */
"windowstate_option ::= STATE_WINDOW LP ids RP"
,
/* 194 */
"fill_opt ::="
,
/* 195 */
"fill_opt ::= FILL LP ID COMMA tagitemlist RP"
,
/* 196 */
"fill_opt ::= FILL LP ID RP"
,
/* 197 */
"sliding_opt ::= SLIDING LP tmvar RP"
,
/* 198 */
"sliding_opt ::="
,
/* 199 */
"orderby_opt ::="
,
/* 200 */
"orderby_opt ::= ORDER BY sortlist"
,
/* 201 */
"sortlist ::= sortlist COMMA item sortorder"
,
/* 202 */
"sortlist ::= item sortorder"
,
/* 203 */
"item ::= ids cpxName"
,
/* 204 */
"sortorder ::= ASC"
,
/* 205 */
"sortorder ::= DESC"
,
/* 206 */
"sortorder ::="
,
/* 207 */
"groupby_opt ::="
,
/* 208 */
"groupby_opt ::= GROUP BY grouplist"
,
/* 209 */
"grouplist ::= grouplist COMMA item"
,
/* 210 */
"grouplist ::= item"
,
/* 211 */
"having_opt ::="
,
/* 212 */
"having_opt ::= HAVING expr"
,
/* 213 */
"limit_opt ::="
,
/* 214 */
"limit_opt ::= LIMIT signed"
,
/* 215 */
"limit_opt ::= LIMIT signed OFFSET signed"
,
/* 216 */
"limit_opt ::= LIMIT signed COMMA signed"
,
/* 217 */
"slimit_opt ::="
,
/* 218 */
"slimit_opt ::= SLIMIT signed"
,
/* 219 */
"slimit_opt ::= SLIMIT signed SOFFSET signed"
,
/* 220 */
"slimit_opt ::= SLIMIT signed COMMA signed"
,
/* 221 */
"where_opt ::="
,
/* 222 */
"where_opt ::= WHERE expr"
,
/* 223 */
"expr ::= LP expr RP"
,
/* 224 */
"expr ::= ID"
,
/* 225 */
"expr ::= ID DOT ID"
,
/* 226 */
"expr ::= ID DOT STAR"
,
/* 227 */
"expr ::= INTEGER"
,
/* 228 */
"expr ::= MINUS INTEGER"
,
/* 229 */
"expr ::= PLUS INTEGER"
,
/* 230 */
"expr ::= FLOAT"
,
/* 231 */
"expr ::= MINUS FLOAT"
,
/* 232 */
"expr ::= PLUS FLOAT"
,
/* 233 */
"expr ::= STRING"
,
/* 234 */
"expr ::= NOW"
,
/* 235 */
"expr ::= VARIABLE"
,
/* 236 */
"expr ::= PLUS VARIABLE"
,
/* 237 */
"expr ::= MINUS VARIABLE"
,
/* 238 */
"expr ::= BOOL"
,
/* 239 */
"expr ::= NULL"
,
/* 240 */
"expr ::= ID LP exprlist RP"
,
/* 241 */
"expr ::= ID LP STAR RP"
,
/* 242 */
"expr ::= expr IS NULL"
,
/* 243 */
"expr ::= expr IS NOT NULL"
,
/* 244 */
"expr ::= expr LT expr"
,
/* 245 */
"expr ::= expr GT expr"
,
/* 246 */
"expr ::= expr LE expr"
,
/* 247 */
"expr ::= expr GE expr"
,
/* 248 */
"expr ::= expr NE expr"
,
/* 249 */
"expr ::= expr EQ expr"
,
/* 250 */
"expr ::= expr BETWEEN expr AND expr"
,
/* 251 */
"expr ::= expr AND expr"
,
/* 252 */
"expr ::= expr OR expr"
,
/* 253 */
"expr ::= expr PLUS expr"
,
/* 254 */
"expr ::= expr MINUS expr"
,
/* 255 */
"expr ::= expr STAR expr"
,
/* 256 */
"expr ::= expr SLASH expr"
,
/* 257 */
"expr ::= expr REM expr"
,
/* 258 */
"expr ::= expr LIKE expr"
,
/* 259 */
"expr ::= expr IN LP exprlist RP"
,
/* 260 */
"exprlist ::= exprlist COMMA expritem"
,
/* 261 */
"exprlist ::= expritem"
,
/* 262 */
"expritem ::= expr"
,
/* 263 */
"expritem ::="
,
/* 264 */
"cmd ::= RESET QUERY CACHE"
,
/* 265 */
"cmd ::= SYNCDB ids REPLICA"
,
/* 266 */
"cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist"
,
/* 267 */
"cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids"
,
/* 268 */
"cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist"
,
/* 269 */
"cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist"
,
/* 270 */
"cmd ::= ALTER TABLE ids cpxName DROP TAG ids"
,
/* 271 */
"cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids"
,
/* 272 */
"cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem"
,
/* 273 */
"cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist"
,
/* 274 */
"cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist"
,
/* 275 */
"cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids"
,
/* 276 */
"cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist"
,
/* 277 */
"cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist"
,
/* 278 */
"cmd ::= ALTER STABLE ids cpxName DROP TAG ids"
,
/* 279 */
"cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids"
,
/* 280 */
"cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem"
,
/* 281 */
"cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist"
,
/* 282 */
"cmd ::= KILL CONNECTION INTEGER"
,
/* 283 */
"cmd ::= KILL STREAM INTEGER COLON INTEGER"
,
/* 284 */
"cmd ::= KILL QUERY INTEGER COLON INTEGER"
,
};
#endif
/* NDEBUG */
...
...
@@ -1957,133 +1958,134 @@ static const struct {
{
242
,
-
1
},
/* (154) tagitem ::= STRING */
{
242
,
-
1
},
/* (155) tagitem ::= BOOL */
{
242
,
-
1
},
/* (156) tagitem ::= NULL */
{
242
,
-
2
},
/* (157) tagitem ::= MINUS INTEGER */
{
242
,
-
2
},
/* (158) tagitem ::= MINUS FLOAT */
{
242
,
-
2
},
/* (159) tagitem ::= PLUS INTEGER */
{
242
,
-
2
},
/* (160) tagitem ::= PLUS FLOAT */
{
240
,
-
14
},
/* (161) 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 */
{
240
,
-
3
},
/* (162) select ::= LP select RP */
{
256
,
-
1
},
/* (163) union ::= select */
{
256
,
-
4
},
/* (164) union ::= union UNION ALL select */
{
192
,
-
1
},
/* (165) cmd ::= union */
{
240
,
-
2
},
/* (166) select ::= SELECT selcollist */
{
257
,
-
2
},
/* (167) sclp ::= selcollist COMMA */
{
257
,
0
},
/* (168) sclp ::= */
{
243
,
-
4
},
/* (169) selcollist ::= sclp distinct expr as */
{
243
,
-
2
},
/* (170) selcollist ::= sclp STAR */
{
260
,
-
2
},
/* (171) as ::= AS ids */
{
260
,
-
1
},
/* (172) as ::= ids */
{
260
,
0
},
/* (173) as ::= */
{
258
,
-
1
},
/* (174) distinct ::= DISTINCT */
{
258
,
0
},
/* (175) distinct ::= */
{
244
,
-
2
},
/* (176) from ::= FROM tablelist */
{
244
,
-
2
},
/* (177) from ::= FROM sub */
{
262
,
-
3
},
/* (178) sub ::= LP union RP */
{
262
,
-
4
},
/* (179) sub ::= LP union RP ids */
{
262
,
-
6
},
/* (180) sub ::= sub COMMA LP union RP ids */
{
261
,
-
2
},
/* (181) tablelist ::= ids cpxName */
{
261
,
-
3
},
/* (182) tablelist ::= ids cpxName ids */
{
261
,
-
4
},
/* (183) tablelist ::= tablelist COMMA ids cpxName */
{
261
,
-
5
},
/* (184) tablelist ::= tablelist COMMA ids cpxName ids */
{
263
,
-
1
},
/* (185) tmvar ::= VARIABLE */
{
246
,
-
4
},
/* (186) interval_opt ::= INTERVAL LP tmvar RP */
{
246
,
-
6
},
/* (187) interval_opt ::= INTERVAL LP tmvar COMMA tmvar RP */
{
246
,
0
},
/* (188) interval_opt ::= */
{
247
,
0
},
/* (189) session_option ::= */
{
247
,
-
7
},
/* (190) session_option ::= SESSION LP ids cpxName COMMA tmvar RP */
{
248
,
0
},
/* (191) windowstate_option ::= */
{
248
,
-
4
},
/* (192) windowstate_option ::= STATE_WINDOW LP ids RP */
{
249
,
0
},
/* (193) fill_opt ::= */
{
249
,
-
6
},
/* (194) fill_opt ::= FILL LP ID COMMA tagitemlist RP */
{
249
,
-
4
},
/* (195) fill_opt ::= FILL LP ID RP */
{
250
,
-
4
},
/* (196) sliding_opt ::= SLIDING LP tmvar RP */
{
250
,
0
},
/* (197) sliding_opt ::= */
{
252
,
0
},
/* (198) orderby_opt ::= */
{
252
,
-
3
},
/* (199) orderby_opt ::= ORDER BY sortlist */
{
264
,
-
4
},
/* (200) sortlist ::= sortlist COMMA item sortorder */
{
264
,
-
2
},
/* (201) sortlist ::= item sortorder */
{
266
,
-
2
},
/* (202) item ::= ids cpxName */
{
267
,
-
1
},
/* (203) sortorder ::= ASC */
{
267
,
-
1
},
/* (204) sortorder ::= DESC */
{
267
,
0
},
/* (205) sortorder ::= */
{
251
,
0
},
/* (206) groupby_opt ::= */
{
251
,
-
3
},
/* (207) groupby_opt ::= GROUP BY grouplist */
{
268
,
-
3
},
/* (208) grouplist ::= grouplist COMMA item */
{
268
,
-
1
},
/* (209) grouplist ::= item */
{
253
,
0
},
/* (210) having_opt ::= */
{
253
,
-
2
},
/* (211) having_opt ::= HAVING expr */
{
255
,
0
},
/* (212) limit_opt ::= */
{
255
,
-
2
},
/* (213) limit_opt ::= LIMIT signed */
{
255
,
-
4
},
/* (214) limit_opt ::= LIMIT signed OFFSET signed */
{
255
,
-
4
},
/* (215) limit_opt ::= LIMIT signed COMMA signed */
{
254
,
0
},
/* (216) slimit_opt ::= */
{
254
,
-
2
},
/* (217) slimit_opt ::= SLIMIT signed */
{
254
,
-
4
},
/* (218) slimit_opt ::= SLIMIT signed SOFFSET signed */
{
254
,
-
4
},
/* (219) slimit_opt ::= SLIMIT signed COMMA signed */
{
245
,
0
},
/* (220) where_opt ::= */
{
245
,
-
2
},
/* (221) where_opt ::= WHERE expr */
{
259
,
-
3
},
/* (222) expr ::= LP expr RP */
{
259
,
-
1
},
/* (223) expr ::= ID */
{
259
,
-
3
},
/* (224) expr ::= ID DOT ID */
{
259
,
-
3
},
/* (225) expr ::= ID DOT STAR */
{
259
,
-
1
},
/* (226) expr ::= INTEGER */
{
259
,
-
2
},
/* (227) expr ::= MINUS INTEGER */
{
259
,
-
2
},
/* (228) expr ::= PLUS INTEGER */
{
259
,
-
1
},
/* (229) expr ::= FLOAT */
{
259
,
-
2
},
/* (230) expr ::= MINUS FLOAT */
{
259
,
-
2
},
/* (231) expr ::= PLUS FLOAT */
{
259
,
-
1
},
/* (232) expr ::= STRING */
{
259
,
-
1
},
/* (233) expr ::= NOW */
{
259
,
-
1
},
/* (234) expr ::= VARIABLE */
{
259
,
-
2
},
/* (235) expr ::= PLUS VARIABLE */
{
259
,
-
2
},
/* (236) expr ::= MINUS VARIABLE */
{
259
,
-
1
},
/* (237) expr ::= BOOL */
{
259
,
-
1
},
/* (238) expr ::= NULL */
{
259
,
-
4
},
/* (239) expr ::= ID LP exprlist RP */
{
259
,
-
4
},
/* (240) expr ::= ID LP STAR RP */
{
259
,
-
3
},
/* (241) expr ::= expr IS NULL */
{
259
,
-
4
},
/* (242) expr ::= expr IS NOT NULL */
{
259
,
-
3
},
/* (243) expr ::= expr LT expr */
{
259
,
-
3
},
/* (244) expr ::= expr GT expr */
{
259
,
-
3
},
/* (245) expr ::= expr LE expr */
{
259
,
-
3
},
/* (246) expr ::= expr GE expr */
{
259
,
-
3
},
/* (247) expr ::= expr NE expr */
{
259
,
-
3
},
/* (248) expr ::= expr EQ expr */
{
259
,
-
5
},
/* (249) expr ::= expr BETWEEN expr AND expr */
{
259
,
-
3
},
/* (250) expr ::= expr AND expr */
{
259
,
-
3
},
/* (251) expr ::= expr OR expr */
{
259
,
-
3
},
/* (252) expr ::= expr PLUS expr */
{
259
,
-
3
},
/* (253) expr ::= expr MINUS expr */
{
259
,
-
3
},
/* (254) expr ::= expr STAR expr */
{
259
,
-
3
},
/* (255) expr ::= expr SLASH expr */
{
259
,
-
3
},
/* (256) expr ::= expr REM expr */
{
259
,
-
3
},
/* (257) expr ::= expr LIKE expr */
{
259
,
-
5
},
/* (258) expr ::= expr IN LP exprlist RP */
{
200
,
-
3
},
/* (259) exprlist ::= exprlist COMMA expritem */
{
200
,
-
1
},
/* (260) exprlist ::= expritem */
{
269
,
-
1
},
/* (261) expritem ::= expr */
{
269
,
0
},
/* (262) expritem ::= */
{
192
,
-
3
},
/* (263) cmd ::= RESET QUERY CACHE */
{
192
,
-
3
},
/* (264) cmd ::= SYNCDB ids REPLICA */
{
192
,
-
7
},
/* (265) cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */
{
192
,
-
7
},
/* (266) cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */
{
192
,
-
7
},
/* (267) cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */
{
192
,
-
7
},
/* (268) cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */
{
192
,
-
7
},
/* (269) cmd ::= ALTER TABLE ids cpxName DROP TAG ids */
{
192
,
-
8
},
/* (270) cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */
{
192
,
-
9
},
/* (271) cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */
{
192
,
-
7
},
/* (272) cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */
{
192
,
-
7
},
/* (273) cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */
{
192
,
-
7
},
/* (274) cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */
{
192
,
-
7
},
/* (275) cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */
{
192
,
-
7
},
/* (276) cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */
{
192
,
-
7
},
/* (277) cmd ::= ALTER STABLE ids cpxName DROP TAG ids */
{
192
,
-
8
},
/* (278) cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */
{
192
,
-
9
},
/* (279) cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem */
{
192
,
-
7
},
/* (280) cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */
{
192
,
-
3
},
/* (281) cmd ::= KILL CONNECTION INTEGER */
{
192
,
-
5
},
/* (282) cmd ::= KILL STREAM INTEGER COLON INTEGER */
{
192
,
-
5
},
/* (283) cmd ::= KILL QUERY INTEGER COLON INTEGER */
{
242
,
-
1
},
/* (157) tagitem ::= NOW */
{
242
,
-
2
},
/* (158) tagitem ::= MINUS INTEGER */
{
242
,
-
2
},
/* (159) tagitem ::= MINUS FLOAT */
{
242
,
-
2
},
/* (160) tagitem ::= PLUS INTEGER */
{
242
,
-
2
},
/* (161) tagitem ::= PLUS FLOAT */
{
240
,
-
14
},
/* (162) 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 */
{
240
,
-
3
},
/* (163) select ::= LP select RP */
{
256
,
-
1
},
/* (164) union ::= select */
{
256
,
-
4
},
/* (165) union ::= union UNION ALL select */
{
192
,
-
1
},
/* (166) cmd ::= union */
{
240
,
-
2
},
/* (167) select ::= SELECT selcollist */
{
257
,
-
2
},
/* (168) sclp ::= selcollist COMMA */
{
257
,
0
},
/* (169) sclp ::= */
{
243
,
-
4
},
/* (170) selcollist ::= sclp distinct expr as */
{
243
,
-
2
},
/* (171) selcollist ::= sclp STAR */
{
260
,
-
2
},
/* (172) as ::= AS ids */
{
260
,
-
1
},
/* (173) as ::= ids */
{
260
,
0
},
/* (174) as ::= */
{
258
,
-
1
},
/* (175) distinct ::= DISTINCT */
{
258
,
0
},
/* (176) distinct ::= */
{
244
,
-
2
},
/* (177) from ::= FROM tablelist */
{
244
,
-
2
},
/* (178) from ::= FROM sub */
{
262
,
-
3
},
/* (179) sub ::= LP union RP */
{
262
,
-
4
},
/* (180) sub ::= LP union RP ids */
{
262
,
-
6
},
/* (181) sub ::= sub COMMA LP union RP ids */
{
261
,
-
2
},
/* (182) tablelist ::= ids cpxName */
{
261
,
-
3
},
/* (183) tablelist ::= ids cpxName ids */
{
261
,
-
4
},
/* (184) tablelist ::= tablelist COMMA ids cpxName */
{
261
,
-
5
},
/* (185) tablelist ::= tablelist COMMA ids cpxName ids */
{
263
,
-
1
},
/* (186) tmvar ::= VARIABLE */
{
246
,
-
4
},
/* (187) interval_opt ::= INTERVAL LP tmvar RP */
{
246
,
-
6
},
/* (188) interval_opt ::= INTERVAL LP tmvar COMMA tmvar RP */
{
246
,
0
},
/* (189) interval_opt ::= */
{
247
,
0
},
/* (190) session_option ::= */
{
247
,
-
7
},
/* (191) session_option ::= SESSION LP ids cpxName COMMA tmvar RP */
{
248
,
0
},
/* (192) windowstate_option ::= */
{
248
,
-
4
},
/* (193) windowstate_option ::= STATE_WINDOW LP ids RP */
{
249
,
0
},
/* (194) fill_opt ::= */
{
249
,
-
6
},
/* (195) fill_opt ::= FILL LP ID COMMA tagitemlist RP */
{
249
,
-
4
},
/* (196) fill_opt ::= FILL LP ID RP */
{
250
,
-
4
},
/* (197) sliding_opt ::= SLIDING LP tmvar RP */
{
250
,
0
},
/* (198) sliding_opt ::= */
{
252
,
0
},
/* (199) orderby_opt ::= */
{
252
,
-
3
},
/* (200) orderby_opt ::= ORDER BY sortlist */
{
264
,
-
4
},
/* (201) sortlist ::= sortlist COMMA item sortorder */
{
264
,
-
2
},
/* (202) sortlist ::= item sortorder */
{
266
,
-
2
},
/* (203) item ::= ids cpxName */
{
267
,
-
1
},
/* (204) sortorder ::= ASC */
{
267
,
-
1
},
/* (205) sortorder ::= DESC */
{
267
,
0
},
/* (206) sortorder ::= */
{
251
,
0
},
/* (207) groupby_opt ::= */
{
251
,
-
3
},
/* (208) groupby_opt ::= GROUP BY grouplist */
{
268
,
-
3
},
/* (209) grouplist ::= grouplist COMMA item */
{
268
,
-
1
},
/* (210) grouplist ::= item */
{
253
,
0
},
/* (211) having_opt ::= */
{
253
,
-
2
},
/* (212) having_opt ::= HAVING expr */
{
255
,
0
},
/* (213) limit_opt ::= */
{
255
,
-
2
},
/* (214) limit_opt ::= LIMIT signed */
{
255
,
-
4
},
/* (215) limit_opt ::= LIMIT signed OFFSET signed */
{
255
,
-
4
},
/* (216) limit_opt ::= LIMIT signed COMMA signed */
{
254
,
0
},
/* (217) slimit_opt ::= */
{
254
,
-
2
},
/* (218) slimit_opt ::= SLIMIT signed */
{
254
,
-
4
},
/* (219) slimit_opt ::= SLIMIT signed SOFFSET signed */
{
254
,
-
4
},
/* (220) slimit_opt ::= SLIMIT signed COMMA signed */
{
245
,
0
},
/* (221) where_opt ::= */
{
245
,
-
2
},
/* (222) where_opt ::= WHERE expr */
{
259
,
-
3
},
/* (223) expr ::= LP expr RP */
{
259
,
-
1
},
/* (224) expr ::= ID */
{
259
,
-
3
},
/* (225) expr ::= ID DOT ID */
{
259
,
-
3
},
/* (226) expr ::= ID DOT STAR */
{
259
,
-
1
},
/* (227) expr ::= INTEGER */
{
259
,
-
2
},
/* (228) expr ::= MINUS INTEGER */
{
259
,
-
2
},
/* (229) expr ::= PLUS INTEGER */
{
259
,
-
1
},
/* (230) expr ::= FLOAT */
{
259
,
-
2
},
/* (231) expr ::= MINUS FLOAT */
{
259
,
-
2
},
/* (232) expr ::= PLUS FLOAT */
{
259
,
-
1
},
/* (233) expr ::= STRING */
{
259
,
-
1
},
/* (234) expr ::= NOW */
{
259
,
-
1
},
/* (235) expr ::= VARIABLE */
{
259
,
-
2
},
/* (236) expr ::= PLUS VARIABLE */
{
259
,
-
2
},
/* (237) expr ::= MINUS VARIABLE */
{
259
,
-
1
},
/* (238) expr ::= BOOL */
{
259
,
-
1
},
/* (239) expr ::= NULL */
{
259
,
-
4
},
/* (240) expr ::= ID LP exprlist RP */
{
259
,
-
4
},
/* (241) expr ::= ID LP STAR RP */
{
259
,
-
3
},
/* (242) expr ::= expr IS NULL */
{
259
,
-
4
},
/* (243) expr ::= expr IS NOT NULL */
{
259
,
-
3
},
/* (244) expr ::= expr LT expr */
{
259
,
-
3
},
/* (245) expr ::= expr GT expr */
{
259
,
-
3
},
/* (246) expr ::= expr LE expr */
{
259
,
-
3
},
/* (247) expr ::= expr GE expr */
{
259
,
-
3
},
/* (248) expr ::= expr NE expr */
{
259
,
-
3
},
/* (249) expr ::= expr EQ expr */
{
259
,
-
5
},
/* (250) expr ::= expr BETWEEN expr AND expr */
{
259
,
-
3
},
/* (251) expr ::= expr AND expr */
{
259
,
-
3
},
/* (252) expr ::= expr OR expr */
{
259
,
-
3
},
/* (253) expr ::= expr PLUS expr */
{
259
,
-
3
},
/* (254) expr ::= expr MINUS expr */
{
259
,
-
3
},
/* (255) expr ::= expr STAR expr */
{
259
,
-
3
},
/* (256) expr ::= expr SLASH expr */
{
259
,
-
3
},
/* (257) expr ::= expr REM expr */
{
259
,
-
3
},
/* (258) expr ::= expr LIKE expr */
{
259
,
-
5
},
/* (259) expr ::= expr IN LP exprlist RP */
{
200
,
-
3
},
/* (260) exprlist ::= exprlist COMMA expritem */
{
200
,
-
1
},
/* (261) exprlist ::= expritem */
{
269
,
-
1
},
/* (262) expritem ::= expr */
{
269
,
0
},
/* (263) expritem ::= */
{
192
,
-
3
},
/* (264) cmd ::= RESET QUERY CACHE */
{
192
,
-
3
},
/* (265) cmd ::= SYNCDB ids REPLICA */
{
192
,
-
7
},
/* (266) cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */
{
192
,
-
7
},
/* (267) cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */
{
192
,
-
7
},
/* (268) cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */
{
192
,
-
7
},
/* (269) cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */
{
192
,
-
7
},
/* (270) cmd ::= ALTER TABLE ids cpxName DROP TAG ids */
{
192
,
-
8
},
/* (271) cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */
{
192
,
-
9
},
/* (272) cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */
{
192
,
-
7
},
/* (273) cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */
{
192
,
-
7
},
/* (274) cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */
{
192
,
-
7
},
/* (275) cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */
{
192
,
-
7
},
/* (276) cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */
{
192
,
-
7
},
/* (277) cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */
{
192
,
-
7
},
/* (278) cmd ::= ALTER STABLE ids cpxName DROP TAG ids */
{
192
,
-
8
},
/* (279) cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */
{
192
,
-
9
},
/* (280) cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem */
{
192
,
-
7
},
/* (281) cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */
{
192
,
-
3
},
/* (282) cmd ::= KILL CONNECTION INTEGER */
{
192
,
-
5
},
/* (283) cmd ::= KILL STREAM INTEGER COLON INTEGER */
{
192
,
-
5
},
/* (284) cmd ::= KILL QUERY INTEGER COLON INTEGER */
};
static
void
yy_accept
(
yyParser
*
);
/* Forward Declaration */
...
...
@@ -2357,7 +2359,7 @@ static void yy_reduce(
break
;
case
52
:
/* ifexists ::= */
case
54
:
/* ifnotexists ::= */
yytestcase
(
yyruleno
==
54
);
case
17
5
:
/* distinct ::= */
yytestcase
(
yyruleno
==
175
);
case
17
6
:
/* distinct ::= */
yytestcase
(
yyruleno
==
176
);
{
yymsp
[
1
].
minor
.
yy0
.
n
=
0
;}
break
;
case
53
:
/* ifnotexists ::= IF NOT EXISTS */
...
...
@@ -2665,10 +2667,14 @@ static void yy_reduce(
{
yymsp
[
0
].
minor
.
yy0
.
type
=
0
;
tVariantCreate
(
&
yylhsminor
.
yy506
,
&
yymsp
[
0
].
minor
.
yy0
);
}
yymsp
[
0
].
minor
.
yy506
=
yylhsminor
.
yy506
;
break
;
case
157
:
/* tagitem ::= MINUS INTEGER */
case
158
:
/* tagitem ::= MINUS FLOAT */
yytestcase
(
yyruleno
==
158
);
case
159
:
/* tagitem ::= PLUS INTEGER */
yytestcase
(
yyruleno
==
159
);
case
160
:
/* tagitem ::= PLUS FLOAT */
yytestcase
(
yyruleno
==
160
);
case
157
:
/* tagitem ::= NOW */
{
yymsp
[
0
].
minor
.
yy0
.
type
=
TSDB_DATA_TYPE_TIMESTAMP
;
tVariantCreate
(
&
yylhsminor
.
yy506
,
&
yymsp
[
0
].
minor
.
yy0
);}
yymsp
[
0
].
minor
.
yy506
=
yylhsminor
.
yy506
;
break
;
case
158
:
/* tagitem ::= MINUS INTEGER */
case
159
:
/* tagitem ::= MINUS FLOAT */
yytestcase
(
yyruleno
==
159
);
case
160
:
/* tagitem ::= PLUS INTEGER */
yytestcase
(
yyruleno
==
160
);
case
161
:
/* tagitem ::= PLUS FLOAT */
yytestcase
(
yyruleno
==
161
);
{
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
yymsp
[
-
1
].
minor
.
yy0
.
type
=
yymsp
[
0
].
minor
.
yy0
.
type
;
...
...
@@ -2677,142 +2683,142 @@ static void yy_reduce(
}
yymsp
[
-
1
].
minor
.
yy506
=
yylhsminor
.
yy506
;
break
;
case
16
1
:
/* 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 */
case
16
2
:
/* 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
.
yy236
=
tSetQuerySqlNode
(
&
yymsp
[
-
13
].
minor
.
yy0
,
yymsp
[
-
12
].
minor
.
yy441
,
yymsp
[
-
11
].
minor
.
yy244
,
yymsp
[
-
10
].
minor
.
yy166
,
yymsp
[
-
4
].
minor
.
yy441
,
yymsp
[
-
3
].
minor
.
yy441
,
&
yymsp
[
-
9
].
minor
.
yy340
,
&
yymsp
[
-
8
].
minor
.
yy259
,
&
yymsp
[
-
7
].
minor
.
yy348
,
&
yymsp
[
-
5
].
minor
.
yy0
,
yymsp
[
-
6
].
minor
.
yy441
,
&
yymsp
[
0
].
minor
.
yy414
,
&
yymsp
[
-
1
].
minor
.
yy414
,
yymsp
[
-
2
].
minor
.
yy166
);
}
yymsp
[
-
13
].
minor
.
yy236
=
yylhsminor
.
yy236
;
break
;
case
16
2
:
/* select ::= LP select RP */
case
16
3
:
/* select ::= LP select RP */
{
yymsp
[
-
2
].
minor
.
yy236
=
yymsp
[
-
1
].
minor
.
yy236
;}
break
;
case
16
3
:
/* union ::= select */
case
16
4
:
/* union ::= select */
{
yylhsminor
.
yy441
=
setSubclause
(
NULL
,
yymsp
[
0
].
minor
.
yy236
);
}
yymsp
[
0
].
minor
.
yy441
=
yylhsminor
.
yy441
;
break
;
case
16
4
:
/* union ::= union UNION ALL select */
case
16
5
:
/* union ::= union UNION ALL select */
{
yylhsminor
.
yy441
=
appendSelectClause
(
yymsp
[
-
3
].
minor
.
yy441
,
yymsp
[
0
].
minor
.
yy236
);
}
yymsp
[
-
3
].
minor
.
yy441
=
yylhsminor
.
yy441
;
break
;
case
16
5
:
/* cmd ::= union */
case
16
6
:
/* cmd ::= union */
{
setSqlInfo
(
pInfo
,
yymsp
[
0
].
minor
.
yy441
,
NULL
,
TSDB_SQL_SELECT
);
}
break
;
case
16
6
:
/* select ::= SELECT selcollist */
case
16
7
:
/* select ::= SELECT selcollist */
{
yylhsminor
.
yy236
=
tSetQuerySqlNode
(
&
yymsp
[
-
1
].
minor
.
yy0
,
yymsp
[
0
].
minor
.
yy441
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
);
}
yymsp
[
-
1
].
minor
.
yy236
=
yylhsminor
.
yy236
;
break
;
case
16
7
:
/* sclp ::= selcollist COMMA */
case
16
8
:
/* sclp ::= selcollist COMMA */
{
yylhsminor
.
yy441
=
yymsp
[
-
1
].
minor
.
yy441
;}
yymsp
[
-
1
].
minor
.
yy441
=
yylhsminor
.
yy441
;
break
;
case
16
8
:
/* sclp ::= */
case
19
8
:
/* orderby_opt ::= */
yytestcase
(
yyruleno
==
198
);
case
16
9
:
/* sclp ::= */
case
19
9
:
/* orderby_opt ::= */
yytestcase
(
yyruleno
==
199
);
{
yymsp
[
1
].
minor
.
yy441
=
0
;}
break
;
case
1
69
:
/* selcollist ::= sclp distinct expr as */
case
1
70
:
/* selcollist ::= sclp distinct expr as */
{
yylhsminor
.
yy441
=
tSqlExprListAppend
(
yymsp
[
-
3
].
minor
.
yy441
,
yymsp
[
-
1
].
minor
.
yy166
,
yymsp
[
-
2
].
minor
.
yy0
.
n
?
&
yymsp
[
-
2
].
minor
.
yy0
:
0
,
yymsp
[
0
].
minor
.
yy0
.
n
?&
yymsp
[
0
].
minor
.
yy0
:
0
);
}
yymsp
[
-
3
].
minor
.
yy441
=
yylhsminor
.
yy441
;
break
;
case
17
0
:
/* selcollist ::= sclp STAR */
case
17
1
:
/* selcollist ::= sclp STAR */
{
tSqlExpr
*
pNode
=
tSqlExprCreateIdValue
(
NULL
,
TK_ALL
);
yylhsminor
.
yy441
=
tSqlExprListAppend
(
yymsp
[
-
1
].
minor
.
yy441
,
pNode
,
0
,
0
);
}
yymsp
[
-
1
].
minor
.
yy441
=
yylhsminor
.
yy441
;
break
;
case
17
1
:
/* as ::= AS ids */
case
17
2
:
/* as ::= AS ids */
{
yymsp
[
-
1
].
minor
.
yy0
=
yymsp
[
0
].
minor
.
yy0
;
}
break
;
case
17
2
:
/* as ::= ids */
case
17
3
:
/* as ::= ids */
{
yylhsminor
.
yy0
=
yymsp
[
0
].
minor
.
yy0
;
}
yymsp
[
0
].
minor
.
yy0
=
yylhsminor
.
yy0
;
break
;
case
17
3
:
/* as ::= */
case
17
4
:
/* as ::= */
{
yymsp
[
1
].
minor
.
yy0
.
n
=
0
;
}
break
;
case
17
4
:
/* distinct ::= DISTINCT */
case
17
5
:
/* distinct ::= DISTINCT */
{
yylhsminor
.
yy0
=
yymsp
[
0
].
minor
.
yy0
;
}
yymsp
[
0
].
minor
.
yy0
=
yylhsminor
.
yy0
;
break
;
case
17
6
:
/* from ::= FROM tablelist */
case
17
7
:
/* from ::= FROM sub */
yytestcase
(
yyruleno
==
177
);
case
17
7
:
/* from ::= FROM tablelist */
case
17
8
:
/* from ::= FROM sub */
yytestcase
(
yyruleno
==
178
);
{
yymsp
[
-
1
].
minor
.
yy244
=
yymsp
[
0
].
minor
.
yy244
;}
break
;
case
17
8
:
/* sub ::= LP union RP */
case
17
9
:
/* sub ::= LP union RP */
{
yymsp
[
-
2
].
minor
.
yy244
=
addSubqueryElem
(
NULL
,
yymsp
[
-
1
].
minor
.
yy441
,
NULL
);}
break
;
case
1
79
:
/* sub ::= LP union RP ids */
case
1
80
:
/* sub ::= LP union RP ids */
{
yymsp
[
-
3
].
minor
.
yy244
=
addSubqueryElem
(
NULL
,
yymsp
[
-
2
].
minor
.
yy441
,
&
yymsp
[
0
].
minor
.
yy0
);}
break
;
case
18
0
:
/* sub ::= sub COMMA LP union RP ids */
case
18
1
:
/* sub ::= sub COMMA LP union RP ids */
{
yylhsminor
.
yy244
=
addSubqueryElem
(
yymsp
[
-
5
].
minor
.
yy244
,
yymsp
[
-
2
].
minor
.
yy441
,
&
yymsp
[
0
].
minor
.
yy0
);}
yymsp
[
-
5
].
minor
.
yy244
=
yylhsminor
.
yy244
;
break
;
case
18
1
:
/* tablelist ::= ids cpxName */
case
18
2
:
/* tablelist ::= ids cpxName */
{
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
yylhsminor
.
yy244
=
setTableNameList
(
NULL
,
&
yymsp
[
-
1
].
minor
.
yy0
,
NULL
);
}
yymsp
[
-
1
].
minor
.
yy244
=
yylhsminor
.
yy244
;
break
;
case
18
2
:
/* tablelist ::= ids cpxName ids */
case
18
3
:
/* tablelist ::= ids cpxName ids */
{
yymsp
[
-
2
].
minor
.
yy0
.
n
+=
yymsp
[
-
1
].
minor
.
yy0
.
n
;
yylhsminor
.
yy244
=
setTableNameList
(
NULL
,
&
yymsp
[
-
2
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
);
}
yymsp
[
-
2
].
minor
.
yy244
=
yylhsminor
.
yy244
;
break
;
case
18
3
:
/* tablelist ::= tablelist COMMA ids cpxName */
case
18
4
:
/* tablelist ::= tablelist COMMA ids cpxName */
{
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
yylhsminor
.
yy244
=
setTableNameList
(
yymsp
[
-
3
].
minor
.
yy244
,
&
yymsp
[
-
1
].
minor
.
yy0
,
NULL
);
}
yymsp
[
-
3
].
minor
.
yy244
=
yylhsminor
.
yy244
;
break
;
case
18
4
:
/* tablelist ::= tablelist COMMA ids cpxName ids */
case
18
5
:
/* tablelist ::= tablelist COMMA ids cpxName ids */
{
yymsp
[
-
2
].
minor
.
yy0
.
n
+=
yymsp
[
-
1
].
minor
.
yy0
.
n
;
yylhsminor
.
yy244
=
setTableNameList
(
yymsp
[
-
4
].
minor
.
yy244
,
&
yymsp
[
-
2
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
);
}
yymsp
[
-
4
].
minor
.
yy244
=
yylhsminor
.
yy244
;
break
;
case
18
5
:
/* tmvar ::= VARIABLE */
case
18
6
:
/* tmvar ::= VARIABLE */
{
yylhsminor
.
yy0
=
yymsp
[
0
].
minor
.
yy0
;}
yymsp
[
0
].
minor
.
yy0
=
yylhsminor
.
yy0
;
break
;
case
18
6
:
/* interval_opt ::= INTERVAL LP tmvar RP */
case
18
7
:
/* interval_opt ::= INTERVAL LP tmvar RP */
{
yymsp
[
-
3
].
minor
.
yy340
.
interval
=
yymsp
[
-
1
].
minor
.
yy0
;
yymsp
[
-
3
].
minor
.
yy340
.
offset
.
n
=
0
;}
break
;
case
18
7
:
/* interval_opt ::= INTERVAL LP tmvar COMMA tmvar RP */
case
18
8
:
/* interval_opt ::= INTERVAL LP tmvar COMMA tmvar RP */
{
yymsp
[
-
5
].
minor
.
yy340
.
interval
=
yymsp
[
-
3
].
minor
.
yy0
;
yymsp
[
-
5
].
minor
.
yy340
.
offset
=
yymsp
[
-
1
].
minor
.
yy0
;}
break
;
case
18
8
:
/* interval_opt ::= */
case
18
9
:
/* interval_opt ::= */
{
memset
(
&
yymsp
[
1
].
minor
.
yy340
,
0
,
sizeof
(
yymsp
[
1
].
minor
.
yy340
));}
break
;
case
1
89
:
/* session_option ::= */
case
1
90
:
/* session_option ::= */
{
yymsp
[
1
].
minor
.
yy259
.
col
.
n
=
0
;
yymsp
[
1
].
minor
.
yy259
.
gap
.
n
=
0
;}
break
;
case
19
0
:
/* session_option ::= SESSION LP ids cpxName COMMA tmvar RP */
case
19
1
:
/* session_option ::= SESSION LP ids cpxName COMMA tmvar RP */
{
yymsp
[
-
4
].
minor
.
yy0
.
n
+=
yymsp
[
-
3
].
minor
.
yy0
.
n
;
yymsp
[
-
6
].
minor
.
yy259
.
col
=
yymsp
[
-
4
].
minor
.
yy0
;
yymsp
[
-
6
].
minor
.
yy259
.
gap
=
yymsp
[
-
1
].
minor
.
yy0
;
}
break
;
case
19
1
:
/* windowstate_option ::= */
case
19
2
:
/* windowstate_option ::= */
{
yymsp
[
1
].
minor
.
yy348
.
col
.
n
=
0
;
yymsp
[
1
].
minor
.
yy348
.
col
.
z
=
NULL
;}
break
;
case
19
2
:
/* windowstate_option ::= STATE_WINDOW LP ids RP */
case
19
3
:
/* windowstate_option ::= STATE_WINDOW LP ids RP */
{
yymsp
[
-
3
].
minor
.
yy348
.
col
=
yymsp
[
-
1
].
minor
.
yy0
;
}
break
;
case
19
3
:
/* fill_opt ::= */
case
19
4
:
/* fill_opt ::= */
{
yymsp
[
1
].
minor
.
yy441
=
0
;
}
break
;
case
19
4
:
/* fill_opt ::= FILL LP ID COMMA tagitemlist RP */
case
19
5
:
/* fill_opt ::= FILL LP ID COMMA tagitemlist RP */
{
tVariant
A
=
{
0
};
toTSDBType
(
yymsp
[
-
3
].
minor
.
yy0
.
type
);
...
...
@@ -2822,34 +2828,34 @@ static void yy_reduce(
yymsp
[
-
5
].
minor
.
yy441
=
yymsp
[
-
1
].
minor
.
yy441
;
}
break
;
case
19
5
:
/* fill_opt ::= FILL LP ID RP */
case
19
6
:
/* fill_opt ::= FILL LP ID RP */
{
toTSDBType
(
yymsp
[
-
1
].
minor
.
yy0
.
type
);
yymsp
[
-
3
].
minor
.
yy441
=
tVariantListAppendToken
(
NULL
,
&
yymsp
[
-
1
].
minor
.
yy0
,
-
1
);
}
break
;
case
19
6
:
/* sliding_opt ::= SLIDING LP tmvar RP */
case
19
7
:
/* sliding_opt ::= SLIDING LP tmvar RP */
{
yymsp
[
-
3
].
minor
.
yy0
=
yymsp
[
-
1
].
minor
.
yy0
;
}
break
;
case
19
7
:
/* sliding_opt ::= */
case
19
8
:
/* sliding_opt ::= */
{
yymsp
[
1
].
minor
.
yy0
.
n
=
0
;
yymsp
[
1
].
minor
.
yy0
.
z
=
NULL
;
yymsp
[
1
].
minor
.
yy0
.
type
=
0
;
}
break
;
case
199
:
/* orderby_opt ::= ORDER BY sortlist */
case
200
:
/* orderby_opt ::= ORDER BY sortlist */
{
yymsp
[
-
2
].
minor
.
yy441
=
yymsp
[
0
].
minor
.
yy441
;}
break
;
case
20
0
:
/* sortlist ::= sortlist COMMA item sortorder */
case
20
1
:
/* sortlist ::= sortlist COMMA item sortorder */
{
yylhsminor
.
yy441
=
tVariantListAppend
(
yymsp
[
-
3
].
minor
.
yy441
,
&
yymsp
[
-
1
].
minor
.
yy506
,
yymsp
[
0
].
minor
.
yy112
);
}
yymsp
[
-
3
].
minor
.
yy441
=
yylhsminor
.
yy441
;
break
;
case
20
1
:
/* sortlist ::= item sortorder */
case
20
2
:
/* sortlist ::= item sortorder */
{
yylhsminor
.
yy441
=
tVariantListAppend
(
NULL
,
&
yymsp
[
-
1
].
minor
.
yy506
,
yymsp
[
0
].
minor
.
yy112
);
}
yymsp
[
-
1
].
minor
.
yy441
=
yylhsminor
.
yy441
;
break
;
case
20
2
:
/* item ::= ids cpxName */
case
20
3
:
/* item ::= ids cpxName */
{
toTSDBType
(
yymsp
[
-
1
].
minor
.
yy0
.
type
);
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
...
...
@@ -2858,227 +2864,227 @@ static void yy_reduce(
}
yymsp
[
-
1
].
minor
.
yy506
=
yylhsminor
.
yy506
;
break
;
case
20
3
:
/* sortorder ::= ASC */
case
20
4
:
/* sortorder ::= ASC */
{
yymsp
[
0
].
minor
.
yy112
=
TSDB_ORDER_ASC
;
}
break
;
case
20
4
:
/* sortorder ::= DESC */
case
20
5
:
/* sortorder ::= DESC */
{
yymsp
[
0
].
minor
.
yy112
=
TSDB_ORDER_DESC
;}
break
;
case
20
5
:
/* sortorder ::= */
case
20
6
:
/* sortorder ::= */
{
yymsp
[
1
].
minor
.
yy112
=
TSDB_ORDER_ASC
;
}
break
;
case
20
6
:
/* groupby_opt ::= */
case
20
7
:
/* groupby_opt ::= */
{
yymsp
[
1
].
minor
.
yy441
=
0
;}
break
;
case
20
7
:
/* groupby_opt ::= GROUP BY grouplist */
case
20
8
:
/* groupby_opt ::= GROUP BY grouplist */
{
yymsp
[
-
2
].
minor
.
yy441
=
yymsp
[
0
].
minor
.
yy441
;}
break
;
case
20
8
:
/* grouplist ::= grouplist COMMA item */
case
20
9
:
/* grouplist ::= grouplist COMMA item */
{
yylhsminor
.
yy441
=
tVariantListAppend
(
yymsp
[
-
2
].
minor
.
yy441
,
&
yymsp
[
0
].
minor
.
yy506
,
-
1
);
}
yymsp
[
-
2
].
minor
.
yy441
=
yylhsminor
.
yy441
;
break
;
case
2
09
:
/* grouplist ::= item */
case
2
10
:
/* grouplist ::= item */
{
yylhsminor
.
yy441
=
tVariantListAppend
(
NULL
,
&
yymsp
[
0
].
minor
.
yy506
,
-
1
);
}
yymsp
[
0
].
minor
.
yy441
=
yylhsminor
.
yy441
;
break
;
case
21
0
:
/* having_opt ::= */
case
22
0
:
/* where_opt ::= */
yytestcase
(
yyruleno
==
220
);
case
26
2
:
/* expritem ::= */
yytestcase
(
yyruleno
==
262
);
case
21
1
:
/* having_opt ::= */
case
22
1
:
/* where_opt ::= */
yytestcase
(
yyruleno
==
221
);
case
26
3
:
/* expritem ::= */
yytestcase
(
yyruleno
==
263
);
{
yymsp
[
1
].
minor
.
yy166
=
0
;}
break
;
case
21
1
:
/* having_opt ::= HAVING expr */
case
22
1
:
/* where_opt ::= WHERE expr */
yytestcase
(
yyruleno
==
221
);
case
21
2
:
/* having_opt ::= HAVING expr */
case
22
2
:
/* where_opt ::= WHERE expr */
yytestcase
(
yyruleno
==
222
);
{
yymsp
[
-
1
].
minor
.
yy166
=
yymsp
[
0
].
minor
.
yy166
;}
break
;
case
21
2
:
/* limit_opt ::= */
case
21
6
:
/* slimit_opt ::= */
yytestcase
(
yyruleno
==
216
);
case
21
3
:
/* limit_opt ::= */
case
21
7
:
/* slimit_opt ::= */
yytestcase
(
yyruleno
==
217
);
{
yymsp
[
1
].
minor
.
yy414
.
limit
=
-
1
;
yymsp
[
1
].
minor
.
yy414
.
offset
=
0
;}
break
;
case
21
3
:
/* limit_opt ::= LIMIT signed */
case
21
7
:
/* slimit_opt ::= SLIMIT signed */
yytestcase
(
yyruleno
==
217
);
case
21
4
:
/* limit_opt ::= LIMIT signed */
case
21
8
:
/* slimit_opt ::= SLIMIT signed */
yytestcase
(
yyruleno
==
218
);
{
yymsp
[
-
1
].
minor
.
yy414
.
limit
=
yymsp
[
0
].
minor
.
yy369
;
yymsp
[
-
1
].
minor
.
yy414
.
offset
=
0
;}
break
;
case
21
4
:
/* limit_opt ::= LIMIT signed OFFSET signed */
case
21
5
:
/* limit_opt ::= LIMIT signed OFFSET signed */
{
yymsp
[
-
3
].
minor
.
yy414
.
limit
=
yymsp
[
-
2
].
minor
.
yy369
;
yymsp
[
-
3
].
minor
.
yy414
.
offset
=
yymsp
[
0
].
minor
.
yy369
;}
break
;
case
21
5
:
/* limit_opt ::= LIMIT signed COMMA signed */
case
21
6
:
/* limit_opt ::= LIMIT signed COMMA signed */
{
yymsp
[
-
3
].
minor
.
yy414
.
limit
=
yymsp
[
0
].
minor
.
yy369
;
yymsp
[
-
3
].
minor
.
yy414
.
offset
=
yymsp
[
-
2
].
minor
.
yy369
;}
break
;
case
21
8
:
/* slimit_opt ::= SLIMIT signed SOFFSET signed */
case
21
9
:
/* slimit_opt ::= SLIMIT signed SOFFSET signed */
{
yymsp
[
-
3
].
minor
.
yy414
.
limit
=
yymsp
[
-
2
].
minor
.
yy369
;
yymsp
[
-
3
].
minor
.
yy414
.
offset
=
yymsp
[
0
].
minor
.
yy369
;}
break
;
case
2
19
:
/* slimit_opt ::= SLIMIT signed COMMA signed */
case
2
20
:
/* slimit_opt ::= SLIMIT signed COMMA signed */
{
yymsp
[
-
3
].
minor
.
yy414
.
limit
=
yymsp
[
0
].
minor
.
yy369
;
yymsp
[
-
3
].
minor
.
yy414
.
offset
=
yymsp
[
-
2
].
minor
.
yy369
;}
break
;
case
22
2
:
/* expr ::= LP expr RP */
case
22
3
:
/* expr ::= LP expr RP */
{
yylhsminor
.
yy166
=
yymsp
[
-
1
].
minor
.
yy166
;
yylhsminor
.
yy166
->
token
.
z
=
yymsp
[
-
2
].
minor
.
yy0
.
z
;
yylhsminor
.
yy166
->
token
.
n
=
(
yymsp
[
0
].
minor
.
yy0
.
z
-
yymsp
[
-
2
].
minor
.
yy0
.
z
+
1
);}
yymsp
[
-
2
].
minor
.
yy166
=
yylhsminor
.
yy166
;
break
;
case
22
3
:
/* expr ::= ID */
case
22
4
:
/* expr ::= ID */
{
yylhsminor
.
yy166
=
tSqlExprCreateIdValue
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_ID
);}
yymsp
[
0
].
minor
.
yy166
=
yylhsminor
.
yy166
;
break
;
case
22
4
:
/* expr ::= ID DOT ID */
case
22
5
:
/* expr ::= ID DOT ID */
{
yymsp
[
-
2
].
minor
.
yy0
.
n
+=
(
1
+
yymsp
[
0
].
minor
.
yy0
.
n
);
yylhsminor
.
yy166
=
tSqlExprCreateIdValue
(
&
yymsp
[
-
2
].
minor
.
yy0
,
TK_ID
);}
yymsp
[
-
2
].
minor
.
yy166
=
yylhsminor
.
yy166
;
break
;
case
22
5
:
/* expr ::= ID DOT STAR */
case
22
6
:
/* expr ::= ID DOT STAR */
{
yymsp
[
-
2
].
minor
.
yy0
.
n
+=
(
1
+
yymsp
[
0
].
minor
.
yy0
.
n
);
yylhsminor
.
yy166
=
tSqlExprCreateIdValue
(
&
yymsp
[
-
2
].
minor
.
yy0
,
TK_ALL
);}
yymsp
[
-
2
].
minor
.
yy166
=
yylhsminor
.
yy166
;
break
;
case
22
6
:
/* expr ::= INTEGER */
case
22
7
:
/* expr ::= INTEGER */
{
yylhsminor
.
yy166
=
tSqlExprCreateIdValue
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_INTEGER
);}
yymsp
[
0
].
minor
.
yy166
=
yylhsminor
.
yy166
;
break
;
case
22
7
:
/* expr ::= MINUS INTEGER */
case
22
8
:
/* expr ::= PLUS INTEGER */
yytestcase
(
yyruleno
==
228
);
case
22
8
:
/* expr ::= MINUS INTEGER */
case
22
9
:
/* expr ::= PLUS INTEGER */
yytestcase
(
yyruleno
==
229
);
{
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
yymsp
[
-
1
].
minor
.
yy0
.
type
=
TK_INTEGER
;
yylhsminor
.
yy166
=
tSqlExprCreateIdValue
(
&
yymsp
[
-
1
].
minor
.
yy0
,
TK_INTEGER
);}
yymsp
[
-
1
].
minor
.
yy166
=
yylhsminor
.
yy166
;
break
;
case
2
29
:
/* expr ::= FLOAT */
case
2
30
:
/* expr ::= FLOAT */
{
yylhsminor
.
yy166
=
tSqlExprCreateIdValue
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_FLOAT
);}
yymsp
[
0
].
minor
.
yy166
=
yylhsminor
.
yy166
;
break
;
case
23
0
:
/* expr ::= MINUS FLOAT */
case
23
1
:
/* expr ::= PLUS FLOAT */
yytestcase
(
yyruleno
==
231
);
case
23
1
:
/* expr ::= MINUS FLOAT */
case
23
2
:
/* expr ::= PLUS FLOAT */
yytestcase
(
yyruleno
==
232
);
{
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
yymsp
[
-
1
].
minor
.
yy0
.
type
=
TK_FLOAT
;
yylhsminor
.
yy166
=
tSqlExprCreateIdValue
(
&
yymsp
[
-
1
].
minor
.
yy0
,
TK_FLOAT
);}
yymsp
[
-
1
].
minor
.
yy166
=
yylhsminor
.
yy166
;
break
;
case
23
2
:
/* expr ::= STRING */
case
23
3
:
/* expr ::= STRING */
{
yylhsminor
.
yy166
=
tSqlExprCreateIdValue
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_STRING
);}
yymsp
[
0
].
minor
.
yy166
=
yylhsminor
.
yy166
;
break
;
case
23
3
:
/* expr ::= NOW */
case
23
4
:
/* expr ::= NOW */
{
yylhsminor
.
yy166
=
tSqlExprCreateIdValue
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_NOW
);
}
yymsp
[
0
].
minor
.
yy166
=
yylhsminor
.
yy166
;
break
;
case
23
4
:
/* expr ::= VARIABLE */
case
23
5
:
/* expr ::= VARIABLE */
{
yylhsminor
.
yy166
=
tSqlExprCreateIdValue
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_VARIABLE
);}
yymsp
[
0
].
minor
.
yy166
=
yylhsminor
.
yy166
;
break
;
case
23
5
:
/* expr ::= PLUS VARIABLE */
case
23
6
:
/* expr ::= MINUS VARIABLE */
yytestcase
(
yyruleno
==
236
);
case
23
6
:
/* expr ::= PLUS VARIABLE */
case
23
7
:
/* expr ::= MINUS VARIABLE */
yytestcase
(
yyruleno
==
237
);
{
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
yymsp
[
-
1
].
minor
.
yy0
.
type
=
TK_VARIABLE
;
yylhsminor
.
yy166
=
tSqlExprCreateIdValue
(
&
yymsp
[
-
1
].
minor
.
yy0
,
TK_VARIABLE
);}
yymsp
[
-
1
].
minor
.
yy166
=
yylhsminor
.
yy166
;
break
;
case
23
7
:
/* expr ::= BOOL */
case
23
8
:
/* expr ::= BOOL */
{
yylhsminor
.
yy166
=
tSqlExprCreateIdValue
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_BOOL
);}
yymsp
[
0
].
minor
.
yy166
=
yylhsminor
.
yy166
;
break
;
case
23
8
:
/* expr ::= NULL */
case
23
9
:
/* expr ::= NULL */
{
yylhsminor
.
yy166
=
tSqlExprCreateIdValue
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_NULL
);}
yymsp
[
0
].
minor
.
yy166
=
yylhsminor
.
yy166
;
break
;
case
2
39
:
/* expr ::= ID LP exprlist RP */
case
2
40
:
/* expr ::= ID LP exprlist RP */
{
yylhsminor
.
yy166
=
tSqlExprCreateFunction
(
yymsp
[
-
1
].
minor
.
yy441
,
&
yymsp
[
-
3
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
,
yymsp
[
-
3
].
minor
.
yy0
.
type
);
}
yymsp
[
-
3
].
minor
.
yy166
=
yylhsminor
.
yy166
;
break
;
case
24
0
:
/* expr ::= ID LP STAR RP */
case
24
1
:
/* expr ::= ID LP STAR RP */
{
yylhsminor
.
yy166
=
tSqlExprCreateFunction
(
NULL
,
&
yymsp
[
-
3
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
,
yymsp
[
-
3
].
minor
.
yy0
.
type
);
}
yymsp
[
-
3
].
minor
.
yy166
=
yylhsminor
.
yy166
;
break
;
case
24
1
:
/* expr ::= expr IS NULL */
case
24
2
:
/* expr ::= expr IS NULL */
{
yylhsminor
.
yy166
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy166
,
NULL
,
TK_ISNULL
);}
yymsp
[
-
2
].
minor
.
yy166
=
yylhsminor
.
yy166
;
break
;
case
24
2
:
/* expr ::= expr IS NOT NULL */
case
24
3
:
/* expr ::= expr IS NOT NULL */
{
yylhsminor
.
yy166
=
tSqlExprCreate
(
yymsp
[
-
3
].
minor
.
yy166
,
NULL
,
TK_NOTNULL
);}
yymsp
[
-
3
].
minor
.
yy166
=
yylhsminor
.
yy166
;
break
;
case
24
3
:
/* expr ::= expr LT expr */
case
24
4
:
/* expr ::= expr LT expr */
{
yylhsminor
.
yy166
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy166
,
yymsp
[
0
].
minor
.
yy166
,
TK_LT
);}
yymsp
[
-
2
].
minor
.
yy166
=
yylhsminor
.
yy166
;
break
;
case
24
4
:
/* expr ::= expr GT expr */
case
24
5
:
/* expr ::= expr GT expr */
{
yylhsminor
.
yy166
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy166
,
yymsp
[
0
].
minor
.
yy166
,
TK_GT
);}
yymsp
[
-
2
].
minor
.
yy166
=
yylhsminor
.
yy166
;
break
;
case
24
5
:
/* expr ::= expr LE expr */
case
24
6
:
/* expr ::= expr LE expr */
{
yylhsminor
.
yy166
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy166
,
yymsp
[
0
].
minor
.
yy166
,
TK_LE
);}
yymsp
[
-
2
].
minor
.
yy166
=
yylhsminor
.
yy166
;
break
;
case
24
6
:
/* expr ::= expr GE expr */
case
24
7
:
/* expr ::= expr GE expr */
{
yylhsminor
.
yy166
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy166
,
yymsp
[
0
].
minor
.
yy166
,
TK_GE
);}
yymsp
[
-
2
].
minor
.
yy166
=
yylhsminor
.
yy166
;
break
;
case
24
7
:
/* expr ::= expr NE expr */
case
24
8
:
/* expr ::= expr NE expr */
{
yylhsminor
.
yy166
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy166
,
yymsp
[
0
].
minor
.
yy166
,
TK_NE
);}
yymsp
[
-
2
].
minor
.
yy166
=
yylhsminor
.
yy166
;
break
;
case
24
8
:
/* expr ::= expr EQ expr */
case
24
9
:
/* expr ::= expr EQ expr */
{
yylhsminor
.
yy166
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy166
,
yymsp
[
0
].
minor
.
yy166
,
TK_EQ
);}
yymsp
[
-
2
].
minor
.
yy166
=
yylhsminor
.
yy166
;
break
;
case
2
49
:
/* expr ::= expr BETWEEN expr AND expr */
case
2
50
:
/* expr ::= expr BETWEEN expr AND expr */
{
tSqlExpr
*
X2
=
tSqlExprClone
(
yymsp
[
-
4
].
minor
.
yy166
);
yylhsminor
.
yy166
=
tSqlExprCreate
(
tSqlExprCreate
(
yymsp
[
-
4
].
minor
.
yy166
,
yymsp
[
-
2
].
minor
.
yy166
,
TK_GE
),
tSqlExprCreate
(
X2
,
yymsp
[
0
].
minor
.
yy166
,
TK_LE
),
TK_AND
);}
yymsp
[
-
4
].
minor
.
yy166
=
yylhsminor
.
yy166
;
break
;
case
25
0
:
/* expr ::= expr AND expr */
case
25
1
:
/* expr ::= expr AND expr */
{
yylhsminor
.
yy166
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy166
,
yymsp
[
0
].
minor
.
yy166
,
TK_AND
);}
yymsp
[
-
2
].
minor
.
yy166
=
yylhsminor
.
yy166
;
break
;
case
25
1
:
/* expr ::= expr OR expr */
case
25
2
:
/* expr ::= expr OR expr */
{
yylhsminor
.
yy166
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy166
,
yymsp
[
0
].
minor
.
yy166
,
TK_OR
);
}
yymsp
[
-
2
].
minor
.
yy166
=
yylhsminor
.
yy166
;
break
;
case
25
2
:
/* expr ::= expr PLUS expr */
case
25
3
:
/* expr ::= expr PLUS expr */
{
yylhsminor
.
yy166
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy166
,
yymsp
[
0
].
minor
.
yy166
,
TK_PLUS
);
}
yymsp
[
-
2
].
minor
.
yy166
=
yylhsminor
.
yy166
;
break
;
case
25
3
:
/* expr ::= expr MINUS expr */
case
25
4
:
/* expr ::= expr MINUS expr */
{
yylhsminor
.
yy166
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy166
,
yymsp
[
0
].
minor
.
yy166
,
TK_MINUS
);
}
yymsp
[
-
2
].
minor
.
yy166
=
yylhsminor
.
yy166
;
break
;
case
25
4
:
/* expr ::= expr STAR expr */
case
25
5
:
/* expr ::= expr STAR expr */
{
yylhsminor
.
yy166
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy166
,
yymsp
[
0
].
minor
.
yy166
,
TK_STAR
);
}
yymsp
[
-
2
].
minor
.
yy166
=
yylhsminor
.
yy166
;
break
;
case
25
5
:
/* expr ::= expr SLASH expr */
case
25
6
:
/* expr ::= expr SLASH expr */
{
yylhsminor
.
yy166
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy166
,
yymsp
[
0
].
minor
.
yy166
,
TK_DIVIDE
);}
yymsp
[
-
2
].
minor
.
yy166
=
yylhsminor
.
yy166
;
break
;
case
25
6
:
/* expr ::= expr REM expr */
case
25
7
:
/* expr ::= expr REM expr */
{
yylhsminor
.
yy166
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy166
,
yymsp
[
0
].
minor
.
yy166
,
TK_REM
);
}
yymsp
[
-
2
].
minor
.
yy166
=
yylhsminor
.
yy166
;
break
;
case
25
7
:
/* expr ::= expr LIKE expr */
case
25
8
:
/* expr ::= expr LIKE expr */
{
yylhsminor
.
yy166
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy166
,
yymsp
[
0
].
minor
.
yy166
,
TK_LIKE
);
}
yymsp
[
-
2
].
minor
.
yy166
=
yylhsminor
.
yy166
;
break
;
case
25
8
:
/* expr ::= expr IN LP exprlist RP */
case
25
9
:
/* expr ::= expr IN LP exprlist RP */
{
yylhsminor
.
yy166
=
tSqlExprCreate
(
yymsp
[
-
4
].
minor
.
yy166
,
(
tSqlExpr
*
)
yymsp
[
-
1
].
minor
.
yy441
,
TK_IN
);
}
yymsp
[
-
4
].
minor
.
yy166
=
yylhsminor
.
yy166
;
break
;
case
2
59
:
/* exprlist ::= exprlist COMMA expritem */
case
2
60
:
/* exprlist ::= exprlist COMMA expritem */
{
yylhsminor
.
yy441
=
tSqlExprListAppend
(
yymsp
[
-
2
].
minor
.
yy441
,
yymsp
[
0
].
minor
.
yy166
,
0
,
0
);}
yymsp
[
-
2
].
minor
.
yy441
=
yylhsminor
.
yy441
;
break
;
case
26
0
:
/* exprlist ::= expritem */
case
26
1
:
/* exprlist ::= expritem */
{
yylhsminor
.
yy441
=
tSqlExprListAppend
(
0
,
yymsp
[
0
].
minor
.
yy166
,
0
,
0
);}
yymsp
[
0
].
minor
.
yy441
=
yylhsminor
.
yy441
;
break
;
case
26
1
:
/* expritem ::= expr */
case
26
2
:
/* expritem ::= expr */
{
yylhsminor
.
yy166
=
yymsp
[
0
].
minor
.
yy166
;}
yymsp
[
0
].
minor
.
yy166
=
yylhsminor
.
yy166
;
break
;
case
26
3
:
/* cmd ::= RESET QUERY CACHE */
case
26
4
:
/* cmd ::= RESET QUERY CACHE */
{
setDCLSqlElems
(
pInfo
,
TSDB_SQL_RESET_CACHE
,
0
);}
break
;
case
26
4
:
/* cmd ::= SYNCDB ids REPLICA */
case
26
5
:
/* cmd ::= SYNCDB ids REPLICA */
{
setDCLSqlElems
(
pInfo
,
TSDB_SQL_SYNC_DB_REPLICA
,
1
,
&
yymsp
[
-
1
].
minor
.
yy0
);}
break
;
case
26
5
:
/* cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */
case
26
6
:
/* 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
.
yy441
,
NULL
,
TSDB_ALTER_TABLE_ADD_COLUMN
,
-
1
);
setSqlInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
break
;
case
26
6
:
/* cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */
case
26
7
:
/* cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */
{
yymsp
[
-
4
].
minor
.
yy0
.
n
+=
yymsp
[
-
3
].
minor
.
yy0
.
n
;
...
...
@@ -3089,21 +3095,21 @@ static void yy_reduce(
setSqlInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
break
;
case
26
7
:
/* cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */
case
26
8
:
/* cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */
{
yymsp
[
-
4
].
minor
.
yy0
.
n
+=
yymsp
[
-
3
].
minor
.
yy0
.
n
;
SAlterTableInfo
*
pAlterTable
=
tSetAlterTableInfo
(
&
yymsp
[
-
4
].
minor
.
yy0
,
yymsp
[
0
].
minor
.
yy441
,
NULL
,
TSDB_ALTER_TABLE_CHANGE_COLUMN
,
-
1
);
setSqlInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
break
;
case
26
8
:
/* cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */
case
26
9
:
/* 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
.
yy441
,
NULL
,
TSDB_ALTER_TABLE_ADD_TAG_COLUMN
,
-
1
);
setSqlInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
break
;
case
2
69
:
/* cmd ::= ALTER TABLE ids cpxName DROP TAG ids */
case
2
70
:
/* cmd ::= ALTER TABLE ids cpxName DROP TAG ids */
{
yymsp
[
-
4
].
minor
.
yy0
.
n
+=
yymsp
[
-
3
].
minor
.
yy0
.
n
;
...
...
@@ -3114,7 +3120,7 @@ static void yy_reduce(
setSqlInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
break
;
case
27
0
:
/* cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */
case
27
1
:
/* cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */
{
yymsp
[
-
5
].
minor
.
yy0
.
n
+=
yymsp
[
-
4
].
minor
.
yy0
.
n
;
...
...
@@ -3128,7 +3134,7 @@ static void yy_reduce(
setSqlInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
break
;
case
27
1
:
/* cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */
case
27
2
:
/* cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */
{
yymsp
[
-
6
].
minor
.
yy0
.
n
+=
yymsp
[
-
5
].
minor
.
yy0
.
n
;
...
...
@@ -3140,21 +3146,21 @@ static void yy_reduce(
setSqlInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
break
;
case
27
2
:
/* cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */
case
27
3
:
/* cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */
{
yymsp
[
-
4
].
minor
.
yy0
.
n
+=
yymsp
[
-
3
].
minor
.
yy0
.
n
;
SAlterTableInfo
*
pAlterTable
=
tSetAlterTableInfo
(
&
yymsp
[
-
4
].
minor
.
yy0
,
yymsp
[
0
].
minor
.
yy441
,
NULL
,
TSDB_ALTER_TABLE_MODIFY_TAG_COLUMN
,
-
1
);
setSqlInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
break
;
case
27
3
:
/* cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */
case
27
4
:
/* cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */
{
yymsp
[
-
4
].
minor
.
yy0
.
n
+=
yymsp
[
-
3
].
minor
.
yy0
.
n
;
SAlterTableInfo
*
pAlterTable
=
tSetAlterTableInfo
(
&
yymsp
[
-
4
].
minor
.
yy0
,
yymsp
[
0
].
minor
.
yy441
,
NULL
,
TSDB_ALTER_TABLE_ADD_COLUMN
,
TSDB_SUPER_TABLE
);
setSqlInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
break
;
case
27
4
:
/* cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */
case
27
5
:
/* cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */
{
yymsp
[
-
4
].
minor
.
yy0
.
n
+=
yymsp
[
-
3
].
minor
.
yy0
.
n
;
...
...
@@ -3165,21 +3171,21 @@ static void yy_reduce(
setSqlInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
break
;
case
27
5
:
/* cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */
case
27
6
:
/* cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */
{
yymsp
[
-
4
].
minor
.
yy0
.
n
+=
yymsp
[
-
3
].
minor
.
yy0
.
n
;
SAlterTableInfo
*
pAlterTable
=
tSetAlterTableInfo
(
&
yymsp
[
-
4
].
minor
.
yy0
,
yymsp
[
0
].
minor
.
yy441
,
NULL
,
TSDB_ALTER_TABLE_CHANGE_COLUMN
,
TSDB_SUPER_TABLE
);
setSqlInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
break
;
case
27
6
:
/* cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */
case
27
7
:
/* 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
.
yy441
,
NULL
,
TSDB_ALTER_TABLE_ADD_TAG_COLUMN
,
TSDB_SUPER_TABLE
);
setSqlInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
break
;
case
27
7
:
/* cmd ::= ALTER STABLE ids cpxName DROP TAG ids */
case
27
8
:
/* cmd ::= ALTER STABLE ids cpxName DROP TAG ids */
{
yymsp
[
-
4
].
minor
.
yy0
.
n
+=
yymsp
[
-
3
].
minor
.
yy0
.
n
;
...
...
@@ -3190,7 +3196,7 @@ static void yy_reduce(
setSqlInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
break
;
case
27
8
:
/* cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */
case
27
9
:
/* cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */
{
yymsp
[
-
5
].
minor
.
yy0
.
n
+=
yymsp
[
-
4
].
minor
.
yy0
.
n
;
...
...
@@ -3204,7 +3210,7 @@ static void yy_reduce(
setSqlInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
break
;
case
2
79
:
/* cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem */
case
2
80
:
/* cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem */
{
yymsp
[
-
6
].
minor
.
yy0
.
n
+=
yymsp
[
-
5
].
minor
.
yy0
.
n
;
...
...
@@ -3216,20 +3222,20 @@ static void yy_reduce(
setSqlInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
break
;
case
28
0
:
/* cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */
case
28
1
:
/* cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */
{
yymsp
[
-
4
].
minor
.
yy0
.
n
+=
yymsp
[
-
3
].
minor
.
yy0
.
n
;
SAlterTableInfo
*
pAlterTable
=
tSetAlterTableInfo
(
&
yymsp
[
-
4
].
minor
.
yy0
,
yymsp
[
0
].
minor
.
yy441
,
NULL
,
TSDB_ALTER_TABLE_MODIFY_TAG_COLUMN
,
TSDB_SUPER_TABLE
);
setSqlInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
break
;
case
28
1
:
/* cmd ::= KILL CONNECTION INTEGER */
case
28
2
:
/* cmd ::= KILL CONNECTION INTEGER */
{
setKillSql
(
pInfo
,
TSDB_SQL_KILL_CONNECTION
,
&
yymsp
[
0
].
minor
.
yy0
);}
break
;
case
28
2
:
/* cmd ::= KILL STREAM INTEGER COLON INTEGER */
case
28
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
28
3
:
/* cmd ::= KILL QUERY INTEGER COLON INTEGER */
case
28
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/tsdb/src/tsdbRead.c
浏览文件 @
ceb2aa72
...
...
@@ -3355,11 +3355,16 @@ static bool tableFilterFp(const void* pNode, void* param) {
}
}
else
if
(
pInfo
->
optr
==
TSDB_RELATION_IN
)
{
int
type
=
pInfo
->
sch
.
type
;
if
(
type
==
TSDB_DATA_TYPE_BOOL
||
type
==
TSDB_DATA_TYPE_TINYINT
||
type
==
TSDB_DATA_TYPE_SMALLINT
||
type
==
TSDB_DATA_TYPE_BIGINT
||
type
==
TSDB_DATA_TYPE_INT
)
{
if
(
type
==
TSDB_DATA_TYPE_BOOL
||
IS_SIGNED_NUMERIC_TYPE
(
type
)
||
type
==
TSDB_DATA_TYPE_TIMESTAMP
)
{
int64_t
v
;
GET_TYPED_DATA
(
v
,
int64_t
,
pInfo
->
sch
.
type
,
val
);
return
NULL
!=
taosHashGet
((
SHashObj
*
)
pInfo
->
q
,
(
char
*
)
&
v
,
sizeof
(
v
));
}
else
if
(
type
==
TSDB_DATA_TYPE_DOUBLE
||
type
==
TSDB_DATA_TYPE_DOUBLE
)
{
}
else
if
(
IS_UNSIGNED_NUMERIC_TYPE
(
type
))
{
uint64_t
v
;
GET_TYPED_DATA
(
v
,
uint64_t
,
pInfo
->
sch
.
type
,
val
);
return
NULL
!=
taosHashGet
((
SHashObj
*
)
pInfo
->
q
,
(
char
*
)
&
v
,
sizeof
(
v
));
}
else
if
(
type
==
TSDB_DATA_TYPE_DOUBLE
||
type
==
TSDB_DATA_TYPE_DOUBLE
)
{
double
v
;
GET_TYPED_DATA
(
v
,
double
,
pInfo
->
sch
.
type
,
val
);
return
NULL
!=
taosHashGet
((
SHashObj
*
)
pInfo
->
q
,
(
char
*
)
&
v
,
sizeof
(
v
));
...
...
tests/pytest/fulltest.sh
浏览文件 @
ceb2aa72
...
...
@@ -73,6 +73,7 @@ python3 ./test.py -f tag_lite/int.py
python3 ./test.py
-f
tag_lite/set.py
python3 ./test.py
-f
tag_lite/smallint.py
python3 ./test.py
-f
tag_lite/tinyint.py
python3 ./test.py
-f
tag_lite/timestamp.py
#python3 ./test.py -f dbmgmt/database-name-boundary.py
python3 test.py
-f
dbmgmt/nanoSecondCheck.py
...
...
tests/pytest/functions/function_operations.py
浏览文件 @
ceb2aa72
...
...
@@ -16,7 +16,7 @@ import taos
from
util.log
import
*
from
util.cases
import
*
from
util.sql
import
*
import
numpy
as
np
#
import numpy as np
class
TDTestCase
:
...
...
tests/pytest/tag_lite/timestamp.py
0 → 100644
浏览文件 @
ceb2aa72
# -*- coding: utf-8 -*-
import
sys
from
util.log
import
*
from
util.cases
import
*
from
util.sql
import
*
class
TDTestCase
:
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
(),
logSql
)
def
run
(
self
):
tdSql
.
prepare
()
tdLog
.
info
(
'======================== dnode1 start'
)
tbPrefix
=
"ta_fl_tb"
mtPrefix
=
"ta_fl_mt"
tbNum
=
10
rowNum
=
20
totalNum
=
200
tdLog
.
info
(
'=============== step1'
)
i
=
0
mt
=
"%s%d"
%
(
mtPrefix
,
i
)
tdSql
.
execute
(
'create table %s (ts timestamp, tbcol int) TAGS(tgcol float, tgTs timestamp, tgcol2 int)'
%
(
mt
))
i
=
0
ts
=
1605045600000
tsStr
=
"2020-11-11 06:00:00"
while
(
i
<
5
):
tb
=
"%s%d"
%
(
tbPrefix
,
i
)
tdLog
.
info
(
'create table %s using %s tags(%d, %d, %d)'
%
(
tb
,
mt
,
i
,
ts
+
i
,
i
))
tdSql
.
execute
(
'create table %s using %s tags(%d, %d, %d)'
%
(
tb
,
mt
,
i
,
ts
+
i
,
i
))
x
=
0
while
(
x
<
rowNum
):
ms
=
x
*
60000
#tdLog.info(
# "insert into %s values (%d, %d)" %
# (tb, 1605045600000 + ms, x))
tdSql
.
execute
(
"insert into %s values (%d, %d)"
%
(
tb
,
1605045600000
+
ms
,
x
))
x
=
x
+
1
i
=
i
+
1
tdLog
.
info
(
'=============== step2'
)
tdSql
.
query
(
'select * from %s'
%
(
mt
))
tdSql
.
checkRows
(
5
*
rowNum
)
tdSql
.
query
(
'select * from %s where tgTs = %ld and tgcol2 = 0'
%
(
mt
,
ts
))
tdSql
.
checkRows
(
rowNum
)
tdSql
.
query
(
'select * from %s where tgTs =
\"
%s
\"
and tgcol2 = 0'
%
(
mt
,
tsStr
))
tdSql
.
checkRows
(
rowNum
)
tdLog
.
info
(
'=============== step3'
)
i
=
0
while
(
i
<
5
):
tb
=
"%s%d"
%
(
tbPrefix
,
i
+
100
)
tdLog
.
info
(
'create table %s using %s tags(%d,
\"
%s
\"
, %d)'
%
(
tb
,
mt
,
i
+
100
,
tsStr
,
i
+
100
))
tdSql
.
execute
(
'create table %s using %s tags(%d,
\"
%s
\"
, %d)'
%
(
tb
,
mt
,
i
+
100
,
tsStr
,
i
+
100
))
x
=
0
while
(
x
<
rowNum
):
ms
=
x
*
60000
#tdLog.info(
# "insert into %s values (%d, %d)" %
# (tb, 1605045600000 + ms, x))
tdSql
.
execute
(
"insert into %s values (%d, %d)"
%
(
tb
,
1605045600000
+
ms
,
x
))
x
=
x
+
1
i
=
i
+
1
tdSql
.
query
(
'select * from %s where tgTs = %ld and tgcol2 = 100'
%
(
mt
,
ts
))
tdSql
.
checkRows
(
rowNum
)
tdSql
.
query
(
'select * from %s where tgTs =
\"
%s
\"
and tgcol2 = 100'
%
(
mt
,
tsStr
))
tdSql
.
checkRows
(
rowNum
)
tdLog
.
info
(
'=============== step4'
)
i
=
0
tb
=
"%s%d"
%
(
tbPrefix
,
i
+
1000
)
tdSql
.
execute
(
'insert into %s using %s tags(%d,
\"
%s
\"
, %d) values(now, 10)'
%
(
tb
,
mt
,
i
+
100
,
tsStr
,
i
+
1000
))
tdSql
.
execute
(
'insert into %s using %s tags(%d,
\"
%s
\"
, %d) values(now+2s, 10)'
%
(
tb
,
mt
,
i
+
100
,
tsStr
,
i
+
1000
))
tdSql
.
execute
(
'insert into %s using %s tags(%d,
\"
%s
\"
, %d) values(now+3s, 10)'
%
(
tb
,
mt
,
i
+
100
,
tsStr
,
i
+
1000
))
tdSql
.
query
(
'select * from %s where tgTs =
\"
%s
\"
and tgcol2 = 1000'
%
(
mt
,
tsStr
))
tdSql
.
checkRows
(
3
)
i
=
0
tb
=
"%s%d"
%
(
tbPrefix
,
i
+
10000
)
tdSql
.
execute
(
'create table %s using %s tags(%d, now, %d)'
%
(
tb
,
mt
,
i
+
10000
,
i
+
10000
))
tdSql
.
checkRows
(
3
)
def
stop
(
self
):
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/script/general/parser/create_mt.sim
浏览文件 @
ceb2aa72
...
...
@@ -99,7 +99,7 @@ $i_binary2 = varchar(20) # illegal string
$i_bool = boolean
$nchar = nchar # nchar with unspecified length
print ========== create_mt.sim case4: illegal data types in tags test
sql_error create table $mt (ts timestamp, col int) tags (tag1 timestamp )
##
sql_error create table $mt (ts timestamp, col int) tags (tag1 timestamp )
sql_error create table $mt (ts timestamp, col int) tags (tag1 $i_ts )
sql_error create table $mt (ts timestamp, col int) tags (tag1 $i_binary )
sql_error create table $mt (ts timestamp, col int) tags (tag1 $i_bigint )
...
...
tests/script/general/parser/where.sim
浏览文件 @
ceb2aa72
...
...
@@ -155,8 +155,8 @@ sql_error select last(*) from wh_mt1_tb1 where c6 in ('1')
#sql_error select last(*) from wh_mt1_tb1 where c7 in ('binary')
#sql_error select last(*) from wh_mt1 where c8 in ('nchar')
#sql_error select last(*) from wh_mt1_tb1 where c9 in (true, false)
sql_error select last(*) from wh_mt1 where c10 in ('2019-01-01 00:00:00.000')
sql_error select last(*) from wh_mt1_tb1 where c10 in ('2019-01-01 00:00:00.000')
#
sql_error select last(*) from wh_mt1 where c10 in ('2019-01-01 00:00:00.000')
#
sql_error select last(*) from wh_mt1_tb1 where c10 in ('2019-01-01 00:00:00.000')
sql select last(*) from wh_mt1 where c1 = 1
if $rows != 1 then
return -1
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录