Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
40d6194c
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看板
未验证
提交
40d6194c
编写于
5月 05, 2022
作者:
S
shenglian-zhou
提交者:
GitHub
5月 05, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #11976 from taosdata/fix/td-14745
fix: two ts columns error when sample and interval
上级
d079342f
a7788b03
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
50 addition
and
3 deletion
+50
-3
src/client/src/tscSQLParser.c
src/client/src/tscSQLParser.c
+1
-1
src/client/src/tscUtil.c
src/client/src/tscUtil.c
+5
-2
tests/develop-test/2-query/TD-14745.py
tests/develop-test/2-query/TD-14745.py
+43
-0
tests/parallel_test/cases.task
tests/parallel_test/cases.task
+1
-0
未找到文件。
src/client/src/tscSQLParser.c
浏览文件 @
40d6194c
...
@@ -1073,7 +1073,7 @@ static bool isTopBottomUniqueQuery(SQueryInfo* pQueryInfo) {
...
@@ -1073,7 +1073,7 @@ static bool isTopBottomUniqueQuery(SQueryInfo* pQueryInfo) {
for
(
int32_t
i
=
0
;
i
<
size
;
++
i
)
{
for
(
int32_t
i
=
0
;
i
<
size
;
++
i
)
{
int32_t
functionId
=
tscExprGet
(
pQueryInfo
,
i
)
->
base
.
functionId
;
int32_t
functionId
=
tscExprGet
(
pQueryInfo
,
i
)
->
base
.
functionId
;
if
(
functionId
==
TSDB_FUNC_TOP
||
functionId
==
TSDB_FUNC_BOTTOM
if
(
functionId
==
TSDB_FUNC_TOP
||
functionId
==
TSDB_FUNC_BOTTOM
||
functionId
==
TSDB_FUNC_SAMPLE
||
functionId
==
TSDB_FUNC_UNIQUE
||
functionId
==
TSDB_FUNC_TAIL
)
{
||
functionId
==
TSDB_FUNC_UNIQUE
||
functionId
==
TSDB_FUNC_TAIL
)
{
return
true
;
return
true
;
}
}
...
...
src/client/src/tscUtil.c
浏览文件 @
40d6194c
...
@@ -2701,8 +2701,11 @@ int32_t tscExprTopBottomIndex(SQueryInfo* pQueryInfo){
...
@@ -2701,8 +2701,11 @@ int32_t tscExprTopBottomIndex(SQueryInfo* pQueryInfo){
SExprInfo
*
pExpr
=
tscExprGet
(
pQueryInfo
,
i
);
SExprInfo
*
pExpr
=
tscExprGet
(
pQueryInfo
,
i
);
if
(
pExpr
==
NULL
)
if
(
pExpr
==
NULL
)
continue
;
continue
;
if
(
pExpr
->
base
.
functionId
==
TSDB_FUNC_TOP
||
pExpr
->
base
.
functionId
==
TSDB_FUNC_BOTTOM
if
(
pExpr
->
base
.
functionId
==
TSDB_FUNC_TOP
||
pExpr
->
base
.
functionId
==
TSDB_FUNC_UNIQUE
||
pExpr
->
base
.
functionId
==
TSDB_FUNC_TAIL
)
{
||
pExpr
->
base
.
functionId
==
TSDB_FUNC_BOTTOM
||
pExpr
->
base
.
functionId
==
TSDB_FUNC_SAMPLE
||
pExpr
->
base
.
functionId
==
TSDB_FUNC_UNIQUE
||
pExpr
->
base
.
functionId
==
TSDB_FUNC_TAIL
)
{
return
i
;
return
i
;
}
}
}
}
...
...
tests/develop-test/2-query/TD-14745.py
0 → 100644
浏览文件 @
40d6194c
import
sys
from
util.log
import
*
from
util.cases
import
*
from
util.sql
import
*
from
util.dnodes
import
tdDnodes
from
math
import
inf
class
TDTestCase
:
def
caseDescription
(
self
):
'''
case1<shenglian zhou>: [TD-13946]core dump of sampling binary column so that when result from vnode exceeds INT16_MAX bytes
'''
return
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
(),
logSql
)
self
.
_conn
=
conn
def
run
(
self
):
print
(
"running {}"
.
format
(
__file__
))
tdSql
.
execute
(
"drop database if exists td14745"
)
tdSql
.
execute
(
"create database td14745"
)
tdSql
.
execute
(
"use td14745"
)
tdSql
.
execute
(
"create table st ( ts timestamp, i int) tags (t1 int)"
)
tdSql
.
execute
(
"create table ct1 using st tags(1)"
)
for
i
in
range
(
100
):
tdSql
.
execute
(
"insert into ct1 values(now+{}a, {})"
.
format
(
100
*
i
,
i
))
tdSql
.
query
(
"select sample(i,3) from ct1 interval(1s)"
)
tdSql
.
checkCols
(
2
)
tdSql
.
query
(
"select sample(i,3) from ct1 session(ts, 200a)"
)
tdSql
.
checkCols
(
2
)
def
stop
(
self
):
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/parallel_test/cases.task
浏览文件 @
40d6194c
...
@@ -725,6 +725,7 @@
...
@@ -725,6 +725,7 @@
5,,develop-test,python3 ./test.py -f 2-query/scalar_triangle.py
5,,develop-test,python3 ./test.py -f 2-query/scalar_triangle.py
5,,develop-test,python3 ./test.py -f 2-query/scalar_expression.py
5,,develop-test,python3 ./test.py -f 2-query/scalar_expression.py
5,,develop-test,python3 ./test.py -f 2-query/scalar_powlog.py
5,,develop-test,python3 ./test.py -f 2-query/scalar_powlog.py
5,,develop-test,python3 ./test.py -f 2-query/TD-14745.py
4,,system-test,python3 test.py -f 4-taosAdapter/TD-12163.py
4,,system-test,python3 test.py -f 4-taosAdapter/TD-12163.py
4,,system-test,python3 ./test.py -f 3-connectors/restful/restful_binddbname.py
4,,system-test,python3 ./test.py -f 3-connectors/restful/restful_binddbname.py
4,,system-test,python3 ./test.py -f 2-query/TD-12614.py
4,,system-test,python3 ./test.py -f 2-query/TD-12614.py
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录