Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
CSDN产品汪
TDengine
提交
e8120443
T
TDengine
项目概览
CSDN产品汪
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
5
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
e8120443
编写于
5月 13, 2020
作者:
H
hjLiao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[td-225]
上级
ebff0807
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
15 addition
and
11 deletion
+15
-11
src/client/src/tscSecondaryMerge.c
src/client/src/tscSecondaryMerge.c
+2
-1
src/query/src/queryExecutor.c
src/query/src/queryExecutor.c
+1
-1
src/tsdb/src/tsdbRead.c
src/tsdb/src/tsdbRead.c
+10
-8
tests/script/general/import/replica1.sim
tests/script/general/import/replica1.sim
+2
-1
未找到文件。
src/client/src/tscSecondaryMerge.c
浏览文件 @
e8120443
...
...
@@ -283,7 +283,6 @@ void tscCreateLocalReducer(tExtMemBuffer **pMemBuffer, int32_t numOfBuffer, tOrd
// used to keep the latest input row
pReducer
->
pTempBuffer
=
(
tFilePage
*
)
calloc
(
1
,
pReducer
->
rowSize
+
sizeof
(
tFilePage
));
pReducer
->
discardData
=
(
tFilePage
*
)
calloc
(
1
,
pReducer
->
rowSize
+
sizeof
(
tFilePage
));
pReducer
->
discard
=
false
;
...
...
@@ -311,6 +310,8 @@ void tscCreateLocalReducer(tExtMemBuffer **pMemBuffer, int32_t numOfBuffer, tOrd
return
;
}
size
=
tscSqlExprNumOfExprs
(
pQueryInfo
);
pReducer
->
pTempBuffer
->
numOfElems
=
0
;
pReducer
->
pResInfo
=
calloc
(
size
,
sizeof
(
SResultInfo
));
...
...
src/query/src/queryExecutor.c
浏览文件 @
e8120443
...
...
@@ -2399,7 +2399,7 @@ static int64_t doScanAllDataBlocks(SQueryRuntimeEnv *pRuntimeEnv) {
// todo extract methods
if
(
isIntervalQuery
(
pQuery
)
&&
pRuntimeEnv
->
windowResInfo
.
prevSKey
==
0
)
{
TSKEY
skey1
,
ekey1
;
STimeWindow
w
=
{
0
}
;
STimeWindow
w
=
TSWINDOW_INITIALIZER
;
SWindowResInfo
*
pWindowResInfo
=
&
pRuntimeEnv
->
windowResInfo
;
if
(
QUERY_IS_ASC_QUERY
(
pQuery
))
{
...
...
src/tsdb/src/tsdbRead.c
浏览文件 @
e8120443
...
...
@@ -54,12 +54,12 @@ typedef struct SQueryFilePos {
typedef
struct
SDataBlockLoadInfo
{
SFileGroup
*
fileGroup
;
int32_t
slot
;
int32_t
s
id
;
int32_t
t
id
;
SArray
*
pLoadedCols
;
}
SDataBlockLoadInfo
;
typedef
struct
SLoadCompBlockInfo
{
int32_t
sid
;
/* table s
id */
int32_t
tid
;
/* table t
id */
int32_t
fileId
;
int32_t
fileListIndex
;
}
SLoadCompBlockInfo
;
...
...
@@ -127,12 +127,12 @@ static void changeQueryHandleForLastrowQuery(TsdbQueryHandleT pqHandle);
static
void
tsdbInitDataBlockLoadInfo
(
SDataBlockLoadInfo
*
pBlockLoadInfo
)
{
pBlockLoadInfo
->
slot
=
-
1
;
pBlockLoadInfo
->
s
id
=
-
1
;
pBlockLoadInfo
->
t
id
=
-
1
;
pBlockLoadInfo
->
fileGroup
=
NULL
;
}
static
void
tsdbInitCompBlockLoadInfo
(
SLoadCompBlockInfo
*
pCompBlockLoadInfo
)
{
pCompBlockLoadInfo
->
s
id
=
-
1
;
pCompBlockLoadInfo
->
t
id
=
-
1
;
pCompBlockLoadInfo
->
fileId
=
-
1
;
pCompBlockLoadInfo
->
fileListIndex
=
-
1
;
}
...
...
@@ -423,7 +423,7 @@ static bool doLoadFileDataBlock(STsdbQueryHandle* pQueryHandle, SCompBlock* pBlo
bool
blockLoaded
=
false
;
SArray
*
sa
=
getDefaultLoadColumns
(
pQueryHandle
,
true
);
if
(
pCheckInfo
->
pDataCols
==
NULL
)
{
if
(
pCheckInfo
->
pDataCols
==
NULL
)
{
// todo: why not the real data?
pCheckInfo
->
pDataCols
=
tdNewDataCols
(
pRepo
->
tsdbMeta
->
maxRowBytes
,
pRepo
->
tsdbMeta
->
maxCols
,
pRepo
->
config
.
maxRowsPerFileBlock
);
}
...
...
@@ -434,7 +434,7 @@ static bool doLoadFileDataBlock(STsdbQueryHandle* pQueryHandle, SCompBlock* pBlo
pBlockLoadInfo
->
fileGroup
=
pQueryHandle
->
pFileGroup
;
pBlockLoadInfo
->
slot
=
pQueryHandle
->
cur
.
slot
;
pBlockLoadInfo
->
s
id
=
pCheckInfo
->
pTableObj
->
tableId
.
tid
;
pBlockLoadInfo
->
t
id
=
pCheckInfo
->
pTableObj
->
tableId
.
tid
;
blockLoaded
=
true
;
}
...
...
@@ -614,7 +614,7 @@ static void filterDataInDataBlock(STsdbQueryHandle* pQueryHandle, STableCheckInf
SColumnInfoData
*
pCol
=
taosArrayGet
(
pQueryHandle
->
pColumns
,
i
);
int32_t
bytes
=
pCol
->
info
.
bytes
;
for
(
int32_t
j
=
0
;
j
<
numOfCols
;
++
j
)
{
for
(
int32_t
j
=
0
;
j
<
numOfCols
;
++
j
)
{
//todo opt performance
SDataCol
*
src
=
&
pQueryHandle
->
rhelper
.
pDataCols
[
0
]
->
cols
[
j
];
if
(
pCol
->
info
.
colId
==
src
->
colId
)
{
...
...
@@ -1197,7 +1197,9 @@ SArray* tsdbRetrieveDataBlock(TsdbQueryHandleT* pQueryHandle, SArray* pIdList) {
}
else
{
// data block has been loaded, todo extract method
SDataBlockLoadInfo
*
pBlockLoadInfo
=
&
pHandle
->
dataBlockLoadInfo
;
if
(
pBlockLoadInfo
->
slot
==
pHandle
->
cur
.
slot
&&
pBlockLoadInfo
->
sid
==
pCheckInfo
->
pTableObj
->
tableId
.
tid
)
{
if
(
pBlockLoadInfo
->
slot
==
pHandle
->
cur
.
slot
&&
pBlockLoadInfo
->
fileGroup
->
fileId
==
pHandle
->
cur
.
fid
&&
pBlockLoadInfo
->
tid
==
pCheckInfo
->
pTableObj
->
tableId
.
tid
)
{
return
pHandle
->
pColumns
;
}
else
{
SCompBlock
*
pBlock
=
pBlockInfoEx
->
pBlock
.
compBlock
;
...
...
tests/script/general/import/replica1.sim
浏览文件 @
e8120443
...
...
@@ -111,7 +111,8 @@ sql import into tb values(1520000034001, 34001)
sql import into tb values(1520000050001, 50001)
sql select * from tb;
print $rows
if $rows != 19 then
if $rows != 19 then
print expect 19, actual: $rows
return -1
endi
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录