Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
1d51e42b
T
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1181
Star
22014
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
1d51e42b
编写于
4月 09, 2022
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
<fix>[query]:fix some syntax errors.
上级
6af7e181
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
6 addition
and
87 deletion
+6
-87
source/libs/executor/inc/executorimpl.h
source/libs/executor/inc/executorimpl.h
+0
-9
source/libs/executor/src/executorimpl.c
source/libs/executor/src/executorimpl.c
+0
-76
source/libs/monitor/src/monMsg.c
source/libs/monitor/src/monMsg.c
+1
-0
source/libs/monitor/test/monTest.cpp
source/libs/monitor/test/monTest.cpp
+5
-2
未找到文件。
source/libs/executor/inc/executorimpl.h
浏览文件 @
1d51e42b
...
...
@@ -712,15 +712,6 @@ SOperatorInfo* createAllMultiTableTimeIntervalOperatorInfo(STaskRuntimeEnv* pRun
SExprInfo* pExpr, int32_t numOfOutput);
SOperatorInfo* createTagScanOperatorInfo(STaskRuntimeEnv* pRuntimeEnv, SExprInfo* pExpr, int32_t numOfOutput);
SOperatorInfo* createMultiwaySortOperatorInfo(STaskRuntimeEnv* pRuntimeEnv, SExprInfo* pExpr, int32_t numOfOutput,
int32_t numOfRows, void* merger);
SOperatorInfo* createGlobalAggregateOperatorInfo(STaskRuntimeEnv* pRuntimeEnv, SOperatorInfo* downstream,
SExprInfo* pExpr, int32_t numOfOutput, void* param, SArray* pUdfInfo,
bool groupResultMixedUp);
SOperatorInfo* createSLimitOperatorInfo(STaskRuntimeEnv* pRuntimeEnv, SOperatorInfo* downstream, SExprInfo* pExpr,
int32_t numOfOutput, void* merger, bool multigroupResult);
SOperatorInfo* createJoinOperatorInfo(SOperatorInfo** pdownstream, int32_t numOfDownstream, SSchema* pSchema,
int32_t numOfOutput);
#endif
...
...
source/libs/executor/src/executorimpl.c
浏览文件 @
1d51e42b
...
...
@@ -1964,30 +1964,6 @@ static void* destroySqlFunctionCtx(SqlFunctionCtx* pCtx, int32_t numOfOutput) {
return
NULL
;
}
static
void
doFreeQueryHandle
(
STaskRuntimeEnv
*
pRuntimeEnv
)
{
STaskAttr
*
pQueryAttr
=
pRuntimeEnv
->
pQueryAttr
;
// tsdbCleanupReadHandle(pRuntimeEnv->pTsdbReadHandle);
pRuntimeEnv
->
pTsdbReadHandle
=
NULL
;
// SMemRef* pMemRef = &pQueryAttr->memRef;
// assert(pMemRef->ref == 0 && pMemRef->snapshot.imem == NULL && pMemRef->snapshot.mem == NULL);
}
static
void
destroyTsComp
(
STaskRuntimeEnv
*
pRuntimeEnv
,
STaskAttr
*
pQueryAttr
)
{
if
(
pQueryAttr
->
tsCompQuery
&&
pRuntimeEnv
->
outputBuf
&&
pRuntimeEnv
->
outputBuf
->
pDataBlock
&&
taosArrayGetSize
(
pRuntimeEnv
->
outputBuf
->
pDataBlock
)
>
0
)
{
SColumnInfoData
*
pColInfoData
=
taosArrayGet
(
pRuntimeEnv
->
outputBuf
->
pDataBlock
,
0
);
if
(
pColInfoData
)
{
TdFilePtr
pFile
=
*
(
TdFilePtr
*
)
pColInfoData
->
pData
;
// TODO refactor
if
(
pFile
!=
NULL
)
{
taosCloseFile
(
&
pFile
);
*
(
TdFilePtr
*
)
pColInfoData
->
pData
=
NULL
;
}
}
}
}
bool
isTaskKilled
(
SExecTaskInfo
*
pTaskInfo
)
{
// query has been executed more than tsShellActivityTimer, and the retrieve has not arrived
// abort current query execution.
...
...
@@ -6347,7 +6323,6 @@ SOperatorInfo* createAllTimeIntervalOperatorInfo(STaskRuntimeEnv* pRuntimeEnv, S
pOperator
->
pExpr
=
pExpr
;
pOperator
->
numOfOutput
=
numOfOutput
;
pOperator
->
info
=
pInfo
;
pOperator
->
pRuntimeEnv
=
pRuntimeEnv
;
pOperator
->
getNextFn
=
doAllIntervalAgg
;
pOperator
->
closeFn
=
destroyBasicOperatorInfo
;
...
...
@@ -6443,7 +6418,6 @@ SOperatorInfo* createMultiTableTimeIntervalOperatorInfo(STaskRuntimeEnv* pRuntim
pOperator
->
pExpr
=
pExpr
;
pOperator
->
numOfOutput
=
numOfOutput
;
pOperator
->
info
=
pInfo
;
pOperator
->
pRuntimeEnv
=
pRuntimeEnv
;
pOperator
->
getNextFn
=
doSTableIntervalAgg
;
pOperator
->
closeFn
=
destroyBasicOperatorInfo
;
...
...
@@ -6468,7 +6442,6 @@ SOperatorInfo* createAllMultiTableTimeIntervalOperatorInfo(STaskRuntimeEnv* pRun
pOperator
->
pExpr
=
pExpr
;
pOperator
->
numOfOutput
=
numOfOutput
;
pOperator
->
info
=
pInfo
;
pOperator
->
pRuntimeEnv
=
pRuntimeEnv
;
pOperator
->
getNextFn
=
doAllSTableIntervalAgg
;
pOperator
->
closeFn
=
destroyBasicOperatorInfo
;
...
...
@@ -6541,52 +6514,6 @@ _error:
return
NULL
;
}
SOperatorInfo
*
createSLimitOperatorInfo
(
STaskRuntimeEnv
*
pRuntimeEnv
,
SOperatorInfo
*
downstream
,
SExprInfo
*
pExpr
,
int32_t
numOfOutput
,
void
*
pMerger
,
bool
multigroupResult
)
{
SSLimitOperatorInfo
*
pInfo
=
taosMemoryCalloc
(
1
,
sizeof
(
SSLimitOperatorInfo
));
SOperatorInfo
*
pOperator
=
taosMemoryCalloc
(
1
,
sizeof
(
SOperatorInfo
));
// pInfo->orderColumnList = getResultGroupCheckColumns(pQueryAttr);
// pInfo->slimit = pQueryAttr->slimit;
// pInfo->limit = pQueryAttr->limit;
// pInfo->capacity = pResultInfo->capacity;
// pInfo->threshold = (int64_t)(pInfo->capacity * 0.8);
// pInfo->currentOffset = pQueryAttr->limit.offset;
// pInfo->currentGroupOffset = pQueryAttr->slimit.offset;
pInfo
->
multigroupResult
=
multigroupResult
;
// TODO refactor
int32_t
len
=
0
;
for
(
int32_t
i
=
0
;
i
<
numOfOutput
;
++
i
)
{
len
+=
pExpr
[
i
].
base
.
resSchema
.
bytes
;
}
int32_t
numOfCols
=
(
pInfo
->
orderColumnList
!=
NULL
)
?
(
int32_t
)
taosArrayGetSize
(
pInfo
->
orderColumnList
)
:
0
;
pInfo
->
prevRow
=
taosMemoryCalloc
(
1
,
(
POINTER_BYTES
*
numOfCols
+
len
));
int32_t
offset
=
POINTER_BYTES
*
numOfCols
;
for
(
int32_t
i
=
0
;
i
<
numOfCols
;
++
i
)
{
pInfo
->
prevRow
[
i
]
=
(
char
*
)
pInfo
->
prevRow
+
offset
;
SColIndex
*
index
=
taosArrayGet
(
pInfo
->
orderColumnList
,
i
);
offset
+=
pExpr
[
index
->
colIndex
].
base
.
resSchema
.
bytes
;
}
// pInfo->pRes = createOutputBuf(pExpr, numOfOutput, pOperator->resultInfo.capacity);
pOperator
->
name
=
"SLimitOperator"
;
// pOperator->operatorType = OP_SLimit;
pOperator
->
blockingOptr
=
false
;
pOperator
->
status
=
OP_NOT_OPENED
;
// pOperator->exec = doSLimit;
pOperator
->
info
=
pInfo
;
pOperator
->
pRuntimeEnv
=
pRuntimeEnv
;
pOperator
->
closeFn
=
destroySlimitOperatorInfo
;
int32_t
code
=
appendDownstream
(
pOperator
,
&
downstream
,
1
);
return
pOperator
;
}
static
SSDataBlock
*
doTagScan
(
SOperatorInfo
*
pOperator
,
bool
*
newgroup
)
{
#if 0
SOperatorInfo* pOperator = (SOperatorInfo*) param;
...
...
@@ -6594,7 +6521,6 @@ static SSDataBlock* doTagScan(SOperatorInfo* pOperator, bool* newgroup) {
return NULL;
}
STaskRuntimeEnv* pRuntimeEnv = pOperator->pRuntimeEnv;
int32_t maxNumOfTables = (int32_t)pResultInfo->capacity;
STagScanInfo *pInfo = pOperator->info;
...
...
@@ -6726,7 +6652,6 @@ SOperatorInfo* createTagScanOperatorInfo(STaskRuntimeEnv* pRuntimeEnv, SExprInfo
size_t
numOfGroup
=
GET_NUM_OF_TABLEGROUP
(
pRuntimeEnv
);
assert
(
numOfGroup
==
0
||
numOfGroup
==
1
);
pInfo
->
totalTables
=
pRuntimeEnv
->
tableqinfoGroupInfo
.
numOfTables
;
pInfo
->
curPos
=
0
;
SOperatorInfo
*
pOperator
=
taosMemoryCalloc
(
1
,
sizeof
(
SOperatorInfo
));
...
...
@@ -6738,7 +6663,6 @@ SOperatorInfo* createTagScanOperatorInfo(STaskRuntimeEnv* pRuntimeEnv, SExprInfo
pOperator
->
getNextFn
=
doTagScan
;
pOperator
->
pExpr
=
pExpr
;
pOperator
->
numOfOutput
=
numOfOutput
;
pOperator
->
pRuntimeEnv
=
pRuntimeEnv
;
pOperator
->
closeFn
=
destroyTagScanOperatorInfo
;
return
pOperator
;
...
...
source/libs/monitor/src/monMsg.c
浏览文件 @
1d51e42b
...
...
@@ -267,6 +267,7 @@ int32_t tEncodeSMonDiskDesc(SCoder *encoder, const SMonDiskDesc *pDesc) {
if
(
tEncodeI64
(
encoder
,
pDesc
->
size
.
total
)
<
0
)
return
-
1
;
if
(
tEncodeI64
(
encoder
,
pDesc
->
size
.
used
)
<
0
)
return
-
1
;
if
(
tEncodeI64
(
encoder
,
pDesc
->
size
.
avail
)
<
0
)
return
-
1
;
return
0
;
}
static
int32_t
tDecodeSMonDiskDesc
(
SCoder
*
decoder
,
SMonDiskDesc
*
pDesc
)
{
...
...
source/libs/monitor/test/monTest.cpp
浏览文件 @
1d51e42b
...
...
@@ -208,12 +208,15 @@ void MonitorTest::GetDiskInfo(SMonDiskInfo *pInfo) {
void
MonitorTest
::
GetLogInfo
(
SMonLogs
*
logs
)
{
logs
->
logs
=
taosArrayInit
(
4
,
sizeof
(
SMonLogItem
));
SMonLogItem
item1
=
{.
level
=
DEBUG_INFO
};
SMonLogItem
item1
=
{
0
};
item1
.
level
=
DEBUG_INFO
;
item1
.
ts
=
taosGetTimestampMs
();
strcpy
(
item1
.
content
,
"log test1"
);
taosArrayPush
(
logs
->
logs
,
&
item1
);
SMonLogItem
item2
=
{.
level
=
DEBUG_ERROR
};
SMonLogItem
item2
=
{
0
};
item2
.
level
=
DEBUG_ERROR
;
item2
.
ts
=
taosGetTimestampMs
();
strcpy
(
item2
.
content
,
"log test2"
);
taosArrayPush
(
logs
->
logs
,
&
item2
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录