Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
ee2774ac
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
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看板
提交
ee2774ac
编写于
8月 01, 2022
作者:
X
Xiaoyu Wang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: some problems of parser and planner
上级
7bcf6b05
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
24 addition
and
24 deletion
+24
-24
tests/system-test/1-insert/create_retentions.py
tests/system-test/1-insert/create_retentions.py
+24
-24
未找到文件。
tests/system-test/1-insert/create_retentions.py
浏览文件 @
ee2774ac
...
...
@@ -253,34 +253,34 @@ class TDTestCase:
tdLog
.
printNoPrefix
(
"==========step2.1.1 : alter stb schemaL drop column"
)
tdSql
.
query
(
f
"select
{
BINT_COL
}
from
{
DB3
}
.
{
STBNAME
}
"
)
tdSql
.
execute
(
f
"alter stable
{
DB3
}
.stb1 drop column
{
BINT_COL
}
"
)
#
TODO
not support alter stable schema anymore
#
tdSql.error(f"alter stable {DB3}.stb1 drop column {BINT_COL}")
tdSql
.
error
(
f
"select
{
BINT_COL
}
from
{
DB3
}
.
{
STBNAME
}
"
)
#
tdSql.execute(f"alter stable {DB3}.stb1 drop column {BINT_COL}")
# not support alter stable schema anymore
tdSql
.
error
(
f
"alter stable
{
DB3
}
.stb1 drop column
{
BINT_COL
}
"
)
#
tdSql.error(f"select {BINT_COL} from {DB3}.{STBNAME}")
tdLog
.
printNoPrefix
(
"==========step2.1.2 : alter stb schemaL add num_column"
)
#
TODO
not support alter stable schema anymore
#
tdSql.error(f"alter stable {DB3}.stb1 add column {INT_COL}_1 int")
# not support alter stable schema anymore
tdSql
.
error
(
f
"alter stable
{
DB3
}
.stb1 add column
{
INT_COL
}
_1 int"
)
tdSql
.
error
(
f
"select
{
INT_COL
}
_1 from
{
DB3
}
.
{
STBNAME
}
"
)
tdSql
.
execute
(
f
"alter stable
{
DB3
}
.stb1 add column
{
INT_COL
}
_1 int"
)
tdSql
.
query
(
f
"select count(
{
INT_COL
}
_1) from
{
DB3
}
.
{
STBNAME
}
where _c0 > now-5m"
)
tdSql
.
checkData
(
0
,
0
,
0
)
tdSql
.
execute
(
f
"insert into
{
DB3
}
.
{
CTBNAME
}
(
{
PRIMARY_COL
}
,
{
INT_COL
}
,
{
INT_COL
}
_1) values(
{
NOW
}
+20s, 111, 112)"
)
time
.
sleep
(
7
)
tdSql
.
query
(
f
"select _rowts,
{
INT_COL
}
,
{
INT_COL
}
_1 from
{
DB3
}
.
{
CTBNAME
}
where _c0 > now()-1h and _c0>
{
NOW
}
"
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
1
,
111
)
tdSql
.
checkData
(
0
,
2
,
112
)
tdSql
.
query
(
f
"select _rowts,
{
INT_COL
}
,
{
INT_COL
}
_1 from
{
DB3
}
.
{
CTBNAME
}
where _c0 > now()-2d and _c0>
{
NOW
}
"
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
1
,
111
)
tdSql
.
checkData
(
0
,
2
,
112
)
tdSql
.
query
(
f
"select _rowts,
{
INT_COL
}
,
{
INT_COL
}
_1 from
{
DB3
}
.
{
CTBNAME
}
where _c0 > now()-7d and _c0>
{
NOW
}
"
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
1
,
111
)
tdSql
.
checkData
(
0
,
2
,
112
)
#
tdSql.execute(f"alter stable {DB3}.stb1 add column {INT_COL}_1 int")
#
tdSql.query(f"select count({INT_COL}_1) from {DB3}.{STBNAME} where _c0 > now-5m")
#
tdSql.checkData(0, 0, 0)
#
tdSql.execute(f"insert into {DB3}.{CTBNAME} ({PRIMARY_COL}, {INT_COL}, {INT_COL}_1) values({NOW}+20s, 111, 112)")
#
time.sleep(7)
#
tdSql.query(f"select _rowts, {INT_COL}, {INT_COL}_1 from {DB3}.{CTBNAME} where _c0 > now()-1h and _c0>{NOW}")
#
tdSql.checkRows(1)
#
tdSql.checkData(0, 1, 111)
#
tdSql.checkData(0, 2, 112)
#
#
tdSql.query(f"select _rowts, {INT_COL}, {INT_COL}_1 from {DB3}.{CTBNAME} where _c0 > now()-2d and _c0>{NOW}")
#
tdSql.checkRows(1)
#
tdSql.checkData(0, 1, 111)
#
tdSql.checkData(0, 2, 112)
#
tdSql.query(f"select _rowts, {INT_COL}, {INT_COL}_1 from {DB3}.{CTBNAME} where _c0 > now()-7d and _c0>{NOW}")
#
tdSql.checkRows(1)
#
tdSql.checkData(0, 1, 111)
#
tdSql.checkData(0, 2, 112)
tdLog
.
printNoPrefix
(
"==========step2.1.3 : drop child-table"
)
tdSql
.
execute
(
f
"drop table
{
DB3
}
.
{
CTBNAME
}
"
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录