Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
257b7297
T
TDengine
项目概览
taosdata
/
TDengine
12 个月 前同步成功
通知
1180
Star
22014
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
257b7297
编写于
4月 09, 2022
作者:
D
dapan1121
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feature/qnode
上级
a8f740bc
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
45 addition
and
19 deletion
+45
-19
source/libs/executor/src/executorimpl.c
source/libs/executor/src/executorimpl.c
+18
-11
source/libs/executor/src/scanoperator.c
source/libs/executor/src/scanoperator.c
+15
-7
source/libs/scalar/src/filter.c
source/libs/scalar/src/filter.c
+11
-0
tests/script/tsim/query/stddev.sim
tests/script/tsim/query/stddev.sim
+1
-1
未找到文件。
source/libs/executor/src/executorimpl.c
浏览文件 @
257b7297
...
...
@@ -3297,6 +3297,7 @@ void doFilter(const SNode* pFilterNode, SSDataBlock* pBlock) {
int8_t
*
rowRes
=
NULL
;
bool
keep
=
filterExecute
(
filter
,
pBlock
,
&
rowRes
,
NULL
,
param1
.
numOfCols
);
filterFreeInfo
(
filter
);
SSDataBlock
*
px
=
createOneDataBlock
(
pBlock
);
blockDataEnsureCapacity
(
px
,
pBlock
->
info
.
rows
);
...
...
@@ -3306,19 +3307,25 @@ void doFilter(const SNode* pFilterNode, SSDataBlock* pBlock) {
for
(
int32_t
i
=
0
;
i
<
pBlock
->
info
.
numOfCols
;
++
i
)
{
SColumnInfoData
*
pDst
=
taosArrayGet
(
px
->
pDataBlock
,
i
);
SColumnInfoData
*
pSrc
=
taosArrayGet
(
pBlock
->
pDataBlock
,
i
);
if
(
keep
)
{
colDataAssign
(
pDst
,
pSrc
,
pBlock
->
info
.
rows
);
numOfRow
=
pBlock
->
info
.
rows
;
}
else
if
(
NULL
!=
rowRes
)
{
numOfRow
=
0
;
for
(
int32_t
j
=
0
;
j
<
pBlock
->
info
.
rows
;
++
j
)
{
if
(
rowRes
[
j
]
==
0
)
{
continue
;
}
numOfRow
=
0
;
for
(
int32_t
j
=
0
;
j
<
pBlock
->
info
.
rows
;
++
j
)
{
if
(
rowRes
[
j
]
==
0
)
{
continue
;
}
if
(
colDataIsNull_s
(
pSrc
,
j
))
{
colDataAppendNULL
(
pDst
,
numOfRow
);
}
else
{
colDataAppend
(
pDst
,
numOfRow
,
colDataGetData
(
pSrc
,
j
),
false
);
if
(
colDataIsNull_s
(
pSrc
,
j
))
{
colDataAppendNULL
(
pDst
,
numOfRow
);
}
else
{
colDataAppend
(
pDst
,
numOfRow
,
colDataGetData
(
pSrc
,
j
),
false
);
}
numOfRow
+=
1
;
}
numOfRow
+=
1
;
}
else
{
numOfRow
=
0
;
}
*
pSrc
=
*
pDst
;
...
...
source/libs/executor/src/scanoperator.c
浏览文件 @
257b7297
...
...
@@ -596,6 +596,7 @@ static SSDataBlock* doFilterResult(SSysTableScanInfo* pInfo) {
int8_t
*
rowRes
=
NULL
;
bool
keep
=
filterExecute
(
filter
,
pInfo
->
pRes
,
&
rowRes
,
NULL
,
param1
.
numOfCols
);
filterFreeInfo
(
filter
);
SSDataBlock
*
px
=
createOneDataBlock
(
pInfo
->
pRes
);
blockDataEnsureCapacity
(
px
,
pInfo
->
pRes
->
info
.
rows
);
...
...
@@ -606,14 +607,21 @@ static SSDataBlock* doFilterResult(SSysTableScanInfo* pInfo) {
SColumnInfoData
*
pDest
=
taosArrayGet
(
px
->
pDataBlock
,
i
);
SColumnInfoData
*
pSrc
=
taosArrayGet
(
pInfo
->
pRes
->
pDataBlock
,
i
);
numOfRow
=
0
;
for
(
int32_t
j
=
0
;
j
<
pInfo
->
pRes
->
info
.
rows
;
++
j
)
{
if
(
rowRes
[
j
]
==
0
)
{
continue
;
if
(
keep
)
{
colDataAssign
(
pDest
,
pSrc
,
pInfo
->
pRes
->
info
.
rows
);
numOfRow
=
pInfo
->
pRes
->
info
.
rows
;
}
else
if
(
NULL
!=
rowRes
)
{
numOfRow
=
0
;
for
(
int32_t
j
=
0
;
j
<
pInfo
->
pRes
->
info
.
rows
;
++
j
)
{
if
(
rowRes
[
j
]
==
0
)
{
continue
;
}
colDataAppend
(
pDest
,
numOfRow
,
colDataGetData
(
pSrc
,
j
),
false
);
numOfRow
+=
1
;
}
colDataAppend
(
pDest
,
numOfRow
,
colDataGetData
(
pSrc
,
j
),
false
);
numOfRow
+=
1
;
}
else
{
numOfRow
=
0
;
}
}
...
...
source/libs/scalar/src/filter.c
浏览文件 @
257b7297
...
...
@@ -1797,6 +1797,7 @@ int32_t fltInitValFieldData(SFilterInfo *info) {
}
else
{
SScalarParam
out
=
{.
columnData
=
taosMemoryCalloc
(
1
,
sizeof
(
SColumnInfoData
))};
out
.
columnData
->
info
.
type
=
type
;
out
.
columnData
->
info
.
bytes
=
tDataTypes
[
type
].
bytes
;
// todo refactor the convert
int32_t
code
=
doConvertDataType
(
var
,
&
out
);
...
...
@@ -1804,6 +1805,8 @@ int32_t fltInitValFieldData(SFilterInfo *info) {
qError
(
"convert value to type[%d] failed"
,
type
);
return
TSDB_CODE_TSC_INVALID_OPERATION
;
}
memcpy
(
fi
->
data
,
out
.
columnData
->
pData
,
out
.
columnData
->
info
.
bytes
);
}
}
...
...
@@ -3638,6 +3641,10 @@ int32_t fltGetDataFromSlotId(void *param, int32_t id, void **data) {
int32_t
filterSetDataFromSlotId
(
SFilterInfo
*
info
,
void
*
param
)
{
if
(
NULL
==
info
)
{
return
TSDB_CODE_QRY_INVALID_INPUT
;
}
return
fltSetColFieldDataImpl
(
info
,
param
,
fltGetDataFromSlotId
,
false
);
}
...
...
@@ -3691,6 +3698,10 @@ _return:
}
bool
filterExecute
(
SFilterInfo
*
info
,
SSDataBlock
*
pSrc
,
int8_t
**
p
,
SColumnDataAgg
*
statis
,
int16_t
numOfCols
)
{
if
(
NULL
==
info
)
{
return
false
;
}
if
(
info
->
scalarMode
)
{
SScalarParam
output
=
{
0
};
...
...
tests/script/tsim/query/stddev.sim
浏览文件 @
257b7297
...
...
@@ -121,4 +121,4 @@ if $rows != 0 then
return -1
endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
system sh/exec.sh -n dnode1 -s stop -x SIGINT
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录