Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
6aed8932
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看板
未验证
提交
6aed8932
编写于
11月 17, 2022
作者:
D
dapan1121
提交者:
GitHub
11月 17, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #18231 from taosdata/fix/TD-20428
fix:fill operator core
上级
4395c55e
507aa0c7
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
102 addition
and
2 deletion
+102
-2
source/libs/executor/src/executorimpl.c
source/libs/executor/src/executorimpl.c
+1
-2
source/libs/executor/src/timewindowoperator.c
source/libs/executor/src/timewindowoperator.c
+2
-0
tests/script/tsim/parser/fill.sim
tests/script/tsim/parser/fill.sim
+99
-0
未找到文件。
source/libs/executor/src/executorimpl.c
浏览文件 @
6aed8932
...
...
@@ -1994,8 +1994,7 @@ static void doHandleRemainBlockForNewGroupImpl(SOperatorInfo* pOperator, SFillOp
int32_t
scanFlag
=
MAIN_SCAN
;
getTableScanInfo
(
pOperator
,
&
order
,
&
scanFlag
);
int64_t
ekey
=
Q_STATUS_EQUAL
(
pTaskInfo
->
status
,
TASK_COMPLETED
)
?
pInfo
->
win
.
ekey
:
pInfo
->
existNewGroupBlock
->
info
.
window
.
ekey
;
int64_t
ekey
=
pInfo
->
existNewGroupBlock
->
info
.
window
.
ekey
;
taosResetFillInfo
(
pInfo
->
pFillInfo
,
getFillInfoStart
(
pInfo
->
pFillInfo
));
blockDataCleanup
(
pInfo
->
pRes
);
...
...
source/libs/executor/src/timewindowoperator.c
浏览文件 @
6aed8932
...
...
@@ -4898,6 +4898,7 @@ static void doMergeAlignedIntervalAgg(SOperatorInfo* pOperator) {
if
(
pMiaInfo
->
groupId
==
0
)
{
if
(
pMiaInfo
->
groupId
!=
pBlock
->
info
.
groupId
)
{
pMiaInfo
->
groupId
=
pBlock
->
info
.
groupId
;
pRes
->
info
.
groupId
=
pMiaInfo
->
groupId
;
}
}
else
{
if
(
pMiaInfo
->
groupId
!=
pBlock
->
info
.
groupId
)
{
...
...
@@ -4911,6 +4912,7 @@ static void doMergeAlignedIntervalAgg(SOperatorInfo* pOperator) {
break
;
}
else
{
// continue
pRes
->
info
.
groupId
=
pMiaInfo
->
groupId
;
}
}
...
...
tests/script/tsim/parser/fill.sim
浏览文件 @
6aed8932
...
...
@@ -1049,4 +1049,103 @@ print =============== clear
# return -1
#endi
print ============== fill
sql drop database if exists test;
sql create database test vgroups 4;
sql use test;
sql create stable st(ts timestamp,a int,b int,c int) tags(ta int,tb int,tc int);
sql create table t1 using st tags(1,1,1);
sql create table t2 using st tags(2,2,2);
sql insert into t1 values(1648712211000,1,2,3);
sql insert into t1 values(1648712225000,2,2,3);
sql insert into t2 values(1648712212000,1,2,3);
sql insert into t2 values(1648712226000,2,2,3);
$loop_count = 0
loop0:
sleep 200
sql select count(*) from(select count(a) from st where ts >= 1648712201000 and ts <= 1648732226000 partition by tbname interval(1s) fill(value, -1));
$loop_count = $loop_count + 1
if $loop_count == 20 then
return -1
endi
if $data00 != 20026 then
print =====data00=$data00
goto loop0
endi
if $data10 != 20026 then
print =====data10=$data10
goto loop0
endi
sql select _wstart, count(a) from st where ts >= 1648712201000 and ts <= 1648732226000 partition by tbname interval(1s) fill(prev);
if $rows != 40052 then
print =====rows=$rows
return -1
endi
sql select _wstart, count(a) from st where ts >= 1648712201000 and ts <= 1648732226000 partition by tbname interval(1s) fill(next);
if $rows != 40052 then
print =====rows=$rows
return -1
endi
sql select _wstart, count(a) from st where ts >= 1648712201000 and ts <= 1648732226000 partition by tbname interval(1s) fill(linear);
if $rows != 40052 then
print =====rows=$rows
return -1
endi
sql select _wstart, count(a) from st where ts >= 1648712201000 and ts <= 1648732226000 partition by tbname interval(1s) fill(NULL);
if $rows != 40052 then
print =====rows=$rows
return -1
endi
sql select _wstart, count(a) from t1 where ts >= 1648712201000 and ts <= 1648732226000 partition by tbname interval(1s) fill(value, -1);
if $rows != 20026 then
print =====rows=$rows
return -1
endi
sql select _wstart, count(a) from t1 where ts >= 1648712201000 and ts <= 1648732226000 partition by tbname interval(1s) fill(NULL);
if $rows != 20026 then
print =====rows=$rows
return -1
endi
sql select _wstart, count(a) from t1 where ts >= 1648712201000 and ts <= 1648732226000 partition by tbname interval(1s) fill(prev);
if $rows != 20026 then
print =====rows=$rows
return -1
endi
sql select _wstart, count(a) from t1 where ts >= 1648712201000 and ts <= 1648732226000 partition by tbname interval(1s) fill(next);
if $rows != 20026 then
print =====rows=$rows
return -1
endi
sql select _wstart, count(a) from t1 where ts >= 1648712201000 and ts <= 1648732226000 partition by tbname interval(1s) fill(linear);
if $rows != 20026 then
print =====rows=$rows
return -1
endi
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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录