Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
ae9f58af
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
ae9f58af
编写于
3月 10, 2022
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/3.0_query_integrate' into 3.0_query_integrate
上级
b57f7414
5b5ac34d
变更
31
展开全部
隐藏空白更改
内联
并排
Showing
31 changed file
with
660 addition
and
2362 deletion
+660
-2362
source/client/src/clientImpl.c
source/client/src/clientImpl.c
+2
-1
source/libs/nodes/inc/nodesUtil.h
source/libs/nodes/inc/nodesUtil.h
+0
-0
source/libs/nodes/src/nodesCloneFuncs.c
source/libs/nodes/src/nodesCloneFuncs.c
+1
-1
source/libs/nodes/src/nodesCodeFuncs.c
source/libs/nodes/src/nodesCodeFuncs.c
+1
-1
source/libs/nodes/src/nodesUtilFuncs.c
source/libs/nodes/src/nodesUtilFuncs.c
+1
-1
source/libs/parser/inc/insertParser.h
source/libs/parser/inc/insertParser.h
+0
-31
source/libs/parser/inc/new_sql.y
source/libs/parser/inc/new_sql.y
+0
-557
source/libs/parser/inc/parAst.h
source/libs/parser/inc/parAst.h
+2
-2
source/libs/parser/inc/parInsertData.h
source/libs/parser/inc/parInsertData.h
+0
-0
source/libs/parser/inc/parInt.h
source/libs/parser/inc/parInt.h
+1
-0
source/libs/parser/inc/parToken.h
source/libs/parser/inc/parToken.h
+0
-0
source/libs/parser/inc/parUtil.h
source/libs/parser/inc/parUtil.h
+0
-1
source/libs/parser/inc/sql.y
source/libs/parser/inc/sql.y
+536
-926
source/libs/parser/src/parAstCreater.c
source/libs/parser/src/parAstCreater.c
+2
-2
source/libs/parser/src/parAstParser.c
source/libs/parser/src/parAstParser.c
+13
-13
source/libs/parser/src/parInsert.c
source/libs/parser/src/parInsert.c
+4
-5
source/libs/parser/src/parInsertData.c
source/libs/parser/src/parInsertData.c
+2
-2
source/libs/parser/src/parTokenizer.c
source/libs/parser/src/parTokenizer.c
+1
-2
source/libs/parser/src/parTranslater.c
source/libs/parser/src/parTranslater.c
+2
-2
source/libs/parser/src/parUtil.c
source/libs/parser/src/parUtil.c
+1
-1
source/libs/parser/src/parser.c
source/libs/parser/src/parser.c
+12
-4
source/libs/parser/src/sql.c
source/libs/parser/src/sql.c
+72
-72
source/libs/parser/test/parserAstTest.cpp
source/libs/parser/test/parserAstTest.cpp
+1
-1
source/libs/parser/test/parserInsertTest.cpp
source/libs/parser/test/parserInsertTest.cpp
+1
-2
source/libs/parser/test/tokenizerTest.cpp
source/libs/parser/test/tokenizerTest.cpp
+0
-730
source/libs/planner/inc/planInt.h
source/libs/planner/inc/planInt.h
+0
-0
source/libs/planner/src/planLogicCreater.c
source/libs/planner/src/planLogicCreater.c
+1
-1
source/libs/planner/src/planPhysiCreater.c
source/libs/planner/src/planPhysiCreater.c
+1
-1
source/libs/planner/src/planSpliter.c
source/libs/planner/src/planSpliter.c
+1
-1
source/libs/planner/src/planner.c
source/libs/planner/src/planner.c
+1
-1
source/libs/planner/test/plannerTest.cpp
source/libs/planner/test/plannerTest.cpp
+1
-1
未找到文件。
source/client/src/clientImpl.c
浏览文件 @
ae9f58af
...
...
@@ -173,6 +173,7 @@ int32_t execDdlQuery(SRequestObj* pRequest, SQuery* pQuery) {
SCmdMsgInfo
*
pMsgInfo
=
pQuery
->
pCmdMsg
;
pRequest
->
type
=
pMsgInfo
->
msgType
;
pRequest
->
body
.
requestMsg
=
(
SDataBuf
){.
pData
=
pMsgInfo
->
pMsg
,
.
len
=
pMsgInfo
->
msgLen
,
.
handle
=
NULL
};
pMsgInfo
->
pMsg
=
NULL
;
// pMsg transferred to SMsgSendInfo management
STscObj
*
pTscObj
=
pRequest
->
pTscObj
;
SMsgSendInfo
*
pSendMsg
=
buildMsgInfoImpl
(
pRequest
);
...
...
@@ -248,7 +249,7 @@ TAOS_RES* taos_query_l(TAOS* taos, const char* sql, int sqlLen) {
}
SRequestObj
*
pRequest
=
NULL
;
SQuery
*
pQuery
;
SQuery
*
pQuery
=
NULL
;
SArray
*
pNodeList
=
taosArrayInit
(
4
,
sizeof
(
struct
SQueryNodeAddr
));
terrno
=
TSDB_CODE_SUCCESS
;
...
...
source/libs/nodes/inc/nodes
int
.h
→
source/libs/nodes/inc/nodes
Util
.h
浏览文件 @
ae9f58af
文件已移动
source/libs/nodes/src/nodesCloneFuncs.c
浏览文件 @
ae9f58af
...
...
@@ -13,7 +13,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "nodes
int
.h"
#include "nodes
Util
.h"
#include "plannodes.h"
#include "querynodes.h"
#include "taos.h"
...
...
source/libs/nodes/src/nodesCodeFuncs.c
浏览文件 @
ae9f58af
...
...
@@ -13,7 +13,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "nodes
int
.h"
#include "nodes
Util
.h"
#include "plannodes.h"
#include "querynodes.h"
#include "query.h"
...
...
source/libs/nodes/src/nodesUtilFuncs.c
浏览文件 @
ae9f58af
...
...
@@ -14,7 +14,7 @@
*/
#include "cmdnodes.h"
#include "nodes
int
.h"
#include "nodes
Util
.h"
#include "plannodes.h"
#include "querynodes.h"
#include "taos.h"
...
...
source/libs/parser/inc/insertParser.h
已删除
100644 → 0
浏览文件 @
b57f7414
/*
* Copyright (c) 2019 TAOS Data, Inc. <jhtao@taosdata.com>
*
* This program is free software: you can use, redistribute, and/or modify
* it under the terms of the GNU Affero General Public License, version 3
* or later ("AGPL"), as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef TDENGINE_INSERTPARSER_H
#define TDENGINE_INSERTPARSER_H
#ifdef __cplusplus
extern
"C"
{
#endif
#include "parser.h"
int32_t
parseInsertSql
(
SParseContext
*
pContext
,
SQuery
**
pQuery
);
#ifdef __cplusplus
}
#endif
#endif // TDENGINE_INSERTPARSER_H
source/libs/parser/inc/new_sql.y
已删除
100644 → 0
浏览文件 @
b57f7414
此差异已折叠。
点击以展开。
source/libs/parser/inc/
astCreateFuncs
.h
→
source/libs/parser/inc/
parAst
.h
浏览文件 @
ae9f58af
...
...
@@ -22,9 +22,9 @@ extern "C" {
#include "cmdnodes.h"
#include "parser.h"
#include "parserUtil.h"
#include "parToken.h"
#include "parUtil.h"
#include "querynodes.h"
#include "ttoken.h"
typedef
struct
SAstCreateContext
{
SParseContext
*
pQueryCxt
;
...
...
source/libs/parser/inc/
dataBlockMgt
.h
→
source/libs/parser/inc/
parInsertData
.h
浏览文件 @
ae9f58af
文件已移动
source/libs/parser/inc/par
ser
Int.h
→
source/libs/parser/inc/parInt.h
浏览文件 @
ae9f58af
...
...
@@ -22,6 +22,7 @@ extern "C" {
#include "parser.h"
int32_t
parseInsertSql
(
SParseContext
*
pContext
,
SQuery
**
pQuery
);
int32_t
doParse
(
SParseContext
*
pParseCxt
,
SQuery
**
pQuery
);
int32_t
doTranslate
(
SParseContext
*
pParseCxt
,
SQuery
*
pQuery
);
...
...
source/libs/parser/inc/
tt
oken.h
→
source/libs/parser/inc/
parT
oken.h
浏览文件 @
ae9f58af
文件已移动
source/libs/parser/inc/par
ser
Util.h
→
source/libs/parser/inc/parUtil.h
浏览文件 @
ae9f58af
...
...
@@ -22,7 +22,6 @@ extern "C" {
#include "os.h"
#include "query.h"
#include "ttoken.h"
typedef
struct
SMsgBuf
{
int32_t
len
;
...
...
source/libs/parser/inc/sql.y
浏览文件 @
ae9f58af
此差异已折叠。
点击以展开。
source/libs/parser/src/
astCreateFuncs
.c
→
source/libs/parser/src/
parAstCreater
.c
浏览文件 @
ae9f58af
...
...
@@ -14,8 +14,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "
astCreateFuncs
.h"
#include "par
ser
Util.h"
#include "
parAst
.h"
#include "parUtil.h"
#define CHECK_OUT_OF_MEM(p) \
do { \
...
...
source/libs/parser/src/
astParse
.c
→
source/libs/parser/src/
parAstParser
.c
浏览文件 @
ae9f58af
...
...
@@ -13,28 +13,28 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "par
ser
Int.h"
#include "parInt.h"
#include "
astCreateFuncs
.h"
#include "
tt
oken.h"
#include "
parAst
.h"
#include "
parT
oken.h"
typedef
void
*
(
*
FMalloc
)(
size_t
);
typedef
void
(
*
FFree
)(
void
*
);
extern
void
*
New
ParseAlloc
(
FMalloc
);
extern
void
New
Parse
(
void
*
,
int
,
SToken
,
void
*
);
extern
void
New
ParseFree
(
void
*
,
FFree
);
extern
void
New
ParseTrace
(
FILE
*
,
char
*
);
extern
void
*
ParseAlloc
(
FMalloc
);
extern
void
Parse
(
void
*
,
int
,
SToken
,
void
*
);
extern
void
ParseFree
(
void
*
,
FFree
);
extern
void
ParseTrace
(
FILE
*
,
char
*
);
int32_t
doParse
(
SParseContext
*
pParseCxt
,
SQuery
**
pQuery
)
{
SAstCreateContext
cxt
;
initAstCreateContext
(
pParseCxt
,
&
cxt
);
void
*
pParser
=
New
ParseAlloc
(
malloc
);
void
*
pParser
=
ParseAlloc
(
malloc
);
int32_t
i
=
0
;
while
(
1
)
{
SToken
t0
=
{
0
};
if
(
cxt
.
pQueryCxt
->
pSql
[
i
]
==
0
)
{
New
Parse
(
pParser
,
0
,
t0
,
&
cxt
);
Parse
(
pParser
,
0
,
t0
,
&
cxt
);
goto
abort_parse
;
}
t0
.
n
=
tGetToken
((
char
*
)
&
cxt
.
pQueryCxt
->
pSql
[
i
],
&
t0
.
type
);
...
...
@@ -47,7 +47,7 @@ int32_t doParse(SParseContext* pParseCxt, SQuery** pQuery) {
break
;
}
case
TK_NK_SEMI
:
{
New
Parse
(
pParser
,
0
,
t0
,
&
cxt
);
Parse
(
pParser
,
0
,
t0
,
&
cxt
);
goto
abort_parse
;
}
case
TK_NK_QUESTION
:
...
...
@@ -64,8 +64,8 @@ int32_t doParse(SParseContext* pParseCxt, SQuery** pQuery) {
goto
abort_parse
;
}
default:
New
Parse
(
pParser
,
t0
.
type
,
t0
,
&
cxt
);
//
New
ParseTrace(stdout, "");
Parse
(
pParser
,
t0
.
type
,
t0
,
&
cxt
);
// ParseTrace(stdout, "");
if
(
!
cxt
.
valid
)
{
goto
abort_parse
;
}
...
...
@@ -73,7 +73,7 @@ int32_t doParse(SParseContext* pParseCxt, SQuery** pQuery) {
}
abort_parse:
New
ParseFree
(
pParser
,
free
);
ParseFree
(
pParser
,
free
);
if
(
cxt
.
valid
)
{
*
pQuery
=
calloc
(
1
,
sizeof
(
SQuery
));
if
(
NULL
==
*
pQuery
)
{
...
...
source/libs/parser/src/
insertParser
.c
→
source/libs/parser/src/
parInsert
.c
浏览文件 @
ae9f58af
...
...
@@ -13,13 +13,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "
insertParser
.h"
#include "
dataBlockMgt
.h"
#include "par
serUtil
.h"
#include "
parInsertData
.h"
#include "parInt.h"
#include "
parUtil
.h"
#include "par
Token
.h"
#include "tglobal.h"
#include "ttime.h"
#include "ttoken.h"
#include "ttypes.h"
#define NEXT_TOKEN(pSql, sToken) \
...
...
source/libs/parser/src/
dataBlockMgt
.c
→
source/libs/parser/src/
parInsertData
.c
浏览文件 @
ae9f58af
...
...
@@ -13,10 +13,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "
dataBlockMgt
.h"
#include "
parInsertData
.h"
#include "catalog.h"
#include "par
ser
Util.h"
#include "parUtil.h"
#include "querynodes.h"
#define IS_RAW_PAYLOAD(t) \
...
...
source/libs/parser/src/
tt
okenizer.c
→
source/libs/parser/src/
parT
okenizer.c
浏览文件 @
ae9f58af
...
...
@@ -14,10 +14,9 @@
*/
#include "os.h"
#include "parToken.h"
#include "thash.h"
#include "taosdef.h"
#include "ttoken.h"
#include "ttokendef.h"
// All the keywords of the SQL language are stored in a hash table
...
...
source/libs/parser/src/
astTranslate
.c
→
source/libs/parser/src/
parTranslater
.c
浏览文件 @
ae9f58af
...
...
@@ -13,12 +13,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "par
ser
Int.h"
#include "parInt.h"
#include "catalog.h"
#include "cmdnodes.h"
#include "functionMgt.h"
#include "par
ser
Util.h"
#include "parUtil.h"
#include "ttime.h"
static
bool
afterGroupBy
(
ESqlClause
clause
)
{
...
...
source/libs/parser/src/par
ser
Util.c
→
source/libs/parser/src/parUtil.c
浏览文件 @
ae9f58af
...
...
@@ -13,7 +13,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "par
ser
Util.h"
#include "parUtil.h"
static
char
*
getSyntaxErrFormat
(
int32_t
errCode
)
{
switch
(
errCode
)
{
...
...
source/libs/parser/src/parser.c
浏览文件 @
ae9f58af
...
...
@@ -15,9 +15,8 @@
#include "parser.h"
#include "insertParser.h"
#include "parserInt.h"
#include "ttoken.h"
#include "parInt.h"
#include "parToken.h"
static
bool
isInsertSql
(
const
char
*
pStr
,
size_t
length
)
{
int32_t
index
=
0
;
...
...
@@ -47,5 +46,14 @@ int32_t qParseQuerySql(SParseContext* pCxt, SQuery** pQuery) {
}
void
qDestroyQuery
(
SQuery
*
pQueryNode
)
{
// todo
if
(
NULL
==
pQueryNode
)
{
return
;
}
nodesDestroyNode
(
pQueryNode
->
pRoot
);
tfree
(
pQueryNode
->
pResSchema
);
if
(
NULL
!=
pQueryNode
->
pCmdMsg
)
{
tfree
(
pQueryNode
->
pCmdMsg
->
pMsg
);
tfree
(
pQueryNode
->
pCmdMsg
);
}
tfree
(
pQueryNode
);
}
source/libs/parser/src/
new_
sql.c
→
source/libs/parser/src/sql.c
浏览文件 @
ae9f58af
...
...
@@ -33,9 +33,9 @@
#include <stdbool.h>
#include "nodes.h"
#include "
tt
oken.h"
#include "
parT
oken.h"
#include "ttokendef.h"
#include "
astCreateFuncs
.h"
#include "
parAst
.h"
/**************** End of %include directives **********************************/
/* These constants specify the various numeric values for terminal symbols
** in a format understandable to "makeheaders". This section is blank unless
...
...
@@ -59,7 +59,7 @@
** YYACTIONTYPE is the data type used for "action codes" - numbers
** that indicate what to do in response to the next
** token.
**
New
ParseTOKENTYPE is the data type used for minor type for terminal
** ParseTOKENTYPE is the data type used for minor type for terminal
** symbols. Background: A "minor type" is a semantic
** value associated with a terminal or non-terminal
** symbols. For example, for an "ID" terminal symbol,
...
...
@@ -70,16 +70,16 @@
** symbols.
** YYMINORTYPE is the data type used for all minor types.
** This is typically a union of many types, one of
** which is
New
ParseTOKENTYPE. The entry in the union
** which is ParseTOKENTYPE. The entry in the union
** for terminal symbols is called "yy0".
** YYSTACKDEPTH is the maximum depth of the parser's stack. If
** zero the stack is dynamically sized using realloc()
**
New
ParseARG_SDECL A static variable declaration for the %extra_argument
**
New
ParseARG_PDECL A parameter declaration for the %extra_argument
**
New
ParseARG_PARAM Code to pass %extra_argument as a subroutine parameter
**
New
ParseARG_STORE Code to store %extra_argument into yypParser
**
New
ParseARG_FETCH Code to extract %extra_argument from yypParser
**
NewParseCTX_* As New
ParseARG_ except for %extra_context
** ParseARG_SDECL A static variable declaration for the %extra_argument
** ParseARG_PDECL A parameter declaration for the %extra_argument
** ParseARG_PARAM Code to pass %extra_argument as a subroutine parameter
** ParseARG_STORE Code to store %extra_argument into yypParser
** ParseARG_FETCH Code to extract %extra_argument from yypParser
**
ParseCTX_* As
ParseARG_ except for %extra_context
** YYERRORSYMBOL is the code number of the error symbol. If not
** defined, then do no error processing.
** YYNSTATE the combined number of states.
...
...
@@ -101,10 +101,10 @@
#define YYCODETYPE unsigned char
#define YYNOCODE 208
#define YYACTIONTYPE unsigned short int
#define
New
ParseTOKENTYPE SToken
#define ParseTOKENTYPE SToken
typedef
union
{
int
yyinit
;
New
ParseTOKENTYPE
yy0
;
ParseTOKENTYPE
yy0
;
ENullOrder
yy9
;
SDatabaseOptions
*
yy103
;
SToken
yy161
;
...
...
@@ -121,16 +121,16 @@ typedef union {
#ifndef YYSTACKDEPTH
#define YYSTACKDEPTH 100
#endif
#define
New
ParseARG_SDECL SAstCreateContext* pCxt ;
#define
New
ParseARG_PDECL , SAstCreateContext* pCxt
#define
New
ParseARG_PARAM ,pCxt
#define
New
ParseARG_FETCH SAstCreateContext* pCxt =yypParser->pCxt ;
#define
New
ParseARG_STORE yypParser->pCxt =pCxt ;
#define
New
ParseCTX_SDECL
#define
New
ParseCTX_PDECL
#define
New
ParseCTX_PARAM
#define
New
ParseCTX_FETCH
#define
New
ParseCTX_STORE
#define ParseARG_SDECL SAstCreateContext* pCxt ;
#define ParseARG_PDECL , SAstCreateContext* pCxt
#define ParseARG_PARAM ,pCxt
#define ParseARG_FETCH SAstCreateContext* pCxt =yypParser->pCxt ;
#define ParseARG_STORE yypParser->pCxt =pCxt ;
#define ParseCTX_SDECL
#define ParseCTX_PDECL
#define ParseCTX_PARAM
#define ParseCTX_FETCH
#define ParseCTX_STORE
#define YYNSTATE 278
#define YYNRULE 236
#define YYNTOKEN 134
...
...
@@ -544,8 +544,8 @@ struct yyParser {
#ifndef YYNOERRORRECOVERY
int
yyerrcnt
;
/* Shifts left before out of the error */
#endif
New
ParseARG_SDECL
/* A place to hold %extra_argument */
New
ParseCTX_SDECL
/* A place to hold %extra_context */
ParseARG_SDECL
/* A place to hold %extra_argument */
ParseCTX_SDECL
/* A place to hold %extra_context */
#if YYSTACKDEPTH<=0
int
yystksz
;
/* Current side of the stack */
yyStackEntry
*
yystack
;
/* The parser's stack */
...
...
@@ -581,7 +581,7 @@ static char *yyTracePrompt = 0;
** Outputs:
** None.
*/
void
New
ParseTrace
(
FILE
*
TraceFILE
,
char
*
zTracePrompt
){
void
ParseTrace
(
FILE
*
TraceFILE
,
char
*
zTracePrompt
){
yyTraceFILE
=
TraceFILE
;
yyTracePrompt
=
zTracePrompt
;
if
(
yyTraceFILE
==
0
)
yyTracePrompt
=
0
;
...
...
@@ -1082,7 +1082,7 @@ static int yyGrowStack(yyParser *p){
#endif
/* Datatype of the argument to the memory allocated passed as the
** second argument to
New
ParseAlloc() below. This can be changed by
** second argument to ParseAlloc() below. This can be changed by
** putting an appropriate #define in the %include section of the input
** grammar.
*/
...
...
@@ -1092,9 +1092,9 @@ static int yyGrowStack(yyParser *p){
/* Initialize a new parser that has already been allocated.
*/
void
NewParseInit
(
void
*
yypRawParser
New
ParseCTX_PDECL
){
void
ParseInit
(
void
*
yypRawParser
ParseCTX_PDECL
){
yyParser
*
yypParser
=
(
yyParser
*
)
yypRawParser
;
New
ParseCTX_STORE
ParseCTX_STORE
#ifdef YYTRACKMAXSTACKDEPTH
yypParser
->
yyhwm
=
0
;
#endif
...
...
@@ -1118,7 +1118,7 @@ void NewParseInit(void *yypRawParser NewParseCTX_PDECL){
#endif
}
#ifndef
New
Parse_ENGINEALWAYSONSTACK
#ifndef Parse_ENGINEALWAYSONSTACK
/*
** This function allocates a new parser.
** The only argument is a pointer to a function which works like
...
...
@@ -1129,18 +1129,18 @@ void NewParseInit(void *yypRawParser NewParseCTX_PDECL){
**
** Outputs:
** A pointer to a parser. This pointer is used in subsequent calls
** to
NewParse and New
ParseFree.
** to
Parse and
ParseFree.
*/
void
*
NewParseAlloc
(
void
*
(
*
mallocProc
)(
YYMALLOCARGTYPE
)
New
ParseCTX_PDECL
){
void
*
ParseAlloc
(
void
*
(
*
mallocProc
)(
YYMALLOCARGTYPE
)
ParseCTX_PDECL
){
yyParser
*
yypParser
;
yypParser
=
(
yyParser
*
)(
*
mallocProc
)(
(
YYMALLOCARGTYPE
)
sizeof
(
yyParser
)
);
if
(
yypParser
){
New
ParseCTX_STORE
NewParseInit
(
yypParser
New
ParseCTX_PARAM
);
ParseCTX_STORE
ParseInit
(
yypParser
ParseCTX_PARAM
);
}
return
(
void
*
)
yypParser
;
}
#endif
/*
New
Parse_ENGINEALWAYSONSTACK */
#endif
/* Parse_ENGINEALWAYSONSTACK */
/* The following function deletes the "minor type" or semantic value
...
...
@@ -1155,8 +1155,8 @@ static void yy_destructor(
YYCODETYPE
yymajor
,
/* Type code for object to destroy */
YYMINORTYPE
*
yypminor
/* The object to be destroyed */
){
New
ParseARG_FETCH
New
ParseCTX_FETCH
ParseARG_FETCH
ParseCTX_FETCH
switch
(
yymajor
){
/* Here is inserted the actions which take place when a
** terminal or non-terminal is destroyed. This can happen
...
...
@@ -1321,7 +1321,7 @@ static void yy_pop_parser_stack(yyParser *pParser){
/*
** Clear all secondary memory allocations from the parser
*/
void
New
ParseFinalize
(
void
*
p
){
void
ParseFinalize
(
void
*
p
){
yyParser
*
pParser
=
(
yyParser
*
)
p
;
while
(
pParser
->
yytos
>
pParser
->
yystack
)
yy_pop_parser_stack
(
pParser
);
#if YYSTACKDEPTH<=0
...
...
@@ -1329,7 +1329,7 @@ void NewParseFinalize(void *p){
#endif
}
#ifndef
New
Parse_ENGINEALWAYSONSTACK
#ifndef Parse_ENGINEALWAYSONSTACK
/*
** Deallocate and destroy a parser. Destructors are called for
** all stack elements before shutting the parser down.
...
...
@@ -1338,23 +1338,23 @@ void NewParseFinalize(void *p){
** is defined in a %include section of the input grammar) then it is
** assumed that the input pointer is never NULL.
*/
void
New
ParseFree
(
void
ParseFree
(
void
*
p
,
/* The parser to be deleted */
void
(
*
freeProc
)(
void
*
)
/* Function used to reclaim memory */
){
#ifndef YYPARSEFREENEVERNULL
if
(
p
==
0
)
return
;
#endif
New
ParseFinalize
(
p
);
ParseFinalize
(
p
);
(
*
freeProc
)(
p
);
}
#endif
/*
New
Parse_ENGINEALWAYSONSTACK */
#endif
/* Parse_ENGINEALWAYSONSTACK */
/*
** Return the peak depth of the stack for a parser.
*/
#ifdef YYTRACKMAXSTACKDEPTH
int
New
ParseStackPeak
(
void
*
p
){
int
ParseStackPeak
(
void
*
p
){
yyParser
*
pParser
=
(
yyParser
*
)
p
;
return
pParser
->
yyhwm
;
}
...
...
@@ -1378,7 +1378,7 @@ static unsigned char yycoverage[YYNSTATE][YYNTOKEN];
** Return the number of missed state/lookahead combinations.
*/
#if defined(YYCOVERAGE)
int
New
ParseCoverage
(
FILE
*
out
){
int
ParseCoverage
(
FILE
*
out
){
int
stateno
,
iLookAhead
,
i
;
int
nMissed
=
0
;
for
(
stateno
=
0
;
stateno
<
YYNSTATE
;
stateno
++
){
...
...
@@ -1500,8 +1500,8 @@ static YYACTIONTYPE yy_find_reduce_action(
** The following routine is called if the stack overflows.
*/
static
void
yyStackOverflow
(
yyParser
*
yypParser
){
New
ParseARG_FETCH
New
ParseCTX_FETCH
ParseARG_FETCH
ParseCTX_FETCH
#ifndef NDEBUG
if
(
yyTraceFILE
){
fprintf
(
yyTraceFILE
,
"%sStack Overflow!
\n
"
,
yyTracePrompt
);
...
...
@@ -1512,8 +1512,8 @@ static void yyStackOverflow(yyParser *yypParser){
** stack every overflows */
/******** Begin %stack_overflow code ******************************************/
/******** End %stack_overflow code ********************************************/
New
ParseARG_STORE
/* Suppress warning about unused %extra_argument var */
New
ParseCTX_STORE
ParseARG_STORE
/* Suppress warning about unused %extra_argument var */
ParseCTX_STORE
}
/*
...
...
@@ -1544,7 +1544,7 @@ static void yy_shift(
yyParser
*
yypParser
,
/* The parser to be shifted */
YYACTIONTYPE
yyNewState
,
/* The new state to shift in */
YYCODETYPE
yyMajor
,
/* The major token to shift in */
New
ParseTOKENTYPE
yyMinor
/* The minor token to shift in */
ParseTOKENTYPE
yyMinor
/* The minor token to shift in */
){
yyStackEntry
*
yytos
;
yypParser
->
yytos
++
;
...
...
@@ -1840,14 +1840,14 @@ static YYACTIONTYPE yy_reduce(
yyParser
*
yypParser
,
/* The parser */
unsigned
int
yyruleno
,
/* Number of the rule by which to reduce */
int
yyLookahead
,
/* Lookahead token, or YYNOCODE if none */
New
ParseTOKENTYPE
yyLookaheadToken
/* Value of the lookahead token */
New
ParseCTX_PDECL
/* %extra_context */
ParseTOKENTYPE
yyLookaheadToken
/* Value of the lookahead token */
ParseCTX_PDECL
/* %extra_context */
){
int
yygoto
;
/* The next state */
YYACTIONTYPE
yyact
;
/* The next action */
yyStackEntry
*
yymsp
;
/* The top of the parser's stack */
int
yysize
;
/* Amount to pop the stack */
New
ParseARG_FETCH
ParseARG_FETCH
(
void
)
yyLookahead
;
(
void
)
yyLookaheadToken
;
yymsp
=
yypParser
->
yytos
;
...
...
@@ -2680,8 +2680,8 @@ static YYACTIONTYPE yy_reduce(
static
void
yy_parse_failed
(
yyParser
*
yypParser
/* The parser */
){
New
ParseARG_FETCH
New
ParseCTX_FETCH
ParseARG_FETCH
ParseCTX_FETCH
#ifndef NDEBUG
if
(
yyTraceFILE
){
fprintf
(
yyTraceFILE
,
"%sFail!
\n
"
,
yyTracePrompt
);
...
...
@@ -2692,8 +2692,8 @@ static void yy_parse_failed(
** parser fails */
/************ Begin %parse_failure code ***************************************/
/************ End %parse_failure code *****************************************/
New
ParseARG_STORE
/* Suppress warning about unused %extra_argument variable */
New
ParseCTX_STORE
ParseARG_STORE
/* Suppress warning about unused %extra_argument variable */
ParseCTX_STORE
}
#endif
/* YYNOERRORRECOVERY */
...
...
@@ -2703,10 +2703,10 @@ static void yy_parse_failed(
static
void
yy_syntax_error
(
yyParser
*
yypParser
,
/* The parser */
int
yymajor
,
/* The major type of the error token */
New
ParseTOKENTYPE
yyminor
/* The minor type of the error token */
ParseTOKENTYPE
yyminor
/* The minor type of the error token */
){
New
ParseARG_FETCH
New
ParseCTX_FETCH
ParseARG_FETCH
ParseCTX_FETCH
#define TOKEN yyminor
/************ Begin %syntax_error code ****************************************/
...
...
@@ -2717,8 +2717,8 @@ static void yy_syntax_error(
}
pCxt
->
valid
=
false
;
/************ End %syntax_error code ******************************************/
New
ParseARG_STORE
/* Suppress warning about unused %extra_argument variable */
New
ParseCTX_STORE
ParseARG_STORE
/* Suppress warning about unused %extra_argument variable */
ParseCTX_STORE
}
/*
...
...
@@ -2727,8 +2727,8 @@ static void yy_syntax_error(
static
void
yy_accept
(
yyParser
*
yypParser
/* The parser */
){
New
ParseARG_FETCH
New
ParseCTX_FETCH
ParseARG_FETCH
ParseCTX_FETCH
#ifndef NDEBUG
if
(
yyTraceFILE
){
fprintf
(
yyTraceFILE
,
"%sAccept!
\n
"
,
yyTracePrompt
);
...
...
@@ -2742,13 +2742,13 @@ static void yy_accept(
** parser accepts */
/*********** Begin %parse_accept code *****************************************/
/*********** End %parse_accept code *******************************************/
New
ParseARG_STORE
/* Suppress warning about unused %extra_argument variable */
New
ParseCTX_STORE
ParseARG_STORE
/* Suppress warning about unused %extra_argument variable */
ParseCTX_STORE
}
/* The main parser program.
** The first argument is a pointer to a structure obtained from
** "
New
ParseAlloc" which describes the current state of the parser.
** "ParseAlloc" which describes the current state of the parser.
** The second argument is the major token number. The third is
** the minor token. The fourth optional argument is whatever the
** user wants (and specified in the grammar) and is available for
...
...
@@ -2765,11 +2765,11 @@ static void yy_accept(
** Outputs:
** None.
*/
void
New
Parse
(
void
Parse
(
void
*
yyp
,
/* The parser */
int
yymajor
,
/* The major token code number */
New
ParseTOKENTYPE
yyminor
/* The value for the token */
New
ParseARG_PDECL
/* Optional %extra_argument parameter */
ParseTOKENTYPE
yyminor
/* The value for the token */
ParseARG_PDECL
/* Optional %extra_argument parameter */
){
YYMINORTYPE
yyminorunion
;
YYACTIONTYPE
yyact
;
/* The parser action. */
...
...
@@ -2780,8 +2780,8 @@ void NewParse(
int
yyerrorhit
=
0
;
/* True if yymajor has invoked an error */
#endif
yyParser
*
yypParser
=
(
yyParser
*
)
yyp
;
/* The parser */
New
ParseCTX_FETCH
New
ParseARG_STORE
ParseCTX_FETCH
ParseARG_STORE
assert
(
yypParser
->
yytos
!=
0
);
#if !defined(YYERRORSYMBOL) && !defined(YYNOERRORRECOVERY)
...
...
@@ -2806,7 +2806,7 @@ void NewParse(
yyact
=
yy_find_shift_action
((
YYCODETYPE
)
yymajor
,
yyact
);
if
(
yyact
>=
YY_MIN_REDUCE
){
yyact
=
yy_reduce
(
yypParser
,
yyact
-
YY_MIN_REDUCE
,
yymajor
,
yyminor
New
ParseCTX_PARAM
);
yyminor
ParseCTX_PARAM
);
}
else
if
(
yyact
<=
YY_MAX_SHIFTREDUCE
){
yy_shift
(
yypParser
,
yyact
,(
YYCODETYPE
)
yymajor
,
yyminor
);
#ifndef YYNOERRORRECOVERY
...
...
@@ -2939,7 +2939,7 @@ void NewParse(
** Return the fallback token corresponding to canonical token iToken, or
** 0 if iToken has no fallback.
*/
int
New
ParseFallback
(
int
iToken
){
int
ParseFallback
(
int
iToken
){
#ifdef YYFALLBACK
if
(
iToken
<
(
int
)(
sizeof
(
yyFallback
)
/
sizeof
(
yyFallback
[
0
]))
){
return
yyFallback
[
iToken
];
...
...
source/libs/parser/test/parserTest.cpp
→
source/libs/parser/test/parser
Ast
Test.cpp
浏览文件 @
ae9f58af
...
...
@@ -18,7 +18,7 @@
#include <gtest/gtest.h>
#include "par
ser
Int.h"
#include "parInt.h"
using
namespace
std
;
using
namespace
testing
;
...
...
source/libs/parser/test/
insertParser
Test.cpp
→
source/libs/parser/test/
parserInsert
Test.cpp
浏览文件 @
ae9f58af
...
...
@@ -15,8 +15,7 @@
#include <gtest/gtest.h>
#include "insertParser.h"
// #include "mockCatalog.h"
#include "parInt.h"
using
namespace
std
;
using
namespace
testing
;
...
...
source/libs/parser/test/tokenizerTest.cpp
已删除
100644 → 0
浏览文件 @
b57f7414
此差异已折叠。
点击以展开。
source/libs/planner/inc/plan
ner
Int.h
→
source/libs/planner/inc/planInt.h
浏览文件 @
ae9f58af
文件已移动
source/libs/planner/src/
logicPlan
.c
→
source/libs/planner/src/
planLogicCreater
.c
浏览文件 @
ae9f58af
...
...
@@ -13,7 +13,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "plan
ner
Int.h"
#include "planInt.h"
#include "functionMgt.h"
...
...
source/libs/planner/src/p
hysicalPlan
.c
→
source/libs/planner/src/p
lanPhysiCreater
.c
浏览文件 @
ae9f58af
...
...
@@ -13,7 +13,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "plan
ner
Int.h"
#include "planInt.h"
#include "functionMgt.h"
...
...
source/libs/planner/src/
splitPlan
.c
→
source/libs/planner/src/
planSpliter
.c
浏览文件 @
ae9f58af
...
...
@@ -13,7 +13,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "plan
ner
Int.h"
#include "planInt.h"
#define SPLIT_FLAG_MASK(n) (1 << n)
...
...
source/libs/planner/src/planner.c
浏览文件 @
ae9f58af
...
...
@@ -15,7 +15,7 @@
#include "planner.h"
#include "plan
ner
Int.h"
#include "planInt.h"
int32_t
optimize
(
SPlanContext
*
pCxt
,
SLogicNode
*
pLogicNode
)
{
return
TSDB_CODE_SUCCESS
;
...
...
source/libs/planner/test/plannerTest.cpp
浏览文件 @
ae9f58af
...
...
@@ -18,7 +18,7 @@
#include <gtest/gtest.h>
#include "parser.h"
#include "plan
ner
Int.h"
#include "planInt.h"
using
namespace
std
;
using
namespace
testing
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录