Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
92c555f2
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看板
提交
92c555f2
编写于
4月 29, 2022
作者:
D
dapan1121
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
stmt query
上级
c4cfcef6
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
28 addition
and
29 deletion
+28
-29
include/libs/nodes/querynodes.h
include/libs/nodes/querynodes.h
+1
-0
source/libs/nodes/src/nodesUtilFuncs.c
source/libs/nodes/src/nodesUtilFuncs.c
+12
-12
source/libs/scalar/src/scalar.c
source/libs/scalar/src/scalar.c
+3
-3
tests/script/api/batchprepare.c
tests/script/api/batchprepare.c
+12
-14
未找到文件。
include/libs/nodes/querynodes.h
浏览文件 @
92c555f2
...
...
@@ -313,6 +313,7 @@ bool nodesIsTimeorderQuery(const SNode* pQuery);
bool
nodesIsTimelineQuery
(
const
SNode
*
pQuery
);
void
*
nodesGetValueFromNode
(
SValueNode
*
pNode
);
int32_t
nodesSetValueNodeValue
(
SValueNode
*
pNode
,
void
*
value
);
char
*
nodesGetStrValueFromNode
(
SValueNode
*
pNode
);
char
*
getFillModeString
(
EFillMode
mode
);
void
valueNodeToVariant
(
const
SValueNode
*
pNode
,
SVariant
*
pVal
);
...
...
source/libs/nodes/src/nodesUtilFuncs.c
浏览文件 @
92c555f2
...
...
@@ -894,51 +894,51 @@ int32_t nodesSetValueNodeValue(SValueNode* pNode, void *value) {
switch
(
pNode
->
node
.
resType
.
type
)
{
case
TSDB_DATA_TYPE_BOOL
:
pNode
->
datum
.
b
=
*
(
bool
*
)
value
;
*
(
bool
*
)
pNode
->
typeData
=
pNode
->
datum
.
b
;
*
(
bool
*
)
&
pNode
->
typeData
=
pNode
->
datum
.
b
;
break
;
case
TSDB_DATA_TYPE_TINYINT
:
pNode
->
datum
.
i
=
*
(
int8_t
*
)
value
;
*
(
int8_t
*
)
pNode
->
typeData
=
pNode
->
datum
.
i
;
*
(
int8_t
*
)
&
pNode
->
typeData
=
pNode
->
datum
.
i
;
break
;
case
TSDB_DATA_TYPE_SMALLINT
:
pNode
->
datum
.
i
=
*
(
int16_t
*
)
value
;
*
(
int16_t
*
)
pNode
->
typeData
=
pNode
->
datum
.
i
;
*
(
int16_t
*
)
&
pNode
->
typeData
=
pNode
->
datum
.
i
;
break
;
case
TSDB_DATA_TYPE_INT
:
pNode
->
datum
.
i
=
*
(
int32_t
*
)
value
;
*
(
int32_t
*
)
pNode
->
typeData
=
pNode
->
datum
.
i
;
*
(
int32_t
*
)
&
pNode
->
typeData
=
pNode
->
datum
.
i
;
break
;
case
TSDB_DATA_TYPE_BIGINT
:
pNode
->
datum
.
i
=
*
(
int64_t
*
)
value
;
*
(
int64_t
*
)
pNode
->
typeData
=
pNode
->
datum
.
i
;
*
(
int64_t
*
)
&
pNode
->
typeData
=
pNode
->
datum
.
i
;
break
;
case
TSDB_DATA_TYPE_TIMESTAMP
:
pNode
->
datum
.
i
=
*
(
int64_t
*
)
value
;
*
(
int64_t
*
)
pNode
->
typeData
=
pNode
->
datum
.
i
;
*
(
int64_t
*
)
&
pNode
->
typeData
=
pNode
->
datum
.
i
;
break
;
case
TSDB_DATA_TYPE_UTINYINT
:
pNode
->
datum
.
u
=
*
(
int8_t
*
)
value
;
*
(
int8_t
*
)
pNode
->
typeData
=
pNode
->
datum
.
u
;
*
(
int8_t
*
)
&
pNode
->
typeData
=
pNode
->
datum
.
u
;
break
;
case
TSDB_DATA_TYPE_USMALLINT
:
pNode
->
datum
.
u
=
*
(
int16_t
*
)
value
;
*
(
int16_t
*
)
pNode
->
typeData
=
pNode
->
datum
.
u
;
*
(
int16_t
*
)
&
pNode
->
typeData
=
pNode
->
datum
.
u
;
break
;
case
TSDB_DATA_TYPE_UINT
:
pNode
->
datum
.
u
=
*
(
int32_t
*
)
value
;
*
(
int32_t
*
)
pNode
->
typeData
=
pNode
->
datum
.
u
;
*
(
int32_t
*
)
&
pNode
->
typeData
=
pNode
->
datum
.
u
;
break
;
case
TSDB_DATA_TYPE_UBIGINT
:
pNode
->
datum
.
u
=
*
(
uint64_t
*
)
value
;
*
(
uint64_t
*
)
pNode
->
typeData
=
pNode
->
datum
.
u
;
*
(
uint64_t
*
)
&
pNode
->
typeData
=
pNode
->
datum
.
u
;
break
;
case
TSDB_DATA_TYPE_FLOAT
:
pNode
->
datum
.
d
=
*
(
float
*
)
value
;
*
(
float
*
)
pNode
->
typeData
=
pNode
->
datum
.
d
;
*
(
float
*
)
&
pNode
->
typeData
=
pNode
->
datum
.
d
;
break
;
case
TSDB_DATA_TYPE_DOUBLE
:
pNode
->
datum
.
d
=
*
(
double
*
)
value
;
*
(
double
*
)
pNode
->
typeData
=
pNode
->
datum
.
d
;
*
(
double
*
)
&
pNode
->
typeData
=
pNode
->
datum
.
d
;
break
;
case
TSDB_DATA_TYPE_NCHAR
:
case
TSDB_DATA_TYPE_VARCHAR
:
...
...
source/libs/scalar/src/scalar.c
浏览文件 @
92c555f2
...
...
@@ -599,7 +599,7 @@ EDealRes sclRewriteFunction(SNode** pNode, SScalarCtx *ctx) {
res
->
datum
.
p
=
taosMemoryCalloc
(
res
->
node
.
resType
.
bytes
+
VARSTR_HEADER_SIZE
+
1
,
1
);
memcpy
(
res
->
datum
.
p
,
output
.
columnData
->
pData
,
varDataTLen
(
output
.
columnData
->
pData
));
}
else
{
memcpy
(
nodesGetValueFromNode
(
res
),
output
.
columnData
->
pData
,
tDataTypes
[
type
].
bytes
);
nodesSetValueNodeValue
(
res
,
output
.
columnData
->
pData
);
}
}
...
...
@@ -639,7 +639,7 @@ EDealRes sclRewriteLogic(SNode** pNode, SScalarCtx *ctx) {
res
->
datum
.
p
=
output
.
columnData
->
pData
;
output
.
columnData
->
pData
=
NULL
;
}
else
{
memcpy
(
nodesGetValueFromNode
(
res
),
output
.
columnData
->
pData
,
tDataTypes
[
type
].
bytes
);
nodesSetValueNodeValue
(
res
,
output
.
columnData
->
pData
);
}
nodesDestroyNode
(
*
pNode
);
...
...
@@ -681,7 +681,7 @@ EDealRes sclRewriteOperator(SNode** pNode, SScalarCtx *ctx) {
res
->
datum
.
p
=
output
.
columnData
->
pData
;
output
.
columnData
->
pData
=
NULL
;
}
else
{
memcpy
(
nodesGetValueFromNode
(
res
),
output
.
columnData
->
pData
,
tDataTypes
[
type
].
bytes
);
nodesSetValueNodeValue
(
res
,
output
.
columnData
->
pData
);
}
}
...
...
tests/script/api/batchprepare.c
浏览文件 @
92c555f2
...
...
@@ -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_
INT
,
TSDB_DATA_TYPE_FLOA
T
};
int32_t
optrIdxList
[]
=
{
3
,
5
,
2
};
int32_t
bindColTypeList
[]
=
{
TSDB_DATA_TYPE_TIMESTAMP
,
TSDB_DATA_TYPE_
NCHAR
,
TSDB_DATA_TYPE_SMALLIN
T
};
int32_t
optrIdxList
[]
=
{
4
,
11
,
1
};
typedef
struct
{
char
*
oper
;
...
...
@@ -33,7 +33,7 @@ OperInfo operInfo[] = {
{
"like"
,
2
,
false
},
{
"not like"
,
2
,
false
},
{
"match"
,
2
,
false
},
{
"nma
ke"
,
2
,
false
},
{
"nma
tch"
,
2
,
false
},
};
int32_t
operatorList
[]
=
{
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
};
...
...
@@ -140,9 +140,7 @@ CaseCfg gCase[] = {
{
"insert:MPME1-C012"
,
tListLen
(
fullColList
),
fullColList
,
TTYPE_INSERT
,
false
,
false
,
insertMPMETest1
,
10
,
10
,
2
,
12
,
0
,
1
,
-
1
},
// 22
//{"query:SUBT-FULL", tListLen(fullColList), fullColList, TTYPE_QUERY, false, false, querySUBTTest1, 10, 10, 1, 3, 0, 1, 2},
{
"query:SUBT-FULL"
,
tListLen
(
fullColList
),
fullColList
,
TTYPE_QUERY
,
false
,
false
,
querySUBTTest1
,
1
,
10
,
1
,
3
,
0
,
1
,
2
},
{
"query:SUBT-FULL"
,
tListLen
(
fullColList
),
fullColList
,
TTYPE_QUERY
,
false
,
false
,
querySUBTTest1
,
10
,
10
,
1
,
3
,
0
,
1
,
2
},
};
...
...
@@ -181,10 +179,10 @@ CaseCtrl gCaseCtrl = {
.
rowNum
=
0
,
.
bindColNum
=
0
,
.
bindRowNum
=
0
,
//
.bindColTypeNum = 0,
//
.bindColTypeList = NULL,
//
.optrIdxListNum = 0,
//
.optrIdxList = NULL,
.
bindColTypeNum
=
0
,
.
bindColTypeList
=
NULL
,
.
optrIdxListNum
=
0
,
.
optrIdxList
=
NULL
,
.
checkParamNum
=
false
,
.
printRes
=
true
,
.
runTimes
=
0
,
...
...
@@ -194,10 +192,10 @@ CaseCtrl gCaseCtrl = {
// .caseRunNum = -1,
.
optrIdxListNum
=
tListLen
(
optrIdxList
),
.
optrIdxList
=
optrIdxList
,
.
bindColTypeNum
=
tListLen
(
bindColTypeList
),
.
bindColTypeList
=
bindColTypeList
,
//
.optrIdxListNum = tListLen(optrIdxList),
//
.optrIdxList = optrIdxList,
//
.bindColTypeNum = tListLen(bindColTypeList),
//
.bindColTypeList = bindColTypeList,
.
caseIdx
=
22
,
.
caseNum
=
1
,
.
caseRunNum
=
1
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录