Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
c3fd294c
T
TDengine
项目概览
慢慢CG
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
c3fd294c
编写于
11月 24, 2020
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-225] fix bugs in regression test.
上级
c17d202e
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
57 addition
and
3 deletion
+57
-3
src/query/inc/qUtil.h
src/query/inc/qUtil.h
+1
-0
src/query/src/qExecutor.c
src/query/src/qExecutor.c
+1
-1
src/query/src/qUtil.c
src/query/src/qUtil.c
+6
-0
tests/script/general/parser/col_arithmetic_query.sim
tests/script/general/parser/col_arithmetic_query.sim
+49
-2
未找到文件。
src/query/inc/qUtil.h
浏览文件 @
c3fd294c
...
...
@@ -81,6 +81,7 @@ int32_t getNumOfAllocatedResultRows(SResultRowPool* p);
int32_t
getNumOfUsedResultRows
(
SResultRowPool
*
p
);
uint64_t
getResultInfoUId
(
SQueryRuntimeEnv
*
pRuntimeEnv
);
bool
isPointInterpoQuery
(
SQuery
*
pQuery
);
#endif // TDENGINE_QUERYUTIL_H
src/query/src/qExecutor.c
浏览文件 @
c3fd294c
...
...
@@ -1825,7 +1825,7 @@ static bool isFixedOutputQuery(SQueryRuntimeEnv* pRuntimeEnv) {
}
// todo refactor with isLastRowQuery
static
bool
isPointInterpoQuery
(
SQuery
*
pQuery
)
{
bool
isPointInterpoQuery
(
SQuery
*
pQuery
)
{
for
(
int32_t
i
=
0
;
i
<
pQuery
->
numOfOutput
;
++
i
)
{
int32_t
functionID
=
pQuery
->
pExpr1
[
i
].
base
.
functionId
;
if
(
functionID
==
TSDB_FUNC_INTERP
)
{
...
...
src/query/src/qUtil.c
浏览文件 @
c3fd294c
...
...
@@ -388,6 +388,12 @@ uint64_t getResultInfoUId(SQueryRuntimeEnv* pRuntimeEnv) {
return
0
;
// for simple table query, the uid is always set to be 0;
}
SQuery
*
pQuery
=
pRuntimeEnv
->
pQuery
;
if
((
pQuery
->
checkBuffer
==
1
&&
pQuery
->
interval
.
interval
==
0
)
||
isPointInterpoQuery
(
pQuery
)
||
pRuntimeEnv
->
groupbyNormalCol
)
{
return
0
;
}
STableId
*
id
=
TSDB_TABLEID
(
pRuntimeEnv
->
pQuery
->
current
);
return
id
->
uid
;
}
\ No newline at end of file
tests/script/general/parser/col_arithmetic_query.sim
浏览文件 @
c3fd294c
...
...
@@ -323,9 +323,56 @@ sql select c2-c2, 911 from $tb
#======================================= aggregation function arithmetic query cases ================
# asc/desc order [d.2]
sql select first(c1) * ( 2 / 3 ) from $stb order by ts asc;
sql select (count(c1) * 2) % 7.9 from $stb order by ts desc;
if $rows != 1 then
return -1
endi
if $data00 != 0.000000000 then
return -1
endi
sql select first(c1) * (2/99) from $stb order by ts desc;
if $rows != 1 then
return -1
endi
if $data00 != 0.000000000 then
return -1
endi
sql select (count(c1) * 2) % 7.9, (count(c1) * 2), ( count(1)*2) from $stb order by ts desc;
if $rows != 1 then
return -1
endi
if $data00 != 1.800000000 then
return -1
endi
if $data01 != 100000 then
return -1
endi
if $data02 != 200000 then
return -1
endi
sql select spread( c1 )/44, spread(c1), 0.204545455 * 44 from $stb order by ts asc;
if $rows != 1 then
return -1
endi
if $data00 != 0.204545455 then
return -1
endi
sql select spread(c1 )/44 from $stb order by ts asc;
if $data01 != 9.000000000 then
return -1
endi
if $data02 != 9.000000020 then
return -1
endi
# all possible function in the arithmetic expressioin
sql select min(c1) * max(c2) /4, sum(c1) * percentile(c2, 20), apercentile(c4, 33) + 52/9, spread(c5)/min(c2) from $stb where ts < and ts >
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录