Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
088fd12b
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看板
提交
088fd12b
编写于
9月 15, 2021
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[td-255] remove dead code and reformat some code.
上级
a24f5bbd
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
15 addition
and
25 deletion
+15
-25
src/query/inc/qExecutor.h
src/query/inc/qExecutor.h
+7
-7
src/query/src/qExecutor.c
src/query/src/qExecutor.c
+0
-1
src/tsdb/src/tsdbRead.c
src/tsdb/src/tsdbRead.c
+8
-17
未找到文件。
src/query/inc/qExecutor.h
浏览文件 @
088fd12b
...
...
@@ -351,16 +351,16 @@ enum OPERATOR_TYPE_E {
typedef
struct
SOperatorInfo
{
uint8_t
operatorType
;
bool
blockingOptr
;
// block operator or not
uint8_t
status
;
// denote if current operator is completed
int32_t
numOfOutput
;
// number of columns of the current operator results
char
*
name
;
// name, used to show the query execution plan
void
*
info
;
// extension attribution
bool
blockingOptr
;
// block operator or not
uint8_t
status
;
// denote if current operator is completed
int32_t
numOfOutput
;
// number of columns of the current operator results
char
*
name
;
// name, used to show the query execution plan
void
*
info
;
// extension attribution
SExprInfo
*
pExpr
;
SQueryRuntimeEnv
*
pRuntimeEnv
;
struct
SOperatorInfo
**
upstream
;
// upstream pointer list
int32_t
numOfUpstream
;
// number of upstream. The value is always ONE expect for join operator
struct
SOperatorInfo
**
upstream
;
// upstream pointer list
int32_t
numOfUpstream
;
// number of upstream. The value is always ONE expect for join operator
__operator_fn_t
exec
;
__optr_cleanup_fn_t
cleanup
;
}
SOperatorInfo
;
...
...
src/query/src/qExecutor.c
浏览文件 @
088fd12b
...
...
@@ -5147,7 +5147,6 @@ SOperatorInfo* createTableScanOperator(void* pTsdbQueryHandle, SQueryRuntimeEnv*
pInfo
->
reverseTimes
=
0
;
pInfo
->
order
=
pRuntimeEnv
->
pQueryAttr
->
order
.
order
;
pInfo
->
current
=
0
;
// pInfo->prevGroupId = -1;
SOperatorInfo
*
pOperator
=
calloc
(
1
,
sizeof
(
SOperatorInfo
));
pOperator
->
name
=
"TableScanOperator"
;
...
...
src/tsdb/src/tsdbRead.c
浏览文件 @
088fd12b
...
...
@@ -3474,9 +3474,12 @@ void filterPrepare(void* expr, void* param) {
int
dummy
=
-
1
;
SHashObj
*
pObj
=
NULL
;
if
(
pInfo
->
sch
.
colId
==
TSDB_TBNAME_COLUMN_INDEX
)
{
pObj
=
taosHashInit
(
256
,
taosGetDefaultHashFunction
(
pInfo
->
sch
.
type
),
true
,
false
);
SArray
*
arr
=
(
SArray
*
)(
pCond
->
arr
);
for
(
size_t
i
=
0
;
i
<
taosArrayGetSize
(
arr
);
i
++
)
{
size_t
size
=
taosArrayGetSize
(
arr
);
pObj
=
taosHashInit
(
size
*
2
,
taosGetDefaultHashFunction
(
pInfo
->
sch
.
type
),
true
,
false
);
for
(
size_t
i
=
0
;
i
<
size
;
i
++
)
{
char
*
p
=
taosArrayGetP
(
arr
,
i
);
strntolower_s
(
varDataVal
(
p
),
varDataVal
(
p
),
varDataLen
(
p
));
taosHashPut
(
pObj
,
varDataVal
(
p
),
varDataLen
(
p
),
&
dummy
,
sizeof
(
dummy
));
...
...
@@ -3484,12 +3487,14 @@ void filterPrepare(void* expr, void* param) {
}
else
{
buildFilterSetFromBinary
((
void
**
)
&
pObj
,
pCond
->
pz
,
pCond
->
nLen
);
}
pInfo
->
q
=
(
char
*
)
pObj
;
}
else
if
(
pCond
!=
NULL
)
{
uint32_t
size
=
pCond
->
nLen
*
TSDB_NCHAR_SIZE
;
if
(
size
<
(
uint32_t
)
pSchema
->
bytes
)
{
size
=
pSchema
->
bytes
;
}
// to make sure tonchar does not cause invalid write, since the '\0' needs at least sizeof(wchar_t) space.
pInfo
->
q
=
calloc
(
1
,
size
+
TSDB_NCHAR_SIZE
+
VARSTR_HEADER_SIZE
);
tVariantDump
(
pCond
,
pInfo
->
q
,
pSchema
->
type
,
true
);
...
...
@@ -3665,8 +3670,7 @@ static bool tableFilterFp(const void* pNode, void* param) {
uint64_t
v
;
GET_TYPED_DATA
(
v
,
uint64_t
,
pInfo
->
sch
.
type
,
val
);
return
NULL
!=
taosHashGet
((
SHashObj
*
)
pInfo
->
q
,
(
char
*
)
&
v
,
sizeof
(
v
));
}
else
if
(
type
==
TSDB_DATA_TYPE_DOUBLE
||
type
==
TSDB_DATA_TYPE_FLOAT
)
{
}
else
if
(
type
==
TSDB_DATA_TYPE_DOUBLE
||
type
==
TSDB_DATA_TYPE_FLOAT
)
{
double
v
;
GET_TYPED_DATA
(
v
,
double
,
pInfo
->
sch
.
type
,
val
);
return
NULL
!=
taosHashGet
((
SHashObj
*
)
pInfo
->
q
,
(
char
*
)
&
v
,
sizeof
(
v
));
...
...
@@ -4126,19 +4130,6 @@ static void queryIndexedColumn(SSkipList* pSkipList, tQueryInfo* pQueryInfo, SAr
taosArrayPush
(
result
,
&
info
);
}
}
else
if
(
optr
==
TSDB_RELATION_IN
)
{
while
(
tSkipListIterNext
(
iter
))
{
SSkipListNode
*
pNode
=
tSkipListIterGet
(
iter
);
int32_t
ret
=
pQueryInfo
->
compare
(
SL_GET_NODE_KEY
(
pSkipList
,
pNode
),
cond
.
start
->
v
);
if
(
ret
!=
0
)
{
break
;
}
STableKeyInfo
info
=
{.
pTable
=
(
void
*
)
SL_GET_NODE_DATA
(
pNode
),
.
lastKey
=
TSKEY_INITIAL_VAL
};
taosArrayPush
(
result
,
&
info
);
}
}
else
{
assert
(
0
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录