Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
a29327ef
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看板
提交
a29327ef
编写于
11月 19, 2020
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-225]
上级
bc8fb310
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
8 addition
and
49 deletion
+8
-49
src/client/src/tscLocalMerge.c
src/client/src/tscLocalMerge.c
+2
-2
src/client/src/tscSql.c
src/client/src/tscSql.c
+3
-44
src/client/src/tscSubquery.c
src/client/src/tscSubquery.c
+3
-3
未找到文件。
src/client/src/tscLocalMerge.c
浏览文件 @
a29327ef
...
...
@@ -884,11 +884,11 @@ static void genFinalResWithoutFill(SSqlRes* pRes, SLocalReducer *pLocalReducer,
tFilePage
*
pBeforeFillData
=
pLocalReducer
->
pResultBuf
;
pRes
->
data
=
pLocalReducer
->
pFinalRes
;
pRes
->
numOfRows
=
pBeforeFillData
->
num
;
pRes
->
numOfRows
=
(
int32_t
)
pBeforeFillData
->
num
;
if
(
pQueryInfo
->
limit
.
offset
>
0
)
{
if
(
pQueryInfo
->
limit
.
offset
<
pRes
->
numOfRows
)
{
int32_t
prevSize
=
(
int32_t
)
pBeforeFillData
->
num
;
int32_t
prevSize
=
(
int32_t
)
pBeforeFillData
->
num
;
tColModelErase
(
pLocalReducer
->
finalModel
,
pBeforeFillData
,
prevSize
,
0
,
(
int32_t
)
pQueryInfo
->
limit
.
offset
-
1
);
/* remove the hole in column model */
...
...
src/client/src/tscSql.c
浏览文件 @
a29327ef
...
...
@@ -394,7 +394,7 @@ int taos_affected_rows(TAOS_RES *tres) {
SSqlObj
*
pSql
=
(
SSqlObj
*
)
tres
;
if
(
pSql
==
NULL
||
pSql
->
signature
!=
pSql
)
return
0
;
return
(
int
)(
pSql
->
res
.
numOfRows
)
;
return
pSql
->
res
.
numOfRows
;
}
TAOS_FIELD
*
taos_fetch_fields
(
TAOS_RES
*
res
)
{
...
...
@@ -440,53 +440,12 @@ int taos_retrieve(TAOS_RES *res) {
tscResetForNextRetrieve
(
pRes
);
if
(
pCmd
->
command
<
TSDB_SQL_LOCAL
)
{
pCmd
->
command
=
(
pCmd
->
command
>
TSDB_SQL_MGMT
)
?
TSDB_SQL_RETRIEVE
:
TSDB_SQL_FETCH
;
}
tscProcessSql
(
pSql
);
return
(
int
)
pRes
->
numOfRows
;
}
int
taos_fetch_block_impl
(
TAOS_RES
*
res
,
TAOS_ROW
*
rows
)
{
SSqlObj
*
pSql
=
(
SSqlObj
*
)
res
;
SSqlCmd
*
pCmd
=
&
pSql
->
cmd
;
SSqlRes
*
pRes
=
&
pSql
->
res
;
if
(
pRes
->
qhandle
==
0
||
pSql
->
signature
!=
pSql
)
{
*
rows
=
NULL
;
return
0
;
}
// Retrieve new block
tscResetForNextRetrieve
(
pRes
);
if
(
pCmd
->
command
<
TSDB_SQL_LOCAL
)
{
pCmd
->
command
=
(
pCmd
->
command
>
TSDB_SQL_MGMT
)
?
TSDB_SQL_RETRIEVE
:
TSDB_SQL_FETCH
;
}
tscProcessSql
(
pSql
);
if
(
pRes
->
numOfRows
==
0
)
{
*
rows
=
NULL
;
return
0
;
}
// secondary merge has handle this situation
if
(
pCmd
->
command
!=
TSDB_SQL_RETRIEVE_LOCALMERGE
)
{
pRes
->
numOfClauseTotal
+=
pRes
->
numOfRows
;
}
SQueryInfo
*
pQueryInfo
=
tscGetQueryInfoDetail
(
pCmd
,
0
);
if
(
pQueryInfo
==
NULL
)
return
0
;
assert
(
0
);
for
(
int
i
=
0
;
i
<
pQueryInfo
->
fieldsInfo
.
numOfOutput
;
++
i
)
{
tscGetResultColumnChr
(
pRes
,
&
pQueryInfo
->
fieldsInfo
,
i
,
0
);
}
*
rows
=
pRes
->
tsrow
;
return
(
int
)((
pQueryInfo
->
order
.
order
==
TSDB_ORDER_DESC
)
?
pRes
->
numOfRows
:
-
pRes
->
numOfRows
);
return
pRes
->
numOfRows
;
}
static
bool
needToFetchNewBlock
(
SSqlObj
*
pSql
)
{
...
...
@@ -573,7 +532,7 @@ int taos_fetch_block(TAOS_RES *res, TAOS_ROW *rows) {
*
rows
=
pRes
->
urow
;
tscClearSqlOwner
(
pSql
);
return
(
int32_t
)
pRes
->
numOfRows
;
return
pRes
->
numOfRows
;
}
int
taos_select_db
(
TAOS
*
taos
,
const
char
*
db
)
{
...
...
src/client/src/tscSubquery.c
浏览文件 @
a29327ef
...
...
@@ -948,7 +948,7 @@ static void tsCompRetrieveCallback(void* param, TAOS_RES* tres, int32_t numOfRow
if
(
!
pRes
->
completed
)
{
taosGetTmpfilePath
(
"ts-join"
,
pSupporter
->
path
);
pSupporter
->
f
=
fopen
(
pSupporter
->
path
,
"w"
);
pRes
->
row
=
(
int32_t
)
pRes
->
numOfRows
;
pRes
->
row
=
pRes
->
numOfRows
;
taos_fetch_rows_a
(
tres
,
tsCompRetrieveCallback
,
param
);
return
;
...
...
@@ -974,7 +974,7 @@ static void tsCompRetrieveCallback(void* param, TAOS_RES* tres, int32_t numOfRow
// TODO check for failure
pSupporter
->
f
=
fopen
(
pSupporter
->
path
,
"w"
);
pRes
->
row
=
(
int32_t
)
pRes
->
numOfRows
;
pRes
->
row
=
pRes
->
numOfRows
;
// set the callback function
pSql
->
fp
=
tscJoinQueryCallback
;
...
...
@@ -2059,7 +2059,7 @@ static void tscRetrieveFromDnodeCallBack(void *param, TAOS_RES *tres, int numOfR
}
int32_t
ret
=
saveToBuffer
(
trsupport
->
pExtMemBuffer
[
idx
],
pDesc
,
trsupport
->
localBuffer
,
pRes
->
data
,
(
int32_t
)
pRes
->
numOfRows
,
pQueryInfo
->
groupbyExpr
.
orderType
);
pRes
->
numOfRows
,
pQueryInfo
->
groupbyExpr
.
orderType
);
if
(
ret
!=
0
)
{
// set no disk space error info, and abort retry
tscAbortFurtherRetryRetrieval
(
trsupport
,
tres
,
TSDB_CODE_TSC_NO_DISKSPACE
);
}
else
if
(
pRes
->
completed
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录