Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
loser646
TDengine
提交
b61eaa10
T
TDengine
项目概览
loser646
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
b61eaa10
编写于
8月 13, 2021
作者:
W
wpan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix stddev query condition column issue and add test case
上级
89b4262c
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
22 addition
and
4 deletion
+22
-4
src/client/src/tscSubquery.c
src/client/src/tscSubquery.c
+4
-0
tests/script/general/parser/function.sim
tests/script/general/parser/function.sim
+18
-4
未找到文件。
src/client/src/tscSubquery.c
浏览文件 @
b61eaa10
...
@@ -2397,6 +2397,10 @@ int32_t tscHandleFirstRoundStableQuery(SSqlObj *pSql) {
...
@@ -2397,6 +2397,10 @@ int32_t tscHandleFirstRoundStableQuery(SSqlObj *pSql) {
}
else
{
}
else
{
SSchema
ss
=
{.
type
=
(
uint8_t
)
pCol
->
info
.
type
,
.
bytes
=
pCol
->
info
.
bytes
,
.
colId
=
(
int16_t
)
pCol
->
columnIndex
};
SSchema
ss
=
{.
type
=
(
uint8_t
)
pCol
->
info
.
type
,
.
bytes
=
pCol
->
info
.
bytes
,
.
colId
=
(
int16_t
)
pCol
->
columnIndex
};
tscColumnListInsert
(
pNewQueryInfo
->
colList
,
pCol
->
columnIndex
,
pCol
->
tableUid
,
&
ss
);
tscColumnListInsert
(
pNewQueryInfo
->
colList
,
pCol
->
columnIndex
,
pCol
->
tableUid
,
&
ss
);
int32_t
ti
=
tscColumnExists
(
pNewQueryInfo
->
colList
,
pCol
->
columnIndex
,
pCol
->
tableUid
);
assert
(
ti
>=
0
);
SColumn
*
x
=
taosArrayGetP
(
pNewQueryInfo
->
colList
,
ti
);
tscColumnCopy
(
x
,
pCol
);
}
}
}
}
}
}
...
...
tests/script/general/parser/function.sim
浏览文件 @
b61eaa10
...
@@ -1149,9 +1149,11 @@ endi
...
@@ -1149,9 +1149,11 @@ endi
sql select derivative(test_column_alias_name, 1s, 0) from (select avg(k) test_column_alias_name from t1 interval(1s));
sql select derivative(test_column_alias_name, 1s, 0) from (select avg(k) test_column_alias_name from t1 interval(1s));
sql create table smeters (ts timestamp, current float, voltage int);
sql create table smeters (ts timestamp, current float, voltage int) tags (t1 int);
sql insert into smeters values ('2021-08-08 10:10:10', 10, 1);
sql create table smeter1 using smeters tags (1);
sql insert into smeters values ('2021-08-08 10:10:12', 10, 2);
sql insert into smeter1 values ('2021-08-08 10:10:10', 10, 2);
sql insert into smeter1 values ('2021-08-08 10:10:12', 10, 2);
sql insert into smeter1 values ('2021-08-08 10:10:14', 20, 1);
sql select stddev(voltage) from smeters where ts>='2021-08-08 10:10:10.000' and ts < '2021-08-08 10:10:20.000' and current=10 interval(1000a);
sql select stddev(voltage) from smeters where ts>='2021-08-08 10:10:10.000' and ts < '2021-08-08 10:10:20.000' and current=10 interval(1000a);
if $rows != 2 then
if $rows != 2 then
...
@@ -1160,9 +1162,21 @@ endi
...
@@ -1160,9 +1162,21 @@ endi
if $data00 != @21-08-08 10:10:10.000@ then
if $data00 != @21-08-08 10:10:10.000@ then
return -1
return -1
endi
endi
if $data01 != 0.000000000 then
return -1
endi
if $data10 != @21-08-08 10:10:12.000@ then
if $data10 != @21-08-08 10:10:12.000@ then
return -1
return -1
endi
endi
if $data11 != 0.000000000 then
return -1
endi
sql select stddev(voltage) from smeters where ts>='2021-08-08 10:10:10.000' and ts < '2021-08-08 10:10:20.000' and current=10;
if $rows != 1 then
return -1
endi
if $data00 != 0.000000000 then
return -1
endi
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录