Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
6b69b286
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1184
Star
22015
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
6b69b286
编写于
6月 02, 2022
作者:
dengyihao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
enh: refactor tag filter code
上级
441d31d8
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
149 addition
and
116 deletion
+149
-116
include/common/ttypes.h
include/common/ttypes.h
+44
-42
source/dnode/vnode/src/meta/metaQuery.c
source/dnode/vnode/src/meta/metaQuery.c
+19
-11
source/dnode/vnode/src/meta/metaTable.c
source/dnode/vnode/src/meta/metaTable.c
+36
-33
source/libs/index/src/indexFilter.c
source/libs/index/src/indexFilter.c
+50
-29
source/libs/transport/src/transCli.c
source/libs/transport/src/transCli.c
+0
-1
未找到文件。
include/common/ttypes.h
浏览文件 @
6b69b286
...
...
@@ -49,7 +49,8 @@ typedef struct {
#define varDataCopy(dst, v) memcpy((dst), (void *)(v), varDataTLen(v))
#define varDataLenByData(v) (*(VarDataLenT *)(((char *)(v)) - VARSTR_HEADER_SIZE))
#define varDataSetLen(v, _len) (((VarDataLenT *)(v))[0] = (VarDataLenT)(_len))
#define IS_VAR_DATA_TYPE(t) (((t) == TSDB_DATA_TYPE_VARCHAR) || ((t) == TSDB_DATA_TYPE_NCHAR) || ((t) == TSDB_DATA_TYPE_JSON))
#define IS_VAR_DATA_TYPE(t) \
(((t) == TSDB_DATA_TYPE_VARCHAR) || ((t) == TSDB_DATA_TYPE_NCHAR) || ((t) == TSDB_DATA_TYPE_JSON))
#define IS_STR_DATA_TYPE(t) (((t) == TSDB_DATA_TYPE_VARCHAR) || ((t) == TSDB_DATA_TYPE_NCHAR))
#define varDataNetLen(v) (htons(((VarDataLenT *)(v))[0]))
...
...
@@ -179,7 +180,7 @@ typedef struct {
} \
} while (0)
//TODO: use varchar(0) to represent NULL type
//
TODO: use varchar(0) to represent NULL type
#define IS_NULL_TYPE(_t) ((_t) == TSDB_DATA_TYPE_NULL)
#define IS_SIGNED_NUMERIC_TYPE(_t) ((_t) >= TSDB_DATA_TYPE_TINYINT && (_t) <= TSDB_DATA_TYPE_BIGINT)
#define IS_UNSIGNED_NUMERIC_TYPE(_t) ((_t) >= TSDB_DATA_TYPE_UTINYINT && (_t) <= TSDB_DATA_TYPE_UBIGINT)
...
...
@@ -187,7 +188,8 @@ typedef struct {
#define IS_INTEGER_TYPE(_t) ((IS_SIGNED_NUMERIC_TYPE(_t)) || (IS_UNSIGNED_NUMERIC_TYPE(_t)))
#define IS_NUMERIC_TYPE(_t) ((IS_SIGNED_NUMERIC_TYPE(_t)) || (IS_UNSIGNED_NUMERIC_TYPE(_t)) || (IS_FLOAT_TYPE(_t)))
#define IS_MATHABLE_TYPE(_t) (IS_NUMERIC_TYPE(_t) || (_t) == (TSDB_DATA_TYPE_BOOL) || (_t) == (TSDB_DATA_TYPE_TIMESTAMP))
#define IS_MATHABLE_TYPE(_t) \
(IS_NUMERIC_TYPE(_t) || (_t) == (TSDB_DATA_TYPE_BOOL) || (_t) == (TSDB_DATA_TYPE_TIMESTAMP))
#define IS_VALID_TINYINT(_t) ((_t) >= INT8_MIN && (_t) <= INT8_MAX)
#define IS_VALID_SMALLINT(_t) ((_t) >= INT16_MIN && (_t) <= INT16_MAX)
...
...
@@ -244,7 +246,7 @@ typedef struct tDataTypeDescriptor {
int16_t
type
;
int16_t
nameLen
;
int32_t
bytes
;
char
*
name
;
char
*
name
;
int64_t
minValue
;
int64_t
maxValue
;
int32_t
(
*
compFunc
)(
const
char
*
const
input
,
int32_t
inputSize
,
const
int32_t
nelements
,
char
*
const
output
,
...
...
source/dnode/vnode/src/meta/metaQuery.c
浏览文件 @
6b69b286
...
...
@@ -576,15 +576,15 @@ SArray *metaGetSmaTbUids(SMeta *pMeta) {
const
void
*
metaGetTableTagVal
(
SMetaEntry
*
pEntry
,
int16_t
type
,
STagVal
*
val
)
{
ASSERT
(
pEntry
->
type
==
TSDB_CHILD_TABLE
);
STag
*
tag
=
(
STag
*
)
pEntry
->
ctbEntry
.
pTags
;
if
(
type
==
TSDB_DATA_TYPE_JSON
){
if
(
tag
->
nTag
==
0
)
{
if
(
type
==
TSDB_DATA_TYPE_JSON
)
{
if
(
tag
->
nTag
==
0
)
{
return
NULL
;
}
return
tag
;
}
bool
find
=
tTagGet
(
tag
,
val
);
if
(
!
find
)
{
if
(
!
find
)
{
return
NULL
;
}
return
val
;
...
...
@@ -605,8 +605,6 @@ typedef struct {
int32_t
metaFilteTableIds
(
SMeta
*
pMeta
,
SMetaFltParam
*
param
,
SArray
*
pUids
)
{
SIdxCursor
*
pCursor
=
NULL
;
char
*
tagData
=
param
->
val
;
int32_t
ret
=
0
,
valid
=
0
;
pCursor
=
(
SIdxCursor
*
)
taosMemoryCalloc
(
1
,
sizeof
(
SIdxCursor
));
pCursor
->
pMeta
=
pMeta
;
...
...
@@ -623,12 +621,16 @@ int32_t metaFilteTableIds(SMeta *pMeta, SMetaFltParam *param, SArray *pUids) {
int32_t
nKey
=
0
;
int32_t
nTagData
=
0
;
if
(
IS_VAR_DATA_TYPE
(
param
->
type
)){
nTagData
=
strlen
(
param
->
val
);
}
else
{
void
*
tagData
=
NULL
;
if
(
IS_VAR_DATA_TYPE
(
param
->
type
))
{
tagData
=
varDataVal
(
param
->
val
);
nTagData
=
varDataLen
(
param
->
val
);
}
else
{
tagData
=
param
->
val
;
nTagData
=
tDataTypes
[
param
->
type
].
bytes
;
}
ret
=
metaCreateTagIdxKey
(
pCursor
->
suid
,
pCursor
->
cid
,
param
->
val
,
nTagData
,
pCursor
->
type
,
ret
=
metaCreateTagIdxKey
(
pCursor
->
suid
,
pCursor
->
cid
,
tagData
,
nTagData
,
pCursor
->
type
,
param
->
reverse
?
INT64_MAX
:
INT64_MIN
,
&
pKey
,
&
nKey
);
if
(
ret
!=
0
)
{
goto
END
;
...
...
@@ -637,6 +639,7 @@ int32_t metaFilteTableIds(SMeta *pMeta, SMetaFltParam *param, SArray *pUids) {
if
(
tdbTbcMoveTo
(
pCursor
->
pCur
,
pKey
,
nKey
,
&
cmp
)
<
0
)
{
goto
END
;
}
void
*
entryKey
=
NULL
,
*
entryVal
=
NULL
;
int32_t
nEntryKey
,
nEntryVal
;
while
(
1
)
{
...
...
@@ -649,7 +652,12 @@ int32_t metaFilteTableIds(SMeta *pMeta, SMetaFltParam *param, SArray *pUids) {
int32_t
cmp
=
(
*
param
->
filterFunc
)(
p
->
data
,
pKey
->
data
,
pKey
->
type
);
if
(
cmp
==
0
)
{
// match
tb_uid_t
tuid
=
*
(
tb_uid_t
*
)(
p
->
data
+
tDataTypes
[
pCursor
->
type
].
bytes
);
tb_uid_t
tuid
=
0
;
if
(
IS_VAR_DATA_TYPE
(
pKey
->
type
))
{
tuid
=
*
(
tb_uid_t
*
)(
p
->
data
+
varDataTLen
(
p
->
data
));
}
else
{
tuid
=
*
(
tb_uid_t
*
)(
p
->
data
+
tDataTypes
[
pCursor
->
type
].
bytes
);
}
taosArrayPush
(
pUids
,
&
tuid
);
}
else
if
(
cmp
==
1
)
{
// not match but should continue to iter
...
...
source/dnode/vnode/src/meta/metaTable.c
浏览文件 @
6b69b286
...
...
@@ -31,9 +31,9 @@ int metaCreateSTable(SMeta *pMeta, int64_t version, SVCreateStbReq *pReq) {
int
vLen
=
0
;
const
void
*
pKey
=
NULL
;
const
void
*
pVal
=
NULL
;
void
*
pBuf
=
NULL
;
void
*
pBuf
=
NULL
;
int32_t
szBuf
=
0
;
void
*
p
=
NULL
;
void
*
p
=
NULL
;
SMetaReader
mr
=
{
0
};
// validate req
...
...
@@ -87,7 +87,7 @@ int metaDropSTable(SMeta *pMeta, int64_t verison, SVDropStbReq *pReq) {
}
// drop all child tables
TBC
*
pCtbIdxc
=
NULL
;
TBC
*
pCtbIdxc
=
NULL
;
SArray
*
pArray
=
taosArrayInit
(
8
,
sizeof
(
tb_uid_t
));
tdbTbcOpen
(
pMeta
->
pCtbIdx
,
&
pCtbIdxc
,
&
pMeta
->
txn
);
...
...
@@ -142,8 +142,8 @@ _exit:
int
metaAlterSTable
(
SMeta
*
pMeta
,
int64_t
version
,
SVCreateStbReq
*
pReq
)
{
SMetaEntry
oStbEntry
=
{
0
};
SMetaEntry
nStbEntry
=
{
0
};
TBC
*
pUidIdxc
=
NULL
;
TBC
*
pTbDbc
=
NULL
;
TBC
*
pUidIdxc
=
NULL
;
TBC
*
pTbDbc
=
NULL
;
const
void
*
pData
;
int
nData
;
int64_t
oversion
;
...
...
@@ -262,7 +262,7 @@ _err:
}
int
metaDropTable
(
SMeta
*
pMeta
,
int64_t
version
,
SVDropTbReq
*
pReq
,
SArray
*
tbUids
)
{
void
*
pData
=
NULL
;
void
*
pData
=
NULL
;
int
nData
=
0
;
int
rc
=
0
;
tb_uid_t
uid
;
...
...
@@ -288,7 +288,7 @@ int metaDropTable(SMeta *pMeta, int64_t version, SVDropTbReq *pReq, SArray *tbUi
}
static
int
metaDropTableByUid
(
SMeta
*
pMeta
,
tb_uid_t
uid
,
int
*
type
)
{
void
*
pData
=
NULL
;
void
*
pData
=
NULL
;
int
nData
=
0
;
int
rc
=
0
;
int64_t
version
;
...
...
@@ -324,14 +324,14 @@ static int metaDropTableByUid(SMeta *pMeta, tb_uid_t uid, int *type) {
}
static
int
metaAlterTableColumn
(
SMeta
*
pMeta
,
int64_t
version
,
SVAlterTbReq
*
pAlterTbReq
)
{
void
*
pVal
=
NULL
;
void
*
pVal
=
NULL
;
int
nVal
=
0
;
const
void
*
pData
=
NULL
;
const
void
*
pData
=
NULL
;
int
nData
=
0
;
int
ret
=
0
;
tb_uid_t
uid
;
int64_t
oversion
;
SSchema
*
pColumn
=
NULL
;
SSchema
*
pColumn
=
NULL
;
SMetaEntry
entry
=
{
0
};
SSchemaWrapper
*
pSchema
;
int
c
;
...
...
@@ -479,7 +479,7 @@ _err:
static
int
metaUpdateTableTagVal
(
SMeta
*
pMeta
,
int64_t
version
,
SVAlterTbReq
*
pAlterTbReq
)
{
SMetaEntry
ctbEntry
=
{
0
};
SMetaEntry
stbEntry
=
{
0
};
void
*
pVal
=
NULL
;
void
*
pVal
=
NULL
;
int
nVal
=
0
;
int
ret
;
int
c
;
...
...
@@ -510,7 +510,7 @@ static int metaUpdateTableTagVal(SMeta *pMeta, int64_t version, SVAlterTbReq *pA
oversion
=
*
(
int64_t
*
)
pData
;
// search table.db
TBC
*
pTbDbc
=
NULL
;
TBC
*
pTbDbc
=
NULL
;
SDecoder
dc1
=
{
0
};
SDecoder
dc2
=
{
0
};
...
...
@@ -534,7 +534,7 @@ static int metaUpdateTableTagVal(SMeta *pMeta, int64_t version, SVAlterTbReq *pA
metaDecodeEntry
(
&
dc2
,
&
stbEntry
);
SSchemaWrapper
*
pTagSchema
=
&
stbEntry
.
stbEntry
.
schemaTag
;
SSchema
*
pColumn
=
NULL
;
SSchema
*
pColumn
=
NULL
;
int32_t
iCol
=
0
;
for
(;;)
{
pColumn
=
NULL
;
...
...
@@ -564,8 +564,8 @@ static int metaUpdateTableTagVal(SMeta *pMeta, int64_t version, SVAlterTbReq *pA
memcpy
((
void
*
)
ctbEntry
.
ctbEntry
.
pTags
,
pAlterTbReq
->
pTagVal
,
pAlterTbReq
->
nTagVal
);
}
else
{
const
STag
*
pOldTag
=
(
const
STag
*
)
ctbEntry
.
ctbEntry
.
pTags
;
STag
*
pNewTag
=
NULL
;
SArray
*
pTagArray
=
taosArrayInit
(
pTagSchema
->
nCols
,
sizeof
(
STagVal
));
STag
*
pNewTag
=
NULL
;
SArray
*
pTagArray
=
taosArrayInit
(
pTagSchema
->
nCols
,
sizeof
(
STagVal
));
if
(
!
pTagArray
)
{
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
goto
_err
;
...
...
@@ -649,8 +649,8 @@ int metaAlterTable(SMeta *pMeta, int64_t version, SVAlterTbReq *pReq) {
static
int
metaSaveToTbDb
(
SMeta
*
pMeta
,
const
SMetaEntry
*
pME
)
{
STbDbKey
tbDbKey
;
void
*
pKey
=
NULL
;
void
*
pVal
=
NULL
;
void
*
pKey
=
NULL
;
void
*
pVal
=
NULL
;
int
kLen
=
0
;
int
vLen
=
0
;
SEncoder
coder
=
{
0
};
...
...
@@ -733,16 +733,11 @@ static int metaUpdateCtbIdx(SMeta *pMeta, const SMetaEntry *pME) {
int
metaCreateTagIdxKey
(
tb_uid_t
suid
,
int32_t
cid
,
const
void
*
pTagData
,
int32_t
nTagData
,
int8_t
type
,
tb_uid_t
uid
,
STagIdxKey
**
ppTagIdxKey
,
int32_t
*
nTagIdxKey
)
{
// int32_t nTagData = 0;
// if (pTagData) {
// if (IS_VAR_DATA_TYPE(type)) {
// nTagData = varDataTLen(pTagData);
// } else {
// nTagData = tDataTypes[type].bytes;
// }
// }
if
(
IS_VAR_DATA_TYPE
(
type
))
{
*
nTagIdxKey
=
sizeof
(
STagIdxKey
)
+
nTagData
+
VARSTR_HEADER_SIZE
+
sizeof
(
tb_uid_t
);
}
else
{
*
nTagIdxKey
=
sizeof
(
STagIdxKey
)
+
nTagData
+
sizeof
(
tb_uid_t
);
}
*
ppTagIdxKey
=
(
STagIdxKey
*
)
taosMemoryMalloc
(
*
nTagIdxKey
);
if
(
*
ppTagIdxKey
==
NULL
)
{
...
...
@@ -754,8 +749,16 @@ int metaCreateTagIdxKey(tb_uid_t suid, int32_t cid, const void *pTagData, int32_
(
*
ppTagIdxKey
)
->
cid
=
cid
;
(
*
ppTagIdxKey
)
->
isNull
=
(
pTagData
==
NULL
)
?
1
:
0
;
(
*
ppTagIdxKey
)
->
type
=
type
;
if
(
nTagData
)
memcpy
((
*
ppTagIdxKey
)
->
data
,
pTagData
,
nTagData
);
// refactor
if
(
IS_VAR_DATA_TYPE
(
type
))
{
memcpy
((
*
ppTagIdxKey
)
->
data
,
(
uint16_t
*
)
&
nTagData
,
VARSTR_HEADER_SIZE
);
memcpy
((
*
ppTagIdxKey
)
->
data
+
VARSTR_HEADER_SIZE
,
pTagData
,
nTagData
);
*
(
tb_uid_t
*
)((
*
ppTagIdxKey
)
->
data
+
VARSTR_HEADER_SIZE
+
nTagData
)
=
uid
;
}
else
{
memcpy
((
*
ppTagIdxKey
)
->
data
,
pTagData
,
nTagData
);
*
(
tb_uid_t
*
)((
*
ppTagIdxKey
)
->
data
+
nTagData
)
=
uid
;
}
return
0
;
}
...
...
@@ -765,14 +768,14 @@ static void metaDestroyTagIdxKey(STagIdxKey *pTagIdxKey) {
}
static
int
metaUpdateTagIdx
(
SMeta
*
pMeta
,
const
SMetaEntry
*
pCtbEntry
)
{
void
*
pData
=
NULL
;
void
*
pData
=
NULL
;
int
nData
=
0
;
STbDbKey
tbDbKey
=
{
0
};
SMetaEntry
stbEntry
=
{
0
};
STagIdxKey
*
pTagIdxKey
=
NULL
;
STagIdxKey
*
pTagIdxKey
=
NULL
;
int32_t
nTagIdxKey
;
const
SSchema
*
pTagColumn
;
// = &stbEntry.stbEntry.schema.pSchema[0];
const
void
*
pTagData
=
NULL
;
//
const
void
*
pTagData
=
NULL
;
//
int32_t
nTagData
=
0
;
SDecoder
dc
=
{
0
};
...
...
@@ -829,7 +832,7 @@ static int metaUpdateTagIdx(SMeta *pMeta, const SMetaEntry *pCtbEntry) {
static
int
metaSaveToSkmDb
(
SMeta
*
pMeta
,
const
SMetaEntry
*
pME
)
{
SEncoder
coder
=
{
0
};
void
*
pVal
=
NULL
;
void
*
pVal
=
NULL
;
int
vLen
=
0
;
int
rcode
=
0
;
SSkmDbKey
skmDbKey
=
{
0
};
...
...
source/libs/index/src/indexFilter.c
浏览文件 @
6b69b286
...
...
@@ -265,23 +265,24 @@ static int32_t sifExecFunction(SFunctionNode *node, SIFCtx *ctx, SIFParam *outpu
typedef
int
(
*
Filter
)(
void
*
a
,
void
*
b
,
int16_t
dtype
);
int
sifGreaterThan
(
void
*
a
,
void
*
b
,
int16_t
dtype
)
{
__compar_fn_t
func
=
indexGetCompar
(
dtype
);
__compar_fn_t
func
=
getComparFunc
(
dtype
,
0
);
return
tDoCompare
(
func
,
QUERY_GREATER_THAN
,
a
,
b
);
}
int
sifGreaterEqual
(
void
*
a
,
void
*
b
,
int16_t
dtype
)
{
__compar_fn_t
func
=
indexGetCompar
(
dtype
);
__compar_fn_t
func
=
getComparFunc
(
dtype
,
0
);
return
tDoCompare
(
func
,
QUERY_GREATER_EQUAL
,
a
,
b
);
}
int
sifLessEqual
(
void
*
a
,
void
*
b
,
int16_t
dtype
)
{
__compar_fn_t
func
=
indexGetCompar
(
dtype
);
__compar_fn_t
func
=
getComparFunc
(
dtype
,
0
);
return
tDoCompare
(
func
,
QUERY_LESS_EQUAL
,
a
,
b
);
}
int
sifLessThan
(
void
*
a
,
void
*
b
,
int16_t
dtype
)
{
__compar_fn_t
func
=
indexGetCompar
(
dtype
);
__compar_fn_t
func
=
getComparFunc
(
dtype
,
0
);
return
(
int
)
tDoCompare
(
func
,
QUERY_LESS_THAN
,
a
,
b
);
}
int
sifEqual
(
void
*
a
,
void
*
b
,
int16_t
dtype
)
{
__compar_fn_t
func
=
indexGetCompar
(
dtype
);
__compar_fn_t
func
=
getComparFunc
(
dtype
,
0
);
//__compar_fn_t func = indexGetCompar(dtype);
return
(
int
)
tDoCompare
(
func
,
QUERY_TERM
,
a
,
b
);
}
static
Filter
sifGetFilterFunc
(
EIndexQueryType
type
,
bool
*
reverse
)
{
...
...
@@ -397,38 +398,62 @@ static int32_t sifDefaultFunc(SIFParam *left, SIFParam *right, SIFParam *output)
return
TSDB_CODE_QRY_INVALID_INPUT
;
}
static
sif_func_t
sifGetOperFn
(
int32_t
funcId
)
{
static
int32_t
sifGetOperFn
(
int32_t
funcId
,
sif_func_t
*
func
,
SIdxFltStatus
*
status
)
{
// impl later
*
status
=
SFLT_ACCURATE_INDEX
;
switch
(
funcId
)
{
case
OP_TYPE_GREATER_THAN
:
return
sifGreaterThanFunc
;
*
func
=
sifGreaterThanFunc
;
return
0
;
case
OP_TYPE_GREATER_EQUAL
:
return
sifGreaterEqualFunc
;
*
func
=
sifGreaterEqualFunc
;
return
0
;
case
OP_TYPE_LOWER_THAN
:
return
sifLessThanFunc
;
*
func
=
sifLessThanFunc
;
return
0
;
case
OP_TYPE_LOWER_EQUAL
:
return
sifLessEqualFunc
;
*
func
=
sifLessEqualFunc
;
return
0
;
case
OP_TYPE_EQUAL
:
return
sifEqualFunc
;
*
func
=
sifEqualFunc
;
return
0
;
case
OP_TYPE_NOT_EQUAL
:
return
sifNotEqualFunc
;
*
status
=
SFLT_NOT_INDEX
;
*
func
=
sifNotEqualFunc
;
return
0
;
case
OP_TYPE_IN
:
return
sifInFunc
;
*
status
=
SFLT_NOT_INDEX
;
*
func
=
sifInFunc
;
return
0
;
case
OP_TYPE_NOT_IN
:
return
sifNotInFunc
;
*
status
=
SFLT_NOT_INDEX
;
*
func
=
sifNotInFunc
;
return
0
;
case
OP_TYPE_LIKE
:
return
sifLikeFunc
;
*
status
=
SFLT_NOT_INDEX
;
*
func
=
sifLikeFunc
;
return
0
;
case
OP_TYPE_NOT_LIKE
:
return
sifNotLikeFunc
;
*
status
=
SFLT_NOT_INDEX
;
*
func
=
sifNotLikeFunc
;
return
0
;
case
OP_TYPE_MATCH
:
return
sifMatchFunc
;
*
status
=
SFLT_NOT_INDEX
;
*
func
=
sifMatchFunc
;
return
0
;
case
OP_TYPE_NMATCH
:
return
sifNotMatchFunc
;
*
status
=
SFLT_NOT_INDEX
;
*
func
=
sifNotMatchFunc
;
return
0
;
default:
return
sifNullFunc
;
*
status
=
SFLT_NOT_INDEX
;
*
func
=
sifNullFunc
;
return
0
;
}
return
sifNullFunc
;
return
0
;
}
// typedef struct filterFuncDict {
static
int32_t
sifExecOper
(
SOperatorNode
*
node
,
SIFCtx
*
ctx
,
SIFParam
*
output
)
{
int32_t
code
=
0
;
int32_t
nParam
=
sifGetOperParamNum
(
node
->
opType
);
...
...
@@ -441,18 +466,14 @@ static int32_t sifExecOper(SOperatorNode *node, SIFCtx *ctx, SIFParam *output) {
// ugly code, refactor later
output
->
arg
=
ctx
->
arg
;
sif_func_t
operFn
=
sifGetOperFn
(
node
->
opType
);
if
(
ctx
->
noExec
&&
operFn
==
NULL
)
{
output
->
status
=
SFLT_NOT_INDEX
;
}
else
{
output
->
status
=
SFLT_ACCURATE_INDEX
;
}
sif_func_t
operFn
=
sifNullFunc
;
code
=
sifGetOperFn
(
node
->
opType
,
&
operFn
,
&
output
->
status
);
if
(
ctx
->
noExec
)
{
SIF_RET
(
code
);
}
}
else
{
return
operFn
(
&
params
[
0
],
nParam
>
1
?
&
params
[
1
]
:
NULL
,
output
);
}
_return:
taosMemoryFree
(
params
);
SIF_RET
(
code
);
...
...
@@ -477,7 +498,7 @@ static int32_t sifExecLogic(SLogicConditionNode *node, SIFCtx *ctx, SIFParam *ou
}
else
if
(
node
->
condType
==
LOGIC_COND_TYPE_OR
)
{
taosArrayAddAll
(
output
->
result
,
params
[
m
].
result
);
}
else
if
(
node
->
condType
==
LOGIC_COND_TYPE_NOT
)
{
taosArrayAddAll
(
output
->
result
,
params
[
m
].
result
);
//
taosArrayAddAll(output->result, params[m].result);
}
}
}
else
{
...
...
source/libs/transport/src/transCli.c
浏览文件 @
6b69b286
...
...
@@ -1151,7 +1151,6 @@ void transSetDefaultAddr(void* ahandle, const char* ip, const char* fqdn) {
SCliThrdObj
*
thrd
=
((
SCliObj
*
)
pTransInst
->
tcphandle
)
->
pThreadObj
[
i
];
tDebug
(
"update epset at thread:%d, threadID:%"
PRId64
""
,
i
,
thrd
->
thread
);
tsem_t
*
pSem
=
pCtx
->
pSem
;
transSendAsync
(
thrd
->
asyncPool
,
&
(
cliMsg
->
q
));
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录