Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
58514862
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22017
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看板
提交
58514862
编写于
7月 27, 2022
作者:
X
Xiaoyu Wang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: delete sink node add ts column name attribute
上级
e4655413
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
11 addition
and
0 deletion
+11
-0
include/libs/nodes/plannodes.h
include/libs/nodes/plannodes.h
+1
-0
source/libs/nodes/src/nodesCloneFuncs.c
source/libs/nodes/src/nodesCloneFuncs.c
+1
-0
source/libs/nodes/src/nodesCodeFuncs.c
source/libs/nodes/src/nodesCodeFuncs.c
+7
-0
source/libs/planner/src/planLogicCreater.c
source/libs/planner/src/planLogicCreater.c
+1
-0
source/libs/planner/src/planPhysiCreater.c
source/libs/planner/src/planPhysiCreater.c
+1
-0
未找到文件。
include/libs/nodes/plannodes.h
浏览文件 @
58514862
...
...
@@ -152,6 +152,7 @@ typedef struct SVnodeModifyLogicNode {
uint64_t
stableId
;
int8_t
tableType
;
// table type
char
tableFName
[
TSDB_TABLE_FNAME_LEN
];
char
tsColName
[
TSDB_COL_NAME_LEN
];
STimeWindow
deleteTimeRange
;
SVgroupsInfo
*
pVgroupList
;
SNodeList
*
pInsertCols
;
...
...
source/libs/nodes/src/nodesCloneFuncs.c
浏览文件 @
58514862
...
...
@@ -402,6 +402,7 @@ static int32_t logicVnodeModifCopy(const SVnodeModifyLogicNode* pSrc, SVnodeModi
COPY_SCALAR_FIELD
(
stableId
);
COPY_SCALAR_FIELD
(
tableType
);
COPY_CHAR_ARRAY_FIELD
(
tableFName
);
COPY_CHAR_ARRAY_FIELD
(
tsColName
);
COPY_OBJECT_FIELD
(
deleteTimeRange
,
sizeof
(
STimeWindow
));
CLONE_OBJECT_FIELD
(
pVgroupList
,
vgroupsInfoClone
);
CLONE_NODE_LIST_FIELD
(
pInsertCols
);
...
...
source/libs/nodes/src/nodesCodeFuncs.c
浏览文件 @
58514862
...
...
@@ -2370,6 +2370,7 @@ static int32_t jsonToPhysiQueryInsertNode(const SJson* pJson, void* pObj) {
static
const
char
*
jkDeletePhysiPlanTableId
=
"TableId"
;
static
const
char
*
jkDeletePhysiPlanTableType
=
"TableType"
;
static
const
char
*
jkDeletePhysiPlanTableFName
=
"TableFName"
;
static
const
char
*
jkDeletePhysiPlanTsColName
=
"TsColName"
;
static
const
char
*
jkDeletePhysiPlanDeleteTimeRangeStartKey
=
"DeleteTimeRangeStartKey"
;
static
const
char
*
jkDeletePhysiPlanDeleteTimeRangeEndKey
=
"DeleteTimeRangeEndKey"
;
static
const
char
*
jkDeletePhysiPlanAffectedRows
=
"AffectedRows"
;
...
...
@@ -2387,6 +2388,9 @@ static int32_t physiDeleteNodeToJson(const void* pObj, SJson* pJson) {
if
(
TSDB_CODE_SUCCESS
==
code
)
{
code
=
tjsonAddStringToObject
(
pJson
,
jkDeletePhysiPlanTableFName
,
pNode
->
tableFName
);
}
if
(
TSDB_CODE_SUCCESS
==
code
)
{
code
=
tjsonAddStringToObject
(
pJson
,
jkDeletePhysiPlanTsColName
,
pNode
->
tsColName
);
}
if
(
TSDB_CODE_SUCCESS
==
code
)
{
code
=
tjsonAddIntegerToObject
(
pJson
,
jkDeletePhysiPlanDeleteTimeRangeStartKey
,
pNode
->
deleteTimeRange
.
skey
);
}
...
...
@@ -2413,6 +2417,9 @@ static int32_t jsonToPhysiDeleteNode(const SJson* pJson, void* pObj) {
if
(
TSDB_CODE_SUCCESS
==
code
)
{
code
=
tjsonGetStringValue
(
pJson
,
jkDeletePhysiPlanTableFName
,
pNode
->
tableFName
);
}
if
(
TSDB_CODE_SUCCESS
==
code
)
{
code
=
tjsonGetStringValue
(
pJson
,
jkDeletePhysiPlanTsColName
,
pNode
->
tsColName
);
}
if
(
TSDB_CODE_SUCCESS
==
code
)
{
code
=
tjsonGetBigIntValue
(
pJson
,
jkDeletePhysiPlanDeleteTimeRangeStartKey
,
&
pNode
->
deleteTimeRange
.
skey
);
}
...
...
source/libs/planner/src/planLogicCreater.c
浏览文件 @
58514862
...
...
@@ -1294,6 +1294,7 @@ static int32_t createVnodeModifLogicNodeByDelete(SLogicPlanContext* pCxt, SDelet
pModify
->
tableType
=
pRealTable
->
pMeta
->
tableType
;
snprintf
(
pModify
->
tableFName
,
sizeof
(
pModify
->
tableFName
),
"%d.%s.%s"
,
pCxt
->
pPlanCxt
->
acctId
,
pRealTable
->
table
.
dbName
,
pRealTable
->
table
.
tableName
);
strcpy
(
pModify
->
tsColName
,
pRealTable
->
pMeta
->
schema
->
name
);
pModify
->
deleteTimeRange
=
pDelete
->
timeRange
;
pModify
->
pAffectedRows
=
nodesCloneNode
(
pDelete
->
pCountFunc
);
if
(
NULL
==
pModify
->
pAffectedRows
)
{
...
...
source/libs/planner/src/planPhysiCreater.c
浏览文件 @
58514862
...
...
@@ -1637,6 +1637,7 @@ static int32_t createDataDeleter(SPhysiPlanContext* pCxt, SVnodeModifyLogicNode*
pDeleter
->
tableId
=
pModify
->
tableId
;
pDeleter
->
tableType
=
pModify
->
tableType
;
strcpy
(
pDeleter
->
tableFName
,
pModify
->
tableFName
);
strcpy
(
pDeleter
->
tsColName
,
pModify
->
tsColName
);
pDeleter
->
deleteTimeRange
=
pModify
->
deleteTimeRange
;
int32_t
code
=
setNodeSlotId
(
pCxt
,
pRoot
->
pOutputDataBlockDesc
->
dataBlockId
,
-
1
,
pModify
->
pAffectedRows
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录