Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
abfa8c1d
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看板
提交
abfa8c1d
编写于
11月 03, 2022
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(query): add api to memset buffer for filtering data.
上级
03154146
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
23 addition
and
7 deletion
+23
-7
include/common/tdatablock.h
include/common/tdatablock.h
+2
-0
source/client/CMakeLists.txt
source/client/CMakeLists.txt
+2
-2
source/client/test/clientTests.cpp
source/client/test/clientTests.cpp
+8
-5
source/common/src/tdatablock.c
source/common/src/tdatablock.c
+10
-0
source/libs/scalar/src/scalar.c
source/libs/scalar/src/scalar.c
+1
-0
未找到文件。
include/common/tdatablock.h
浏览文件 @
abfa8c1d
...
...
@@ -217,6 +217,8 @@ int32_t blockDataSort_rv(SSDataBlock* pDataBlock, SArray* pOrderInfo, bool nullF
int32_t
colInfoDataEnsureCapacity
(
SColumnInfoData
*
pColumn
,
uint32_t
numOfRows
);
int32_t
blockDataEnsureCapacity
(
SSDataBlock
*
pDataBlock
,
uint32_t
numOfRows
);
void
colInfoDataMemset
(
SColumnInfoData
*
pColumn
,
uint32_t
numOfRows
);
void
colInfoDataCleanup
(
SColumnInfoData
*
pColumn
,
uint32_t
numOfRows
);
void
blockDataCleanup
(
SSDataBlock
*
pDataBlock
);
...
...
source/client/CMakeLists.txt
浏览文件 @
abfa8c1d
...
...
@@ -60,6 +60,6 @@ target_link_libraries(
PRIVATE os util common transport nodes parser command planner catalog scheduler function qcom
)
if
(
${
BUILD_TEST
}
)
#
if(${BUILD_TEST})
ADD_SUBDIRECTORY
(
test
)
endif
(
${
BUILD_TEST
}
)
\ No newline at end of file
#endif(${BUILD_TEST})
\ No newline at end of file
source/client/test/clientTests.cpp
浏览文件 @
abfa8c1d
...
...
@@ -112,7 +112,7 @@ void createNewTable(TAOS* pConn, int32_t index) {
}
taos_free_result
(
pRes
);
for
(
int32_t
i
=
0
;
i
<
1000
0
;
i
+=
20
)
{
for
(
int32_t
i
=
0
;
i
<
2
0
;
i
+=
20
)
{
char
sql
[
1024
]
=
{
0
};
sprintf
(
sql
,
"insert into tu%d values(now+%da, %d)(now+%da, %d)(now+%da, %d)(now+%da, %d)"
...
...
@@ -692,6 +692,7 @@ TEST(testCase, insert_test) {
taos_free_result(pRes);
taos_close(pConn);
}
#endif
TEST
(
testCase
,
projection_query_tables
)
{
TAOS
*
pConn
=
taos_connect
(
"localhost"
,
"root"
,
"taosdata"
,
NULL
,
0
);
...
...
@@ -703,7 +704,7 @@ TEST(testCase, projection_query_tables) {
// }
// taos_free_result(pRes);
TAOS_RES* pRes = taos_query(pConn, "use
benchmarkcpu
");
TAOS_RES
*
pRes
=
taos_query
(
pConn
,
"use
abc2
"
);
taos_free_result
(
pRes
);
pRes
=
taos_query
(
pConn
,
"create stable st1 (ts timestamp, k int) tags(a int)"
);
...
...
@@ -725,7 +726,7 @@ TEST(testCase, projection_query_tables) {
}
taos_free_result
(
pRes
);
for (int32_t i = 0; i < 2; ++i) {
for
(
int32_t
i
=
0
;
i
<
2
00000
;
++
i
)
{
printf
(
"create table :%d
\n
"
,
i
);
createNewTable
(
pConn
,
i
);
}
...
...
@@ -750,7 +751,9 @@ TEST(testCase, projection_query_tables) {
taos_free_result
(
pRes
);
taos_close
(
pConn
);
}
#endif
#if 0
TEST(testCase, tsbs_perf_test) {
TdThread qid[20] = {0};
...
...
@@ -761,7 +764,7 @@ TEST(testCase, tsbs_perf_test) {
getchar();
}
#if 0
TEST(testCase, projection_query_stables) {
TAOS* pConn = taos_connect("localhost", "root", "taosdata", NULL, 0);
ASSERT_NE(pConn, nullptr);
...
...
source/common/src/tdatablock.c
浏览文件 @
abfa8c1d
...
...
@@ -1208,6 +1208,16 @@ int32_t colInfoDataEnsureCapacity(SColumnInfoData* pColumn, uint32_t numOfRows)
return
doEnsureCapacity
(
pColumn
,
&
info
,
numOfRows
);
}
void
colInfoDataMemset
(
SColumnInfoData
*
pColumn
,
uint32_t
numOfRows
)
{
if
(
!
IS_VAR_DATA_TYPE
(
pColumn
->
info
.
type
))
{
memset
(
pColumn
->
pData
,
0
,
pColumn
->
info
.
bytes
*
numOfRows
);
}
else
{
if
(
pColumn
->
varmeta
.
length
>
0
)
{
memset
(
pColumn
->
pData
,
0
,
pColumn
->
varmeta
.
length
);
}
}
}
int32_t
blockDataEnsureCapacity
(
SSDataBlock
*
pDataBlock
,
uint32_t
numOfRows
)
{
int32_t
code
=
0
;
if
(
numOfRows
==
0
)
{
...
...
source/libs/scalar/src/scalar.c
浏览文件 @
abfa8c1d
...
...
@@ -56,6 +56,7 @@ int32_t sclCreateColumnInfoData(SDataType *pType, int32_t numOfRows, SScalarPara
return
terrno
;
}
colInfoDataMemset
(
pColumnData
,
numOfRows
);
pParam
->
columnData
=
pColumnData
;
pParam
->
colAlloced
=
true
;
return
TSDB_CODE_SUCCESS
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录