Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
0bd2c7f1
T
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1184
Star
22015
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,发现更多精彩内容 >>
未验证
提交
0bd2c7f1
编写于
7月 14, 2022
作者:
L
liuyao
提交者:
GitHub
7月 14, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #14881 from taosdata/feature/TD-17357
feat(stream): interval offset
上级
6445671e
13519f8f
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
9 addition
and
5 deletion
+9
-5
source/libs/executor/src/executil.c
source/libs/executor/src/executil.c
+3
-0
source/libs/stream/src/streamUpdate.c
source/libs/stream/src/streamUpdate.c
+1
-1
tests/script/jenkins/basic.txt
tests/script/jenkins/basic.txt
+1
-0
tests/script/tsim/stream/sliding.sim
tests/script/tsim/stream/sliding.sim
+4
-4
未找到文件。
source/libs/executor/src/executil.c
浏览文件 @
0bd2c7f1
...
...
@@ -853,6 +853,9 @@ static STimeWindow doCalculateTimeWindow(int64_t ts, SInterval* pInterval) {
w
.
ekey
=
taosTimeAdd
(
w
.
skey
,
pInterval
->
interval
,
pInterval
->
intervalUnit
,
pInterval
->
precision
)
-
1
;
}
else
{
int64_t
st
=
w
.
skey
;
if
(
pInterval
->
offset
>
0
)
{
st
=
taosTimeAdd
(
st
,
pInterval
->
offset
,
pInterval
->
offsetUnit
,
pInterval
->
precision
);
}
if
(
st
>
ts
)
{
st
-=
((
st
-
ts
+
pInterval
->
sliding
-
1
)
/
pInterval
->
sliding
)
*
pInterval
->
sliding
;
...
...
source/libs/stream/src/streamUpdate.c
浏览文件 @
0bd2c7f1
...
...
@@ -17,7 +17,7 @@
#include "ttime.h"
#define DEFAULT_FALSE_POSITIVE 0.01
#define DEFAULT_BUCKET_SIZE 1
024
#define DEFAULT_BUCKET_SIZE 1
31072
#define ROWS_PER_MILLISECOND 1
#define MAX_NUM_SCALABLE_BF 100000
#define MIN_NUM_SCALABLE_BF 10
...
...
tests/script/jenkins/basic.txt
浏览文件 @
0bd2c7f1
...
...
@@ -114,6 +114,7 @@
# ./test.sh -f tsim/stream/schedSnode.sim
./test.sh -f tsim/stream/windowClose.sim
./test.sh -f tsim/stream/ignoreExpiredData.sim
./test.sh -f tsim/stream/sliding.sim
# ---- transaction
./test.sh -f tsim/trans/lossdata1.sim
...
...
tests/script/tsim/stream/sliding.sim
浏览文件 @
0bd2c7f1
...
...
@@ -17,10 +17,10 @@ sql use test
sql create stable st(ts timestamp, a int, b int, c int, d double) 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 create stream streams1 trigger at_once into streamt as select _wstart
ts
, count(*) c1, sum(a) c3 , max(b) c4, min(c) c5 from t1 interval(10s) sliding (5s);
sql create stream streams2 trigger at_once watermark 1d into streamt2 as select _wstart
ts
, count(*) c1, sum(a) c3 , max(b) c4, min(c) c5 from t1 interval(10s) sliding (5s);
sql create stream stream_t1 trigger at_once into streamtST as select _wstart
ts
, count(*) c1, sum(a) c3 , max(b) c4, min(c) c5 from st interval(10s) sliding (5s);
sql create stream stream_t2 trigger at_once watermark 1d into streamtST2 as select _wstart
ts
, count(*) c1, sum(a) c3 , max(b) c4, min(c) c5 from st interval(10s) sliding (5s);
sql create stream streams1 trigger at_once into streamt as select _wstart, count(*) c1, sum(a) c3 , max(b) c4, min(c) c5 from t1 interval(10s) sliding (5s);
sql create stream streams2 trigger at_once watermark 1d into streamt2 as select _wstart, count(*) c1, sum(a) c3 , max(b) c4, min(c) c5 from t1 interval(10s) sliding (5s);
sql create stream stream_t1 trigger at_once into streamtST as select _wstart, count(*) c1, sum(a) c3 , max(b) c4, min(c) c5 from st interval(10s) sliding (5s);
sql create stream stream_t2 trigger at_once watermark 1d into streamtST2 as select _wstart, count(*) c1, sum(a) c3 , max(b) c4, min(c) c5 from st interval(10s) sliding (5s);
sql insert into t1 values(1648791210000,1,2,3,1.0);
sql insert into t1 values(1648791216000,2,2,3,1.1);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录