Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
e52c6aae
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看板
未验证
提交
e52c6aae
编写于
6月 15, 2023
作者:
D
dapan1121
提交者:
GitHub
6月 15, 2023
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #21620 from taosdata/fix/TD-24567-3.0
fix: tsma query with order by _wstart/_wend
上级
0c2bfde7
4cd039c3
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
78 addition
and
3 deletion
+78
-3
source/libs/nodes/src/nodesUtilFuncs.c
source/libs/nodes/src/nodesUtilFuncs.c
+3
-3
source/libs/parser/src/parTranslater.c
source/libs/parser/src/parTranslater.c
+1
-0
tests/script/tsim/sma/tsmaCreateInsertQuery.sim
tests/script/tsim/sma/tsmaCreateInsertQuery.sim
+74
-0
未找到文件。
source/libs/nodes/src/nodesUtilFuncs.c
浏览文件 @
e52c6aae
...
...
@@ -1956,9 +1956,9 @@ static uint32_t funcNodeHash(const char* pKey, uint32_t len) {
}
static
int32_t
funcNodeEqual
(
const
void
*
pLeft
,
const
void
*
pRight
,
size_t
len
)
{
if
(
0
!=
strcmp
((
*
(
const
SExprNode
**
)
pLeft
)
->
aliasName
,
(
*
(
const
SExprNode
**
)
pRight
)
->
aliasName
))
{
return
1
;
}
//
if (0 != strcmp((*(const SExprNode**)pLeft)->aliasName, (*(const SExprNode**)pRight)->aliasName)) {
//
return 1;
//
}
return
nodesEqualNode
(
*
(
const
SNode
**
)
pLeft
,
*
(
const
SNode
**
)
pRight
)
?
0
:
1
;
}
...
...
source/libs/parser/src/parTranslater.c
浏览文件 @
e52c6aae
...
...
@@ -4979,6 +4979,7 @@ static int32_t buildTableForSampleAst(SSampleAstInfo* pInfo, SNode** pOutput) {
}
snprintf
(
pTable
->
table
.
dbName
,
sizeof
(
pTable
->
table
.
dbName
),
"%s"
,
pInfo
->
pDbName
);
snprintf
(
pTable
->
table
.
tableName
,
sizeof
(
pTable
->
table
.
tableName
),
"%s"
,
pInfo
->
pTableName
);
snprintf
(
pTable
->
table
.
tableAlias
,
sizeof
(
pTable
->
table
.
tableAlias
),
"%s"
,
pInfo
->
pTableName
);
TSWAP
(
pTable
->
pMeta
,
pInfo
->
pRollupTableMeta
);
*
pOutput
=
(
SNode
*
)
pTable
;
return
TSDB_CODE_SUCCESS
;
...
...
tests/script/tsim/sma/tsmaCreateInsertQuery.sim
浏览文件 @
e52c6aae
...
...
@@ -340,6 +340,80 @@ if $data05 != 30.000000000 then
return -1
endi
print =============== select with _wstart/order by _wstart from stb from file in designated vgroup
sql select _wstart, _wend, min(c1),max(c2),max(c1) from stb interval(5m,10s) sliding(5m) order by _wstart;
print $data00 $data01 $data02 $data03 $data04
if $rows != 1 then
print rows $rows != 1
return -1
endi
if $data02 != -13 then
print data02 $data02 != -13
return -1
endi
if $data03 != 20.00000 then
print data03 $data03 != 20.00000
return -1
endi
if $data04 != 20 then
print data04 $data04 != 20
return -1
endi
print =============== select without _wstart/with order by _wstart from stb from file in designated vgroup
sql select _wend, min(c1),max(c2),max(c1) from stb interval(5m,10s) sliding(5m) order by _wstart;
print $data00 $data01 $data02 $data03
if $rows != 1 then
print rows $rows != 1
return -1
endi
if $data01 != -13 then
print data01 $data01 != -13
return -1
endi
if $data02 != 20.00000 then
print data02 $data02 != 20.00000
return -1
endi
if $data03 != 20 then
print data03 $data03 != 20
return -1
endi
print =============== select * from stb from file in common vgroups
sql select _wstart, _wend, min(c1),max(c2),max(c1),max(c3) from stb interval(5m,10s) sliding(5m) order by _wstart;
print $data00 $data01 $data02 $data03 $data04 $data05
if $rows != 1 then
print rows $rows != 1
return -1
endi
if $data02 != -13 then
print data02 $data02 != -13
return -1
endi
if $data03 != 20.00000 then
print data03 $data03 != 20.00000
return -1
endi
if $data04 != 20 then
print data04 $data04 != 20
return -1
endi
if $data05 != 30.000000000 then
print data05 $data05 != 30.000000000
return -1
endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录