Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
597ea1c2
T
TDengine
项目概览
taosdata
/
TDengine
大约 2 年 前同步成功
通知
1193
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看板
提交
597ea1c2
编写于
9月 04, 2022
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(query): add value check.
上级
97b802ad
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
24 addition
and
3 deletion
+24
-3
source/client/src/clientImpl.c
source/client/src/clientImpl.c
+6
-1
source/common/src/tdatablock.c
source/common/src/tdatablock.c
+3
-0
source/libs/executor/src/dataDeleter.c
source/libs/executor/src/dataDeleter.c
+3
-1
source/libs/executor/src/dataDispatcher.c
source/libs/executor/src/dataDispatcher.c
+12
-1
未找到文件。
source/client/src/clientImpl.c
浏览文件 @
597ea1c2
...
...
@@ -1672,7 +1672,12 @@ static int32_t doConvertJson(SReqResultInfo* pResultInfo, int32_t numOfCols, int
break
;
}
}
if
(
!
needConvert
)
return
TSDB_CODE_SUCCESS
;
if
(
!
needConvert
)
{
return
TSDB_CODE_SUCCESS
;
}
tscDebug
(
"start to convert form json format string"
);
char
*
p
=
(
char
*
)
pResultInfo
->
pData
;
int32_t
dataLen
=
estimateJsonLen
(
pResultInfo
,
numOfCols
,
numOfRows
);
...
...
source/common/src/tdatablock.c
浏览文件 @
597ea1c2
...
...
@@ -2120,6 +2120,7 @@ void blockEncode(const SSDataBlock* pBlock, char* data, int32_t* dataLen, int32_
int32_t
*
rows
=
(
int32_t
*
)
data
;
*
rows
=
pBlock
->
info
.
rows
;
data
+=
sizeof
(
int32_t
);
ASSERT
(
*
rows
>
0
);
int32_t
*
cols
=
(
int32_t
*
)
data
;
*
cols
=
numOfCols
;
...
...
@@ -2183,6 +2184,8 @@ void blockEncode(const SSDataBlock* pBlock, char* data, int32_t* dataLen, int32_
*
actualLen
=
*
dataLen
;
*
groupId
=
pBlock
->
info
.
groupId
;
ASSERT
(
*
dataLen
>
0
);
uDebug
(
"build data block, actualLen:%d, rows:%d, cols:%d"
,
*
dataLen
,
*
rows
,
*
cols
);
}
const
char
*
blockDecode
(
SSDataBlock
*
pBlock
,
const
char
*
pData
)
{
...
...
source/libs/executor/src/dataDeleter.c
浏览文件 @
597ea1c2
...
...
@@ -168,7 +168,9 @@ static void getDataLength(SDataSinkHandle* pHandle, int64_t* pLen, bool* pQueryE
taosReadQitem
(
pDeleter
->
pDataBlocks
,
(
void
**
)
&
pBuf
);
memcpy
(
&
pDeleter
->
nextOutput
,
pBuf
,
sizeof
(
SDataDeleterBuf
));
taosFreeQitem
(
pBuf
);
*
pLen
=
((
SDataCacheEntry
*
)(
pDeleter
->
nextOutput
.
pData
))
->
dataLen
;
SDataCacheEntry
*
pEntry
=
(
SDataCacheEntry
*
)
pDeleter
->
nextOutput
.
pData
;
*
pLen
=
pEntry
->
dataLen
;
*
pQueryEnd
=
pDeleter
->
queryEnd
;
qDebug
(
"got data len %"
PRId64
", row num %d in sink"
,
*
pLen
,
((
SDataCacheEntry
*
)(
pDeleter
->
nextOutput
.
pData
))
->
numOfRows
);
}
...
...
source/libs/executor/src/dataDispatcher.c
浏览文件 @
597ea1c2
...
...
@@ -93,6 +93,8 @@ static void toDataCacheEntry(SDataDispatchHandle* pHandle, const SInputData* pIn
pBuf
->
useSize
=
sizeof
(
SDataCacheEntry
);
blockEncode
(
pInput
->
pData
,
pEntry
->
data
,
&
pEntry
->
dataLen
,
numOfCols
,
pEntry
->
compressed
);
ASSERT
(
pEntry
->
numOfRows
==
*
(
int32_t
*
)(
pEntry
->
data
+
8
));
ASSERT
(
pEntry
->
numOfCols
==
*
(
int32_t
*
)(
pEntry
->
data
+
8
+
4
));
pBuf
->
useSize
+=
pEntry
->
dataLen
;
...
...
@@ -170,7 +172,13 @@ static void getDataLength(SDataSinkHandle* pHandle, int64_t* pLen, bool* pQueryE
taosReadQitem
(
pDispatcher
->
pDataBlocks
,
(
void
**
)
&
pBuf
);
memcpy
(
&
pDispatcher
->
nextOutput
,
pBuf
,
sizeof
(
SDataDispatchBuf
));
taosFreeQitem
(
pBuf
);
*
pLen
=
((
SDataCacheEntry
*
)(
pDispatcher
->
nextOutput
.
pData
))
->
dataLen
;
SDataCacheEntry
*
pEntry
=
(
SDataCacheEntry
*
)
pDispatcher
->
nextOutput
.
pData
;
*
pLen
=
pEntry
->
dataLen
;
ASSERT
(
pEntry
->
numOfRows
==
*
(
int32_t
*
)(
pEntry
->
data
+
8
));
ASSERT
(
pEntry
->
numOfCols
==
*
(
int32_t
*
)(
pEntry
->
data
+
8
+
4
));
*
pQueryEnd
=
pDispatcher
->
queryEnd
;
qDebug
(
"got data len %"
PRId64
", row num %d in sink"
,
*
pLen
,
((
SDataCacheEntry
*
)(
pDispatcher
->
nextOutput
.
pData
))
->
numOfRows
);
}
...
...
@@ -191,6 +199,9 @@ static int32_t getDataBlock(SDataSinkHandle* pHandle, SOutputData* pOutput) {
pOutput
->
numOfCols
=
pEntry
->
numOfCols
;
pOutput
->
compressed
=
pEntry
->
compressed
;
ASSERT
(
pEntry
->
numOfRows
==
*
(
int32_t
*
)(
pEntry
->
data
+
8
));
ASSERT
(
pEntry
->
numOfCols
==
*
(
int32_t
*
)(
pEntry
->
data
+
8
+
4
));
atomic_sub_fetch_64
(
&
pDispatcher
->
cachedSize
,
pEntry
->
dataLen
);
atomic_sub_fetch_64
(
&
gDataSinkStat
.
cachedSize
,
pEntry
->
dataLen
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录