Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
c4cdebb0
TDengine
项目概览
taosdata
/
TDengine
接近 1 年 前同步成功
通知
1181
Star
22014
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看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
c4cdebb0
编写于
3月 31, 2022
作者:
C
cpwu
提交者:
GitHub
3月 31, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #11165 from taosdata/cpwu/3.0
fix interval case
上级
6df2b9b6
2858a705
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
116 addition
and
94 deletion
+116
-94
tests/script/tsim/query/interval-offset.sim
tests/script/tsim/query/interval-offset.sim
+78
-56
tests/script/tsim/query/interval.sim
tests/script/tsim/query/interval.sim
+38
-38
未找到文件。
tests/script/tsim/query/interval-offset.sim
浏览文件 @
c4cdebb0
...
...
@@ -176,6 +176,33 @@ if $data70 != 1 then
return -1
endi
sql select _wstartts, _wendts, _wduration, _qstartts, _qendts, count(tbcol) from ct2 interval(1d, 2h) sliding(12h)
print ===> select count(tbcol), sum(tbcol), max(tbcol), min(tbcol), count(*) from ct2 interval(1d, 2h) sliding(12h)
print ===> rows: $rows
print ===> rows0: $data00 $data01 $data02 $data03 $data04 $data05
print ===> rows1: $data10 $data11 $data12 $data13 $data14 $data15
print ===> rows2: $data20 $data21 $data22 $data23 $data24 $data25
print ===> rows3: $data30 $data31 $data32 $data33 $data34 $data35
print ===> rows4: $data40 $data41 $data42 $data43 $data44 $data45
print ===> rows5: $data50 $data51 $data52 $data53 $data54 $data55
print ===> rows6: $data60 $data61 $data62 $data63 $data64 $data65
print ===> rows7: $data70 $data71 $data72 $data73 $data74 $data75
if $rows != 8 then
return -1
endi
if $data05 != 1 then
return -1
endi
if $data15 != 2 then
return -1
endi
if $data75 != 1 then
return -1
endi
if $data02 != 86400000 then
return -1
endi
sql select count(tbcol), sum(tbcol), max(tbcol), min(tbcol), count(*) from ct3 interval(1n, 1w)
print ===> select count(tbcol), sum(tbcol), max(tbcol), min(tbcol), count(*) from ct3 interval(1n, 1w)
print ===> rows: $rows
...
...
@@ -184,15 +211,15 @@ print ===> rows1: $data10 $data11 $data12 $data13 $data14
print ===> rows2: $data20 $data21 $data22 $data23 $data24
print ===> rows3: $data30 $data31 $data32 $data33 $data34
print ===> rows4: $data40 $data41 $data42 $data43 $data44
#if $rows != 5 then
#
if $rows != 5 then
# return -1
#
endi
#
i
f $data00 != 1 then
#
endi
#
f $data00 != 1 then
# return -1
#
endi
#if $data40 != 1 then
#
endi
#
if $data40 != 1 then
# return -1
#
endi
#
endi
sql select count(tbcol), sum(tbcol), max(tbcol), min(tbcol), count(*) from ct3 interval(1n, 1w) sliding(2w)
print ===> select count(tbcol), sum(tbcol), max(tbcol), min(tbcol), count(*) from ct3 interval(1n, 1w) sliding(2w)
...
...
@@ -322,9 +349,4 @@ endi
#sql select count(*) from car where ts > '2019-05-14 00:00:00' interval(1y, 5d)
#system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
tests/script/tsim/query/interval.sim
浏览文件 @
c4cdebb0
...
...
@@ -59,7 +59,7 @@ if $data04 != 1 then
return -1
endi
#
print =============== step3
print =============== step3
#$cc = 4 * 60000
#$ms = 1601481600000 + $cc
#sql select count(tbcol), sum(tbcol), max(tbcol), min(tbcol), count(tbcol) from $tb where ts <= $ms interval(1m)
...
...
@@ -75,25 +75,25 @@ endi
# return -1
#endi
#
print =============== step4
print =============== step4
#$cc = 40 * 60000
#$ms = 1601481600000 + $cc
#$cc = 1 * 60000
#$ms2 = 1601481600000 - $cc
#sql select count(tbcol), sum(tbcol), max(tbcol), min(tbcol), count(tbcol) from $tb where ts <= $ms and ts > $ms2
interval(1m)
#print ===> select count(tbcol), sum(tbcol), max(tbcol), min(tbcol), count(tbcol) from $tb where ts <= $ms and ts > $ms2
interval(1m)
#
print ===> $rows $data01 $data05
#if $rows != 20 then
#
return -1
#
endi
#if $data00 != 1 then
#
return -1
#
endi
#if $data04 != 1 then
#
return -1
#
endi
sql select _wstartts, _wendts, _wduration, _qstartts, _qendts, count(tbcol) from $tb
interval(1m)
print ===> select _wstartts, _wendts, _wduration, _qstartts, _qendts, count(tbcol) from $tb
interval(1m)
print ===> $rows $data01 $data05
if $rows != $rowNum then
return -1
endi
if $data05 != 1 then
return -1
endi
if $data02 != 60000 then
return -1
endi
#print =============== step5
#$cc = 40 * 60000
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录