Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
327b5cda
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看板
提交
327b5cda
编写于
5月 11, 2022
作者:
D
dapan1121
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
stmt auto create table
上级
c0bd8a2f
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
34 addition
and
24 deletion
+34
-24
include/common/taosdef.h
include/common/taosdef.h
+1
-1
source/libs/scalar/src/filter.c
source/libs/scalar/src/filter.c
+1
-1
source/libs/scalar/src/scalar.c
source/libs/scalar/src/scalar.c
+4
-3
source/libs/scalar/src/sclvector.c
source/libs/scalar/src/sclvector.c
+3
-3
tests/script/api/batchprepare.c
tests/script/api/batchprepare.c
+25
-16
未找到文件。
include/common/taosdef.h
浏览文件 @
327b5cda
...
...
@@ -89,7 +89,7 @@ extern char *qtypeStr[];
#define TSDB_PORT_HTTP 11
#
define
TD_DEBUG_PRINT_ROW
#
undef
TD_DEBUG_PRINT_ROW
#ifdef __cplusplus
}
...
...
source/libs/scalar/src/filter.c
浏览文件 @
327b5cda
...
...
@@ -260,7 +260,7 @@ int8_t filterGetCompFuncIdx(int32_t type, int32_t optr) {
comparFn
=
20
;
}
else
if
(
optr
==
OP_TYPE_LIKE
)
{
comparFn
=
9
;
}
else
if
(
optr
==
OP_TYPE_LIKE
)
{
}
else
if
(
optr
==
OP_TYPE_
NOT_
LIKE
)
{
comparFn
=
27
;
}
else
if
(
optr
==
OP_TYPE_IN
)
{
comparFn
=
8
;
...
...
source/libs/scalar/src/scalar.c
浏览文件 @
327b5cda
...
...
@@ -92,8 +92,9 @@ int32_t scalarGenerateSetFromList(void **data, void *pNode, uint32_t type) {
}
if
(
IS_VAR_DATA_TYPE
(
type
))
{
len
=
varDataLen
(
out
.
columnData
->
pData
);
buf
=
varDataVal
(
out
.
columnData
->
pData
);
char
*
data
=
colDataGetVarData
(
out
.
columnData
,
0
);
len
=
varDataLen
(
data
);
buf
=
varDataVal
(
data
);
}
else
{
len
=
tDataTypes
[
type
].
bytes
;
buf
=
out
.
columnData
->
pData
;
...
...
@@ -109,7 +110,7 @@ int32_t scalarGenerateSetFromList(void **data, void *pNode, uint32_t type) {
}
if
(
taosHashPut
(
pObj
,
buf
,
(
size_t
)
len
,
NULL
,
0
))
{
sclError
(
"taosHashPut failed"
);
sclError
(
"taosHashPut
to set
failed"
);
SCL_ERR_JRET
(
TSDB_CODE_QRY_OUT_OF_MEMORY
);
}
...
...
source/libs/scalar/src/sclvector.c
浏览文件 @
327b5cda
...
...
@@ -512,7 +512,7 @@ int32_t vectorConvertToVarData(const SScalarParam* pIn, SScalarParam* pOut, int1
if
(
outType
==
TSDB_DATA_TYPE_NCHAR
)
{
varToNchar
(
tmp
,
pOut
,
i
);
}
else
{
colDataAppend
(
pOutputCol
,
i
,
(
char
*
)
&
value
,
false
);
colDataAppend
(
pOutputCol
,
i
,
(
char
*
)
tmp
,
false
);
}
}
}
else
if
(
IS_UNSIGNED_NUMERIC_TYPE
(
inType
))
{
...
...
@@ -529,7 +529,7 @@ int32_t vectorConvertToVarData(const SScalarParam* pIn, SScalarParam* pOut, int1
if
(
outType
==
TSDB_DATA_TYPE_NCHAR
)
{
varToNchar
(
tmp
,
pOut
,
i
);
}
else
{
colDataAppend
(
pOutputCol
,
i
,
(
char
*
)
&
value
,
false
);
colDataAppend
(
pOutputCol
,
i
,
(
char
*
)
tmp
,
false
);
}
}
}
else
if
(
IS_FLOAT_TYPE
(
inType
))
{
...
...
@@ -546,7 +546,7 @@ int32_t vectorConvertToVarData(const SScalarParam* pIn, SScalarParam* pOut, int1
if
(
outType
==
TSDB_DATA_TYPE_NCHAR
)
{
varToNchar
(
tmp
,
pOut
,
i
);
}
else
{
colDataAppend
(
pOutputCol
,
i
,
(
char
*
)
&
value
,
false
);
colDataAppend
(
pOutputCol
,
i
,
(
char
*
)
tmp
,
false
);
}
}
}
else
{
...
...
tests/script/api/batchprepare.c
浏览文件 @
327b5cda
...
...
@@ -11,8 +11,8 @@
int32_t
shortColList
[]
=
{
TSDB_DATA_TYPE_TIMESTAMP
,
TSDB_DATA_TYPE_INT
};
int32_t
fullColList
[]
=
{
TSDB_DATA_TYPE_TIMESTAMP
,
TSDB_DATA_TYPE_BOOL
,
TSDB_DATA_TYPE_TINYINT
,
TSDB_DATA_TYPE_UTINYINT
,
TSDB_DATA_TYPE_SMALLINT
,
TSDB_DATA_TYPE_USMALLINT
,
TSDB_DATA_TYPE_INT
,
TSDB_DATA_TYPE_UINT
,
TSDB_DATA_TYPE_BIGINT
,
TSDB_DATA_TYPE_UBIGINT
,
TSDB_DATA_TYPE_FLOAT
,
TSDB_DATA_TYPE_DOUBLE
,
TSDB_DATA_TYPE_BINARY
,
TSDB_DATA_TYPE_NCHAR
};
int32_t
bindColTypeList
[]
=
{
TSDB_DATA_TYPE_TIMESTAMP
,
TSDB_DATA_TYPE_
SMALLINT
,
TSDB_DATA_TYPE_
NCHAR
};
int32_t
optrIdxList
[]
=
{
0
,
1
,
2
};
int32_t
bindColTypeList
[]
=
{
TSDB_DATA_TYPE_TIMESTAMP
,
TSDB_DATA_TYPE_NCHAR
};
int32_t
optrIdxList
[]
=
{
0
,
9
};
typedef
struct
{
char
*
oper
;
...
...
@@ -184,7 +184,7 @@ typedef struct {
int32_t
caseRunNum
;
// total run case num
}
CaseCtrl
;
#if
0
#if
1
CaseCtrl
gCaseCtrl
=
{
// default
.
bindNullNum
=
0
,
.
printCreateTblSql
=
false
,
...
...
@@ -202,7 +202,7 @@ CaseCtrl gCaseCtrl = { // default
.
optrIdxListNum
=
0
,
.
optrIdxList
=
NULL
,
.
checkParamNum
=
false
,
.printRes =
tru
e,
.
printRes
=
fals
e
,
.
runTimes
=
0
,
.
caseIdx
=
-
1
,
.
caseNum
=
-
1
,
...
...
@@ -212,7 +212,7 @@ CaseCtrl gCaseCtrl = { // default
#endif
#if
1
#if
0
CaseCtrl gCaseCtrl = {
.bindNullNum = 0,
.printCreateTblSql = true,
...
...
@@ -223,18 +223,18 @@ CaseCtrl gCaseCtrl = {
.bindColNum = 0,
.bindTagNum = 0,
.bindRowNum = 0,
.
bindColTypeNum
=
0
,
.
bindColTypeList
=
NULL
,
.bindColTypeNum =
tListLen(bindColTypeList)
,
.bindColTypeList =
bindColTypeList
,
.bindTagTypeNum = 0,
.bindTagTypeList = NULL,
.
optrIdxListNum
=
0
,
.
optrIdxList
=
NULL
,
.optrIdxListNum =
tListLen(optrIdxList)
,
.optrIdxList =
optrIdxList
,
.checkParamNum = false,
.printRes = false,
.runTimes = 0,
.
caseIdx
=
-
1
,
.caseIdx =
23
,
.caseNum = 1,
.
caseRunIdx
=
20
,
.caseRunIdx =
-1
,
.caseRunNum = 1,
};
#endif
...
...
@@ -253,14 +253,14 @@ CaseCtrl gCaseCtrl = { // query case with specified col&oper
.optrIdxListNum = 0,
.optrIdxList = NULL,
.checkParamNum = false,
.printRes =
tru
e,
.printRes =
fals
e,
.runTimes = 0,
.caseRunIdx = -1,
.optrIdxListNum = 0,
.optrIdxList = NULL,
.bindColTypeNum = 0,
.bindColTypeList = NULL,
.caseIdx = 2
2
,
.caseIdx = 2
3
,
.caseNum = 1,
.caseRunNum = 1,
};
...
...
@@ -3332,6 +3332,7 @@ int32_t runCase(TAOS *taos, int32_t caseIdx, int32_t caseRunIdx, bool silent) {
TAOS_STMT
*
stmt
=
NULL
;
int64_t
beginUs
,
endUs
,
totalUs
;
CaseCfg
cfg
=
gCase
[
caseIdx
];
CaseCfg
cfgBk
;
gCurCase
=
&
cfg
;
if
((
gCaseCtrl
.
bindColTypeNum
||
gCaseCtrl
.
bindColNum
)
&&
(
gCurCase
->
colNum
!=
gFullColNum
))
{
...
...
@@ -3402,6 +3403,7 @@ int32_t runCase(TAOS *taos, int32_t caseIdx, int32_t caseRunIdx, bool silent) {
}
totalUs
=
0
;
cfgBk
=
cfg
;
for
(
int32_t
n
=
0
;
n
<
gCurCase
->
runTimes
;
++
n
)
{
if
(
gCurCase
->
preCaseIdx
<
0
)
{
prepare
(
taos
,
gCurCase
->
colNum
,
gCurCase
->
colList
,
gCurCase
->
autoCreateTbl
);
...
...
@@ -3423,6 +3425,8 @@ int32_t runCase(TAOS *taos, int32_t caseIdx, int32_t caseRunIdx, bool silent) {
totalUs
+=
(
endUs
-
beginUs
);
prepareCheckResult
(
taos
,
silent
);
cfg
=
cfgBk
;
}
if
(
!
silent
)
{
...
...
@@ -3465,18 +3469,19 @@ void* runCaseList(TAOS *taos) {
}
void
runAll
(
TAOS
*
taos
)
{
#if 0
#if 1
strcpy
(
gCaseCtrl
.
caseCatalog
,
"Normal Test"
);
printf
(
"%s Begin
\n
"
,
gCaseCtrl
.
caseCatalog
);
runCaseList
(
taos
);
#endif
#if 1
strcpy
(
gCaseCtrl
.
caseCatalog
,
"Auto Create Table Test"
);
gCaseCtrl
.
autoCreateTbl
=
true
;
printf
(
"%s Begin
\n
"
,
gCaseCtrl
.
caseCatalog
);
runCaseList
(
taos
);
gCaseCtrl
.
autoCreateTbl
=
false
;
#endif
/*
...
...
@@ -3499,6 +3504,7 @@ void runAll(TAOS *taos) {
runCaseList(taos);
gCaseCtrl.rowNum = 0;
gCaseCtrl.printRes = true;
*/
strcpy
(
gCaseCtrl
.
caseCatalog
,
"Runtimes Test"
);
printf
(
"%s Begin
\n
"
,
gCaseCtrl
.
caseCatalog
);
...
...
@@ -3506,12 +3512,15 @@ void runAll(TAOS *taos) {
runCaseList
(
taos
);
gCaseCtrl
.
runTimes
=
0
;
#if 1
strcpy
(
gCaseCtrl
.
caseCatalog
,
"Check Param Test"
);
printf
(
"%s Begin
\n
"
,
gCaseCtrl
.
caseCatalog
);
gCaseCtrl
.
checkParamNum
=
true
;
runCaseList
(
taos
);
gCaseCtrl
.
checkParamNum
=
false
;
#endif
/*
strcpy(gCaseCtrl.caseCatalog, "Bind Col Num Test");
printf("%s Begin\n", gCaseCtrl.caseCatalog);
gCaseCtrl.bindColNum = 6;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录