Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
f126b8d5
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看板
提交
f126b8d5
编写于
10月 29, 2020
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[td-1826]
上级
1620cc52
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
14 addition
and
11 deletion
+14
-11
src/client/inc/tsclient.h
src/client/inc/tsclient.h
+1
-1
src/client/src/tscLocalMerge.c
src/client/src/tscLocalMerge.c
+6
-6
src/client/src/tscSQLParser.c
src/client/src/tscSQLParser.c
+6
-3
src/query/src/qExecutor.c
src/query/src/qExecutor.c
+1
-1
未找到文件。
src/client/inc/tsclient.h
浏览文件 @
f126b8d5
...
...
@@ -127,7 +127,7 @@ typedef struct STableMetaInfo {
typedef
struct
SSqlExpr
{
char
aliasName
[
TSDB_COL_NAME_LEN
];
// as aliasName
SColIndex
colInfo
;
int64_t
uid
;
// refactor use the pointer
uint64_t
uid
;
// refactor use the pointer
int16_t
functionId
;
// function id in aAgg array
int16_t
resType
;
// return value type
int16_t
resBytes
;
// length of return value
...
...
src/client/src/tscLocalMerge.c
浏览文件 @
f126b8d5
...
...
@@ -1253,10 +1253,11 @@ bool genFinalResults(SSqlObj *pSql, SLocalReducer *pLocalReducer, bool noMoreCur
return
true
;
}
void
resetOutputBuf
(
SQueryInfo
*
pQueryInfo
,
SLocalReducer
*
pLocalReducer
)
{
// reset output buffer to the beginning
for
(
int32_t
i
=
0
;
i
<
pQueryInfo
->
fieldsInfo
.
numOfOutput
;
++
i
)
{
pLocalReducer
->
pCtx
[
i
].
aOutputBuf
=
pLocalReducer
->
pResultBuf
->
data
+
tscFieldInfoGetOffset
(
pQueryInfo
,
i
)
*
pLocalReducer
->
resColModel
->
capacity
;
void
resetOutputBuf
(
SQueryInfo
*
pQueryInfo
,
SLocalReducer
*
pLocalReducer
)
{
// reset output buffer to the beginning
size_t
t
=
tscSqlExprNumOfExprs
(
pQueryInfo
);
for
(
int32_t
i
=
0
;
i
<
t
;
++
i
)
{
SSqlExpr
*
pExpr
=
tscSqlExprGet
(
pQueryInfo
,
i
);
pLocalReducer
->
pCtx
[
i
].
aOutputBuf
=
pLocalReducer
->
pResultBuf
->
data
+
pExpr
->
offset
*
pLocalReducer
->
resColModel
->
capacity
;
}
memset
(
pLocalReducer
->
pResultBuf
,
0
,
pLocalReducer
->
nResultBufSize
+
sizeof
(
tFilePage
));
...
...
@@ -1501,8 +1502,7 @@ int32_t tscDoLocalMerge(SSqlObj *pSql) {
if
(
pLocalReducer
->
discard
&&
sameGroup
)
{
pLocalReducer
->
hasUnprocessedRow
=
false
;
tmpBuffer
->
num
=
0
;
}
else
{
// current row does not belongs to the previous group, so it is not be handled yet.
}
else
{
// current row does not belongs to the previous group, so it is not be handled yet.
pLocalReducer
->
hasUnprocessedRow
=
true
;
}
...
...
src/client/src/tscSQLParser.c
浏览文件 @
f126b8d5
...
...
@@ -5281,11 +5281,14 @@ void addGroupInfoForSubquery(SSqlObj* pParentObj, SSqlObj* pSql, int32_t subClau
if
(
pParentQueryInfo
->
groupbyExpr
.
numOfGroupCols
>
0
)
{
SQueryInfo
*
pQueryInfo
=
tscGetQueryInfoDetail
(
&
pSql
->
cmd
,
subClauseIndex
);
size_t
size
=
taosArrayGetSize
(
pQueryInfo
->
exprList
)
;
SSqlExpr
*
pExpr
=
NULL
;
SSqlExpr
*
pExpr
=
tscSqlExprGet
(
pQueryInfo
,
(
int32_t
)
size
-
1
);
size_t
size
=
taosArrayGetSize
(
pQueryInfo
->
exprList
);
if
(
size
>
0
)
{
pExpr
=
tscSqlExprGet
(
pQueryInfo
,
(
int32_t
)
size
-
1
);
}
if
(
pExpr
->
functionId
!=
TSDB_FUNC_TAG
)
{
if
(
pExpr
==
NULL
||
pExpr
->
functionId
!=
TSDB_FUNC_TAG
)
{
STableMetaInfo
*
pTableMetaInfo
=
tscGetMetaInfo
(
pParentQueryInfo
,
tableIndex
);
int16_t
colId
=
tscGetJoinTagColIdByUid
(
&
pQueryInfo
->
tagCond
,
pTableMetaInfo
->
pTableMeta
->
id
.
uid
);
...
...
src/query/src/qExecutor.c
浏览文件 @
f126b8d5
...
...
@@ -5168,7 +5168,7 @@ static void doSaveContext(SQInfo *pQInfo) {
SWITCH_ORDER
(
pQuery
->
order
.
order
);
if
(
pRuntimeEnv
->
pTSBuf
!=
NULL
)
{
pRuntimeEnv
->
pTSBuf
->
cur
.
order
=
pQuery
->
order
.
order
;
SWITCH_ORDER
(
pRuntimeEnv
->
pTSBuf
->
cur
.
order
)
;
}
STsdbQueryCond
cond
=
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录