Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
851ffe49
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1187
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看板
提交
851ffe49
编写于
9月 07, 2022
作者:
D
dapan1121
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
enh: support set tag value with expr
上级
4a563b6d
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
10 addition
and
21 deletion
+10
-21
source/libs/parser/src/parTranslater.c
source/libs/parser/src/parTranslater.c
+6
-17
source/util/test/pageBufferTest.cpp
source/util/test/pageBufferTest.cpp
+4
-4
未找到文件。
source/libs/parser/src/parTranslater.c
浏览文件 @
851ffe49
...
...
@@ -6603,32 +6603,21 @@ static int32_t buildUpdateTagValReq(STranslateContext* pCxt, SAlterTableStmt* pS
}
pReq
->
colId
=
pSchema
->
colId
;
SValueNode
*
pVal
=
NULL
;
SDataType
targetDt
=
schemaToDataType
(
pTableMeta
->
tableInfo
.
precision
,
pSchema
);
pCxt
->
errCode
=
createTagValFromExpr
(
pCxt
,
targetDt
,
(
SNode
*
)
pStmt
->
pVal
,
&
pVal
);
if
(
pCxt
->
errCode
)
{
return
pCxt
->
errCode
;
}
/*
if (QUERY_NODE_FUNCTION == pStmt->pVal->node.type) {
pCxt->errCode =
getFuncInfo(pCxt, (SFunctionNode*)pStmt->
pVal);
if
(
QUERY_NODE_VALUE
!=
pStmt
->
pVal
->
node
.
type
)
{
SValueNode
*
pVal
=
NULL
;
pCxt
->
errCode
=
createTagValFromExpr
(
pCxt
,
targetDt
,
(
SNode
*
)
pStmt
->
pVal
,
&
pVal
);
if
(
pCxt
->
errCode
)
{
return
pCxt
->
errCode
;
}
if (DEAL_RES_ERROR == translateFunctionImpl(pCxt, (SFunctionNode**)&pStmt->pVal)) {
return pCxt->errCode;
}
nodesDestroyNode
((
SNode
*
)
pStmt
->
pVal
);
pStmt
->
pVal
=
pVal
;
}
else
if
(
DEAL_RES_ERROR
==
translateValueImpl
(
pCxt
,
pStmt
->
pVal
,
targetDt
,
true
))
{
return
pCxt
->
errCode
;
}
*/
nodesDestroyNode
((
SNode
*
)
pStmt
->
pVal
);
pStmt
->
pVal
=
pVal
;
pReq
->
tagType
=
targetDt
.
type
;
if
(
targetDt
.
type
==
TSDB_DATA_TYPE_JSON
)
{
if
(
pStmt
->
pVal
->
literal
&&
...
...
source/util/test/pageBufferTest.cpp
浏览文件 @
851ffe49
...
...
@@ -23,9 +23,9 @@ void simpleTest() {
ASSERT_EQ
(
getTotalBufSize
(
pBuf
),
1024
);
SIDList
list
=
getDataBufPagesIdList
(
pBuf
,
groupId
);
SIDList
list
=
getDataBufPagesIdList
(
pBuf
);
ASSERT_EQ
(
taosArrayGetSize
(
list
),
1
);
ASSERT_EQ
(
getNumOfBufGroupId
(
pBuf
),
1
);
//
ASSERT_EQ(getNumOfBufGroupId(pBuf), 1);
releaseBufPage
(
pBuf
,
pBufPage
);
...
...
@@ -98,7 +98,7 @@ void writeDownTest() {
SFilePage
*
pBufPagex
=
static_cast
<
SFilePage
*>
(
getBufPage
(
pBuf
,
writePageId
));
ASSERT_EQ
(
*
(
int32_t
*
)
pBufPagex
->
data
,
nx
);
SArray
*
pa
=
getDataBufPagesIdList
(
pBuf
,
groupId
);
SArray
*
pa
=
getDataBufPagesIdList
(
pBuf
);
ASSERT_EQ
(
taosArrayGetSize
(
pa
),
5
);
destroyDiskbasedBuf
(
pBuf
);
...
...
@@ -152,7 +152,7 @@ void recyclePageTest() {
SFilePage
*
pBufPagex1
=
static_cast
<
SFilePage
*>
(
getBufPage
(
pBuf
,
1
));
SArray
*
pa
=
getDataBufPagesIdList
(
pBuf
,
groupId
);
SArray
*
pa
=
getDataBufPagesIdList
(
pBuf
);
ASSERT_EQ
(
taosArrayGetSize
(
pa
),
6
);
destroyDiskbasedBuf
(
pBuf
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录