Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
a2bcbb4d
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看板
未验证
提交
a2bcbb4d
编写于
5月 15, 2023
作者:
D
dapan1121
提交者:
GitHub
5月 15, 2023
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #21301 from taosdata/fix/TS-3404
fix: fix linear interpolation error
上级
6c1a7167
8db7c864
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
107 addition
and
0 deletion
+107
-0
source/libs/executor/src/timesliceoperator.c
source/libs/executor/src/timesliceoperator.c
+5
-0
tests/parallel_test/cases.task
tests/parallel_test/cases.task
+1
-0
tests/system-test/99-TDcase/TS-3404.py
tests/system-test/99-TDcase/TS-3404.py
+101
-0
未找到文件。
source/libs/executor/src/timesliceoperator.c
浏览文件 @
a2bcbb4d
...
...
@@ -244,6 +244,11 @@ static bool genInterpolationResult(STimeSliceOperatorInfo* pSliceInfo, SExprSupp
break
;
}
if
(
end
.
key
!=
INT64_MIN
&&
end
.
key
<
pSliceInfo
->
current
)
{
hasInterp
=
false
;
break
;
}
if
(
start
.
key
==
INT64_MIN
||
end
.
key
==
INT64_MIN
)
{
colDataSetNULL
(
pDst
,
rows
);
break
;
...
...
tests/parallel_test/cases.task
浏览文件 @
a2bcbb4d
...
...
@@ -118,6 +118,7 @@
,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmq3mnodeSwitch.py -N 6 -M 3 -n 3
,,y,system-test,./pytest.sh python3 ./test.py -f 99-TDcase/TD-19201.py
,,y,system-test,./pytest.sh python3 ./test.py -f 99-TDcase/TD-21561.py
,,y,system-test,./pytest.sh python3 ./test.py -f 99-TDcase/TS-3404.py
,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/balance_vgroups_r1.py -N 6
,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/taosShell.py
...
...
tests/system-test/99-TDcase/TS-3404.py
0 → 100644
浏览文件 @
a2bcbb4d
import
taos
import
sys
import
time
import
socket
import
os
import
threading
from
util.log
import
*
from
util.sql
import
*
from
util.cases
import
*
from
util.dnodes
import
*
class
TDTestCase
:
hostname
=
socket
.
gethostname
()
def
init
(
self
,
conn
,
logSql
,
replicaVar
=
1
):
self
.
replicaVar
=
int
(
replicaVar
)
tdLog
.
debug
(
f
"start to excute
{
__file__
}
"
)
#tdSql.init(conn.cursor())
tdSql
.
init
(
conn
.
cursor
(),
logSql
)
# output sql.txt file
def
getBuildPath
(
self
):
selfPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
))
if
(
"community"
in
selfPath
):
projPath
=
selfPath
[:
selfPath
.
find
(
"community"
)]
else
:
projPath
=
selfPath
[:
selfPath
.
find
(
"tests"
)]
for
root
,
dirs
,
files
in
os
.
walk
(
projPath
):
if
(
"taosd"
in
files
or
"taosd.exe"
in
files
):
rootRealPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
root
))
if
(
"packaging"
not
in
rootRealPath
):
buildPath
=
root
[:
len
(
root
)
-
len
(
"/build/bin"
)]
break
return
buildPath
def
create_tables
(
self
):
tdSql
.
execute
(
f
"CREATE STABLE `stb5` (`ts` TIMESTAMP, `ip_value` FLOAT, `ip_quality` INT) TAGS (`t1` INT)"
)
tdSql
.
execute
(
f
"CREATE TABLE `t_11` USING `stb5` (`t1`) TAGS (1)"
)
def
insert_data
(
self
):
tdLog
.
debug
(
"start to insert data ............"
)
tdSql
.
execute
(
f
"INSERT INTO `t_11` VALUES ('2023-05-10 09:30:47.722', 10.30000, 100)"
)
tdSql
.
execute
(
f
"INSERT INTO `t_11` VALUES ('2023-05-10 09:30:56.383', 12.30000, 100)"
)
tdSql
.
execute
(
f
"INSERT INTO `t_11` VALUES ('2023-05-10 09:48:55.778', 13.30000, 100)"
)
tdSql
.
execute
(
f
"INSERT INTO `t_11` VALUES ('2023-05-10 09:51:50.821', 9.30000, 100)"
)
tdSql
.
execute
(
f
"INSERT INTO `t_11` VALUES ('2023-05-10 09:58:07.162', 9.30000, 100)"
)
tdSql
.
execute
(
f
"INSERT INTO `t_11` VALUES ('2023-05-10 13:41:16.075', 9.30000, 100)"
)
tdSql
.
execute
(
f
"INSERT INTO `t_11` VALUES ('2023-05-13 14:12:58.318', 21.00000, 100)"
)
tdSql
.
execute
(
f
"INSERT INTO `t_11` VALUES ('2023-05-13 14:13:21.328', 1.10000, 100)"
)
tdSql
.
execute
(
f
"INSERT INTO `t_11` VALUES ('2023-05-13 14:35:24.258', 1.30000, 100)"
)
tdSql
.
execute
(
f
"INSERT INTO `t_11` VALUES ('2023-05-13 16:56:49.033', 1.80000, 100)"
)
tdLog
.
debug
(
"insert data ............ [OK]"
)
def
run
(
self
):
tdSql
.
prepare
()
self
.
create_tables
()
self
.
insert_data
()
tdLog
.
printNoPrefix
(
"======== test TS-3404"
)
tdSql
.
query
(
f
"select _irowts, interp(ip_value) from t_11 range('2023-05-13 14:00:00', '2023-05-13 15:00:00') every(300s) fill(linear);"
)
tdSql
.
checkRows
(
13
)
tdSql
.
checkData
(
0
,
0
,
'2023-05-13 14:00:00.000'
)
tdSql
.
checkData
(
1
,
0
,
'2023-05-13 14:05:00.000'
)
tdSql
.
checkData
(
2
,
0
,
'2023-05-13 14:10:00.000'
)
tdSql
.
checkData
(
3
,
0
,
'2023-05-13 14:15:00.000'
)
tdSql
.
checkData
(
4
,
0
,
'2023-05-13 14:20:00.000'
)
tdSql
.
checkData
(
5
,
0
,
'2023-05-13 14:25:00.000'
)
tdSql
.
checkData
(
6
,
0
,
'2023-05-13 14:30:00.000'
)
tdSql
.
checkData
(
7
,
0
,
'2023-05-13 14:35:00.000'
)
tdSql
.
checkData
(
8
,
0
,
'2023-05-13 14:40:00.000'
)
tdSql
.
checkData
(
9
,
0
,
'2023-05-13 14:45:00.000'
)
tdSql
.
checkData
(
10
,
0
,
'2023-05-13 14:50:00.000'
)
tdSql
.
checkData
(
11
,
0
,
'2023-05-13 14:55:00.000'
)
tdSql
.
checkData
(
12
,
0
,
'2023-05-13 15:00:00.000'
)
tdSql
.
checkData
(
0
,
1
,
20.96512
)
tdSql
.
checkData
(
1
,
1
,
20.97857
)
tdSql
.
checkData
(
2
,
1
,
20.99201
)
tdSql
.
checkData
(
3
,
1
,
1.114917
)
tdSql
.
checkData
(
4
,
1
,
1.160271
)
tdSql
.
checkData
(
5
,
1
,
1.205625
)
tdSql
.
checkData
(
6
,
1
,
1.250978
)
tdSql
.
checkData
(
7
,
1
,
1.296333
)
tdSql
.
checkData
(
8
,
1
,
1.316249
)
tdSql
.
checkData
(
9
,
1
,
1.333927
)
tdSql
.
checkData
(
10
,
1
,
1.351607
)
tdSql
.
checkData
(
11
,
1
,
1.369285
)
tdSql
.
checkData
(
12
,
1
,
1.386964
)
def
stop
(
self
):
tdSql
.
close
()
tdLog
.
success
(
f
"
{
__file__
}
successfully executed"
)
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录