Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
20b3f8c1
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看板
未验证
提交
20b3f8c1
编写于
8月 11, 2023
作者:
D
dapan1121
提交者:
GitHub
8月 11, 2023
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #22402 from taosdata/fix/TS-3799
fix: add time window boundary check before interpolation
上级
b81fe203
b6e0e076
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
43 addition
and
0 deletion
+43
-0
source/libs/executor/src/timesliceoperator.c
source/libs/executor/src/timesliceoperator.c
+4
-0
tests/system-test/2-query/interp.py
tests/system-test/2-query/interp.py
+39
-0
未找到文件。
source/libs/executor/src/timesliceoperator.c
浏览文件 @
20b3f8c1
...
...
@@ -848,6 +848,10 @@ static void doHandleTimeslice(SOperatorInfo* pOperator, SSDataBlock* pBlock) {
bool
ignoreNull
=
getIgoreNullRes
(
pSup
);
int32_t
order
=
TSDB_ORDER_ASC
;
if
(
checkWindowBoundReached
(
pSliceInfo
))
{
return
;
}
int32_t
code
=
initKeeperInfo
(
pSliceInfo
,
pBlock
,
&
pOperator
->
exprSupp
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
T_LONG_JMP
(
pTaskInfo
->
env
,
code
);
...
...
tests/system-test/2-query/interp.py
浏览文件 @
20b3f8c1
...
...
@@ -20,6 +20,7 @@ class TDTestCase:
tbname
=
"tb"
tbname1
=
"tb1"
tbname2
=
"tb2"
tbname3
=
"tb3"
stbname
=
"stb"
ctbname1
=
"ctb1"
ctbname2
=
"ctb2"
...
...
@@ -5607,6 +5608,44 @@ class TDTestCase:
tdSql
.
query
(
f
"select _irowts, _isfilled, interp(c0) from
{
dbname
}
.
{
stbname_single
}
partition by tbname range('2020-02-01 00:00:06') fill(linear)"
)
tdSql
.
checkRows
(
0
)
#### TS-3799 ####
tdSql
.
execute
(
f
'''create table if not exists
{
dbname
}
.
{
tbname3
}
(ts timestamp, c0 double)'''
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.
{
tbname3
}
values ('2023-08-06 23:59:51.000000000', 4.233947800000000)"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.
{
tbname3
}
values ('2023-08-06 23:59:52.000000000', 3.606781000000000)"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.
{
tbname3
}
values ('2023-08-06 23:59:52.500000000', 3.162353500000000)"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.
{
tbname3
}
values ('2023-08-06 23:59:53.000000000', 3.162292500000000)"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.
{
tbname3
}
values ('2023-08-06 23:59:53.500000000', 4.998230000000000)"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.
{
tbname3
}
values ('2023-08-06 23:59:54.400000000', 8.800414999999999)"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.
{
tbname3
}
values ('2023-08-06 23:59:54.900000000', 8.853271500000000)"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.
{
tbname3
}
values ('2023-08-06 23:59:55.900000000', 7.507751500000000)"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.
{
tbname3
}
values ('2023-08-06 23:59:56.400000000', 7.510681000000000)"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.
{
tbname3
}
values ('2023-08-06 23:59:56.900000000', 7.841614000000000)"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.
{
tbname3
}
values ('2023-08-06 23:59:57.900000000', 8.153809000000001)"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.
{
tbname3
}
values ('2023-08-06 23:59:58.500000000', 6.866455000000000)"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.
{
tbname3
}
values ('2023-08-06 23:59:59.000000000', 6.869140600000000)"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.
{
tbname3
}
values ('2023-08-07 00:00:00.000000000', 0.261475000000001)"
)
tdSql
.
query
(
f
"select _irowts, interp(c0) from
{
dbname
}
.
{
tbname3
}
range('2023-08-06 23:59:00','2023-08-06 23:59:59') every(1m) fill(next)"
)
tdSql
.
checkRows
(
1
);
tdSql
.
checkData
(
0
,
0
,
'2023-08-06 23:59:00'
)
tdSql
.
checkData
(
0
,
1
,
4.233947800000000
)
tdSql
.
query
(
f
"select _irowts, interp(c0) from
{
dbname
}
.
{
tbname3
}
range('2023-08-06 23:59:00','2023-08-06 23:59:59') every(1m) fill(value, 1)"
)
tdSql
.
checkRows
(
1
);
tdSql
.
checkData
(
0
,
0
,
'2023-08-06 23:59:00'
)
tdSql
.
checkData
(
0
,
1
,
1
)
tdSql
.
query
(
f
"select _irowts, interp(c0) from
{
dbname
}
.
{
tbname3
}
range('2023-08-06 23:59:00','2023-08-06 23:59:59') every(1m) fill(null)"
)
tdSql
.
checkRows
(
1
);
tdSql
.
checkData
(
0
,
0
,
'2023-08-06 23:59:00'
)
tdSql
.
checkData
(
0
,
1
,
None
)
def
stop
(
self
):
tdSql
.
close
()
tdLog
.
success
(
f
"
{
__file__
}
successfully executed"
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录