Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
6357faa0
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看板
提交
6357faa0
编写于
10月 18, 2022
作者:
G
Ganlin Zhao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix test cases
上级
46a5ede3
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
17 addition
and
17 deletion
+17
-17
tests/develop-test/2-query/function_mode.py
tests/develop-test/2-query/function_mode.py
+17
-17
未找到文件。
tests/develop-test/2-query/function_mode.py
浏览文件 @
6357faa0
...
...
@@ -57,10 +57,10 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
1
,
2
)
tdSql
.
query
(
'select mode(num) from d001'
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
None
)
tdSql
.
checkData
(
0
,
0
,
-
32767
)
tdSql
.
query
(
'select mode(dbool) from d001'
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
Non
e
)
tdSql
.
checkData
(
0
,
0
,
Fals
e
)
tdSql
.
query
(
'select mode(dtiny) from d001'
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
None
)
...
...
@@ -87,7 +87,7 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
0
,
1
)
tdSql
.
query
(
'select mode(num),mode(voltage) from smode'
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
None
)
tdSql
.
checkData
(
0
,
0
,
3276
)
tdSql
.
checkData
(
0
,
1
,
1
)
tdSql
.
query
(
'select mode(dbool) from smode'
)
tdSql
.
checkRows
(
1
)
...
...
@@ -97,7 +97,7 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
0
,
None
)
tdSql
.
query
(
'select mode(dfloat) from smode'
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
None
)
tdSql
.
checkData
(
0
,
0
,
3.3232219219207764
)
tdSql
.
query
(
'select mode(ddouble) from smode'
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
4.982392323
)
...
...
@@ -112,16 +112,16 @@ class TDTestCase:
#group by column
tdSql
.
query
(
'select mode(num) from d002 group by dbinary'
)
tdSql
.
checkRows
(
2
)
tdSql
.
checkData
(
0
,
0
,
None
)
tdSql
.
checkData
(
0
,
0
,
3276
)
tdSql
.
checkData
(
1
,
0
,
None
)
tdSql
.
execute
(
'insert into D002 values("2021-11-17 20:31:31", 1, 3276, true, NULL, 3.32322, 4.982392323, "你好吗", "sdf", 333)'
)
tdSql
.
query
(
'select mode(num) from d002 group by dbinary'
)
tdSql
.
checkRows
(
2
)
tdSql
.
checkData
(
1
,
0
,
3276
)
tdSql
.
checkData
(
0
,
0
,
None
)
tdSql
.
checkData
(
0
,
0
,
3276
)
tdSql
.
query
(
'select mode(dfloat) from d002 group by dbinary'
)
tdSql
.
checkRows
(
2
)
tdSql
.
checkData
(
1
,
0
,
None
)
tdSql
.
checkData
(
1
,
0
,
3.3232200145721436
)
tdSql
.
query
(
'select mode(dchar) from d002 group by dbinary'
)
tdSql
.
checkRows
(
2
)
tdSql
.
checkData
(
1
,
0
,
"你好吗"
)
...
...
@@ -138,7 +138,7 @@ class TDTestCase:
#group by tbname
tdSql
.
query
(
'select mode(dchar) from smode group by tbname'
)
tdSql
.
checkRows
(
2
)
tdSql
.
checkData
(
0
,
0
,
None
)
tdSql
.
checkData
(
0
,
0
,
"你好吗"
)
tdSql
.
checkData
(
0
,
1
,
"d001"
)
tdSql
.
checkData
(
1
,
0
,
"你好吗"
)
tdSql
.
checkData
(
1
,
1
,
"d002"
)
...
...
@@ -148,7 +148,7 @@ class TDTestCase:
tdSql
.
checkRows
(
2
)
tdSql
.
checkData
(
0
,
0
,
4.982392323
)
tdSql
.
checkData
(
0
,
1
,
"Beijing.haidian"
)
tdSql
.
checkData
(
1
,
0
,
None
)
tdSql
.
checkData
(
1
,
0
,
4.982392323
)
tdSql
.
checkData
(
1
,
1
,
"Beijing.Chaoyang"
)
#group by tag,column
...
...
@@ -169,7 +169,7 @@ class TDTestCase:
tdSql
.
checkRows
(
2
)
tdSql
.
checkData
(
0
,
0
,
"你好吗"
)
tdSql
.
checkData
(
0
,
1
,
"d002"
)
tdSql
.
checkData
(
1
,
0
,
None
)
tdSql
.
checkData
(
1
,
0
,
"你好吗"
)
tdSql
.
checkData
(
1
,
1
,
"d001"
)
#where
...
...
@@ -178,7 +178,7 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
0
,
19
)
tdSql
.
query
(
'select mode(voltage) from smode where num > 9'
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
None
)
tdSql
.
checkData
(
0
,
0
,
19
)
#interval
tdSql
.
query
(
'select mode(voltage) from smode interval(1s)'
)
...
...
@@ -188,7 +188,7 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
0
,
"2021-01-01 00:00:00"
)
tdSql
.
checkData
(
0
,
1
,
1
)
tdSql
.
checkData
(
1
,
0
,
"2022-01-01 00:00:00"
)
tdSql
.
checkData
(
1
,
1
,
None
)
tdSql
.
checkData
(
1
,
1
,
19
)
tdSql
.
query
(
'select mode(voltage) from smode interval(1n)'
)
tdSql
.
checkRows
(
4
)
tdSql
.
checkData
(
0
,
0
,
"2021-10-01 00:00:00"
)
...
...
@@ -198,7 +198,7 @@ class TDTestCase:
tdSql
.
checkData
(
2
,
0
,
"2021-12-01 00:00:00"
)
tdSql
.
checkData
(
2
,
1
,
2
)
tdSql
.
checkData
(
3
,
0
,
"2022-01-01 00:00:00"
)
tdSql
.
checkData
(
3
,
1
,
None
)
tdSql
.
checkData
(
3
,
1
,
19
)
tdSql
.
query
(
'select mode(voltage) from smode where ts > "2021-09-01 00:00:00" and ts <"2022-02-02 00:00:00" interval(1n) fill(prev)'
)
tdSql
.
checkRows
(
6
)
...
...
@@ -207,7 +207,7 @@ class TDTestCase:
tdSql
.
checkData
(
3
,
0
,
"2021-12-01 00:00:00"
)
tdSql
.
checkData
(
3
,
1
,
2
)
tdSql
.
checkData
(
5
,
0
,
"2022-02-01 00:00:00"
)
tdSql
.
checkData
(
5
,
1
,
2
)
tdSql
.
checkData
(
5
,
1
,
19
)
#session
tdSql
.
query
(
'select mode(voltage) from d002 session(ts,1w)'
)
...
...
@@ -222,7 +222,7 @@ class TDTestCase:
#state_window
tdSql
.
query
(
'select mode(dfloat) from d002 state_window(voltage)'
)
tdSql
.
checkRows
(
3
)
tdSql
.
checkData
(
0
,
0
,
None
)
tdSql
.
checkData
(
0
,
0
,
3.3232200145721436
)
tdSql
.
checkData
(
1
,
0
,
None
)
#slimit/soffset
...
...
@@ -237,9 +237,9 @@ class TDTestCase:
#having
tdSql
.
query
(
'select mode(ddouble) from smode group by location having mode(ddouble)>3'
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkRows
(
2
)
tdSql
.
checkData
(
0
,
0
,
4.982392323
)
tdSql
.
checkData
(
0
,
1
,
"Beijing.
haidian
"
)
tdSql
.
checkData
(
0
,
1
,
"Beijing.
Chaoyang
"
)
#subquery
tdSql
.
query
(
'select mode(ddouble) from (select * from smode where voltage = 1)'
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录