Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
0dcb3a5d
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看板
提交
0dcb3a5d
编写于
7月 28, 2022
作者:
C
Cary Xu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: assign uid for rsma by physical plan
上级
3e2c24d9
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
22 addition
and
4 deletion
+22
-4
source/common/src/tdatablock.c
source/common/src/tdatablock.c
+1
-1
source/dnode/vnode/src/sma/smaRollup.c
source/dnode/vnode/src/sma/smaRollup.c
+2
-2
source/libs/executor/inc/executorimpl.h
source/libs/executor/inc/executorimpl.h
+1
-0
source/libs/executor/src/executor.c
source/libs/executor/src/executor.c
+6
-0
source/libs/executor/src/scanoperator.c
source/libs/executor/src/scanoperator.c
+5
-0
source/libs/nodes/src/nodesCodeFuncs.c
source/libs/nodes/src/nodesCodeFuncs.c
+7
-1
未找到文件。
source/common/src/tdatablock.c
浏览文件 @
0dcb3a5d
...
...
@@ -1713,7 +1713,7 @@ void blockDebugShowDataBlocks(const SArray* dataBlocks, const char* flag) {
size_t
numOfCols
=
taosArrayGetSize
(
pDataBlock
->
pDataBlock
);
int32_t
rows
=
pDataBlock
->
info
.
rows
;
printf
(
"%s |block type %d |child id %d|group id %
zX
\n
"
,
flag
,
(
int32_t
)
pDataBlock
->
info
.
type
,
printf
(
"%s |block type %d |child id %d|group id %
"
PRIu64
"
\n
"
,
flag
,
(
int32_t
)
pDataBlock
->
info
.
type
,
pDataBlock
->
info
.
childId
,
pDataBlock
->
info
.
groupId
);
for
(
int32_t
j
=
0
;
j
<
rows
;
j
++
)
{
printf
(
"%s |"
,
flag
);
...
...
source/dnode/vnode/src/sma/smaRollup.c
浏览文件 @
0dcb3a5d
...
...
@@ -599,14 +599,14 @@ static int32_t tdRSmaFetchAndSubmitResult(SRSmaInfoItem *pItem, STSchema *pTSche
SSubmitReq
*
pReq
=
NULL
;
// TODO: the schema update should be handled
if
(
buildSubmitReqFromDataBlock
(
&
pReq
,
pResult
,
pTSchema
,
SMA_VID
(
pSma
),
suid
)
<
0
)
{
smaError
(
"vgId:%d, build submit req for rsma
table %"
PRIi64
"l
evel %"
PRIi8
" failed since %s"
,
SMA_VID
(
pSma
),
smaError
(
"vgId:%d, build submit req for rsma
stable %"
PRIi64
" l
evel %"
PRIi8
" failed since %s"
,
SMA_VID
(
pSma
),
suid
,
pItem
->
level
,
terrstr
());
goto
_err
;
}
if
(
pReq
&&
tdProcessSubmitReq
(
sinkTsdb
,
output
->
info
.
version
,
pReq
)
<
0
)
{
taosMemoryFreeClear
(
pReq
);
smaError
(
"vgId:%d, process submit req for rsma table %"
PRIi64
" level %"
PRIi8
" failed since %s"
,
smaError
(
"vgId:%d, process submit req for rsma
s
table %"
PRIi64
" level %"
PRIi8
" failed since %s"
,
SMA_VID
(
pSma
),
suid
,
pItem
->
level
,
terrstr
());
goto
_err
;
}
...
...
source/libs/executor/inc/executorimpl.h
浏览文件 @
0dcb3a5d
...
...
@@ -318,6 +318,7 @@ typedef struct STableScanInfo {
int32_t
currentTable
;
int8_t
scanMode
;
int8_t
noTable
;
int8_t
assignBlockUid
;
}
STableScanInfo
;
typedef
struct
STableMergeScanInfo
{
...
...
source/libs/executor/src/executor.c
浏览文件 @
0dcb3a5d
...
...
@@ -270,6 +270,12 @@ int32_t qUpdateQualifiedTableId(qTaskInfo_t tinfo, const SArray* tableIdList, bo
}
taosArrayPush
(
pTaskInfo
->
tableqinfoList
.
pTableList
,
&
keyInfo
);
if
(
pTaskInfo
->
tableqinfoList
.
map
==
NULL
)
{
pTaskInfo
->
tableqinfoList
.
map
=
taosHashInit
(
32
,
taosGetDefaultHashFunction
(
TSDB_DATA_TYPE_BINARY
),
false
,
HASH_NO_LOCK
);
}
taosHashPut
(
pTaskInfo
->
tableqinfoList
.
map
,
uid
,
sizeof
(
uid
),
&
keyInfo
.
groupId
,
sizeof
(
keyInfo
.
groupId
));
}
if
(
keyBuf
!=
NULL
)
{
...
...
source/libs/executor/src/scanoperator.c
浏览文件 @
0dcb3a5d
...
...
@@ -408,6 +408,10 @@ static SSDataBlock* doTableScanImpl(SOperatorInfo* pOperator) {
pBlock
->
info
.
groupId
=
*
groupId
;
}
if
(
pTableScanInfo
->
assignBlockUid
)
{
pBlock
->
info
.
groupId
=
pBlock
->
info
.
uid
;
}
pOperator
->
resultInfo
.
totalRows
=
pTableScanInfo
->
readRecorder
.
totalRows
;
pTableScanInfo
->
readRecorder
.
elapsedTime
+=
(
taosGetTimestampUs
()
-
st
)
/
1000
.
0
;
...
...
@@ -616,6 +620,7 @@ SOperatorInfo* createTableScanOperatorInfo(STableScanPhysiNode* pTableScanNode,
pInfo
->
scanFlag
=
MAIN_SCAN
;
pInfo
->
pColMatchInfo
=
pColList
;
pInfo
->
currentGroupId
=
-
1
;
pInfo
->
assignBlockUid
=
pTableScanNode
->
assignBlockUid
;
pOperator
->
name
=
"TableScanOperator"
;
// for debug purpose
pOperator
->
operatorType
=
QUERY_NODE_PHYSICAL_PLAN_TABLE_SCAN
;
...
...
source/libs/nodes/src/nodesCodeFuncs.c
浏览文件 @
0dcb3a5d
...
...
@@ -1522,6 +1522,7 @@ static const char* jkTableScanPhysiPlanWatermark = "Watermark";
static
const
char
*
jkTableScanPhysiPlanIgnoreExpired
=
"IgnoreExpired"
;
static
const
char
*
jkTableScanPhysiPlanGroupTags
=
"GroupTags"
;
static
const
char
*
jkTableScanPhysiPlanGroupSort
=
"GroupSort"
;
static
const
char
*
jkTableScanPhysiPlanAssignBlockUid
=
"AssignBlockUid"
;
static
int32_t
physiTableScanNodeToJson
(
const
void
*
pObj
,
SJson
*
pJson
)
{
const
STableScanPhysiNode
*
pNode
=
(
const
STableScanPhysiNode
*
)
pObj
;
...
...
@@ -1578,6 +1579,9 @@ static int32_t physiTableScanNodeToJson(const void* pObj, SJson* pJson) {
if
(
TSDB_CODE_SUCCESS
==
code
)
{
code
=
tjsonAddBoolToObject
(
pJson
,
jkTableScanPhysiPlanGroupSort
,
pNode
->
groupSort
);
}
if
(
TSDB_CODE_SUCCESS
==
code
)
{
code
=
tjsonAddBoolToObject
(
pJson
,
jkTableScanPhysiPlanAssignBlockUid
,
pNode
->
assignBlockUid
);
}
return
code
;
}
...
...
@@ -1637,6 +1641,9 @@ static int32_t jsonToPhysiTableScanNode(const SJson* pJson, void* pObj) {
if
(
TSDB_CODE_SUCCESS
==
code
)
{
code
=
tjsonGetBoolValue
(
pJson
,
jkTableScanPhysiPlanGroupSort
,
&
pNode
->
groupSort
);
}
if
(
TSDB_CODE_SUCCESS
==
code
)
{
code
=
tjsonGetBoolValue
(
pJson
,
jkTableScanPhysiPlanAssignBlockUid
,
&
pNode
->
assignBlockUid
);
}
return
code
;
}
...
...
@@ -4518,7 +4525,6 @@ static int32_t jsonToSpecificNode(const SJson* pJson, void* pObj) {
case
QUERY_NODE_PHYSICAL_PLAN_BLOCK_DIST_SCAN
:
return
jsonToPhysiScanNode
(
pJson
,
pObj
);
case
QUERY_NODE_PHYSICAL_PLAN_LAST_ROW_SCAN
:
return
jsonToPhysiLastRowScanNode
(
pJson
,
pObj
);
case
QUERY_NODE_PHYSICAL_PLAN_TABLE_SCAN
:
case
QUERY_NODE_PHYSICAL_PLAN_TABLE_MERGE_SCAN
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录