Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
61de3b17
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看板
提交
61de3b17
编写于
2月 22, 2023
作者:
G
Ganlin Zhao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Revert "add stats"
This reverts commit
09ce8182
.
上级
7e01d092
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
2 addition
and
40 deletion
+2
-40
include/libs/function/function.h
include/libs/function/function.h
+0
-5
source/libs/executor/inc/executorimpl.h
source/libs/executor/inc/executorimpl.h
+0
-7
source/libs/executor/src/executil.c
source/libs/executor/src/executil.c
+0
-5
source/libs/executor/src/executorimpl.c
source/libs/executor/src/executorimpl.c
+2
-18
source/libs/function/src/builtinsimpl.c
source/libs/function/src/builtinsimpl.c
+0
-5
未找到文件。
include/libs/function/function.h
浏览文件 @
61de3b17
...
...
@@ -153,11 +153,6 @@ typedef struct SqlFunctionCtx {
SSerializeDataHandle
saveHandle
;
int32_t
exprIdx
;
char
udfName
[
TSDB_FUNC_NAME_LEN
];
int64_t
smaHits
;
int64_t
smaNoHits
;
int64_t
smaNoHitsRows
;
int64_t
sdHits
;
int64_t
sdHitsRows
;
}
SqlFunctionCtx
;
typedef
struct
tExprNode
{
...
...
source/libs/executor/inc/executorimpl.h
浏览文件 @
61de3b17
...
...
@@ -231,14 +231,7 @@ typedef struct SOperatorInfo {
int64_t
downstreamTime
;
int64_t
funcInitTime
;
int64_t
funcExecTime
;
int64_t
funcExecCalled
;
int64_t
totalNumOfRows
;
int64_t
funcFinTime
;
int64_t
smaHits
;
int64_t
smaNoHits
;
int64_t
smaNoHitsRows
;
int64_t
sdHits
;
int64_t
sdHitsRows
;
}
SOperatorInfo
;
typedef
enum
{
...
...
source/libs/executor/src/executil.c
浏览文件 @
61de3b17
...
...
@@ -1543,11 +1543,6 @@ SqlFunctionCtx* createSqlFunctionCtx(SExprInfo* pExprInfo, int32_t numOfOutput,
pCtx
->
numOfParams
=
pExpr
->
base
.
numOfParams
;
pCtx
->
param
=
pFunct
->
pParam
;
pCtx
->
saveHandle
.
currentPage
=
-
1
;
pCtx
->
smaHits
=
0
;
pCtx
->
smaNoHits
=
0
;
pCtx
->
smaNoHitsRows
=
0
;
pCtx
->
sdHits
=
0
;
pCtx
->
sdHitsRows
=
0
;
}
for
(
int32_t
i
=
1
;
i
<
numOfOutput
;
++
i
)
{
...
...
source/libs/executor/src/executorimpl.c
浏览文件 @
61de3b17
...
...
@@ -520,14 +520,7 @@ static int32_t doAggregateImpl(SOperatorInfo* pOperator, SqlFunctionCtx* pCtx) {
int64_t
st
=
taosGetTimestampUs
();
int32_t
code
=
pCtx
[
k
].
fpSet
.
process
(
&
pCtx
[
k
]);
pOperator
->
funcExecCalled
+=
1
;
pOperator
->
totalNumOfRows
+=
pCtx
->
input
.
numOfRows
;
pOperator
->
funcExecTime
+=
taosGetTimestampUs
()
-
st
;
pOperator
->
smaHits
=
pCtx
->
smaHits
;
pOperator
->
smaNoHits
=
pCtx
->
smaNoHits
;
pOperator
->
smaNoHitsRows
=
pCtx
->
smaNoHitsRows
;
pOperator
->
sdHits
=
pCtx
->
sdHits
;
pOperator
->
sdHitsRows
=
pCtx
->
sdHitsRows
;
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
qError
(
"%s aggregate function error happens, code: %s"
,
GET_TASKID
(
pOperator
->
pTaskInfo
),
tstrerror
(
code
));
return
code
;
...
...
@@ -1715,10 +1708,8 @@ void destroyOperatorInfo(SOperatorInfo* pOperator) {
double
init
=
(
double
)
pOperator
->
funcInitTime
/
1000000
;
double
exec
=
(
double
)
pOperator
->
funcExecTime
/
1000000
;
double
fin
=
(
double
)
pOperator
->
funcFinTime
/
1000000
;
qError
(
"operator: %s, downstream time:%lf, init time:%lf, exec time:%lf, exec called:%ld, fin time:%lf, total rows:%ld"
,
pOperator
->
name
,
downstream
,
init
,
exec
,
pOperator
->
funcExecCalled
,
fin
,
pOperator
->
totalNumOfRows
);
qError
(
"operator: %s, sma hits:%ld, sma nohits:%ld, sma nohits rows:%ld, second stage hits:%ld, second stage hits rows:%ld"
,
pOperator
->
name
,
pOperator
->
smaHits
,
pOperator
->
smaNoHits
,
pOperator
->
smaNoHitsRows
,
pOperator
->
sdHits
,
pOperator
->
sdHitsRows
);
qError
(
"operator: %s, downstream time:%lf, init time:%lf, exec time:%lf, fin time:%lf"
,
pOperator
->
name
,
downstream
,
init
,
exec
,
fin
);
}
if
(
pOperator
->
fpSet
.
closeFn
!=
NULL
)
{
...
...
@@ -1940,14 +1931,7 @@ SOperatorInfo* createAggregateOperatorInfo(SOperatorInfo* downstream, SAggPhysiN
pOperator
->
downstreamTime
=
0
;
pOperator
->
funcInitTime
=
0
;
pOperator
->
funcExecTime
=
0
;
pOperator
->
funcExecCalled
=
0
;
pOperator
->
funcFinTime
=
0
;
pOperator
->
totalNumOfRows
=
0
;
pOperator
->
smaHits
=
0
;
pOperator
->
smaNoHits
=
0
;
pOperator
->
smaNoHitsRows
=
0
;
pOperator
->
sdHits
=
0
;
pOperator
->
sdHitsRows
=
0
;
if
(
downstream
->
operatorType
==
QUERY_NODE_PHYSICAL_PLAN_TABLE_SCAN
)
{
STableScanInfo
*
pTableScanInfo
=
downstream
->
info
;
...
...
source/libs/function/src/builtinsimpl.c
浏览文件 @
61de3b17
...
...
@@ -1614,7 +1614,6 @@ int32_t percentileFunction(SqlFunctionCtx* pCtx) {
}
pInfo
->
numOfElems
+=
(
pInput
->
numOfRows
-
pAgg
->
numOfNull
);
pCtx
->
smaHits
+=
1
;
}
else
{
// check the valid data one by one
int32_t
start
=
pInput
->
startRowIndex
;
...
...
@@ -1637,8 +1636,6 @@ int32_t percentileFunction(SqlFunctionCtx* pCtx) {
pInfo
->
numOfElems
+=
1
;
}
pCtx
->
smaNoHits
+=
1
;
pCtx
->
smaNoHitsRows
+=
pInput
->
numOfRows
;
}
}
else
{
// the second stage, calculate the true percentile value
...
...
@@ -1658,8 +1655,6 @@ int32_t percentileFunction(SqlFunctionCtx* pCtx) {
}
SET_VAL
(
pResInfo
,
numOfElems
,
1
);
pCtx
->
sdHits
+=
1
;
pCtx
->
sdHitsRows
+=
pInput
->
numOfRows
;
}
return
TSDB_CODE_SUCCESS
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录