Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
5dc2c5cd
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看板
提交
5dc2c5cd
编写于
6月 18, 2020
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[td-225] refactor subquery codes
上级
3206bf96
变更
6
展开全部
显示空白变更内容
内联
并排
Showing
6 changed file
with
393 addition
and
376 deletion
+393
-376
src/client/inc/tscLocalMerge.h
src/client/inc/tscLocalMerge.h
+6
-19
src/client/inc/tscSubquery.h
src/client/inc/tscSubquery.h
+0
-2
src/client/inc/tscUtil.h
src/client/inc/tscUtil.h
+2
-1
src/client/src/tscSubquery.c
src/client/src/tscSubquery.c
+385
-352
src/query/src/qExecutor.c
src/query/src/qExecutor.c
+0
-1
src/util/src/terror.c
src/util/src/terror.c
+0
-1
未找到文件。
src/client/inc/tscLocalMerge.h
浏览文件 @
5dc2c5cd
...
@@ -13,8 +13,8 @@
...
@@ -13,8 +13,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
*/
#ifndef TDENGINE_TSC
SECONARY
MERGE_H
#ifndef TDENGINE_TSC
LOCAL
MERGE_H
#define TDENGINE_TSC
SECONARY
MERGE_H
#define TDENGINE_TSC
LOCAL
MERGE_H
#ifdef __cplusplus
#ifdef __cplusplus
extern
"C"
{
extern
"C"
{
...
@@ -28,13 +28,6 @@ extern "C" {
...
@@ -28,13 +28,6 @@ extern "C" {
#define MAX_NUM_OF_SUBQUERY_RETRY 3
#define MAX_NUM_OF_SUBQUERY_RETRY 3
/*
* @version 0.1
* @date 2018/01/05
* @author liaohj
* management of client-side reducer for metric query
*/
struct
SQLFunctionCtx
;
struct
SQLFunctionCtx
;
typedef
struct
SLocalDataSource
{
typedef
struct
SLocalDataSource
{
...
@@ -60,7 +53,6 @@ typedef struct SLocalReducer {
...
@@ -60,7 +53,6 @@ typedef struct SLocalReducer {
char
*
prevRowOfInput
;
char
*
prevRowOfInput
;
tFilePage
*
pResultBuf
;
tFilePage
*
pResultBuf
;
int32_t
nResultBufSize
;
int32_t
nResultBufSize
;
// char * pBufForInterpo; // intermediate buffer for interpolation
tFilePage
*
pTempBuffer
;
tFilePage
*
pTempBuffer
;
struct
SQLFunctionCtx
*
pCtx
;
struct
SQLFunctionCtx
*
pCtx
;
int32_t
rowSize
;
// size of each intermediate result.
int32_t
rowSize
;
// size of each intermediate result.
...
@@ -81,13 +73,8 @@ typedef struct SLocalReducer {
...
@@ -81,13 +73,8 @@ typedef struct SLocalReducer {
}
SLocalReducer
;
}
SLocalReducer
;
typedef
struct
SSubqueryState
{
typedef
struct
SSubqueryState
{
/*
int32_t
numOfRemain
;
// the number of remain unfinished subquery
* the number of completed retrieval subquery, once this value equals to numOfVnodes,
int32_t
numOfTotal
;
// the number of total sub-queries
* all retrieval are completed.Local merge is launched.
*/
int32_t
numOfCompleted
;
int32_t
numOfTotal
;
// number of total sub-queries
int32_t
code
;
// code from subqueries
uint64_t
numOfRetrievedRows
;
// total number of points in this query
uint64_t
numOfRetrievedRows
;
// total number of points in this query
}
SSubqueryState
;
}
SSubqueryState
;
...
@@ -128,4 +115,4 @@ int32_t tscDoLocalMerge(SSqlObj *pSql);
...
@@ -128,4 +115,4 @@ int32_t tscDoLocalMerge(SSqlObj *pSql);
}
}
#endif
#endif
#endif // TDENGINE_TSC
SECONARY
MERGE_H
#endif // TDENGINE_TSC
LOCAL
MERGE_H
src/client/inc/tscSubquery.h
浏览文件 @
5dc2c5cd
...
@@ -26,11 +26,9 @@ extern "C" {
...
@@ -26,11 +26,9 @@ extern "C" {
void
tscFetchDatablockFromSubquery
(
SSqlObj
*
pSql
);
void
tscFetchDatablockFromSubquery
(
SSqlObj
*
pSql
);
void
tscSetupOutputColumnIndex
(
SSqlObj
*
pSql
);
void
tscSetupOutputColumnIndex
(
SSqlObj
*
pSql
);
int32_t
tscLaunchSecondPhaseSubqueries
(
SSqlObj
*
pSql
);
void
tscJoinQueryCallback
(
void
*
param
,
TAOS_RES
*
tres
,
int
code
);
void
tscJoinQueryCallback
(
void
*
param
,
TAOS_RES
*
tres
,
int
code
);
SJoinSupporter
*
tscCreateJoinSupporter
(
SSqlObj
*
pSql
,
SSubqueryState
*
pState
,
int32_t
index
);
SJoinSupporter
*
tscCreateJoinSupporter
(
SSqlObj
*
pSql
,
SSubqueryState
*
pState
,
int32_t
index
);
void
tscDestroyJoinSupporter
(
SJoinSupporter
*
pSupporter
);
int32_t
tscHandleMasterJoinQuery
(
SSqlObj
*
pSql
);
int32_t
tscHandleMasterJoinQuery
(
SSqlObj
*
pSql
);
...
...
src/client/inc/tscUtil.h
浏览文件 @
5dc2c5cd
...
@@ -64,7 +64,8 @@ typedef struct SJoinSupporter {
...
@@ -64,7 +64,8 @@ typedef struct SJoinSupporter {
SSubqueryState
*
pState
;
SSubqueryState
*
pState
;
SSqlObj
*
pObj
;
// parent SqlObj
SSqlObj
*
pObj
;
// parent SqlObj
int32_t
subqueryIndex
;
// index of sub query
int32_t
subqueryIndex
;
// index of sub query
int64_t
interval
;
// interval time
int64_t
intervalTime
;
// interval time
int64_t
slidingTime
;
// sliding time
SLimitVal
limit
;
// limit info
SLimitVal
limit
;
// limit info
uint64_t
uid
;
// query meter uid
uint64_t
uid
;
// query meter uid
SArray
*
colList
;
// previous query information, no need to use this attribute, and the corresponding attribution
SArray
*
colList
;
// previous query information, no need to use this attribute, and the corresponding attribution
...
...
src/client/src/tscSubquery.c
浏览文件 @
5dc2c5cd
此差异已折叠。
点击以展开。
src/query/src/qExecutor.c
浏览文件 @
5dc2c5cd
...
@@ -1216,7 +1216,6 @@ static int32_t tableApplyFunctionsOnBlock(SQueryRuntimeEnv *pRuntimeEnv, SDataBl
...
@@ -1216,7 +1216,6 @@ static int32_t tableApplyFunctionsOnBlock(SQueryRuntimeEnv *pRuntimeEnv, SDataBl
// interval query with limit applied
// interval query with limit applied
int32_t
numOfRes
=
0
;
int32_t
numOfRes
=
0
;
if
(
isIntervalQuery
(
pQuery
))
{
if
(
isIntervalQuery
(
pQuery
))
{
numOfRes
=
doCheckQueryCompleted
(
pRuntimeEnv
,
lastKey
,
pWindowResInfo
);
numOfRes
=
doCheckQueryCompleted
(
pRuntimeEnv
,
lastKey
,
pWindowResInfo
);
}
else
{
}
else
{
...
...
src/util/src/terror.c
浏览文件 @
5dc2c5cd
...
@@ -15,7 +15,6 @@
...
@@ -15,7 +15,6 @@
#include <stdint.h>
#include <stdint.h>
#include <pthread.h>
#include <pthread.h>
#include <errno.h>
#include <stdlib.h>
#include <stdlib.h>
#include <string.h>
#include <string.h>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录