Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
df4fd528
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看板
提交
df4fd528
编写于
11月 11, 2022
作者:
L
Liu Jicong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(stream): tbname max len to 192
上级
3f4a2480
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
34 addition
and
21 deletion
+34
-21
source/dnode/vnode/src/tq/tqSink.c
source/dnode/vnode/src/tq/tqSink.c
+5
-2
source/libs/executor/src/groupoperator.c
source/libs/executor/src/groupoperator.c
+8
-7
source/libs/executor/src/scanoperator.c
source/libs/executor/src/scanoperator.c
+21
-12
未找到文件。
source/dnode/vnode/src/tq/tqSink.c
浏览文件 @
df4fd528
...
...
@@ -244,7 +244,7 @@ SSubmitReq* tqBlockToSubmit(SVnode* pVnode, const SArray* pBlocks, const STSchem
int32_t
rows
=
pDataBlock
->
info
.
rows
;
tqDebug
(
"tq sink, convert block %d, rows: %d"
,
i
,
rows
);
tqDebug
(
"tq sink, convert block
1
%d, rows: %d"
,
i
,
rows
);
int32_t
dataLen
=
0
;
int32_t
schemaLen
=
0
;
...
...
@@ -486,7 +486,7 @@ void tqSinkToTablePipeline(SStreamTask* pTask, void* vnode, int64_t ver, void* d
blkHead
->
uid
=
0
;
blkHead
->
schemaLen
=
0
;
tqDebug
(
"tq sink, convert block %d, rows: %d"
,
i
,
rows
);
tqDebug
(
"tq sink, convert block
2
%d, rows: %d"
,
i
,
rows
);
int32_t
dataLen
=
0
;
void
*
blkSchema
=
POINTER_SHIFT
(
blkHead
,
sizeof
(
SSubmitBlk
));
...
...
@@ -514,6 +514,9 @@ void tqSinkToTablePipeline(SStreamTask* pTask, void* vnode, int64_t ver, void* d
tdAppendColValToRow
(
&
rb
,
pColumn
->
colId
,
pColumn
->
type
,
TD_VTYPE_NULL
,
NULL
,
false
,
pColumn
->
offset
,
k
);
}
else
{
void
*
colData
=
colDataGetData
(
pColData
,
j
);
if
(
k
==
0
)
{
tqDebug
(
"tq sink, row %d ts %"
PRId64
,
j
,
*
(
int64_t
*
)
colData
);
}
tdAppendColValToRow
(
&
rb
,
pColumn
->
colId
,
pColumn
->
type
,
TD_VTYPE_NORM
,
colData
,
true
,
pColumn
->
offset
,
k
);
}
}
...
...
source/libs/executor/src/groupoperator.c
浏览文件 @
df4fd528
...
...
@@ -816,12 +816,12 @@ SOperatorInfo* createPartitionOperatorInfo(SOperatorInfo* downstream, SPartition
goto
_error
;
}
setOperatorInfo
(
pOperator
,
"PartitionOperator"
,
QUERY_NODE_PHYSICAL_PLAN_PARTITION
,
false
,
OP_NOT_OPENED
,
pInfo
,
pTaskInfo
);
setOperatorInfo
(
pOperator
,
"PartitionOperator"
,
QUERY_NODE_PHYSICAL_PLAN_PARTITION
,
false
,
OP_NOT_OPENED
,
pInfo
,
pTaskInfo
);
pOperator
->
exprSupp
.
numOfExprs
=
numOfCols
;
pOperator
->
exprSupp
.
pExprInfo
=
pExprInfo
;
pOperator
->
fpSet
=
createOperatorFpSet
(
operatorDummyOpenFn
,
hashPartition
,
NULL
,
destroyPartitionOperatorInfo
,
NULL
);
pOperator
->
fpSet
=
createOperatorFpSet
(
operatorDummyOpenFn
,
hashPartition
,
NULL
,
destroyPartitionOperatorInfo
,
NULL
);
code
=
appendDownstream
(
pOperator
,
&
downstream
,
1
);
return
pOperator
;
...
...
@@ -900,7 +900,7 @@ static SSDataBlock* buildStreamPartitionResult(SOperatorInfo* pOperator) {
// TODO check tbname validity
if
(
pData
!=
(
void
*
)
-
1
)
{
memset
(
pDest
->
info
.
parTbName
,
0
,
TSDB_TABLE_NAME_LEN
);
int32_t
len
=
TMIN
(
varDataLen
(
pData
),
TSDB_TABLE_NAME_LEN
);
int32_t
len
=
TMIN
(
varDataLen
(
pData
),
TSDB_TABLE_NAME_LEN
-
1
);
memcpy
(
pDest
->
info
.
parTbName
,
varDataVal
(
pData
),
len
);
/*pDest->info.parTbName[len + 1] = 0;*/
}
else
{
...
...
@@ -1099,11 +1099,12 @@ SOperatorInfo* createStreamPartitionOperatorInfo(SOperatorInfo* downstream, SStr
int32_t
numOfCols
=
0
;
SExprInfo
*
pExprInfo
=
createExprInfo
(
pPartNode
->
part
.
pTargets
,
NULL
,
&
numOfCols
);
setOperatorInfo
(
pOperator
,
"StreamPartitionOperator"
,
QUERY_NODE_PHYSICAL_PLAN_STREAM_PARTITION
,
false
,
OP_NOT_OPENED
,
pInfo
,
pTaskInfo
);
setOperatorInfo
(
pOperator
,
"StreamPartitionOperator"
,
QUERY_NODE_PHYSICAL_PLAN_STREAM_PARTITION
,
false
,
OP_NOT_OPENED
,
pInfo
,
pTaskInfo
);
pOperator
->
exprSupp
.
numOfExprs
=
numOfCols
;
pOperator
->
exprSupp
.
pExprInfo
=
pExprInfo
;
pOperator
->
fpSet
=
createOperatorFpSet
(
operatorDummyOpenFn
,
doStreamHashPartition
,
NULL
,
destroyStreamPartitionOperatorInfo
,
NULL
);
pOperator
->
fpSet
=
createOperatorFpSet
(
operatorDummyOpenFn
,
doStreamHashPartition
,
NULL
,
destroyStreamPartitionOperatorInfo
,
NULL
);
initParDownStream
(
downstream
,
&
pInfo
->
partitionSup
,
&
pInfo
->
scalarSup
);
code
=
appendDownstream
(
pOperator
,
&
downstream
,
1
);
...
...
source/libs/executor/src/scanoperator.c
浏览文件 @
df4fd528
...
...
@@ -946,7 +946,8 @@ SOperatorInfo* createTableScanOperatorInfo(STableScanPhysiNode* pTableScanNode,
pInfo
->
currentGroupId
=
-
1
;
pInfo
->
assignBlockUid
=
pTableScanNode
->
assignBlockUid
;
setOperatorInfo
(
pOperator
,
"TableScanOperator"
,
QUERY_NODE_PHYSICAL_PLAN_TABLE_SCAN
,
false
,
OP_NOT_OPENED
,
pInfo
,
pTaskInfo
);
setOperatorInfo
(
pOperator
,
"TableScanOperator"
,
QUERY_NODE_PHYSICAL_PLAN_TABLE_SCAN
,
false
,
OP_NOT_OPENED
,
pInfo
,
pTaskInfo
);
pOperator
->
exprSupp
.
numOfExprs
=
numOfCols
;
pInfo
->
metaCache
.
pTableMetaEntryCache
=
taosLRUCacheInit
(
1024
*
128
,
-
1
,
.
5
);
...
...
@@ -980,7 +981,8 @@ SOperatorInfo* createTableSeqScanOperatorInfo(void* pReadHandle, SExecTaskInfo*
pInfo
->
dataReader
=
pReadHandle
;
// pInfo->prevGroupId = -1;
setOperatorInfo
(
pOperator
,
"TableSeqScanOperator"
,
QUERY_NODE_PHYSICAL_PLAN_TABLE_SEQ_SCAN
,
false
,
OP_NOT_OPENED
,
pInfo
,
pTaskInfo
);
setOperatorInfo
(
pOperator
,
"TableSeqScanOperator"
,
QUERY_NODE_PHYSICAL_PLAN_TABLE_SEQ_SCAN
,
false
,
OP_NOT_OPENED
,
pInfo
,
pTaskInfo
);
pOperator
->
fpSet
=
createOperatorFpSet
(
operatorDummyOpenFn
,
doTableScanImpl
,
NULL
,
NULL
,
NULL
);
return
pOperator
;
}
...
...
@@ -1136,8 +1138,10 @@ SOperatorInfo* createDataBlockInfoScanOperator(SReadHandle* readHandle, SBlockDi
goto
_error
;
}
setOperatorInfo
(
pOperator
,
"DataBlockDistScanOperator"
,
QUERY_NODE_PHYSICAL_PLAN_BLOCK_DIST_SCAN
,
false
,
OP_NOT_OPENED
,
pInfo
,
pTaskInfo
);
pOperator
->
fpSet
=
createOperatorFpSet
(
operatorDummyOpenFn
,
doBlockInfoScan
,
NULL
,
destroyBlockDistScanOperatorInfo
,
NULL
);
setOperatorInfo
(
pOperator
,
"DataBlockDistScanOperator"
,
QUERY_NODE_PHYSICAL_PLAN_BLOCK_DIST_SCAN
,
false
,
OP_NOT_OPENED
,
pInfo
,
pTaskInfo
);
pOperator
->
fpSet
=
createOperatorFpSet
(
operatorDummyOpenFn
,
doBlockInfoScan
,
NULL
,
destroyBlockDistScanOperatorInfo
,
NULL
);
return
pOperator
;
_error:
...
...
@@ -1581,7 +1585,7 @@ static void calBlockTbName(SExprSupp* pTbNameCalSup, SSDataBlock* pBlock) {
// TODO check tbname validation
if
(
pData
!=
(
void
*
)
-
1
&&
pData
!=
NULL
)
{
memset
(
pBlock
->
info
.
parTbName
,
0
,
TSDB_TABLE_NAME_LEN
);
int32_t
len
=
TMIN
(
varDataLen
(
pData
),
TSDB_TABLE_NAME_LEN
);
int32_t
len
=
TMIN
(
varDataLen
(
pData
),
TSDB_TABLE_NAME_LEN
-
1
);
memcpy
(
pBlock
->
info
.
parTbName
,
varDataVal
(
pData
),
len
);
/*pBlock->info.parTbName[len + 1] = 0;*/
}
else
{
...
...
@@ -2351,7 +2355,8 @@ SOperatorInfo* createRawScanOperatorInfo(SReadHandle* pHandle, SExecTaskInfo* pT
pInfo
->
vnode
=
pHandle
->
vnode
;
pInfo
->
sContext
=
pHandle
->
sContext
;
setOperatorInfo
(
pOperator
,
"RawScanOperator"
,
QUERY_NODE_PHYSICAL_PLAN_TABLE_SCAN
,
false
,
OP_NOT_OPENED
,
pInfo
,
pTaskInfo
);
setOperatorInfo
(
pOperator
,
"RawScanOperator"
,
QUERY_NODE_PHYSICAL_PLAN_TABLE_SCAN
,
false
,
OP_NOT_OPENED
,
pInfo
,
pTaskInfo
);
pOperator
->
fpSet
=
createOperatorFpSet
(
NULL
,
doRawScan
,
NULL
,
destroyRawScanOperatorInfo
,
NULL
);
return
pOperator
;
...
...
@@ -2537,7 +2542,8 @@ SOperatorInfo* createStreamScanOperatorInfo(SReadHandle* pHandle, STableScanPhys
pInfo
->
assignBlockUid
=
pTableScanNode
->
assignBlockUid
;
pInfo
->
partitionSup
.
needCalc
=
false
;
setOperatorInfo
(
pOperator
,
"StreamScanOperator"
,
QUERY_NODE_PHYSICAL_PLAN_STREAM_SCAN
,
false
,
OP_NOT_OPENED
,
pInfo
,
pTaskInfo
);
setOperatorInfo
(
pOperator
,
"StreamScanOperator"
,
QUERY_NODE_PHYSICAL_PLAN_STREAM_SCAN
,
false
,
OP_NOT_OPENED
,
pInfo
,
pTaskInfo
);
pOperator
->
exprSupp
.
numOfExprs
=
taosArrayGetSize
(
pInfo
->
pRes
->
pDataBlock
);
__optr_fn_t
nextFn
=
pTaskInfo
->
execModel
==
OPTR_EXEC_MODEL_STREAM
?
doStreamScan
:
doQueueScan
;
...
...
@@ -4175,7 +4181,8 @@ SOperatorInfo* createSysTableScanOperatorInfo(void* readHandle, SSystemTableScan
pInfo
->
readHandle
=
*
(
SReadHandle
*
)
readHandle
;
}
setOperatorInfo
(
pOperator
,
"SysTableScanOperator"
,
QUERY_NODE_PHYSICAL_PLAN_SYSTABLE_SCAN
,
false
,
OP_NOT_OPENED
,
pInfo
,
pTaskInfo
);
setOperatorInfo
(
pOperator
,
"SysTableScanOperator"
,
QUERY_NODE_PHYSICAL_PLAN_SYSTABLE_SCAN
,
false
,
OP_NOT_OPENED
,
pInfo
,
pTaskInfo
);
pOperator
->
exprSupp
.
numOfExprs
=
taosArrayGetSize
(
pInfo
->
pRes
->
pDataBlock
);
pOperator
->
fpSet
=
createOperatorFpSet
(
operatorDummyOpenFn
,
doSysTableScan
,
NULL
,
destroySysScanOperator
,
NULL
);
return
pOperator
;
...
...
@@ -4305,7 +4312,8 @@ SOperatorInfo* createTagScanOperatorInfo(SReadHandle* pReadHandle, STagScanPhysi
pInfo
->
readHandle
=
*
pReadHandle
;
pInfo
->
curPos
=
0
;
setOperatorInfo
(
pOperator
,
"TagScanOperator"
,
QUERY_NODE_PHYSICAL_PLAN_TAG_SCAN
,
false
,
OP_NOT_OPENED
,
pInfo
,
pTaskInfo
);
setOperatorInfo
(
pOperator
,
"TagScanOperator"
,
QUERY_NODE_PHYSICAL_PLAN_TAG_SCAN
,
false
,
OP_NOT_OPENED
,
pInfo
,
pTaskInfo
);
initResultSizeInfo
(
&
pOperator
->
resultInfo
,
4096
);
blockDataEnsureCapacity
(
pInfo
->
pRes
,
pOperator
->
resultInfo
.
capacity
);
...
...
@@ -4815,11 +4823,12 @@ SOperatorInfo* createTableMergeScanOperatorInfo(STableScanPhysiNode* pTableScanN
int32_t
rowSize
=
pInfo
->
pResBlock
->
info
.
rowSize
;
pInfo
->
bufPageSize
=
getProperSortPageSize
(
rowSize
);
setOperatorInfo
(
pOperator
,
"TableMergeScanOperator"
,
QUERY_NODE_PHYSICAL_PLAN_TABLE_MERGE_SCAN
,
false
,
OP_NOT_OPENED
,
pInfo
,
pTaskInfo
);
setOperatorInfo
(
pOperator
,
"TableMergeScanOperator"
,
QUERY_NODE_PHYSICAL_PLAN_TABLE_MERGE_SCAN
,
false
,
OP_NOT_OPENED
,
pInfo
,
pTaskInfo
);
pOperator
->
exprSupp
.
numOfExprs
=
numOfCols
;
pOperator
->
fpSet
=
createOperatorFpSet
(
operatorDummyOpenFn
,
doTableMergeScan
,
NULL
,
destroyTableMergeScanOperatorInfo
,
getTableMergeScanExplainExecInfo
);
pOperator
->
fpSet
=
createOperatorFpSet
(
operatorDummyOpenFn
,
doTableMergeScan
,
NULL
,
destroyTableMergeScanOperatorInfo
,
getTableMergeScanExplainExecInfo
);
pOperator
->
cost
.
openCost
=
0
;
return
pOperator
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录