Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
6b2461ce
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看板
提交
6b2461ce
编写于
11月 02, 2021
作者:
S
shenglian zhou
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
rename functions
上级
a296c352
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
37 addition
and
43 deletion
+37
-43
src/client/src/tscSQLParser.c
src/client/src/tscSQLParser.c
+5
-5
src/common/src/tarithoperator.c
src/common/src/tarithoperator.c
+30
-36
src/connector/grafanaplugin
src/connector/grafanaplugin
+1
-1
src/plugins/blm3
src/plugins/blm3
+1
-1
未找到文件。
src/client/src/tscSQLParser.c
浏览文件 @
6b2461ce
...
...
@@ -1874,7 +1874,7 @@ static int32_t handleAggregateExpr(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, int32_
return
TSDB_CODE_SUCCESS
;
}
static
int32_t
handle
ArithmeticExpr
(
SSqlCmd
*
pCmd
,
SQueryInfo
*
pQueryInfo
,
int32_t
exprIndex
,
tSqlExprItem
*
pItem
)
{
static
int32_t
handle
SQLExprItem
(
SSqlCmd
*
pCmd
,
SQueryInfo
*
pQueryInfo
,
int32_t
exprIndex
,
tSqlExprItem
*
pItem
)
{
const
char
*
msg1
=
"invalid column name, illegal column type, or columns in arithmetic expression from two tables"
;
SColumnList
columnList
=
{
0
};
...
...
@@ -2074,7 +2074,7 @@ int32_t validateSelectNodeList(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, SArray* pS
int32_t
type
=
pItem
->
pNode
->
type
;
if
(
type
==
SQL_NODE_EXPR
)
{
int32_t
code
=
handle
ArithmeticExpr
(
pCmd
,
pQueryInfo
,
i
,
pItem
);
int32_t
code
=
handle
SQLExprItem
(
pCmd
,
pQueryInfo
,
i
,
pItem
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
return
code
;
}
...
...
@@ -2103,7 +2103,7 @@ int32_t validateSelectNodeList(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, SArray* pS
}
if
(
willProcessFunctionWithExpr
(
pItem
))
{
int32_t
code
=
handle
ArithmeticExpr
(
pCmd
,
pQueryInfo
,
i
,
pItem
);
int32_t
code
=
handle
SQLExprItem
(
pCmd
,
pQueryInfo
,
i
,
pItem
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
return
code
;
}
...
...
@@ -4331,7 +4331,7 @@ static int32_t getJoinCondInfo(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, tSqlExpr*
return
checkAndSetJoinCondInfo
(
pCmd
,
pQueryInfo
,
pExpr
);
}
static
int32_t
validate
Arithmetic
SQLFunc
(
SSqlCmd
*
pCmd
,
tSqlExpr
*
pExpr
,
static
int32_t
validate
SQLExpr
SQLFunc
(
SSqlCmd
*
pCmd
,
tSqlExpr
*
pExpr
,
SQueryInfo
*
pQueryInfo
,
SColumnList
*
pList
,
int32_t
*
type
,
uint64_t
*
uid
)
{
int32_t
code
=
TSDB_CODE_SUCCESS
;
int32_t
functionId
=
isValidFunction
(
pExpr
->
Expr
.
operand
.
z
,
pExpr
->
Expr
.
operand
.
n
);
...
...
@@ -4468,7 +4468,7 @@ static int32_t validateSQLExprItem(SSqlCmd* pCmd, tSqlExpr* pExpr,
*
uid
=
uidLeft
;
}
else
if
(
pExpr
->
type
==
SQL_NODE_SQLFUNCTION
)
{
int32_t
ret
=
validate
Arithmetic
SQLFunc
(
pCmd
,
pExpr
,
pQueryInfo
,
pList
,
type
,
uid
);
int32_t
ret
=
validate
SQLExpr
SQLFunc
(
pCmd
,
pExpr
,
pQueryInfo
,
pList
,
type
,
uid
);
if
(
ret
!=
TSDB_CODE_SUCCESS
)
{
return
ret
;
}
...
...
src/common/src/tarithoperator.c
浏览文件 @
6b2461ce
...
...
@@ -414,9 +414,9 @@ _arithmetic_operator_fn_t getArithmeticOperatorFn(int32_t arithmeticOptr) {
void
vectorPow
(
tExprOperandInfo
*
pInputs
,
uint8_t
numInputs
,
tExprOperandInfo
*
pOutput
,
int32_t
order
)
{
assert
(
numInputs
==
2
);
assert
(
pInputs
[
1
].
numOfRows
==
1
||
pInputs
[
0
].
numOfRows
==
1
||
pInputs
[
0
].
numOfRows
==
pInputs
[
1
].
numOfRows
);
int
numOfRows
=
(
pInputs
[
0
].
numOfRows
>
pInputs
[
1
].
numOfRows
)
?
pInputs
[
0
].
numOfRows
:
pInputs
[
1
].
numOfRows
;
if
(
pInputs
[
1
].
numOfRows
==
1
)
{
assert
(
pInputs
[
1
].
numOfRows
==
1
&&
pInputs
[
0
].
numOfRows
>=
1
);
int
numOfRows
=
pInputs
[
0
].
numOfRows
;
double
base
=
0
;
GET_TYPED_DATA
(
base
,
double
,
pInputs
[
1
].
type
,
pInputs
[
1
].
data
);
...
...
@@ -432,16 +432,13 @@ void vectorPow(tExprOperandInfo* pInputs, uint8_t numInputs, tExprOperandInfo* p
SET_TYPED_DATA
(
pOutputData
,
pOutput
->
type
,
result
);
}
}
}
else
{
assert
(
0
);
}
}
void
vectorLog
(
tExprOperandInfo
*
pInputs
,
uint8_t
numInputs
,
tExprOperandInfo
*
pOutput
,
int32_t
order
)
{
assert
(
numInputs
==
2
);
assert
(
pInputs
[
1
].
numOfRows
==
1
||
pInputs
[
0
].
numOfRows
==
1
||
pInputs
[
0
].
numOfRows
==
pInputs
[
1
].
numOfRows
);
int
numOfRows
=
(
pInputs
[
0
].
numOfRows
>
pInputs
[
1
].
numOfRows
)
?
pInputs
[
0
].
numOfRows
:
pInputs
[
1
].
numOfRows
;
if
(
pInputs
[
1
].
numOfRows
==
1
)
{
assert
(
pInputs
[
1
].
numOfRows
==
1
&&
pInputs
[
0
].
numOfRows
>=
1
);
int
numOfRows
=
pInputs
[
0
].
numOfRows
;
double
base
=
0
;
GET_TYPED_DATA
(
base
,
double
,
pInputs
[
1
].
type
,
pInputs
[
1
].
data
);
...
...
@@ -457,9 +454,6 @@ void vectorLog(tExprOperandInfo* pInputs, uint8_t numInputs, tExprOperandInfo* p
SET_TYPED_DATA
(
pOutputData
,
pOutput
->
type
,
result
);
}
}
}
else
{
assert
(
0
);
}
}
...
...
grafanaplugin
@
edad7465
比较
9ae793ad
...
edad7465
Subproject commit
9ae793ad2d567eb11d10627b65698f612542e988
Subproject commit
edad746514b2a53a8cf6061c93b98b52a5388692
blm3
@
f56aa0f4
比较
ba539ce6
...
f56aa0f4
Subproject commit
ba539ce69dc4fe53536e9b0517fe75917dce5c46
Subproject commit
f56aa0f485d7bb6aebbcefc2007eeecdccb767c8
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录