Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
fe4d13da
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看板
未验证
提交
fe4d13da
编写于
8月 29, 2022
作者:
S
Shengliang Guan
提交者:
GitHub
8月 29, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #16488 from taosdata/feature/TD-14761
fix: cols num error in tmq for query
上级
b5b33d48
bf3231ab
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
13 addition
and
9 deletion
+13
-9
source/dnode/vnode/src/inc/tq.h
source/dnode/vnode/src/inc/tq.h
+1
-1
source/dnode/vnode/src/tq/tq.c
source/dnode/vnode/src/tq/tq.c
+1
-1
source/dnode/vnode/src/tq/tqExec.c
source/dnode/vnode/src/tq/tqExec.c
+6
-1
source/dnode/vnode/src/tq/tqMeta.c
source/dnode/vnode/src/tq/tqMeta.c
+1
-1
source/libs/executor/src/executor.c
source/libs/executor/src/executor.c
+2
-2
tests/system-test/7-tmq/stbTagFilter-1ctb.py
tests/system-test/7-tmq/stbTagFilter-1ctb.py
+2
-3
未找到文件。
source/dnode/vnode/src/inc/tq.h
浏览文件 @
fe4d13da
...
@@ -88,7 +88,7 @@ typedef struct {
...
@@ -88,7 +88,7 @@ typedef struct {
STqExecTb
execTb
;
STqExecTb
execTb
;
STqExecDb
execDb
;
STqExecDb
execDb
;
};
};
//
int32_t numOfCols; // number of out pout column, temporarily used
int32_t
numOfCols
;
// number of out pout column, temporarily used
SSchemaWrapper
*
pSchemaWrapper
;
// columns that are involved in query
SSchemaWrapper
*
pSchemaWrapper
;
// columns that are involved in query
}
STqExecHandle
;
}
STqExecHandle
;
...
...
source/dnode/vnode/src/tq/tq.c
浏览文件 @
fe4d13da
...
@@ -596,7 +596,7 @@ int32_t tqProcessVgChangeReq(STQ* pTq, int64_t version, char* msg, int32_t msgLe
...
@@ -596,7 +596,7 @@ int32_t tqProcessVgChangeReq(STQ* pTq, int64_t version, char* msg, int32_t msgLe
req
.
qmsg
=
NULL
;
req
.
qmsg
=
NULL
;
pHandle
->
execHandle
.
task
=
pHandle
->
execHandle
.
task
=
qCreateQueueExecTaskInfo
(
pHandle
->
execHandle
.
execCol
.
qmsg
,
&
handle
,
NULL
,
qCreateQueueExecTaskInfo
(
pHandle
->
execHandle
.
execCol
.
qmsg
,
&
handle
,
&
pHandle
->
execHandle
.
numOfCols
,
&
pHandle
->
execHandle
.
pSchemaWrapper
);
&
pHandle
->
execHandle
.
pSchemaWrapper
);
ASSERT
(
pHandle
->
execHandle
.
task
);
ASSERT
(
pHandle
->
execHandle
.
task
);
void
*
scanner
=
NULL
;
void
*
scanner
=
NULL
;
...
...
source/dnode/vnode/src/tq/tqExec.c
浏览文件 @
fe4d13da
...
@@ -110,7 +110,12 @@ int64_t tqScan(STQ* pTq, const STqHandle* pHandle, SMqDataRsp* pRsp, SMqMetaRsp*
...
@@ -110,7 +110,12 @@ int64_t tqScan(STQ* pTq, const STqHandle* pHandle, SMqDataRsp* pRsp, SMqMetaRsp*
taosArrayPush
(
pRsp
->
blockSchema
,
&
pSW
);
taosArrayPush
(
pRsp
->
blockSchema
,
&
pSW
);
}
}
}
}
tqAddBlockDataToRsp
(
pDataBlock
,
pRsp
,
taosArrayGetSize
(
pDataBlock
->
pDataBlock
));
if
(
pHandle
->
execHandle
.
subType
==
TOPIC_SUB_TYPE__COLUMN
){
tqAddBlockDataToRsp
(
pDataBlock
,
pRsp
,
pExec
->
numOfCols
);
}
else
{
tqAddBlockDataToRsp
(
pDataBlock
,
pRsp
,
taosArrayGetSize
(
pDataBlock
->
pDataBlock
));
}
pRsp
->
blockNum
++
;
pRsp
->
blockNum
++
;
if
(
pOffset
->
type
==
TMQ_OFFSET__LOG
)
{
if
(
pOffset
->
type
==
TMQ_OFFSET__LOG
)
{
continue
;
continue
;
...
...
source/dnode/vnode/src/tq/tqMeta.c
浏览文件 @
fe4d13da
...
@@ -260,7 +260,7 @@ int32_t tqMetaRestoreHandle(STQ* pTq) {
...
@@ -260,7 +260,7 @@ int32_t tqMetaRestoreHandle(STQ* pTq) {
if
(
handle
.
execHandle
.
subType
==
TOPIC_SUB_TYPE__COLUMN
)
{
if
(
handle
.
execHandle
.
subType
==
TOPIC_SUB_TYPE__COLUMN
)
{
handle
.
execHandle
.
task
=
qCreateQueueExecTaskInfo
(
handle
.
execHandle
.
task
=
qCreateQueueExecTaskInfo
(
handle
.
execHandle
.
execCol
.
qmsg
,
&
reader
,
NULL
,
&
handle
.
execHandle
.
pSchemaWrapper
);
handle
.
execHandle
.
execCol
.
qmsg
,
&
reader
,
&
handle
.
execHandle
.
numOfCols
,
&
handle
.
execHandle
.
pSchemaWrapper
);
ASSERT
(
handle
.
execHandle
.
task
);
ASSERT
(
handle
.
execHandle
.
task
);
void
*
scanner
=
NULL
;
void
*
scanner
=
NULL
;
qExtractStreamScanner
(
handle
.
execHandle
.
task
,
&
scanner
);
qExtractStreamScanner
(
handle
.
execHandle
.
task
,
&
scanner
);
...
...
source/libs/executor/src/executor.c
浏览文件 @
fe4d13da
...
@@ -177,13 +177,13 @@ qTaskInfo_t qCreateQueueExecTaskInfo(void* msg, SReadHandle* readers, int32_t* n
...
@@ -177,13 +177,13 @@ qTaskInfo_t qCreateQueueExecTaskInfo(void* msg, SReadHandle* readers, int32_t* n
// extract the number of output columns
// extract the number of output columns
SDataBlockDescNode
*
pDescNode
=
pPlan
->
pNode
->
pOutputDataBlockDesc
;
SDataBlockDescNode
*
pDescNode
=
pPlan
->
pNode
->
pOutputDataBlockDesc
;
if
(
numOfCols
)
*
numOfCols
=
0
;
*
numOfCols
=
0
;
SNode
*
pNode
;
SNode
*
pNode
;
FOREACH
(
pNode
,
pDescNode
->
pSlots
)
{
FOREACH
(
pNode
,
pDescNode
->
pSlots
)
{
SSlotDescNode
*
pSlotDesc
=
(
SSlotDescNode
*
)
pNode
;
SSlotDescNode
*
pSlotDesc
=
(
SSlotDescNode
*
)
pNode
;
if
(
pSlotDesc
->
output
)
{
if
(
pSlotDesc
->
output
)
{
if
(
numOfCols
)
++
(
*
numOfCols
);
++
(
*
numOfCols
);
}
}
}
}
...
...
tests/system-test/7-tmq/stbTagFilter-1ctb.py
浏览文件 @
fe4d13da
...
@@ -250,15 +250,14 @@ class TDTestCase:
...
@@ -250,15 +250,14 @@ class TDTestCase:
tdLog
.
printNoPrefix
(
"============================================="
)
tdLog
.
printNoPrefix
(
"============================================="
)
tdLog
.
printNoPrefix
(
"======== snapshot is 0: only consume from wal"
)
tdLog
.
printNoPrefix
(
"======== snapshot is 0: only consume from wal"
)
self
.
tmqCase1
()
self
.
tmqCase1
()
#
self.tmqCase2()
self
.
tmqCase2
()
self
.
prepareTestEnv
()
self
.
prepareTestEnv
()
tdLog
.
printNoPrefix
(
"===================================================================="
)
tdLog
.
printNoPrefix
(
"===================================================================="
)
tdLog
.
printNoPrefix
(
"======== snapshot is 1: firstly consume from tsbs, and then from wal"
)
tdLog
.
printNoPrefix
(
"======== snapshot is 1: firstly consume from tsbs, and then from wal"
)
self
.
snapshot
=
1
self
.
snapshot
=
1
self
.
tmqCase1
()
self
.
tmqCase1
()
# self.tmqCase2()
self
.
tmqCase2
()
def
stop
(
self
):
def
stop
(
self
):
tdSql
.
close
()
tdSql
.
close
()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录