Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
e89ce9b8
T
TDengine
项目概览
taosdata
/
TDengine
大约 2 年 前同步成功
通知
1192
Star
22018
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看板
提交
e89ce9b8
编写于
2月 01, 2023
作者:
X
Xiaoyu Wang
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/main' into fix/main_bugfix_wxy
上级
0d2d3349
a3a2af4b
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
45 addition
and
22 deletion
+45
-22
cmake/taostools_CMakeLists.txt.in
cmake/taostools_CMakeLists.txt.in
+1
-1
source/libs/parser/src/parInsertSql.c
source/libs/parser/src/parInsertSql.c
+3
-0
tests/develop-test/5-taos-tools/taosbenchmark/sml_json_alltypes.py
...elop-test/5-taos-tools/taosbenchmark/sml_json_alltypes.py
+41
-21
未找到文件。
cmake/taostools_CMakeLists.txt.in
浏览文件 @
e89ce9b8
...
...
@@ -2,7 +2,7 @@
# taos-tools
ExternalProject_Add(taos-tools
GIT_REPOSITORY https://github.com/taosdata/taos-tools.git
GIT_TAG
0cd564a
GIT_TAG
181bcac
SOURCE_DIR "${TD_SOURCE_DIR}/tools/taos-tools"
BINARY_DIR ""
#BUILD_IN_SOURCE TRUE
...
...
source/libs/parser/src/parInsertSql.c
浏览文件 @
e89ce9b8
...
...
@@ -1760,6 +1760,9 @@ static int32_t getTableSchemaFromMetaData(SInsertParseContext* pCxt, const SMeta
if
(
TSDB_CODE_SUCCESS
==
code
&&
!
isStb
&&
TSDB_SUPER_TABLE
==
pStmt
->
pTableMeta
->
tableType
)
{
code
=
buildInvalidOperationMsg
(
&
pCxt
->
msg
,
"insert data into super table is not supported"
);
}
if
(
TSDB_CODE_SUCCESS
==
code
&&
isStb
)
{
code
=
storeTableMeta
(
pCxt
,
pStmt
);
}
if
(
TSDB_CODE_SUCCESS
==
code
)
{
code
=
getTableVgroupFromMetaData
(
pMetaData
->
pTableHash
,
pStmt
,
isStb
);
}
...
...
tests/develop-test/5-taos-tools/taosbenchmark/sml_json_alltypes.py
浏览文件 @
e89ce9b8
...
...
@@ -19,32 +19,38 @@ from util.dnodes import *
class
TDTestCase
:
def
caseDescription
(
self
):
'''
"""
[TD-11510] taosBenchmark test cases
'''
return
"""
def
init
(
self
,
conn
,
logSql
,
replicaVar
=
1
):
self
.
replicaVar
=
int
(
replicaVar
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
self
.
replicaVar
=
int
(
replicaVar
)
tdSql
.
init
(
conn
.
cursor
(),
logSql
)
def
getPath
(
self
,
tool
=
"taosBenchmark"
):
selfPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
))
if
(
"community"
in
selfPath
):
projPath
=
selfPath
[:
selfPath
.
find
(
"community"
)]
if
"community"
in
selfPath
:
projPath
=
selfPath
[:
selfPath
.
find
(
"community"
)]
elif
"src"
in
selfPath
:
projPath
=
selfPath
[:
selfPath
.
find
(
"src"
)]
elif
"/tools/"
in
selfPath
:
projPath
=
selfPath
[:
selfPath
.
find
(
"/tools/"
)]
elif
"/tests/"
in
selfPath
:
projPath
=
selfPath
[:
selfPath
.
find
(
"/tests/"
)]
else
:
projPath
=
selfPath
[:
selfPath
.
find
(
"tests"
)]
tdLog
.
info
(
"cannot found %s in path: %s, use system's"
%
(
tool
,
selfPath
))
projPath
=
"/usr/local/taos/bin/"
paths
=
[]
for
root
,
d
irs
,
files
in
os
.
walk
(
projPath
):
if
(
(
tool
)
in
files
)
:
for
root
,
d
ummy
,
files
in
os
.
walk
(
projPath
):
if
(
tool
)
in
files
:
rootRealPath
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
root
))
if
(
"packaging"
not
in
rootRealPath
)
:
if
"packaging"
not
in
rootRealPath
:
paths
.
append
(
os
.
path
.
join
(
root
,
tool
))
break
if
(
len
(
paths
)
==
0
)
:
if
len
(
paths
)
==
0
:
tdLog
.
exit
(
"taosBenchmark not found!"
)
return
else
:
...
...
@@ -52,31 +58,45 @@ class TDTestCase:
return
paths
[
0
]
def
run
(
self
):
tdSql
.
query
(
"select client_version()"
)
client_ver
=
""
.
join
(
tdSql
.
queryResult
[
0
])
major_ver
=
client_ver
.
split
(
"."
)[
0
]
binPath
=
self
.
getPath
()
cmd
=
"%s -f ./5-taos-tools/taosbenchmark/json/sml_json_alltypes.json"
%
binPath
cmd
=
"%s -f ./5-taos-tools/taosbenchmark/json/sml_json_alltypes.json"
%
binPath
tdLog
.
info
(
"%s"
%
cmd
)
os
.
system
(
"%s"
%
cmd
)
tdSql
.
execute
(
"reset query cache"
)
tdSql
.
query
(
"describe db.stb1"
)
tdSql
.
checkData
(
1
,
1
,
"BOOL"
)
tdSql
.
query
(
"describe db.stb2"
)
tdSql
.
checkData
(
1
,
1
,
"
TINYINT
"
)
tdSql
.
checkData
(
1
,
1
,
"
DOUBLE
"
)
tdSql
.
query
(
"describe db.stb3"
)
tdSql
.
checkData
(
1
,
1
,
"
SMALLINT
"
)
tdSql
.
checkData
(
1
,
1
,
"
DOUBLE
"
)
tdSql
.
query
(
"describe db.stb4"
)
tdSql
.
checkData
(
1
,
1
,
"
INT
"
)
tdSql
.
checkData
(
1
,
1
,
"
DOUBLE
"
)
tdSql
.
query
(
"describe db.stb5"
)
tdSql
.
checkData
(
1
,
1
,
"
BIGINT
"
)
tdSql
.
checkData
(
1
,
1
,
"
DOUBLE
"
)
tdSql
.
query
(
"describe db.stb6"
)
tdSql
.
checkData
(
1
,
1
,
"
FLOAT
"
)
tdSql
.
checkData
(
1
,
1
,
"
DOUBLE
"
)
tdSql
.
query
(
"describe db.stb7"
)
tdSql
.
checkData
(
1
,
1
,
"DOUBLE"
)
tdSql
.
query
(
"describe db.stb8"
)
tdSql
.
checkData
(
1
,
1
,
"VARCHAR"
)
if
major_ver
==
"3"
:
tdSql
.
checkData
(
1
,
1
,
"NCHAR"
)
tdSql
.
checkData
(
1
,
2
,
16
)
else
:
tdSql
.
checkData
(
1
,
1
,
"NCHAR"
)
tdSql
.
checkData
(
1
,
2
,
8
)
tdSql
.
query
(
"describe db.stb9"
)
if
major_ver
==
"3"
:
tdSql
.
checkData
(
1
,
1
,
"NCHAR"
)
tdSql
.
checkData
(
1
,
2
,
16
)
else
:
tdSql
.
checkData
(
1
,
1
,
"NCHAR"
)
tdSql
.
checkData
(
1
,
2
,
8
)
tdSql
.
query
(
"select count(*) from db.stb1"
)
tdSql
.
checkData
(
0
,
0
,
160
)
tdSql
.
query
(
"select count(*) from db.stb2"
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录