Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
e45701a6
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,发现更多精彩内容 >>
提交
e45701a6
编写于
3月 28, 2020
作者:
H
hjxilinx
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-32] fix bugs in super table query
上级
ff144921
变更
7
展开全部
隐藏空白更改
内联
并排
Showing
7 changed file
with
305 addition
and
363 deletion
+305
-363
src/client/src/tscAsync.c
src/client/src/tscAsync.c
+1
-1
src/client/src/tscSecondaryMerge.c
src/client/src/tscSecondaryMerge.c
+1
-1
src/client/src/tscSubquery.c
src/client/src/tscSubquery.c
+2
-1
src/query/inc/qtsbuf.h
src/query/inc/qtsbuf.h
+4
-4
src/query/inc/queryExecutor.h
src/query/inc/queryExecutor.h
+9
-15
src/query/src/queryExecutor.c
src/query/src/queryExecutor.c
+286
-339
src/vnode/tsdb/src/tsdbMeta.c
src/vnode/tsdb/src/tsdbMeta.c
+2
-2
未找到文件。
src/client/src/tscAsync.c
浏览文件 @
e45701a6
...
...
@@ -514,7 +514,7 @@ void tscTableMetaCallBack(void *param, TAOS_RES *res, int code) {
tscTansformSQLFunctionForSTableQuery
(
pQueryInfo
);
tscIncStreamExecutionCount
(
pSql
->
pStream
);
}
else
{
tscTrace
(
"%p get tableMeta
/metricMeta
successfully"
,
pSql
);
tscTrace
(
"%p get tableMeta successfully"
,
pSql
);
}
tscDoQuery
(
pSql
);
...
...
src/client/src/tscSecondaryMerge.c
浏览文件 @
e45701a6
...
...
@@ -605,7 +605,7 @@ int32_t tscLocalReducerEnvCreate(SSqlObj *pSql, tExtMemBuffer ***pMemBuffer, tOr
SQueryInfo
*
pQueryInfo
=
tscGetQueryInfoDetail
(
pCmd
,
pCmd
->
clauseIndex
);
STableMetaInfo
*
pTableMetaInfo
=
tscGetMetaInfo
(
pQueryInfo
,
0
);
// (*pMemBuffer) = (tExtMemBuffer **)malloc(POINTER_BYTES * pTableMetaInfo->pMetricMeta->numOfVnodes
);
(
*
pMemBuffer
)
=
(
tExtMemBuffer
**
)
malloc
(
POINTER_BYTES
*
1
);
if
(
*
pMemBuffer
==
NULL
)
{
tscError
(
"%p failed to allocate memory"
,
pSql
);
pRes
->
code
=
TSDB_CODE_CLI_OUT_OF_MEMORY
;
...
...
src/client/src/tscSubquery.c
浏览文件 @
e45701a6
...
...
@@ -1011,8 +1011,9 @@ int32_t tscHandleMasterSTableQuery(SSqlObj *pSql) {
SQueryInfo
*
pQueryInfo
=
tscGetQueryInfoDetail
(
pCmd
,
pCmd
->
clauseIndex
);
STableMetaInfo
*
pTableMetaInfo
=
tscGetMetaInfo
(
pQueryInfo
,
0
);
int32_t
numOfSubQueries
=
0
;
int32_t
numOfSubQueries
=
1
;
// int32_t numOfSubQueries = pTableMetaInfo->pMetricMeta->numOfVnodes;
assert
(
numOfSubQueries
>
0
);
int32_t
ret
=
tscLocalReducerEnvCreate
(
pSql
,
&
pMemoryBuf
,
&
pDesc
,
&
pModel
,
nBufferSize
);
...
...
src/query/inc/qtsbuf.h
浏览文件 @
e45701a6
...
...
@@ -48,10 +48,10 @@ typedef struct STSElem {
}
STSElem
;
typedef
struct
STSCursor
{
int32_t
vnodeIndex
;
int32_t
blockIndex
;
int32_t
tsIndex
;
int32_t
order
;
int32_t
vnodeIndex
;
int32_t
blockIndex
;
int32_t
tsIndex
;
u
int32_t
order
;
}
STSCursor
;
typedef
struct
STSBlock
{
...
...
src/query/inc/queryExecutor.h
浏览文件 @
e45701a6
...
...
@@ -32,12 +32,6 @@ typedef struct SData {
char
data
[];
}
SData
;
enum
{
// ST_QUERY_KILLED = 0, // query killed
ST_QUERY_PAUSED
=
1
,
// query paused, due to full of the response buffer
ST_QUERY_COMPLETED
=
2
,
// query completed
};
struct
SColumnFilterElem
;
typedef
bool
(
*
__filter_func_t
)(
struct
SColumnFilterElem
*
pFilter
,
char
*
val1
,
char
*
val2
);
typedef
int32_t
(
*
__block_search_fn_t
)(
char
*
data
,
int32_t
num
,
int64_t
key
,
int32_t
order
);
...
...
@@ -60,18 +54,20 @@ typedef struct SWindowStatus {
}
SWindowStatus
;
typedef
struct
SWindowResult
{
uint16_t
numOfRows
;
uint16_t
numOfRows
;
// number of rows of current time window
SPosInfo
pos
;
// Position of current result in disk-based output buffer
SResultInfo
*
resultInfo
;
// For each result column, there is a resultInfo
STimeWindow
window
;
// The time window that current result covers.
SWindowStatus
status
;
SWindowStatus
status
;
// this result status: closed or opened
}
SWindowResult
;
typedef
struct
SResultRec
{
int64_t
total
;
int64_t
size
;
int64_t
capacity
;
int32_t
threshold
;
// the threshold size, when the number of rows in result buffer, return to client
int64_t
total
;
// total generated result size in rows
int64_t
size
;
// current result set size in rows
int64_t
capacity
;
// capacity of current result output buffer
// result size threshold in rows. If the result buffer is larger than this, pause query and return to client
int32_t
threshold
;
}
SResultRec
;
typedef
struct
SWindowResInfo
{
...
...
@@ -99,7 +95,6 @@ typedef struct SSingleColumnFilterInfo {
void
*
pData
;
}
SSingleColumnFilterInfo
;
/* intermediate pos during multimeter query involves interval */
typedef
struct
STableQueryInfo
{
int64_t
lastKey
;
STimeWindow
win
;
...
...
@@ -107,7 +102,7 @@ typedef struct STableQueryInfo {
int16_t
queryRangeSet
;
// denote if the query range is set, only available for interval query
int64_t
tag
;
STSCursor
cur
;
int32_t
s
id
;
// for retrieve the page id list
int32_t
t
id
;
// for retrieve the page id list
SWindowResInfo
windowResInfo
;
}
STableQueryInfo
;
...
...
@@ -116,7 +111,6 @@ typedef struct STableDataInfo {
int32_t
numOfBlocks
;
int32_t
start
;
// start block index
int32_t
tableIndex
;
void
*
pMeterObj
;
int32_t
groupIdx
;
// group id in table list
STableQueryInfo
*
pTableQInfo
;
}
STableDataInfo
;
...
...
src/query/src/queryExecutor.c
浏览文件 @
e45701a6
此差异已折叠。
点击以展开。
src/vnode/tsdb/src/tsdbMeta.c
浏览文件 @
e45701a6
...
...
@@ -349,10 +349,10 @@ static int tsdbAddTableToMeta(STsdbMeta *pMeta, STable *pTable, bool addIdx) {
}
else
{
// add non-super table to the array
pMeta
->
tables
[
pTable
->
tableId
.
tid
]
=
pTable
;
if
(
pTable
->
type
==
TSDB_CHILD_TABLE
)
{
// add STABLE to the index
if
(
pTable
->
type
==
TSDB_CHILD_TABLE
&&
addIdx
)
{
// add STABLE to the index
tsdbAddTableIntoIndex
(
pMeta
,
pTable
);
}
pMeta
->
nTables
++
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录