Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
e5d17c95
T
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1184
Star
22015
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
e5d17c95
编写于
4月 17, 2021
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[td-2859]
上级
d54ea3c2
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
27 addition
and
8 deletion
+27
-8
src/client/src/tscLocalMerge.c
src/client/src/tscLocalMerge.c
+8
-1
src/client/src/tscServer.c
src/client/src/tscServer.c
+0
-1
src/client/src/tscSubquery.c
src/client/src/tscSubquery.c
+0
-1
src/client/src/tscUtil.c
src/client/src/tscUtil.c
+10
-2
src/query/inc/qExecutor.h
src/query/inc/qExecutor.h
+1
-1
src/query/src/qExecutor.c
src/query/src/qExecutor.c
+7
-1
tests/script/general/parser/join_multivnode.sim
tests/script/general/parser/join_multivnode.sim
+1
-1
未找到文件。
src/client/src/tscLocalMerge.c
浏览文件 @
e5d17c95
...
...
@@ -1837,7 +1837,7 @@ static void appendOneRowToDataBlock(SSDataBlock *pBlock, char *buf, SColumnModel
pBlock
->
info
.
rows
+=
1
;
}
SSDataBlock
*
doMultiwaySort
(
void
*
param
,
bool
*
newgroup
)
{
SSDataBlock
*
doMultiway
Merge
Sort
(
void
*
param
,
bool
*
newgroup
)
{
SOperatorInfo
*
pOperator
=
(
SOperatorInfo
*
)
param
;
if
(
pOperator
->
status
==
OP_EXEC_DONE
)
{
return
NULL
;
...
...
@@ -2043,8 +2043,15 @@ SSDataBlock* doGlobalAggregate(void* param, bool* newgroup) {
if
(
pInfoData
->
info
.
type
==
TSDB_DATA_TYPE_TIMESTAMP
&&
pRes
->
info
.
rows
>
0
)
{
STimeWindow
*
w
=
&
pRes
->
info
.
window
;
// TODO in case of desc order, swap it
w
->
skey
=
*
(
int64_t
*
)
pInfoData
->
pData
;
w
->
ekey
=
*
(
int64_t
*
)(((
char
*
)
pInfoData
->
pData
)
+
TSDB_KEYSIZE
*
(
pRes
->
info
.
rows
-
1
));
if
(
pOperator
->
pRuntimeEnv
->
pQueryAttr
->
order
.
order
==
TSDB_ORDER_DESC
)
{
SWAP
(
w
->
skey
,
w
->
ekey
,
TSKEY
);
assert
(
w
->
skey
<=
w
->
ekey
);
}
}
}
...
...
src/client/src/tscServer.c
浏览文件 @
e5d17c95
...
...
@@ -1599,7 +1599,6 @@ int tscProcessRetrieveLocalMergeRsp(SSqlObj *pSql) {
if
(
pRes
->
code
==
TSDB_CODE_SUCCESS
&&
pRes
->
numOfRows
>
0
)
{
tscCreateResPointerInfo
(
pRes
,
pQueryInfo
);
tscSetResRawPtrRv
(
pRes
,
pQueryInfo
,
p
);
// tscSetResRawPtr(pRes, pQueryInfo);
}
pRes
->
row
=
0
;
...
...
src/client/src/tscSubquery.c
浏览文件 @
e5d17c95
...
...
@@ -3591,7 +3591,6 @@ void* createQueryInfoFromQueryNode(SQueryInfo* pQueryInfo, SExprInfo* pExprs, ST
STsBufInfo
bufInfo
=
{
0
};
SQueryParam
param
=
{.
pOperator
=
pa
};
/*int32_t code = */
initQInfo
(
&
bufInfo
,
NULL
,
pQInfo
,
&
param
,
NULL
,
0
,
merger
);
// pQInfo->runtimeEnv.proot->upstream = pSourceOperator;
return
pQInfo
;
_cleanup:
...
...
src/client/src/tscUtil.c
浏览文件 @
e5d17c95
...
...
@@ -3282,7 +3282,6 @@ static int32_t createSecondaryExpr(SQueryAttr* pQueryAttr, SQueryInfo* pQueryInf
for
(
int32_t
i
=
0
;
i
<
pQueryAttr
->
numOfExpr2
;
++
i
)
{
SInternalField
*
pField
=
tscFieldInfoGetInternalField
(
&
pQueryInfo
->
fieldsInfo
,
i
);
SExprInfo
*
pExpr
=
pField
->
pExpr
;
// SExprInfo *pExpr = &pQueryAttr->pExpr3[i];
SSqlExpr
*
pse
=
&
pQueryAttr
->
pExpr2
[
i
].
base
;
pse
->
uid
=
pTableMetaInfo
->
pTableMeta
->
id
.
uid
;
...
...
@@ -3304,8 +3303,17 @@ static int32_t createSecondaryExpr(SQueryAttr* pQueryAttr, SQueryInfo* pQueryInf
pse
->
resBytes
=
pExpr
->
base
.
resBytes
;
// TODO restore refactor
int32_t
functionId
=
pExpr
->
base
.
functionId
;
if
(
pExpr
->
base
.
functionId
==
TSDB_FUNC_FIRST_DST
)
{
functionId
=
TSDB_FUNC_FIRST
;
}
else
if
(
pExpr
->
base
.
functionId
==
TSDB_FUNC_LAST_DST
)
{
functionId
=
TSDB_FUNC_LAST
;
}
else
if
(
pExpr
->
base
.
functionId
==
TSDB_FUNC_STDDEV_DST
)
{
functionId
=
TSDB_FUNC_STDDEV
;
}
int32_t
inter
=
0
;
getResultDataInfo
(
pExpr
->
base
.
colType
,
pExpr
->
base
.
colBytes
,
pExpr
->
base
.
functionId
,
0
,
&
pse
->
resType
,
getResultDataInfo
(
pExpr
->
base
.
colType
,
pExpr
->
base
.
colBytes
,
functionId
,
0
,
&
pse
->
resType
,
&
pse
->
resBytes
,
&
inter
,
0
,
false
);
pse
->
colType
=
pse
->
resType
;
pse
->
colBytes
=
pse
->
resBytes
;
...
...
src/query/inc/qExecutor.h
浏览文件 @
e5d17c95
...
...
@@ -499,7 +499,7 @@ SOperatorInfo* createGlobalAggregateOperatorInfo(SQueryRuntimeEnv* pRuntimeEnv,
SOperatorInfo
*
createSLimitOperatorInfo
(
SQueryRuntimeEnv
*
pRuntimeEnv
,
SOperatorInfo
*
upstream
,
SExprInfo
*
pExpr
,
int32_t
numOfOutput
,
void
*
merger
);
SSDataBlock
*
doGlobalAggregate
(
void
*
param
,
bool
*
newgroup
);
SSDataBlock
*
doMultiwaySort
(
void
*
param
,
bool
*
newgroup
);
SSDataBlock
*
doMultiway
Merge
Sort
(
void
*
param
,
bool
*
newgroup
);
SSDataBlock
*
doSLimit
(
void
*
param
,
bool
*
newgroup
);
SSDataBlock
*
createOutputBuf
(
SExprInfo
*
pExpr
,
int32_t
numOfOutput
,
int32_t
numOfRows
);
...
...
src/query/src/qExecutor.c
浏览文件 @
e5d17c95
...
...
@@ -954,6 +954,12 @@ static void arithmeticApplyFunctions(SQueryRuntimeEnv *pRuntimeEnv, SQLFunctionC
for
(
int32_t
k
=
0
;
k
<
numOfOutput
;
++
k
)
{
pCtx
[
k
].
startTs
=
pQueryAttr
->
window
.
skey
;
// Always set the asc order for merge stage process
if
(
pCtx
[
k
].
currentStage
==
MERGE_STAGE
)
{
pCtx
[
k
].
order
=
TSDB_ORDER_ASC
;
}
aAggs
[
pCtx
[
k
].
functionId
].
xFunction
(
&
pCtx
[
k
]);
}
}
...
...
@@ -4500,7 +4506,7 @@ SOperatorInfo *createMultiwaySortOperatorInfo(SQueryRuntimeEnv *pRuntimeEnv, SEx
pOperator
->
info
=
pInfo
;
pOperator
->
pRuntimeEnv
=
pRuntimeEnv
;
pOperator
->
numOfOutput
=
pRuntimeEnv
->
pQueryAttr
->
numOfCols
;
pOperator
->
exec
=
doMultiwaySort
;
pOperator
->
exec
=
doMultiway
Merge
Sort
;
return
pOperator
;
}
...
...
tests/script/general/parser/join_multivnode.sim
浏览文件 @
e5d17c95
...
...
@@ -142,7 +142,7 @@ if $rows != 300 then
endi
if $data00 != @70-01-01 08:01:40.990@ then
print expect 0, actual: $data00
print expect
70-01-01 08:01:40.99
0, actual: $data00
return -1
endi
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录