Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
6d5d6746
T
TDengine
项目概览
taosdata
/
TDengine
接近 2 年 前同步成功
通知
1192
Star
22018
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看板
提交
6d5d6746
编写于
7月 19, 2022
作者:
X
Xiaoyu Wang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: sql command 'show tags from table_name'
上级
1ad25d9e
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
10 addition
and
2 deletion
+10
-2
source/libs/function/src/builtins.c
source/libs/function/src/builtins.c
+1
-1
source/libs/function/src/builtinsimpl.c
source/libs/function/src/builtinsimpl.c
+2
-1
source/libs/parser/src/parTranslater.c
source/libs/parser/src/parTranslater.c
+3
-0
source/libs/scalar/src/filter.c
source/libs/scalar/src/filter.c
+4
-0
未找到文件。
source/libs/function/src/builtins.c
浏览文件 @
6d5d6746
...
@@ -1034,7 +1034,7 @@ static int32_t translateHistogramImpl(SFunctionNode* pFunc, char* pErrBuf, int32
...
@@ -1034,7 +1034,7 @@ static int32_t translateHistogramImpl(SFunctionNode* pFunc, char* pErrBuf, int32
// param1 ~ param3
// param1 ~ param3
if
(((
SExprNode
*
)
nodesListGetNode
(
pFunc
->
pParameterList
,
1
))
->
resType
.
type
!=
TSDB_DATA_TYPE_BINARY
||
if
(((
SExprNode
*
)
nodesListGetNode
(
pFunc
->
pParameterList
,
1
))
->
resType
.
type
!=
TSDB_DATA_TYPE_BINARY
||
((
SExprNode
*
)
nodesListGetNode
(
pFunc
->
pParameterList
,
2
))
->
resType
.
type
!=
TSDB_DATA_TYPE_BINARY
||
((
SExprNode
*
)
nodesListGetNode
(
pFunc
->
pParameterList
,
2
))
->
resType
.
type
!=
TSDB_DATA_TYPE_BINARY
||
((
SExprNode
*
)
nodesListGetNode
(
pFunc
->
pParameterList
,
3
))
->
resType
.
type
!=
TSDB_DATA_TYPE_BIGINT
)
{
!
IS_INTEGER_TYPE
(((
SExprNode
*
)
nodesListGetNode
(
pFunc
->
pParameterList
,
3
))
->
resType
.
type
)
)
{
return
invaildFuncParaTypeErrMsg
(
pErrBuf
,
len
,
pFunc
->
functionName
);
return
invaildFuncParaTypeErrMsg
(
pErrBuf
,
len
,
pFunc
->
functionName
);
}
}
...
...
source/libs/function/src/builtinsimpl.c
浏览文件 @
6d5d6746
...
@@ -2380,7 +2380,8 @@ int32_t percentileFunction(SqlFunctionCtx* pCtx) {
...
@@ -2380,7 +2380,8 @@ int32_t percentileFunction(SqlFunctionCtx* pCtx) {
int32_t
percentileFinalize
(
SqlFunctionCtx
*
pCtx
,
SSDataBlock
*
pBlock
)
{
int32_t
percentileFinalize
(
SqlFunctionCtx
*
pCtx
,
SSDataBlock
*
pBlock
)
{
SVariant
*
pVal
=
&
pCtx
->
param
[
1
].
param
;
SVariant
*
pVal
=
&
pCtx
->
param
[
1
].
param
;
double
v
=
(
pVal
->
nType
==
TSDB_DATA_TYPE_BIGINT
)
?
pVal
->
i
:
pVal
->
d
;
double
v
=
(
IS_SIGNED_NUMERIC_TYPE
(
pVal
->
nType
)
?
pVal
->
i
:
(
IS_UNSIGNED_NUMERIC_TYPE
(
pVal
->
nType
)
?
pVal
->
u
:
pVal
->
d
));
SResultRowEntryInfo
*
pResInfo
=
GET_RES_INFO
(
pCtx
);
SResultRowEntryInfo
*
pResInfo
=
GET_RES_INFO
(
pCtx
);
SPercentileInfo
*
ppInfo
=
(
SPercentileInfo
*
)
GET_ROWCELL_INTERBUF
(
pResInfo
);
SPercentileInfo
*
ppInfo
=
(
SPercentileInfo
*
)
GET_ROWCELL_INTERBUF
(
pResInfo
);
...
...
source/libs/parser/src/parTranslater.c
浏览文件 @
6d5d6746
...
@@ -936,6 +936,9 @@ static EDealRes translateValueImpl(STranslateContext* pCxt, SValueNode* pVal, SD
...
@@ -936,6 +936,9 @@ static EDealRes translateValueImpl(STranslateContext* pCxt, SValueNode* pVal, SD
pVal
->
node
.
resType
=
targetDt
;
pVal
->
node
.
resType
=
targetDt
;
pVal
->
node
.
resType
.
scale
=
pVal
->
unit
;
pVal
->
node
.
resType
.
scale
=
pVal
->
unit
;
pVal
->
translate
=
true
;
pVal
->
translate
=
true
;
if
(
!
strict
&&
TSDB_DATA_TYPE_UBIGINT
==
pVal
->
node
.
resType
.
type
&&
pVal
->
datum
.
u
<=
INT64_MAX
)
{
pVal
->
node
.
resType
.
type
=
TSDB_DATA_TYPE_BIGINT
;
}
return
res
;
return
res
;
}
}
...
...
source/libs/scalar/src/filter.c
浏览文件 @
6d5d6746
...
@@ -3682,6 +3682,10 @@ EDealRes fltReviseRewriter(SNode** pNode, void* pContext) {
...
@@ -3682,6 +3682,10 @@ EDealRes fltReviseRewriter(SNode** pNode, void* pContext) {
if
(
OP_TYPE_IN
!=
node
->
opType
)
{
if
(
OP_TYPE_IN
!=
node
->
opType
)
{
SColumnNode
*
refNode
=
(
SColumnNode
*
)
node
->
pLeft
;
SColumnNode
*
refNode
=
(
SColumnNode
*
)
node
->
pLeft
;
SValueNode
*
valueNode
=
(
SValueNode
*
)
node
->
pRight
;
SValueNode
*
valueNode
=
(
SValueNode
*
)
node
->
pRight
;
if
(
FILTER_GET_FLAG
(
stat
->
info
->
options
,
FLT_OPTION_TIMESTAMP
)
&&
TSDB_DATA_TYPE_UBIGINT
==
valueNode
->
node
.
resType
.
type
&&
valueNode
->
datum
.
u
<=
INT64_MAX
)
{
valueNode
->
node
.
resType
.
type
=
TSDB_DATA_TYPE_BIGINT
;
}
int32_t
type
=
vectorGetConvertType
(
refNode
->
node
.
resType
.
type
,
valueNode
->
node
.
resType
.
type
);
int32_t
type
=
vectorGetConvertType
(
refNode
->
node
.
resType
.
type
,
valueNode
->
node
.
resType
.
type
);
if
(
0
!=
type
&&
type
!=
refNode
->
node
.
resType
.
type
)
{
if
(
0
!=
type
&&
type
!=
refNode
->
node
.
resType
.
type
)
{
stat
->
scalarMode
=
true
;
stat
->
scalarMode
=
true
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录