Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
e3c11172
T
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1184
Star
22015
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,发现更多精彩内容 >>
提交
e3c11172
编写于
8月 17, 2022
作者:
wmmhello
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix:error in get table list by tag filter
上级
359fa4bc
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
24 addition
and
3 deletion
+24
-3
source/libs/executor/src/executil.c
source/libs/executor/src/executil.c
+19
-1
source/libs/scalar/src/scalar.c
source/libs/scalar/src/scalar.c
+3
-0
source/libs/scalar/src/sclvector.c
source/libs/scalar/src/sclvector.c
+2
-2
未找到文件。
source/libs/executor/src/executil.c
浏览文件 @
e3c11172
...
@@ -334,7 +334,13 @@ static EDealRes getColumn(SNode** pNode, void* pContext) {
...
@@ -334,7 +334,13 @@ static EDealRes getColumn(SNode** pNode, void* pContext) {
taosHashPut
(
pData
->
colHash
,
&
pSColumnNode
->
colId
,
sizeof
(
pSColumnNode
->
colId
),
pNode
,
sizeof
((
*
pNode
)));
taosHashPut
(
pData
->
colHash
,
&
pSColumnNode
->
colId
,
sizeof
(
pSColumnNode
->
colId
),
pNode
,
sizeof
((
*
pNode
)));
pSColumnNode
->
slotId
=
pData
->
index
++
;
pSColumnNode
->
slotId
=
pData
->
index
++
;
SColumnInfo
cInfo
=
{.
colId
=
pSColumnNode
->
colId
,
.
type
=
pSColumnNode
->
node
.
resType
.
type
,
.
bytes
=
pSColumnNode
->
node
.
resType
.
bytes
};
SColumnInfo
cInfo
=
{.
colId
=
pSColumnNode
->
colId
,
.
type
=
pSColumnNode
->
node
.
resType
.
type
,
.
bytes
=
pSColumnNode
->
node
.
resType
.
bytes
};
#if TAG_FILTER_DEBUG
qDebug
(
"tagfilter build column info, slotId:%d, colId:%d, type:%d"
,
pSColumnNode
->
slotId
,
cInfo
.
colId
,
cInfo
.
type
);
#endif
taosArrayPush
(
pData
->
cInfoList
,
&
cInfo
);
taosArrayPush
(
pData
->
cInfoList
,
&
cInfo
);
}
else
{
SColumnNode
*
col
=
*
(
SColumnNode
**
)
data
;
pSColumnNode
->
slotId
=
col
->
slotId
;
}
}
return
DEAL_RES_CONTINUE
;
return
DEAL_RES_CONTINUE
;
...
@@ -431,7 +437,9 @@ static SColumnInfoData* getColInfoResult(void* metaHandle, uint64_t suid, SArray
...
@@ -431,7 +437,9 @@ static SColumnInfoData* getColInfoResult(void* metaHandle, uint64_t suid, SArray
char
str
[
TSDB_TABLE_FNAME_LEN
+
VARSTR_HEADER_SIZE
]
=
{
0
};
char
str
[
TSDB_TABLE_FNAME_LEN
+
VARSTR_HEADER_SIZE
]
=
{
0
};
metaGetTableNameByUid
(
metaHandle
,
*
uid
,
str
);
metaGetTableNameByUid
(
metaHandle
,
*
uid
,
str
);
colDataAppend
(
pColInfo
,
i
,
str
,
false
);
colDataAppend
(
pColInfo
,
i
,
str
,
false
);
#if TAG_FILTER_DEBUG
qDebug
(
"tagfilter uid:%ld, tbname:%s"
,
*
uid
,
str
+
2
);
qDebug
(
"tagfilter uid:%ld, tbname:%s"
,
*
uid
,
str
+
2
);
#endif
}
else
{
}
else
{
STagVal
tagVal
=
{
0
};
STagVal
tagVal
=
{
0
};
tagVal
.
cid
=
pColInfo
->
info
.
colId
;
tagVal
.
cid
=
pColInfo
->
info
.
colId
;
...
@@ -442,13 +450,23 @@ static SColumnInfoData* getColInfoResult(void* metaHandle, uint64_t suid, SArray
...
@@ -442,13 +450,23 @@ static SColumnInfoData* getColInfoResult(void* metaHandle, uint64_t suid, SArray
}
else
if
(
pColInfo
->
info
.
type
==
TSDB_DATA_TYPE_JSON
)
{
}
else
if
(
pColInfo
->
info
.
type
==
TSDB_DATA_TYPE_JSON
)
{
colDataAppend
(
pColInfo
,
i
,
p
,
false
);
colDataAppend
(
pColInfo
,
i
,
p
,
false
);
}
else
if
(
IS_VAR_DATA_TYPE
(
pColInfo
->
info
.
type
))
{
}
else
if
(
IS_VAR_DATA_TYPE
(
pColInfo
->
info
.
type
))
{
char
*
tmp
=
taosMemory
Malloc
(
tagVal
.
nData
+
VARSTR_HEADER_SIZE
);
char
*
tmp
=
taosMemory
Calloc
(
tagVal
.
nData
+
VARSTR_HEADER_SIZE
+
1
,
1
);
varDataSetLen
(
tmp
,
tagVal
.
nData
);
varDataSetLen
(
tmp
,
tagVal
.
nData
);
memcpy
(
tmp
+
VARSTR_HEADER_SIZE
,
tagVal
.
pData
,
tagVal
.
nData
);
memcpy
(
tmp
+
VARSTR_HEADER_SIZE
,
tagVal
.
pData
,
tagVal
.
nData
);
colDataAppend
(
pColInfo
,
i
,
tmp
,
false
);
colDataAppend
(
pColInfo
,
i
,
tmp
,
false
);
#if TAG_FILTER_DEBUG
qDebug
(
"tagfilter varch:%s"
,
tmp
+
2
);
#endif
taosMemoryFree
(
tmp
);
taosMemoryFree
(
tmp
);
}
else
{
}
else
{
colDataAppend
(
pColInfo
,
i
,
(
const
char
*
)
&
tagVal
.
i64
,
false
);
colDataAppend
(
pColInfo
,
i
,
(
const
char
*
)
&
tagVal
.
i64
,
false
);
#if TAG_FILTER_DEBUG
if
(
pColInfo
->
info
.
type
==
TSDB_DATA_TYPE_INT
){
qDebug
(
"tagfilter int:%d"
,
*
(
int
*
)(
&
tagVal
.
i64
));
}
else
if
(
pColInfo
->
info
.
type
==
TSDB_DATA_TYPE_DOUBLE
){
qDebug
(
"tagfilter double:%f"
,
*
(
double
*
)(
&
tagVal
.
i64
));
}
#endif
}
}
}
}
}
}
...
...
source/libs/scalar/src/scalar.c
浏览文件 @
e3c11172
...
@@ -292,6 +292,9 @@ int32_t sclInitParam(SNode* node, SScalarParam *param, SScalarCtx *ctx, int32_t
...
@@ -292,6 +292,9 @@ int32_t sclInitParam(SNode* node, SScalarParam *param, SScalarCtx *ctx, int32_t
}
}
SColumnInfoData
*
columnData
=
(
SColumnInfoData
*
)
taosArrayGet
(
block
->
pDataBlock
,
ref
->
slotId
);
SColumnInfoData
*
columnData
=
(
SColumnInfoData
*
)
taosArrayGet
(
block
->
pDataBlock
,
ref
->
slotId
);
#if TAG_FILTER_DEBUG
qDebug
(
"tagfilter column info, slotId:%d, colId:%d, type:%d"
,
ref
->
slotId
,
columnData
->
info
.
colId
,
columnData
->
info
.
type
);
#endif
param
->
numOfRows
=
block
->
info
.
rows
;
param
->
numOfRows
=
block
->
info
.
rows
;
param
->
columnData
=
columnData
;
param
->
columnData
=
columnData
;
break
;
break
;
...
...
source/libs/scalar/src/sclvector.c
浏览文件 @
e3c11172
...
@@ -1672,8 +1672,8 @@ void vectorBitOr(SScalarParam* pLeft, SScalarParam* pRight, SScalarParam *pOut,
...
@@ -1672,8 +1672,8 @@ void vectorBitOr(SScalarParam* pLeft, SScalarParam* pRight, SScalarParam *pOut,
colDataAppendInt8(pOut->columnData, i, (int8_t*)&result);\
colDataAppendInt8(pOut->columnData, i, (int8_t*)&result);\
}else{\
}else{\
bool res = filterDoCompare(fp, optr, pLeftData, pRightData);\
bool res = filterDoCompare(fp, optr, pLeftData, pRightData);\
colDataAppendInt8(pOut->columnData, i, (int8_t*)&res);
\
colDataAppendInt8(pOut->columnData, i, (int8_t*)&res);\
}
\
}\
if(freeLeft) taosMemoryFreeClear(pLeftData);\
if(freeLeft) taosMemoryFreeClear(pLeftData);\
if(freeRight) taosMemoryFreeClear(pRightData);\
if(freeRight) taosMemoryFreeClear(pRightData);\
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录