Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
82241b37
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看板
提交
82241b37
编写于
4月 23, 2020
作者:
H
hjxilinx
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[td-171] fix bugs in time filter in super table query.
上级
b7b8edf2
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
20 addition
and
27 deletion
+20
-27
cmake/platform.inc
cmake/platform.inc
+1
-1
src/client/src/tscSubquery.c
src/client/src/tscSubquery.c
+1
-1
src/query/src/queryExecutor.c
src/query/src/queryExecutor.c
+7
-9
src/tsdb/src/tsdbRead.c
src/tsdb/src/tsdbRead.c
+8
-13
src/util/src/talgo.c
src/util/src/talgo.c
+3
-3
未找到文件。
cmake/platform.inc
浏览文件 @
82241b37
...
...
@@ -62,7 +62,7 @@ IF (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
IF
(
$
{
CMAKE_SIZEOF_VOID_P
}
MATCHES
8
)
SET
(
TD_LINUX_64
TRUE
)
SET
(
TD_OS_DIR
$
{
TD_COMMUNITY_DIR
}
/
src
/
os
/
linux
)
ADD_DEFINITIONS
(
-
D_M_X64
)
ADD_DEFINITIONS
(
-
D_M_X64
-
D_DEBUG_VIEW
)
MESSAGE
(
STATUS
"The current platform is Linux 64-bit"
)
ELSEIF
(
$
{
CMAKE_SIZEOF_VOID_P
}
MATCHES
4
)
IF
(
TD_ARM
)
...
...
src/client/src/tscSubquery.c
浏览文件 @
82241b37
...
...
@@ -1355,7 +1355,7 @@ static void tscRetrieveFromDnodeCallBack(void *param, TAOS_RES *tres, int numOfR
}
#ifdef _DEBUG_VIEW
printf
(
"received data from vnode: %
d
rows
\n
"
,
pRes
->
numOfRows
);
printf
(
"received data from vnode: %
"
PRIu64
"
rows
\n
"
,
pRes
->
numOfRows
);
SSrcColumnInfo
colInfo
[
256
]
=
{
0
};
tscGetSrcColumnInfo
(
colInfo
,
pQueryInfo
);
...
...
src/query/src/queryExecutor.c
浏览文件 @
82241b37
...
...
@@ -1036,9 +1036,8 @@ static int32_t doTSJoinFilter(SQueryRuntimeEnv *pRuntimeEnv, int32_t offset) {
TSKEY
key
=
*
(
TSKEY
*
)(
pCtx
[
0
].
aInputElemBuf
+
TSDB_KEYSIZE
*
offset
);
#if defined(_DEBUG_VIEW)
printf
(
"elem in comp ts file:%"
PRId64
", key:%"
PRId64
", tag:%d, id:%s, query order:%d, ts order:%d, traverse:%d, index:%d
\n
"
,
elem
.
ts
,
key
,
elem
.
tag
,
pRuntimeEnv
->
pTabObj
->
meterId
,
pQuery
->
order
.
order
,
pRuntimeEnv
->
pTSBuf
->
tsOrder
,
printf
(
"elem in comp ts file:%"
PRId64
", key:%"
PRId64
", tag:%"
PRIu64
", query order:%d, ts order:%d, traverse:%d, index:%d
\n
"
,
elem
.
ts
,
key
,
elem
.
tag
,
pQuery
->
order
.
order
,
pRuntimeEnv
->
pTSBuf
->
tsOrder
,
pRuntimeEnv
->
pTSBuf
->
cur
.
order
,
pRuntimeEnv
->
pTSBuf
->
cur
.
tsIndex
);
#endif
...
...
@@ -2312,8 +2311,7 @@ SArray *loadDataBlockOnDemand(SQueryRuntimeEnv *pRuntimeEnv, SDataBlockInfo *pBl
*/
if
(
!
needToLoadDataBlock
(
pQuery
,
*
pStatis
,
pRuntimeEnv
->
pCtx
,
pBlockInfo
->
rows
))
{
#if defined(_DEBUG_VIEW)
qTrace
(
"QInfo:%p fileId:%d, slot:%d, block discarded by per-filter"
,
GET_QINFO_ADDR
(
pQuery
),
pQuery
->
fileId
,
pQuery
->
slot
);
qTrace
(
"QInfo:%p block discarded by per-filter"
,
GET_QINFO_ADDR
(
pRuntimeEnv
));
#endif
// return DISK_DATA_DISCARDED;
}
...
...
@@ -2946,7 +2944,7 @@ int32_t mergeIntoGroupResultImpl(SQInfo *pQInfo, SArray *pGroup) {
int64_t
endt
=
taosGetTimestampMs
();
#ifdef _DEBUG_VIEW
displayInterResult
(
pQuery
->
sdata
,
pQuery
,
pQuery
->
sdata
[
0
]
->
len
);
displayInterResult
(
pQuery
->
sdata
,
pQuery
,
pQuery
->
sdata
[
0
]
->
num
);
#endif
qTrace
(
"QInfo:%p result merge completed, elapsed time:%"
PRId64
" ms"
,
GET_QINFO_ADDR
(
pQuery
),
endt
-
startt
);
...
...
@@ -4337,7 +4335,7 @@ static int64_t queryOnDataBlocks(SQInfo *pQInfo) {
SDataStatis
*
pStatis
=
NULL
;
SArray
*
pDataBlock
=
loadDataBlockOnDemand
(
pRuntimeEnv
,
&
blockInfo
,
&
pStatis
);
TSKEY
nextKey
=
blockInfo
.
window
.
e
key
;
TSKEY
nextKey
=
blockInfo
.
window
.
s
key
;
if
(
!
isIntervalQuery
(
pQuery
))
{
setExecutionContext
(
pQInfo
,
pTableQueryInfo
,
pTable
,
pTableDataInfo
->
groupIdx
,
nextKey
);
}
else
{
// interval query
...
...
@@ -4784,7 +4782,7 @@ static void multiTableQueryProcess(SQInfo *pQInfo) {
copyResToQueryResultBuf
(
pQInfo
,
pQuery
);
#ifdef _DEBUG_VIEW
displayInterResult
(
pQuery
->
sdata
,
pQuery
,
pQuery
->
sdata
[
0
]
->
len
);
displayInterResult
(
pQuery
->
sdata
,
pQuery
,
pQuery
->
sdata
[
0
]
->
num
);
#endif
}
else
{
copyFromWindowResToSData
(
pQInfo
,
pRuntimeEnv
->
windowResInfo
.
pResult
);
...
...
@@ -4845,7 +4843,7 @@ static void multiTableQueryProcess(SQInfo *pQInfo) {
copyResToQueryResultBuf
(
pQInfo
,
pQuery
);
#ifdef _DEBUG_VIEW
displayInterResult
(
pQuery
->
sdata
,
pQuery
,
pQuery
->
sdata
[
0
]
->
len
);
displayInterResult
(
pQuery
->
sdata
,
pQuery
,
pQuery
->
sdata
[
0
]
->
num
);
#endif
}
}
else
{
// not a interval query
...
...
src/tsdb/src/tsdbRead.c
浏览文件 @
82241b37
...
...
@@ -442,11 +442,13 @@ static bool loadFileDataBlock(STsdbQueryHandle* pQueryHandle, SCompBlock* pBlock
if
(
!
doLoadFileDataBlock
(
pQueryHandle
,
pBlock
,
pCheckInfo
))
{
return
false
;
}
SDataCols
*
pDataCols
=
pCheckInfo
->
pDataCols
;
SDataCols
*
pCols
=
pQueryHandle
->
rhelper
.
pDataCols
[
0
];
assert
(
pCols
->
numOfPoints
==
pBlock
->
numOfPoints
);
if
(
pCheckInfo
->
lastKey
>
pBlock
->
keyFirst
)
{
cur
->
pos
=
binarySearchForKey
(
p
Data
Cols
->
cols
[
0
].
pData
,
pBlock
->
numOfPoints
,
pCheckInfo
->
lastKey
,
pQueryHandle
->
order
);
binarySearchForKey
(
pCols
->
cols
[
0
].
pData
,
pBlock
->
numOfPoints
,
pCheckInfo
->
lastKey
,
pQueryHandle
->
order
);
}
else
{
cur
->
pos
=
0
;
}
...
...
@@ -548,8 +550,9 @@ static void filterDataInDataBlock(STsdbQueryHandle* pQueryHandle, STableCheckInf
SArray
*
sa
)
{
SQueryFilePos
*
cur
=
&
pQueryHandle
->
cur
;
SDataBlockInfo
blockInfo
=
getTrueDataBlockInfo
(
pCheckInfo
,
pBlock
);
SDataCols
*
pCols
=
pCheckInfo
->
pDataCols
;
// pQueryHandle->rhelper.pDataCols[0]->cols[0];
SDataCols
*
pCols
=
pQueryHandle
->
rhelper
.
pDataCols
[
0
];
int32_t
endPos
=
cur
->
pos
;
if
(
ASCENDING_ORDER_TRAVERSE
(
pQueryHandle
->
order
)
&&
pQueryHandle
->
window
.
ekey
>
blockInfo
.
window
.
ekey
)
{
...
...
@@ -1335,10 +1338,6 @@ SArray* createTableGroup(SArray* pTableList, STSchema* pTagSchema, SColIndex* pC
taosArrayPush
(
pTableGroup
,
&
sa
);
uTrace
(
"all %d tables belong to one group"
,
size
);
#ifdef _DEBUG_VIEW
tSidSetDisplay
(
pTableGroup
);
#endif
}
else
{
STableGroupSupporter
*
pSupp
=
(
STableGroupSupporter
*
)
calloc
(
1
,
sizeof
(
STableGroupSupporter
));
pSupp
->
numOfCols
=
numOfOrderCols
;
...
...
@@ -1347,10 +1346,6 @@ SArray* createTableGroup(SArray* pTableList, STSchema* pTagSchema, SColIndex* pC
taosqsort
(
pTableList
->
pData
,
size
,
POINTER_BYTES
,
pSupp
,
tableGroupComparFn
);
createTableGroupImpl
(
pTableGroup
,
pTableList
->
pData
,
size
,
pSupp
,
tableGroupComparFn
);
#ifdef _DEBUG_VIEW
tSidSetDisplay
(
pTableGroup
);
#endif
tfree
(
pSupp
);
}
...
...
src/util/src/talgo.c
浏览文件 @
82241b37
...
...
@@ -42,9 +42,9 @@ static void median(void *src, size_t size, size_t s, size_t e, const void *param
assert
(
comparFn
(
elePtrAt
(
src
,
size
,
mid
),
elePtrAt
(
src
,
size
,
s
),
param
)
<=
0
&&
comparFn
(
elePtrAt
(
src
,
size
,
s
),
elePtrAt
(
src
,
size
,
e
),
param
)
<=
0
);
#ifdef _DEBUG_VIEW
tTagsPrints
(
src
[
s
],
pOrderDesc
->
pColumnModel
,
&
pOrderDesc
->
orderIdx
);
tTagsPrints
(
src
[
mid
],
pOrderDesc
->
pColumnModel
,
&
pOrderDesc
->
orderIdx
);
tTagsPrints
(
src
[
e
],
pOrderDesc
->
pColumnModel
,
&
pOrderDesc
->
orderIdx
);
//
tTagsPrints(src[s], pOrderDesc->pColumnModel, &pOrderDesc->orderIdx);
//
tTagsPrints(src[mid], pOrderDesc->pColumnModel, &pOrderDesc->orderIdx);
//
tTagsPrints(src[e], pOrderDesc->pColumnModel, &pOrderDesc->orderIdx);
#endif
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录