Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
aae019d1
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看板
提交
aae019d1
编写于
5月 13, 2022
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(query): close read fd when finishing scanning data files.
上级
26936892
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
12 addition
and
22 deletion
+12
-22
include/libs/function/function.h
include/libs/function/function.h
+0
-7
source/dnode/vnode/inc/vnode.h
source/dnode/vnode/inc/vnode.h
+1
-0
source/dnode/vnode/src/inc/tsdb.h
source/dnode/vnode/src/inc/tsdb.h
+0
-1
source/libs/executor/src/scanoperator.c
source/libs/executor/src/scanoperator.c
+11
-1
source/libs/function/src/texpr.c
source/libs/function/src/texpr.c
+0
-13
未找到文件。
include/libs/function/function.h
浏览文件 @
aae019d1
...
...
@@ -222,13 +222,6 @@ enum {
typedef
struct
tExprNode
{
int32_t
nodeType
;
union
{
// struct {
// int32_t optr; // binary operator
// void *info; // support filter operation on this expression only available for leaf node
// struct tExprNode *pLeft; // left child pointer
// struct tExprNode *pRight; // right child pointer
// } _node;
SSchema
*
pSchema
;
// column node
struct
SVariant
*
pVal
;
// value node
...
...
source/dnode/vnode/inc/vnode.h
浏览文件 @
aae019d1
...
...
@@ -114,6 +114,7 @@ void tsdbResetReadHandle(tsdbReaderT queryHandle, SQueryTableDataCond *pCond)
void
tsdbDestroyTableGroup
(
STableGroupInfo
*
pGroupList
);
int32_t
tsdbGetOneTableGroup
(
void
*
pMeta
,
uint64_t
uid
,
TSKEY
startKey
,
STableGroupInfo
*
pGroupInfo
);
int32_t
tsdbGetTableGroupFromIdList
(
SVnode
*
pVnode
,
SArray
*
pTableIdList
,
STableGroupInfo
*
pGroupInfo
);
void
tsdbCleanupReadHandle
(
tsdbReaderT
queryHandle
);
// tq
...
...
source/dnode/vnode/src/inc/tsdb.h
浏览文件 @
aae019d1
...
...
@@ -99,7 +99,6 @@ int32_t tsdbInitSma(STsdb *pTsdb);
int32_t
tsdbDropTSma
(
STsdb
*
pTsdb
,
char
*
pMsg
);
int32_t
tsdbDropTSmaData
(
STsdb
*
pTsdb
,
int64_t
indexUid
);
int32_t
tsdbInsertRSmaData
(
STsdb
*
pTsdb
,
char
*
msg
);
void
tsdbCleanupReadHandle
(
tsdbReaderT
queryHandle
);
typedef
enum
{
TSDB_FILE_HEAD
=
0
,
// .head
TSDB_FILE_DATA
,
// .data
...
...
source/libs/executor/src/scanoperator.c
浏览文件 @
aae019d1
...
...
@@ -390,6 +390,16 @@ SInterval extractIntervalInfo(const STableScanPhysiNode* pTableScanNode) {
return
interval
;
}
static
void
destroyTableScanOperatorInfo
(
void
*
param
,
int32_t
numOfOutput
)
{
STableScanInfo
*
pTableScanInfo
=
(
STableScanInfo
*
)
param
;
taosMemoryFree
(
pTableScanInfo
->
pResBlock
);
tsdbCleanupReadHandle
(
pTableScanInfo
->
dataReader
);
if
(
pTableScanInfo
->
pColMatchInfo
!=
NULL
)
{
taosArrayDestroy
(
pTableScanInfo
->
pColMatchInfo
);
}
}
SOperatorInfo
*
createTableScanOperatorInfo
(
STableScanPhysiNode
*
pTableScanNode
,
tsdbReaderT
pDataReader
,
SReadHandle
*
readHandle
,
SExecTaskInfo
*
pTaskInfo
)
{
STableScanInfo
*
pInfo
=
taosMemoryCalloc
(
1
,
sizeof
(
STableScanInfo
));
SOperatorInfo
*
pOperator
=
taosMemoryCalloc
(
1
,
sizeof
(
SOperatorInfo
));
...
...
@@ -436,7 +446,7 @@ SOperatorInfo* createTableScanOperatorInfo(STableScanPhysiNode* pTableScanNode,
pOperator
->
numOfExprs
=
numOfCols
;
pOperator
->
pTaskInfo
=
pTaskInfo
;
pOperator
->
fpSet
=
createOperatorFpSet
(
operatorDummyOpenFn
,
doTableScan
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
);
pOperator
->
fpSet
=
createOperatorFpSet
(
operatorDummyOpenFn
,
doTableScan
,
NULL
,
NULL
,
destroyTableScanOperatorInfo
,
NULL
,
NULL
,
NULL
);
static
int32_t
cost
=
0
;
...
...
source/libs/function/src/texpr.c
浏览文件 @
aae019d1
...
...
@@ -27,19 +27,6 @@
#include "tvariant.h"
#include "tdef.h"
//static uint8_t UNUSED_FUNC isQueryOnPrimaryKey(const char *primaryColumnName, const tExprNode *pLeft, const tExprNode *pRight) {
// if (pLeft->nodeType == TEXPR_COL_NODE) {
// // if left node is the primary column,return true
// return (strcmp(primaryColumnName, pLeft->pSchema->name) == 0) ? 1 : 0;
// } else {
// // if any children have query on primary key, their parents are also keep this value
// return ((pLeft->nodeType == TEXPR_BINARYEXPR_NODE && pLeft->_node.hasPK == 1) ||
// (pRight->nodeType == TEXPR_BINARYEXPR_NODE && pRight->_node.hasPK == 1)) == true
// ? 1
// : 0;
// }
//}
static
void
doExprTreeDestroy
(
tExprNode
**
pExpr
,
void
(
*
fp
)(
void
*
));
void
tExprTreeDestroy
(
tExprNode
*
pNode
,
void
(
*
fp
)(
void
*
))
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录