Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
c9744fce
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看板
提交
c9744fce
编写于
12月 10, 2021
作者:
S
shenglian zhou
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/feature/TD-6140' into szhou/feature/support-math-functions
上级
a9ad82f0
b58be392
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
11 addition
and
15 deletion
+11
-15
src/client/inc/tscUtil.h
src/client/inc/tscUtil.h
+1
-1
src/client/src/tscGlobalmerge.c
src/client/src/tscGlobalmerge.c
+9
-13
src/client/src/tscSubquery.c
src/client/src/tscSubquery.c
+1
-1
未找到文件。
src/client/inc/tscUtil.h
浏览文件 @
c9744fce
...
@@ -364,7 +364,7 @@ bool subAndCheckDone(SSqlObj *pSql, SSqlObj *pParentSql, int idx);
...
@@ -364,7 +364,7 @@ bool subAndCheckDone(SSqlObj *pSql, SSqlObj *pParentSql, int idx);
bool
tscSetSqlOwner
(
SSqlObj
*
pSql
);
bool
tscSetSqlOwner
(
SSqlObj
*
pSql
);
void
tscClearSqlOwner
(
SSqlObj
*
pSql
);
void
tscClearSqlOwner
(
SSqlObj
*
pSql
);
int32_t
do
Arithmetic
Calculate
(
SQueryInfo
*
pQueryInfo
,
tFilePage
*
pOutput
,
int32_t
rowSize
,
int32_t
finalRowSize
);
int32_t
do
ScalarExpr
Calculate
(
SQueryInfo
*
pQueryInfo
,
tFilePage
*
pOutput
,
int32_t
rowSize
,
int32_t
finalRowSize
);
char
*
serializeTagData
(
STagData
*
pTagData
,
char
*
pMsg
);
char
*
serializeTagData
(
STagData
*
pTagData
,
char
*
pMsg
);
int32_t
copyTagData
(
STagData
*
dst
,
const
STagData
*
src
);
int32_t
copyTagData
(
STagData
*
dst
,
const
STagData
*
src
);
...
...
src/client/src/tscGlobalmerge.c
浏览文件 @
c9744fce
...
@@ -607,10 +607,9 @@ static void doMergeResultImpl(SMultiwayMergeInfo* pInfo, SQLFunctionCtx *pCtx, i
...
@@ -607,10 +607,9 @@ static void doMergeResultImpl(SMultiwayMergeInfo* pInfo, SQLFunctionCtx *pCtx, i
if
(
functionId
<
0
)
{
if
(
functionId
<
0
)
{
SUdfInfo
*
pUdfInfo
=
taosArrayGet
(
pInfo
->
udfInfo
,
-
1
*
functionId
-
1
);
SUdfInfo
*
pUdfInfo
=
taosArrayGet
(
pInfo
->
udfInfo
,
-
1
*
functionId
-
1
);
doInvokeUdf
(
pUdfInfo
,
&
pCtx
[
j
],
0
,
TSDB_UDF_FUNC_MERGE
);
doInvokeUdf
(
pUdfInfo
,
&
pCtx
[
j
],
0
,
TSDB_UDF_FUNC_MERGE
);
}
else
if
(
!
TSDB_FUNC_IS_SCALAR
(
functionId
)){
aAggs
[
functionId
].
mergeFunc
(
&
pCtx
[
j
]);
}
else
{
}
else
{
assert
(
0
);
assert
(
!
TSDB_FUNC_IS_SCALAR
(
functionId
));
aAggs
[
functionId
].
mergeFunc
(
&
pCtx
[
j
]);
}
}
}
}
}
}
...
@@ -625,10 +624,9 @@ static void doFinalizeResultImpl(SMultiwayMergeInfo* pInfo, SQLFunctionCtx *pCtx
...
@@ -625,10 +624,9 @@ static void doFinalizeResultImpl(SMultiwayMergeInfo* pInfo, SQLFunctionCtx *pCtx
if
(
functionId
<
0
)
{
if
(
functionId
<
0
)
{
SUdfInfo
*
pUdfInfo
=
taosArrayGet
(
pInfo
->
udfInfo
,
-
1
*
functionId
-
1
);
SUdfInfo
*
pUdfInfo
=
taosArrayGet
(
pInfo
->
udfInfo
,
-
1
*
functionId
-
1
);
doInvokeUdf
(
pUdfInfo
,
&
pCtx
[
j
],
0
,
TSDB_UDF_FUNC_FINALIZE
);
doInvokeUdf
(
pUdfInfo
,
&
pCtx
[
j
],
0
,
TSDB_UDF_FUNC_FINALIZE
);
}
else
if
(
!
TSDB_FUNC_IS_SCALAR
(
functionId
)){
aAggs
[
functionId
].
xFinalize
(
&
pCtx
[
j
]);
}
else
{
}
else
{
assert
(
0
);
assert
(
!
TSDB_FUNC_IS_SCALAR
(
functionId
));
aAggs
[
functionId
].
xFinalize
(
&
pCtx
[
j
]);
}
}
}
}
}
}
...
@@ -667,9 +665,8 @@ static void doExecuteFinalMerge(SOperatorInfo* pOperator, int32_t numOfExpr, SSD
...
@@ -667,9 +665,8 @@ static void doExecuteFinalMerge(SOperatorInfo* pOperator, int32_t numOfExpr, SSD
if
(
pCtx
[
j
].
functionId
<
0
)
{
if
(
pCtx
[
j
].
functionId
<
0
)
{
continue
;
continue
;
}
}
if
(
TSDB_FUNC_IS_SCALAR
(
pCtx
[
j
].
functionId
))
{
{
assert
(
0
);
assert
(
!
TSDB_FUNC_IS_SCALAR
(
pCtx
[
j
].
functionId
));
}
else
{
aAggs
[
pCtx
[
j
].
functionId
].
init
(
&
pCtx
[
j
],
pCtx
[
j
].
resultInfo
);
aAggs
[
pCtx
[
j
].
functionId
].
init
(
&
pCtx
[
j
],
pCtx
[
j
].
resultInfo
);
}
}
}
}
...
@@ -713,7 +710,7 @@ SGlobalMerger* tscInitResObjForLocalQuery(int32_t numOfRes, int32_t rowLen, uint
...
@@ -713,7 +710,7 @@ SGlobalMerger* tscInitResObjForLocalQuery(int32_t numOfRes, int32_t rowLen, uint
}
}
// todo remove it
// todo remove it
int32_t
do
Arithmetic
Calculate
(
SQueryInfo
*
pQueryInfo
,
tFilePage
*
pOutput
,
int32_t
rowSize
,
int32_t
finalRowSize
)
{
int32_t
do
ScalarExpr
Calculate
(
SQueryInfo
*
pQueryInfo
,
tFilePage
*
pOutput
,
int32_t
rowSize
,
int32_t
finalRowSize
)
{
int32_t
maxRowSize
=
MAX
(
rowSize
,
finalRowSize
);
int32_t
maxRowSize
=
MAX
(
rowSize
,
finalRowSize
);
char
*
pbuf
=
calloc
(
1
,
(
size_t
)(
pOutput
->
num
*
maxRowSize
));
char
*
pbuf
=
calloc
(
1
,
(
size_t
)(
pOutput
->
num
*
maxRowSize
));
...
@@ -914,10 +911,9 @@ SSDataBlock* doGlobalAggregate(void* param, bool* newgroup) {
...
@@ -914,10 +911,9 @@ SSDataBlock* doGlobalAggregate(void* param, bool* newgroup) {
clearOutputBuf
(
&
pAggInfo
->
binfo
,
&
pAggInfo
->
bufCapacity
);
clearOutputBuf
(
&
pAggInfo
->
binfo
,
&
pAggInfo
->
bufCapacity
);
continue
;
continue
;
}
}
if
(
!
TSDB_FUNC_IS_SCALAR
(
pCtx
->
functionId
))
{
{
assert
(
!
TSDB_FUNC_IS_SCALAR
(
pCtx
->
functionId
));
aAggs
[
pCtx
->
functionId
].
init
(
pCtx
,
pCtx
->
resultInfo
);
aAggs
[
pCtx
->
functionId
].
init
(
pCtx
,
pCtx
->
resultInfo
);
}
else
{
assert
(
0
);
}
}
}
}
}
}
...
...
src/client/src/tscSubquery.c
浏览文件 @
c9744fce
...
@@ -3600,7 +3600,7 @@ static void doBuildResFromSubqueries(SSqlObj* pSql) {
...
@@ -3600,7 +3600,7 @@ static void doBuildResFromSubqueries(SSqlObj* pSql) {
finalRowSize
+=
pField
->
bytes
;
finalRowSize
+=
pField
->
bytes
;
}
}
do
Arithmetic
Calculate
(
pQueryInfo
,
pFilePage
,
rowSize
,
finalRowSize
);
do
ScalarExpr
Calculate
(
pQueryInfo
,
pFilePage
,
rowSize
,
finalRowSize
);
pRes
->
data
=
pFilePage
->
data
;
pRes
->
data
=
pFilePage
->
data
;
tscSetResRawPtr
(
pRes
,
pQueryInfo
,
pRes
->
dataConverted
);
tscSetResRawPtr
(
pRes
,
pQueryInfo
,
pRes
->
dataConverted
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录