Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
527a142c
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看板
提交
527a142c
编写于
9月 24, 2021
作者:
S
shenglian zhou
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
rename tscIsDiffDeriveQuery function to tscIsDiffDerivLikeQuery
上级
99144e7a
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
9 addition
and
7 deletion
+9
-7
src/client/inc/tscUtil.h
src/client/inc/tscUtil.h
+1
-1
src/client/src/tscSQLParser.c
src/client/src/tscSQLParser.c
+3
-3
src/client/src/tscUtil.c
src/client/src/tscUtil.c
+5
-3
未找到文件。
src/client/inc/tscUtil.h
浏览文件 @
527a142c
...
@@ -156,7 +156,7 @@ bool isSimpleAggregateRv(SQueryInfo* pQueryInfo);
...
@@ -156,7 +156,7 @@ bool isSimpleAggregateRv(SQueryInfo* pQueryInfo);
bool
tscNonOrderedProjectionQueryOnSTable
(
SQueryInfo
*
pQueryInfo
,
int32_t
tableIndex
);
bool
tscNonOrderedProjectionQueryOnSTable
(
SQueryInfo
*
pQueryInfo
,
int32_t
tableIndex
);
bool
tscOrderedProjectionQueryOnSTable
(
SQueryInfo
*
pQueryInfo
,
int32_t
tableIndex
);
bool
tscOrderedProjectionQueryOnSTable
(
SQueryInfo
*
pQueryInfo
,
int32_t
tableIndex
);
bool
tscIsDiffDerivQuery
(
SQueryInfo
*
pQueryInfo
);
bool
tscIsDiffDeriv
Like
Query
(
SQueryInfo
*
pQueryInfo
);
bool
tscIsProjectionQueryOnSTable
(
SQueryInfo
*
pQueryInfo
,
int32_t
tableIndex
);
bool
tscIsProjectionQueryOnSTable
(
SQueryInfo
*
pQueryInfo
,
int32_t
tableIndex
);
bool
tscIsProjectionQuery
(
SQueryInfo
*
pQueryInfo
);
bool
tscIsProjectionQuery
(
SQueryInfo
*
pQueryInfo
);
...
...
src/client/src/tscSQLParser.c
浏览文件 @
527a142c
...
@@ -3418,7 +3418,7 @@ bool hasUnsupportFunctionsForSTableQuery(SSqlCmd* pCmd, SQueryInfo* pQueryInfo)
...
@@ -3418,7 +3418,7 @@ bool hasUnsupportFunctionsForSTableQuery(SSqlCmd* pCmd, SQueryInfo* pQueryInfo)
}
}
}
}
if
(
tscIsTWAQuery
(
pQueryInfo
)
||
tscIsDiffDerivQuery
(
pQueryInfo
)
||
tscIsIrateQuery
(
pQueryInfo
)
||
if
(
tscIsTWAQuery
(
pQueryInfo
)
||
tscIsDiffDeriv
Like
Query
(
pQueryInfo
)
||
tscIsIrateQuery
(
pQueryInfo
)
||
tscQueryContainsFunction
(
pQueryInfo
,
TSDB_FUNC_SAMPLE
))
{
tscQueryContainsFunction
(
pQueryInfo
,
TSDB_FUNC_SAMPLE
))
{
if
(
pQueryInfo
->
groupbyExpr
.
numOfGroupCols
==
0
)
{
if
(
pQueryInfo
->
groupbyExpr
.
numOfGroupCols
==
0
)
{
invalidOperationMsg
(
tscGetErrorMsgPayload
(
pCmd
),
msg1
);
invalidOperationMsg
(
tscGetErrorMsgPayload
(
pCmd
),
msg1
);
...
@@ -7060,7 +7060,7 @@ static int32_t doAddGroupbyColumnsOnDemand(SSqlCmd* pCmd, SQueryInfo* pQueryInfo
...
@@ -7060,7 +7060,7 @@ static int32_t doAddGroupbyColumnsOnDemand(SSqlCmd* pCmd, SQueryInfo* pQueryInfo
if
(
TSDB_COL_IS_TAG
(
pColIndex
->
flag
))
{
if
(
TSDB_COL_IS_TAG
(
pColIndex
->
flag
))
{
int32_t
f
=
TSDB_FUNC_TAG
;
int32_t
f
=
TSDB_FUNC_TAG
;
if
(
tscIsDiffDerivQuery
(
pQueryInfo
))
{
if
(
tscIsDiffDeriv
Like
Query
(
pQueryInfo
))
{
f
=
TSDB_FUNC_TAGPRJ
;
f
=
TSDB_FUNC_TAGPRJ
;
}
}
...
@@ -7224,7 +7224,7 @@ int32_t doFunctionsCompatibleCheck(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, char*
...
@@ -7224,7 +7224,7 @@ int32_t doFunctionsCompatibleCheck(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, char*
}
}
// projection query on super table does not compatible with "group by" syntax
// projection query on super table does not compatible with "group by" syntax
if
(
tscIsProjectionQuery
(
pQueryInfo
)
&&
!
(
tscIsDiffDerivQuery
(
pQueryInfo
)))
{
if
(
tscIsProjectionQuery
(
pQueryInfo
)
&&
!
(
tscIsDiffDeriv
Like
Query
(
pQueryInfo
)))
{
return
invalidOperationMsg
(
msg
,
msg3
);
return
invalidOperationMsg
(
msg
,
msg3
);
}
}
...
...
src/client/src/tscUtil.c
浏览文件 @
527a142c
...
@@ -320,7 +320,9 @@ bool tscIsProjectionQuery(SQueryInfo* pQueryInfo) {
...
@@ -320,7 +320,9 @@ bool tscIsProjectionQuery(SQueryInfo* pQueryInfo) {
return
true
;
return
true
;
}
}
bool
tscIsDiffDerivQuery
(
SQueryInfo
*
pQueryInfo
)
{
// these functions diff/derivative/csum/mavg will return the result computed on current row and history row/rows
// as the result for current row
bool
tscIsDiffDerivLikeQuery
(
SQueryInfo
*
pQueryInfo
)
{
size_t
size
=
tscNumOfExprs
(
pQueryInfo
);
size_t
size
=
tscNumOfExprs
(
pQueryInfo
);
for
(
int32_t
i
=
0
;
i
<
size
;
++
i
)
{
for
(
int32_t
i
=
0
;
i
<
size
;
++
i
)
{
...
@@ -605,7 +607,7 @@ bool isSimpleAggregateRv(SQueryInfo* pQueryInfo) {
...
@@ -605,7 +607,7 @@ bool isSimpleAggregateRv(SQueryInfo* pQueryInfo) {
return
false
;
return
false
;
}
}
if
(
tscIsDiffDerivQuery
(
pQueryInfo
))
{
if
(
tscIsDiffDeriv
Like
Query
(
pQueryInfo
))
{
return
false
;
return
false
;
}
}
...
@@ -4852,7 +4854,7 @@ int32_t tscCreateQueryFromQueryInfo(SQueryInfo* pQueryInfo, SQueryAttr* pQueryAt
...
@@ -4852,7 +4854,7 @@ int32_t tscCreateQueryFromQueryInfo(SQueryInfo* pQueryInfo, SQueryAttr* pQueryAt
pQueryAttr
->
hasTagResults
=
hasTagValOutput
(
pQueryInfo
);
pQueryAttr
->
hasTagResults
=
hasTagValOutput
(
pQueryInfo
);
pQueryAttr
->
stabledev
=
isStabledev
(
pQueryInfo
);
pQueryAttr
->
stabledev
=
isStabledev
(
pQueryInfo
);
pQueryAttr
->
tsCompQuery
=
isTsCompQuery
(
pQueryInfo
);
pQueryAttr
->
tsCompQuery
=
isTsCompQuery
(
pQueryInfo
);
pQueryAttr
->
diffQuery
=
tscIsDiffDerivQuery
(
pQueryInfo
);
pQueryAttr
->
diffQuery
=
tscIsDiffDeriv
Like
Query
(
pQueryInfo
);
pQueryAttr
->
simpleAgg
=
isSimpleAggregateRv
(
pQueryInfo
);
pQueryAttr
->
simpleAgg
=
isSimpleAggregateRv
(
pQueryInfo
);
pQueryAttr
->
needReverseScan
=
tscNeedReverseScan
(
pQueryInfo
);
pQueryAttr
->
needReverseScan
=
tscNeedReverseScan
(
pQueryInfo
);
pQueryAttr
->
stableQuery
=
QUERY_IS_STABLE_QUERY
(
pQueryInfo
->
type
);
pQueryAttr
->
stableQuery
=
QUERY_IS_STABLE_QUERY
(
pQueryInfo
->
type
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录