Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
f07b4f55
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看板
提交
f07b4f55
编写于
7月 26, 2021
作者:
J
jiajingbin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
save
上级
63c9b206
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
37 addition
and
19 deletion
+37
-19
tests/pytest/insert/schemalessInsert.py
tests/pytest/insert/schemalessInsert.py
+37
-19
未找到文件。
tests/pytest/insert/schemalessInsert.py
浏览文件 @
f07b4f55
...
...
@@ -412,22 +412,25 @@ class TDTestCase:
else
:
tdSql
.
checkColNameList
(
res_row_list
,
"please check noIdCheckCase"
)
# ! bug
# TODO confirm!!!
def
maxColTagCheckCase
(
self
):
"""
max tag count is 128
max col count is ??
"""
self
.
cleanStb
()
input_sql
,
stb_name
=
self
.
genLongSql
(
128
,
4000
)
print
(
input_sql
)
code
=
self
.
_conn
.
insertLines
([
input_sql
])
print
(
"insertLines result {}"
.
format
(
code
))
query_sql
=
f
"describe
{
stb_name
}
"
insert_tag_col_num
=
len
(
self
.
resHandle
(
query_sql
,
True
)[
0
])
expected_num
=
128
+
1023
+
1
tdSql
.
checkEqual
(
insert_tag_col_num
,
expected_num
)
for
input_sql
in
[
self
.
genLongSql
(
128
,
1
)[
0
],
self
.
genLongSql
(
1
,
4094
)[
0
]]:
self
.
cleanStb
()
code
=
self
.
_conn
.
insertLines
([
input_sql
])
tdSql
.
checkEqual
(
code
,
0
)
for
input_sql
in
[
self
.
genLongSql
(
129
,
1
)[
0
],
self
.
genLongSql
(
1
,
4095
)[
0
]]:
self
.
cleanStb
()
code
=
self
.
_conn
.
insertLines
([
input_sql
])
tdSql
.
checkNotEqual
(
code
,
0
)
# print("insertLines result {}".format(code))
# query_sql = f"describe {stb_name}"
# insert_tag_col_num = len(self.resHandle(query_sql, True)[0])
# expected_num = 128 + 1023 + 1
# tdSql.checkEqual(insert_tag_col_num, expected_num)
# input_sql, stb_name = self.genLongSql(128, 1500)
# code = self._conn.insertLines([input_sql])
...
...
@@ -574,7 +577,6 @@ class TDTestCase:
print
(
input_sql
)
code
=
self
.
_conn
.
insertLines
([
input_sql
])
tdSql
.
checkNotEqual
(
code
,
0
)
# i16
for
c2
in
[
"-32767i16"
]:
input_sql
,
stb_name
,
tb_name
=
self
.
genFullTypeSql
(
c2
=
c2
)
...
...
@@ -867,6 +869,20 @@ class TDTestCase:
code
=
self
.
_conn
.
insertLines
(
lines
)
tdSql
.
checkEqual
(
code
,
0
)
def
multiInsertCheckCase
(
self
,
count
):
"""
test multi insert
"""
self
.
cleanStb
()
sql_list
=
[]
stb_name
=
self
.
getLongName
(
8
,
"letters"
)
tdSql
.
execute
(
f
'create stable
{
stb_name
}
(ts timestamp, f int) tags(t1 bigint)'
)
for
i
in
range
(
count
):
input_sql
=
self
.
genFullTypeSql
(
stb_name
=
stb_name
,
t7
=
f
'"
{
self
.
getLongName
(
8
,
"letters"
)
}
"'
,
c7
=
f
'"
{
self
.
getLongName
(
8
,
"letters"
)
}
"'
,
id_noexist_tag
=
True
)[
0
]
sql_list
.
append
(
input_sql
)
code
=
self
.
_conn
.
insertLines
(
sql_list
)
tdSql
.
checkEqual
(
code
,
0
)
# ! bug
def
batchErrorInsertCheckCase
(
self
):
"""
...
...
@@ -877,7 +893,7 @@ class TDTestCase:
lines
=
[
"st123456,t1=3i64,t2=4f64,t3=
\"
t3
\"
c1=3i64,c3=L
\"
passit
\"
,c2=false,c4=4f64 1626006833639000000ns"
,
f
"
{
stb_name
}
,t2=5f64,t3=L
\"
ste
\"
c1=tRue,c2=4i64,c3=
\"
iam
\"
1626056811823316532ns"
]
code
=
self
.
_conn
.
insertLines
(
lines
)
# tdSql.check
Equal(code, 0)
tdSql
.
checkNot
Equal
(
code
,
0
)
def
genSqlList
(
self
,
count
=
5
,
stb_name
=
""
,
tb_name
=
""
):
"""
...
...
@@ -1046,12 +1062,14 @@ class TDTestCase:
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"
input_sql2
=
"rfasta,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
\"
ncharColValue
\"
,c9=7u64 1626006833639000000ns"
input_sql3
=
'hmemeb,id="kilrcrldgf",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'
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'
input_sql3
=
f
'ab*cd,id="ccc",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'
self
.
_conn
.
insertLines
([
input_sql3
])
self
.
_conn
.
insertLines
([
input_sql4
])
code
=
self
.
_conn
.
insertLines
([
input_sql3
])
print
(
code
)
# self._conn.insertLines([input_sql4])
def
run
(
self
):
print
(
"running {}"
.
format
(
__file__
))
...
...
@@ -1071,7 +1089,7 @@ class TDTestCase:
# self.idSeqCheckCase()
# self.idUpperCheckCase()
# self.noIdCheckCase()
#
self.maxColTagCheckCase()
self
.
maxColTagCheckCase
()
# self.idIllegalNameCheckCase()
# self.idStartWithNumCheckCase()
# self.nowTsCheckCase()
...
...
@@ -1099,7 +1117,7 @@ class TDTestCase:
# self.tagColNcharMaxLengthCheckCase()
# self.batchInsertCheckCase()
# self.multiInsertCheckCase(5000)
# ! bug
# self.batchErrorInsertCheckCase()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录