Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
41ab4a5f
T
TDengine
项目概览
慢慢CG
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
41ab4a5f
编写于
7月 01, 2021
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[td-4973]<fix>:fix the conversion bug in outer query when handling the data of nchar type.
上级
d9ba8b16
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
8 addition
and
9 deletion
+8
-9
src/client/inc/tscUtil.h
src/client/inc/tscUtil.h
+1
-1
src/client/inc/tsclient.h
src/client/inc/tsclient.h
+1
-1
src/client/src/tscServer.c
src/client/src/tscServer.c
+1
-1
src/client/src/tscUtil.c
src/client/src/tscUtil.c
+5
-5
src/query/inc/qTableMeta.h
src/query/inc/qTableMeta.h
+0
-1
未找到文件。
src/client/inc/tscUtil.h
浏览文件 @
41ab4a5f
...
...
@@ -217,7 +217,7 @@ void tscColumnListDestroy(SArray* pColList);
void
tscColumnListCopy
(
SArray
*
dst
,
const
SArray
*
src
,
uint64_t
tableUid
);
void
tscColumnListCopyAll
(
SArray
*
dst
,
const
SArray
*
src
);
void
convertQueryResult
(
SSqlRes
*
pRes
,
SQueryInfo
*
pQueryInfo
,
uint64_t
objId
);
void
convertQueryResult
(
SSqlRes
*
pRes
,
SQueryInfo
*
pQueryInfo
,
uint64_t
objId
,
bool
convertNchar
);
void
tscDequoteAndTrimToken
(
SStrToken
*
pToken
);
int32_t
tscValidateName
(
SStrToken
*
pToken
);
...
...
src/client/inc/tsclient.h
浏览文件 @
41ab4a5f
...
...
@@ -319,7 +319,7 @@ void tscRestoreFuncForSTableQuery(SQueryInfo *pQueryInfo);
int32_t
tscCreateResPointerInfo
(
SSqlRes
*
pRes
,
SQueryInfo
*
pQueryInfo
);
void
tscSetResRawPtr
(
SSqlRes
*
pRes
,
SQueryInfo
*
pQueryInfo
);
void
tscSetResRawPtrRv
(
SSqlRes
*
pRes
,
SQueryInfo
*
pQueryInfo
,
SSDataBlock
*
pBlock
);
void
tscSetResRawPtrRv
(
SSqlRes
*
pRes
,
SQueryInfo
*
pQueryInfo
,
SSDataBlock
*
pBlock
,
bool
convertNchar
);
void
handleDownstreamOperator
(
SSqlObj
**
pSqlList
,
int32_t
numOfUpstream
,
SQueryInfo
*
px
,
SSqlObj
*
pParent
);
void
destroyTableNameList
(
SInsertStatementParam
*
pInsertParam
);
...
...
src/client/src/tscServer.c
浏览文件 @
41ab4a5f
...
...
@@ -1703,7 +1703,7 @@ int tscProcessRetrieveGlobalMergeRsp(SSqlObj *pSql) {
uint64_t
localQueryId
=
pSql
->
self
;
qTableQuery
(
pQueryInfo
->
pQInfo
,
&
localQueryId
);
convertQueryResult
(
pRes
,
pQueryInfo
,
pSql
->
self
);
convertQueryResult
(
pRes
,
pQueryInfo
,
pSql
->
self
,
true
);
code
=
pRes
->
code
;
if
(
pRes
->
code
==
TSDB_CODE_SUCCESS
)
{
...
...
src/client/src/tscUtil.c
浏览文件 @
41ab4a5f
...
...
@@ -645,7 +645,7 @@ void tscSetResRawPtr(SSqlRes* pRes, SQueryInfo* pQueryInfo) {
}
}
void
tscSetResRawPtrRv
(
SSqlRes
*
pRes
,
SQueryInfo
*
pQueryInfo
,
SSDataBlock
*
pBlock
)
{
void
tscSetResRawPtrRv
(
SSqlRes
*
pRes
,
SQueryInfo
*
pQueryInfo
,
SSDataBlock
*
pBlock
,
bool
convertNchar
)
{
assert
(
pRes
->
numOfCols
>
0
);
for
(
int32_t
i
=
0
;
i
<
pQueryInfo
->
fieldsInfo
.
numOfOutput
;
++
i
)
{
...
...
@@ -678,7 +678,7 @@ void tscSetResRawPtrRv(SSqlRes* pRes, SQueryInfo* pQueryInfo, SSDataBlock* pBloc
}
}
}
else
if
(
pInfo
->
field
.
type
==
TSDB_DATA_TYPE_NCHAR
)
{
}
else
if
(
convertNchar
&&
pInfo
->
field
.
type
==
TSDB_DATA_TYPE_NCHAR
)
{
// convert unicode to native code in a temporary buffer extra one byte for terminated symbol
pRes
->
buffer
[
i
]
=
realloc
(
pRes
->
buffer
[
i
],
pInfo
->
field
.
bytes
*
pRes
->
numOfRows
);
...
...
@@ -1072,14 +1072,14 @@ SOperatorInfo* createJoinOperatorInfo(SOperatorInfo** pUpstream, int32_t numOfUp
return
pOperator
;
}
void
convertQueryResult
(
SSqlRes
*
pRes
,
SQueryInfo
*
pQueryInfo
,
uint64_t
objId
)
{
void
convertQueryResult
(
SSqlRes
*
pRes
,
SQueryInfo
*
pQueryInfo
,
uint64_t
objId
,
bool
convertNchar
)
{
// set the correct result
SSDataBlock
*
p
=
pQueryInfo
->
pQInfo
->
runtimeEnv
.
outputBuf
;
pRes
->
numOfRows
=
(
p
!=
NULL
)
?
p
->
info
.
rows
:
0
;
if
(
pRes
->
code
==
TSDB_CODE_SUCCESS
&&
pRes
->
numOfRows
>
0
)
{
tscCreateResPointerInfo
(
pRes
,
pQueryInfo
);
tscSetResRawPtrRv
(
pRes
,
pQueryInfo
,
p
);
tscSetResRawPtrRv
(
pRes
,
pQueryInfo
,
p
,
convertNchar
);
}
tscDebug
(
"0x%"
PRIx64
" retrieve result in pRes, numOfRows:%d"
,
objId
,
pRes
->
numOfRows
);
...
...
@@ -1199,7 +1199,7 @@ void handleDownstreamOperator(SSqlObj** pSqlObjList, int32_t numOfUpstream, SQue
uint64_t
qId
=
pSql
->
self
;
qTableQuery
(
px
->
pQInfo
,
&
qId
);
convertQueryResult
(
pOutput
,
px
,
pSql
->
self
);
convertQueryResult
(
pOutput
,
px
,
pSql
->
self
,
false
);
}
static
void
tscDestroyResPointerInfo
(
SSqlRes
*
pRes
)
{
...
...
src/query/inc/qTableMeta.h
浏览文件 @
41ab4a5f
...
...
@@ -118,7 +118,6 @@ typedef struct SQueryInfo {
int64_t
vgroupLimit
;
// table limit in case of super table projection query + global order + limit
int32_t
udColumnId
;
// current user-defined constant output field column id, monotonically decreases from TSDB_UD_COLUMN_INDEX
int16_t
resColumnId
;
// result column id
bool
distinctTag
;
// distinct tag or not
int32_t
round
;
// 0/1/....
int32_t
bufLen
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录