Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
a00f4d67
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
a00f4d67
编写于
10月 06, 2021
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-10529]Add APIs of parser/planner/scheduler.
上级
d845a13c
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
126 addition
and
0 deletion
+126
-0
include/libs/parser/parser.h
include/libs/parser/parser.h
+45
-0
include/libs/planner/planner.h
include/libs/planner/planner.h
+46
-0
include/libs/scheduler/scheduler.h
include/libs/scheduler/scheduler.h
+35
-0
未找到文件。
include/libs/parser/parser.h
浏览文件 @
a00f4d67
...
...
@@ -20,6 +20,51 @@
extern
"C"
{
#endif
#include "catalog.h"
#include "common.h"
struct
SQueryStmtInfo
;
struct
SInsertStmtInfo
;
/**
* True will be returned if the input sql string is insert, false otherwise.
* @param pStr sql string
* @param length length of the sql string
* @return
*/
bool
qIsInsertSql
(
const
char
*
pStr
,
size_t
length
);
/**
* Parse the sql statement and then return the SQueryStmtInfo as the result of bounded AST.
* @param pSql sql string
* @param length length of the sql string
* @param id operator id, generated by uuid generator
* @param msg extended error message if exists.
* @return error code
*/
int32_t
qParseQuerySql
(
const
char
*
pStr
,
size_t
length
,
struct
SQueryStmtInfo
**
pQueryInfo
,
int64_t
id
,
char
*
msg
);
/**
* Parse the insert sql statement.
* @param pStr sql string
* @param length length of the sql string
* @param pInsertParam data in binary format to submit to vnode directly.
* @param id operator id, generated by uuid generator.
* @param msg extended error message if exists to help avoid the problem in sql statement.
* @return
*/
int32_t
qParseInsertSql
(
const
char
*
pStr
,
size_t
length
,
struct
SInsertStmtInfo
**
pInsertInfo
,
int64_t
id
,
char
*
msg
);
/**
* Convert a normal sql statement to only query tags information to enable that the subscribe client can be aware quickly of the true vgroup ids that
* involved in the subscribe procedure.
* @param pSql
* @param length
* @param pConvertSql
* @return
*/
int32_t
qParserConvertSql
(
const
char
*
pStr
,
size_t
length
,
char
**
pConvertSql
);
#ifdef __cplusplus
}
#endif
...
...
include/libs/planner/planner.h
浏览文件 @
a00f4d67
...
...
@@ -20,6 +20,52 @@
extern
"C"
{
#endif
/**
* Optimize the query execution plan, currently not implement yet.
* @param pQueryNode
* @return
*/
int32_t
qOptimizeQueryPlan
(
SQueryNode
*
pQueryNode
);
/**
* Create the query plan according to the bound AST, which is in the form of pQueryInfo
* @param pQueryInfo
* @param pQueryNode
* @return
*/
int32_t
qCreateQueryPlan
(
const
SQueryInfo
*
pQueryInfo
,
SQueryNode
*
pQueryNode
);
/**
* Convert the query plan to string, in order to display it in the shell.
* @param pQueryNode
* @return
*/
int32_t
qQueryPlanToString
(
SQueryNode
*
pQueryNode
,
char
**
str
);
/**
* Restore the SQL statement according to the logic query plan.
* @param pQueryNode
* @param sql
* @return
*/
int32_t
qQueryPlanToSql
(
SQueryNode
*
pQueryNode
,
char
**
sql
);
/**
* Create the physical plan for the query, according to the logic plan.
* @param pQueryNode
* @param pPhyNode
* @return
*/
int32_t
qCreatePhysicalPlan
(
SQueryNode
*
pQueryNode
,
SEpSet
*
pQnode
,
SQueryPhyNode
*
pPhyNode
);
/**
* Convert to physical plan to string to enable to print it out in the shell.
* @param pPhyNode
* @param str
* @return
*/
int32_t
qPhyPlanToString
(
SQueryPhyNode
*
pPhyNode
,
char
**
str
);
#ifdef __cplusplus
}
#endif
...
...
include/libs/scheduler/scheduler.h
浏览文件 @
a00f4d67
...
...
@@ -20,6 +20,41 @@
extern
"C"
{
#endif
#define QUERY_TASK_MERGE 1
#define QUERY_TASK_PARTIAL 2
/**
* create query job from the physical execution plan
* @param pPhyNode
* @param pJob
* @return
*/
int32_t
qCreateQueryJob
(
const
SQueryPhyNode
*
pPhyNode
,
SQueryJob
*
pJob
);
/**
* Process the query job, generated according to the query physical plan.
* This is a synchronized API, and is also thread-safety.
* @param pJob
* @return
*/
int32_t
qProcessQueryJob
(
SQueryJob
*
pJob
);
/**
* The SSqlObj should not be here????
* @param pSql
* @param pVgroupId
* @param pRetVgroupId
* @return
*/
SArray
*
qGetInvolvedVgroupIdList
(
SSqlObj
*
pSql
,
SArray
*
pVgroupId
,
SArray
*
pRetVgroupId
);
/**
* Cancel query job
* @param pJob
* @return
*/
int32_t
qKillQueryJob
(
SQueryJob
*
pJob
);
#ifdef __cplusplus
}
#endif
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录