Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
736adcf7
T
TDengine
项目概览
慢慢CG
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
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看板
提交
736adcf7
编写于
7月 27, 2021
作者:
J
jiajingbin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
combine cases
上级
28b7529b
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
41 addition
and
108 deletion
+41
-108
tests/pytest/insert/schemalessInsert.py
tests/pytest/insert/schemalessInsert.py
+41
-108
未找到文件。
tests/pytest/insert/schemalessInsert.py
浏览文件 @
736adcf7
...
...
@@ -14,7 +14,6 @@
import
random
import
string
import
time
import
datetime
from
copy
import
deepcopy
import
numpy
as
np
from
util.log
import
*
...
...
@@ -1053,8 +1052,6 @@ class TDTestCase:
tdSql
.
query
(
f
"select * from
{
stb_name
}
"
)
tdSql
.
checkRows
(
6
)
def
test
(
self
):
input_sql1
=
"rfasta,id=
\"
rfasta_1
\"
,t0=true,t1=127i8,t2=32767i16,t3=2147483647i32,t4=9223372036854775807i64,t5=11.12345f32,t6=22.123456789f64,t7=
\"
ddzhiksj
\"
,t8=L
\"
ncharTagValue
\"
c0=True,c1=127i8,c2=32767i16,c3=2147483647i32,c4=9223372036854775807i64,c5=11.12345f32,c6=22.123456789f64,c7=
\"
bnhwlgvj
\"
,c8=L
\"
ncharTagValue
\"
,c9=7u64 1626006833639000000ns"
...
...
@@ -1062,138 +1059,74 @@ class TDTestCase:
input_sql3
=
f
'abcd,id="cc¥Ec",t0=True,t1=127i8,t2=32767i16,t3=2147483647i32,t4=9223372036854775807i64,t5=11.12345f32,t6=22.123456789f64,t7="ndsfdrum",t8=L"ncharTagValue" c0=f,c1=127i8,c2=32767i16,c3=2147483647i32,c4=9223372036854775807i64,c5=11.12345f32,c6=22.123456789f64,c7="igwoehkm",c8=L"ncharColValue",c9=7u64 0'
print
(
input_sql3
)
# input_sql4 = 'hmemeb,id="kilrcrldgf",t0=F,t1=127i8,t2=32767i16,t3=2147483647i32,t4=9223372036854775807i64,t5=11.12345f32,t6=22.123456789f64,t7="fysodjql",t8=L"ncharTagValue" c0=True,c1=127i8,c2=32767i16,c3=2147483647i32,c4=9223372036854775807i64,c5=11.12345f32,c6=22.123456789f64,c7="waszbfvc",c8=L"ncharColValue",c9=7u64 0'
code
=
self
.
_conn
.
insertLines
([
input_sql3
])
print
(
code
)
# self._conn.insertLines([input_sql4])
def
run
(
self
):
print
(
"running {}"
.
format
(
__file__
))
self
.
createDb
()
# tdSql.execute("create table super_table_cname_check (ts timestamp, pi1 int, pi2 bigint, pf1 float, pf2 double, ps1 binary(10), pi3 smallint, pi4 tinyint, pb1 bool, ps2 nchar(20)) tags (si1 int, si2 bigint, sf1 float, sf2 double, ss1 binary(10), si3 smallint, si4 tinyint, sb1 bool, ss2 nchar(20));")
# tdSql.execute('create table st1 using super_table_cname_check tags (1, 2, 1.1, 2.2, "a", 1, 1, true, "aa");')
# tdSql.execute('insert into st1 values (now, 1, 2, 1.1, 2.2, "a", 1, 1, true, "aa");')
# self.initCheckCase()
# self.boolTypeCheckCase()
# self.symbolsCheckCase()
# self.tsCheckCase()
# self.idSeqCheckCase()
# self.idUpperCheckCase()
# self.noIdCheckCase()
# self.maxColTagCheckCase()
# self.idIllegalNameCheckCase()
# self.idStartWithNumCheckCase()
# self.nowTsCheckCase()
# self.dateFormatTsCheckCase()
# self.illegalTsCheckCase()
def
runAll
(
self
):
self
.
initCheckCase
()
self
.
boolTypeCheckCase
()
self
.
symbolsCheckCase
()
self
.
tsCheckCase
()
self
.
idSeqCheckCase
()
self
.
idUpperCheckCase
()
self
.
noIdCheckCase
()
self
.
maxColTagCheckCase
()
self
.
idIllegalNameCheckCase
()
self
.
idStartWithNumCheckCase
()
self
.
nowTsCheckCase
()
self
.
dateFormatTsCheckCase
()
self
.
illegalTsCheckCase
()
# ! confirm double
#
self.tagValueLengthCheckCase()
self
.
tagValueLengthCheckCase
()
# ! bug
#
self.colValueLengthCheckCase()
self
.
colValueLengthCheckCase
()
#
self.tagColIllegalValueCheckCase()
self
.
tagColIllegalValueCheckCase
()
# ! 重复ID未合并
#
self.duplicateIdTagColInsertCheckCase()
self
.
duplicateIdTagColInsertCheckCase
()
#
self.noIdStbExistCheckCase()
#
self.duplicateInsertExistCheckCase()
#
self.tagColBinaryNcharLengthCheckCase()
self
.
noIdStbExistCheckCase
()
self
.
duplicateInsertExistCheckCase
()
self
.
tagColBinaryNcharLengthCheckCase
()
# ! 结果未校验
self
.
tagColAddDupIDCheckCase
()
#
self.tagColAddCheckCase()
#
self.tagMd5Check()
self
.
tagColAddCheckCase
()
self
.
tagMd5Check
()
# ! rollback bug
#
self.tagColBinaryMaxLengthCheckCase()
#
self.tagColNcharMaxLengthCheckCase()
self
.
tagColBinaryMaxLengthCheckCase
()
self
.
tagColNcharMaxLengthCheckCase
()
#
self.batchInsertCheckCase()
#
self.multiInsertCheckCase(5000)
self
.
batchInsertCheckCase
()
self
.
multiInsertCheckCase
(
5000
)
# ! bug
#
self.batchErrorInsertCheckCase()
self
.
batchErrorInsertCheckCase
()
#
self.stbInsertMultiThreadCheckCase()
#
self.sStbStbDdataInsertMultiThreadCheckCase()
#
self.sStbStbDdataAtcInsertMultiThreadCheckCase()
#
self.sStbStbDdataMtcInsertMultiThreadCheckCase()
#
self.sStbDtbDdataInsertMultiThreadCheckCase()
self
.
stbInsertMultiThreadCheckCase
()
self
.
sStbStbDdataInsertMultiThreadCheckCase
()
self
.
sStbStbDdataAtcInsertMultiThreadCheckCase
()
self
.
sStbStbDdataMtcInsertMultiThreadCheckCase
()
self
.
sStbDtbDdataInsertMultiThreadCheckCase
()
# ! concurrency conflict
#
self.sStbDtbDdataAcMtInsertMultiThreadCheckCase()
#
self.sStbDtbDdataAtMcInsertMultiThreadCheckCase()
self
.
sStbDtbDdataAcMtInsertMultiThreadCheckCase
()
self
.
sStbDtbDdataAtMcInsertMultiThreadCheckCase
()
# ! concurrency conflict
self
.
sStbStbDdataDtsInsertMultiThreadCheckCase
()
# self.sStbStbDdataDtsInsertMultiThreadCheckCase()
# self.test()
# tdSql.execute('create stable ste(ts timestamp, f int) tags(t1 bigint)')
# lines = [ "st,t1=3i64,t2=4f64,t3=\"t3\" c1=3i64,c3=L\"passit\",c2=false,c4=4f64 1626006833639000000ns",
# "st,t1=4i64,t3=\"t4\",t2=5f64,t4=5f64 c1=3i64,c3=L\"passitagin\",c2=true,c4=5f64,c5=5f64 1626006833640000000ns",
# "ste,t2=5f64,t3=L\"ste\" c1=true,c2=4i64,c3=\"iam\" 1626056811823316532ns",
# "stf,t1=4i64,t3=\"t4\",t2=5f64,t4=5f64 c1=3i64,c3=L\"passitagin\",c2=true,c4=5f64,c5=5f64,c6=7u64 1626006933640000000ns",
# "st,t1=4i64,t2=5f64,t3=\"t4\" c1=3i64,c3=L\"passitagain\",c2=true,c4=5f64 1626006833642000000ns",
# "ste,t2=5f64,t3=L\"ste2\" c3=\"iamszhou\",c4=false 1626056811843316532ns",
# "ste,t2=5f64,t3=L\"ste2\" c3=\"iamszhou\",c4=false,c5=32i8,c6=64i16,c7=32i32,c8=88.88f32 1626056812843316532ns",
# "st,t1=4i64,t3=\"t4\",t2=5f64,t4=5f64 c1=3i64,c3=L\"passitagin\",c2=true,c4=5f64,c5=5f64,c6=7u64 1626006933640000000ns",
# "stf,t1=4i64,t3=\"t4\",t2=5f64,t4=5f64 c1=3i64,c3=L\"passitagin_stf\",c2=false,c5=5f64,c6=7u64 1626006933641000000ns"
# ]
# code = self._conn.insertLines(lines)
# print("insertLines result {}".format(code))
# lines2 = [ "stg,t1=3i64,t2=4f64,t3=\"t3\" c1=3i64,c3=L\"passit\",c2=false,c4=4f64 1626006833639000000ns",
# "stg,t1=4i64,t3=\"t4\",t2=5f64,t4=5f64 c1=3i64,c3=L\"passitagin\",c2=true,c4=5f64,c5=5f64 1626006833640000000ns"
# ]
# code = self._conn.insertLines([ lines2[0] ])
# print("insertLines result {}".format(code))
# self._conn.insertLines([ lines2[1] ])
# print("insertLines result {}".format(code))
# tdSql.query("select * from st")
# tdSql.checkRows(4)
# tdSql.query("select * from ste")
# tdSql.checkRows(3)
# tdSql.query("select * from stf")
# tdSql.checkRows(2)
# tdSql.query("select * from stg")
# tdSql.checkRows(2)
# tdSql.query("show tables")
# tdSql.checkRows(8)
# tdSql.query("describe stf")
# tdSql.checkData(2, 2, 14)
def
run
(
self
):
print
(
"running {}"
.
format
(
__file__
))
self
.
createDb
()
self
.
runAll
()
# self._conn.insertLines([
# "sth,t1=4i64,t2=5f64,t4=5f64,ID=\"childtable\" c1=3i64,c3=L\"passitagin_stf\",c2=false,c5=5f64,c6=7u64 1626006933641ms",
# "sth,t1=4i64,t2=5f64,t4=5f64 c1=3i64,c3=L\"passitagin_stf\",c2=false,c5=5f64,c6=7u64 1626006933654ms"
# ])
# tdSql.query('select tbname, * from sth')
# tdSql.checkRows(2)
# self.test()
# tdSql.query('select tbname, * from childtable')
# tdSql.checkRows(1)
def
stop
(
self
):
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录