Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
3ee9d160
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
3ee9d160
编写于
7月 10, 2022
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(query): set correct stddev merge input rows.
上级
9738bb4a
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
7 addition
and
21 deletion
+7
-21
source/libs/executor/inc/executorimpl.h
source/libs/executor/inc/executorimpl.h
+0
-1
source/libs/executor/src/executorimpl.c
source/libs/executor/src/executorimpl.c
+0
-12
source/libs/executor/src/timewindowoperator.c
source/libs/executor/src/timewindowoperator.c
+2
-0
source/libs/function/src/builtinsimpl.c
source/libs/function/src/builtinsimpl.c
+5
-8
未找到文件。
source/libs/executor/inc/executorimpl.h
浏览文件 @
3ee9d160
...
@@ -911,7 +911,6 @@ int32_t updateSessionWindowInfo(SResultWindowInfo* pWinInfo, TSKEY* pStartTs,
...
@@ -911,7 +911,6 @@ int32_t updateSessionWindowInfo(SResultWindowInfo* pWinInfo, TSKEY* pStartTs,
TSKEY
*
pEndTs
,
int32_t
rows
,
int32_t
start
,
int64_t
gap
,
SHashObj
*
pStDeleted
);
TSKEY
*
pEndTs
,
int32_t
rows
,
int32_t
start
,
int64_t
gap
,
SHashObj
*
pStDeleted
);
bool
functionNeedToExecute
(
SqlFunctionCtx
*
pCtx
);
bool
functionNeedToExecute
(
SqlFunctionCtx
*
pCtx
);
int32_t
compareTimeWindow
(
const
void
*
p1
,
const
void
*
p2
,
const
void
*
param
);
int32_t
finalizeResultRowIntoResultDataBlock
(
SDiskbasedBuf
*
pBuf
,
SResultRowPosition
*
resultRowPosition
,
int32_t
finalizeResultRowIntoResultDataBlock
(
SDiskbasedBuf
*
pBuf
,
SResultRowPosition
*
resultRowPosition
,
SqlFunctionCtx
*
pCtx
,
SExprInfo
*
pExprInfo
,
int32_t
numOfExprs
,
const
int32_t
*
rowCellOffset
,
SqlFunctionCtx
*
pCtx
,
SExprInfo
*
pExprInfo
,
int32_t
numOfExprs
,
const
int32_t
*
rowCellOffset
,
SSDataBlock
*
pBlock
,
SExecTaskInfo
*
pTaskInfo
);
SSDataBlock
*
pBlock
,
SExecTaskInfo
*
pTaskInfo
);
...
...
source/libs/executor/src/executorimpl.c
浏览文件 @
3ee9d160
...
@@ -4546,18 +4546,6 @@ SOperatorInfo* createOperatorTree(SPhysiNode* pPhyNode, SExecTaskInfo* pTaskInfo
...
@@ -4546,18 +4546,6 @@ SOperatorInfo* createOperatorTree(SPhysiNode* pPhyNode, SExecTaskInfo* pTaskInfo
return
pOptr
;
return
pOptr
;
}
}
int32_t
compareTimeWindow
(
const
void
*
p1
,
const
void
*
p2
,
const
void
*
param
)
{
const
SQueryTableDataCond
*
pCond
=
param
;
const
STimeWindow
*
pWin1
=
p1
;
const
STimeWindow
*
pWin2
=
p2
;
if
(
pCond
->
order
==
TSDB_ORDER_ASC
)
{
return
pWin1
->
skey
-
pWin2
->
skey
;
}
else
if
(
pCond
->
order
==
TSDB_ORDER_DESC
)
{
return
pWin2
->
skey
-
pWin1
->
skey
;
}
return
0
;
}
SArray
*
extractColumnInfo
(
SNodeList
*
pNodeList
)
{
SArray
*
extractColumnInfo
(
SNodeList
*
pNodeList
)
{
size_t
numOfCols
=
LIST_LENGTH
(
pNodeList
);
size_t
numOfCols
=
LIST_LENGTH
(
pNodeList
);
SArray
*
pList
=
taosArrayInit
(
numOfCols
,
sizeof
(
SColumn
));
SArray
*
pList
=
taosArrayInit
(
numOfCols
,
sizeof
(
SColumn
));
...
...
source/libs/executor/src/timewindowoperator.c
浏览文件 @
3ee9d160
...
@@ -1156,11 +1156,13 @@ static SSDataBlock* doBuildIntervalResult(SOperatorInfo* pOperator) {
...
@@ -1156,11 +1156,13 @@ static SSDataBlock* doBuildIntervalResult(SOperatorInfo* pOperator) {
while
(
1
)
{
while
(
1
)
{
doBuildResultDatablock
(
pOperator
,
&
pInfo
->
binfo
,
&
pInfo
->
groupResInfo
,
pInfo
->
aggSup
.
pResultBuf
);
doBuildResultDatablock
(
pOperator
,
&
pInfo
->
binfo
,
&
pInfo
->
groupResInfo
,
pInfo
->
aggSup
.
pResultBuf
);
doFilter
(
pInfo
->
pCondition
,
pBlock
);
doFilter
(
pInfo
->
pCondition
,
pBlock
);
bool
hasRemain
=
hasDataInGroupInfo
(
&
pInfo
->
groupResInfo
);
bool
hasRemain
=
hasDataInGroupInfo
(
&
pInfo
->
groupResInfo
);
if
(
!
hasRemain
)
{
if
(
!
hasRemain
)
{
doSetOperatorCompleted
(
pOperator
);
doSetOperatorCompleted
(
pOperator
);
break
;
break
;
}
}
if
(
pBlock
->
info
.
rows
>
0
)
{
if
(
pBlock
->
info
.
rows
>
0
)
{
break
;
break
;
}
}
...
...
source/libs/function/src/builtinsimpl.c
浏览文件 @
3ee9d160
...
@@ -1863,8 +1863,6 @@ static void stddevTransferInfo(SStddevRes* pInput, SStddevRes* pOutput) {
...
@@ -1863,8 +1863,6 @@ static void stddevTransferInfo(SStddevRes* pInput, SStddevRes* pOutput) {
}
}
pOutput
->
count
+=
pInput
->
count
;
pOutput
->
count
+=
pInput
->
count
;
return
;
}
}
int32_t
stddevFunctionMerge
(
SqlFunctionCtx
*
pCtx
)
{
int32_t
stddevFunctionMerge
(
SqlFunctionCtx
*
pCtx
)
{
...
@@ -1874,14 +1872,13 @@ int32_t stddevFunctionMerge(SqlFunctionCtx* pCtx) {
...
@@ -1874,14 +1872,13 @@ int32_t stddevFunctionMerge(SqlFunctionCtx* pCtx) {
SStddevRes
*
pInfo
=
GET_ROWCELL_INTERBUF
(
GET_RES_INFO
(
pCtx
));
SStddevRes
*
pInfo
=
GET_ROWCELL_INTERBUF
(
GET_RES_INFO
(
pCtx
));
int32_t
start
=
pInput
->
startRowIndex
;
for
(
int32_t
i
=
pInput
->
startRowIndex
;
i
<
pInput
->
startRowIndex
+
pInput
->
numOfRows
;
++
i
)
{
char
*
data
=
colDataGetData
(
pCol
,
start
);
char
*
data
=
colDataGetData
(
pCol
,
i
);
SStddevRes
*
pInputInfo
=
(
SStddevRes
*
)
varDataVal
(
data
);
SStddevRes
*
pInputInfo
=
(
SStddevRes
*
)
varDataVal
(
data
);
stddevTransferInfo
(
pInputInfo
,
pInfo
);
stddevTransferInfo
(
pInputInfo
,
pInfo
);
}
SET_VAL
(
GET_RES_INFO
(
pCtx
),
1
,
1
);
SET_VAL
(
GET_RES_INFO
(
pCtx
),
1
,
1
);
return
TSDB_CODE_SUCCESS
;
return
TSDB_CODE_SUCCESS
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录