Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
557064d1
T
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1185
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看板
提交
557064d1
编写于
5月 08, 2020
作者:
H
hjxilinx
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[td-225] fix bugs for last(*) query
上级
e71466fd
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
12 addition
and
15 deletion
+12
-15
src/common/src/ttypes.c
src/common/src/ttypes.c
+2
-2
src/inc/taosdef.h
src/inc/taosdef.h
+1
-1
src/tsdb/src/tsdbRead.c
src/tsdb/src/tsdbRead.c
+4
-7
tests/script/general/parser/first_last.sim
tests/script/general/parser/first_last.sim
+1
-1
tests/script/general/parser/first_last_query.sim
tests/script/general/parser/first_last_query.sim
+1
-1
tests/script/general/parser/import_commit1.sim
tests/script/general/parser/import_commit1.sim
+1
-1
tests/script/general/parser/import_commit2.sim
tests/script/general/parser/import_commit2.sim
+1
-1
tests/script/general/parser/import_commit3.sim
tests/script/general/parser/import_commit3.sim
+1
-1
未找到文件。
src/common/src/ttypes.c
浏览文件 @
557064d1
...
...
@@ -92,9 +92,9 @@ bool isNull(const char *val, int32_t type) {
case
TSDB_DATA_TYPE_DOUBLE
:
return
*
(
uint64_t
*
)
val
==
TSDB_DATA_DOUBLE_NULL
;
case
TSDB_DATA_TYPE_NCHAR
:
return
*
(
uint32_t
*
)
val
==
TSDB_DATA_NCHAR_NULL
;
return
*
(
uint32_t
*
)
varDataVal
(
val
)
==
TSDB_DATA_NCHAR_NULL
;
case
TSDB_DATA_TYPE_BINARY
:
return
*
(
uint8_t
*
)
val
==
TSDB_DATA_BINARY_NULL
;
return
*
(
uint8_t
*
)
varDataVal
(
val
)
==
TSDB_DATA_BINARY_NULL
;
default:
return
false
;
};
...
...
src/inc/taosdef.h
浏览文件 @
557064d1
...
...
@@ -241,7 +241,7 @@ void tsDataSwap(void *pLeft, void *pRight, int32_t type, int32_t size);
#define TSDB_MULTI_METERMETA_MAX_NUM 100000 // maximum batch size allowed to load metermeta
#define TSDB_MIN_CACHE_BLOCK_SIZE 1
#define TSDB_MAX_CACHE_BLOCK_SIZE 10
00000
#define TSDB_MAX_CACHE_BLOCK_SIZE 10
240 // 10GB for each vnode
#define TSDB_DEFAULT_CACHE_BLOCK_SIZE 16
#define TSDB_MIN_TOTAL_BLOCKS 2
...
...
src/tsdb/src/tsdbRead.c
浏览文件 @
557064d1
...
...
@@ -335,11 +335,7 @@ static int32_t getFileCompInfo(STsdbQueryHandle* pQueryHandle, int32_t* numOfBlo
pCheckInfo
->
compSize
=
compIndex
->
len
;
}
// tsdbLoadCompBlocks(fileGroup, compIndex, pCheckInfo->pCompInfo);
STable
*
pTable
=
tsdbGetTableByUid
(
tsdbGetMeta
(
pQueryHandle
->
pTsdb
),
pCheckInfo
->
tableId
.
uid
);
assert
(
pTable
!=
NULL
);
tsdbSetHelperTable
(
&
pQueryHandle
->
rhelper
,
pTable
,
pQueryHandle
->
pTsdb
);
tsdbSetHelperTable
(
&
pQueryHandle
->
rhelper
,
pCheckInfo
->
pTableObj
,
pQueryHandle
->
pTsdb
);
tsdbLoadCompInfo
(
&
(
pQueryHandle
->
rhelper
),
(
void
*
)(
pCheckInfo
->
pCompInfo
));
SCompInfo
*
pCompInfo
=
pCheckInfo
->
pCompInfo
;
...
...
@@ -472,6 +468,7 @@ static bool loadFileDataBlock(STsdbQueryHandle* pQueryHandle, SCompBlock* pBlock
filterDataInDataBlock
(
pQueryHandle
,
pCheckInfo
,
pBlock
,
sa
);
}
else
{
// the whole block is loaded in to buffer
pQueryHandle
->
realNumOfRows
=
pBlock
->
numOfPoints
;
cur
->
pos
=
0
;
}
}
else
{
// query ended in current block
...
...
@@ -491,6 +488,7 @@ static bool loadFileDataBlock(STsdbQueryHandle* pQueryHandle, SCompBlock* pBlock
filterDataInDataBlock
(
pQueryHandle
,
pCheckInfo
,
pBlock
,
sa
);
}
else
{
pQueryHandle
->
realNumOfRows
=
pBlock
->
numOfPoints
;
cur
->
pos
=
pBlock
->
numOfPoints
-
1
;
}
}
...
...
@@ -568,7 +566,7 @@ static void filterDataInDataBlock(STsdbQueryHandle* pQueryHandle, STableCheckInf
SDataBlockInfo
blockInfo
=
getTrueDataBlockInfo
(
pCheckInfo
,
pBlock
);
SDataCols
*
pCols
=
pQueryHandle
->
rhelper
.
pDataCols
[
0
];
int32_t
endPos
=
cur
->
pos
;
if
(
ASCENDING_ORDER_TRAVERSE
(
pQueryHandle
->
order
)
&&
pQueryHandle
->
window
.
ekey
>
blockInfo
.
window
.
ekey
)
{
endPos
=
blockInfo
.
rows
-
1
;
...
...
@@ -612,7 +610,6 @@ static void filterDataInDataBlock(STsdbQueryHandle* pQueryHandle, STableCheckInf
int32_t
reqCols
=
taosArrayGetSize
(
pQueryHandle
->
pColumns
);
for
(
int32_t
i
=
0
;
i
<
reqCols
;
++
i
)
{
// int16_t colId = *(int16_t*)taosArrayGet(sa, i);
SColumnInfoData
*
pCol
=
taosArrayGet
(
pQueryHandle
->
pColumns
,
i
);
int32_t
bytes
=
pCol
->
info
.
bytes
;
...
...
tests/script/general/parser/first_last.sim
浏览文件 @
557064d1
...
...
@@ -21,7 +21,7 @@ $stb = $stbPrefix . $i
sql drop database $db -x step1
step1:
sql create database $db
rows 400 cache 4096
maxTables 4
sql create database $db
maxrows 400 cache 1
maxTables 4
sql use $db
sql create table $stb (ts timestamp, c1 int, c2 bigint, c3 float, c4 double, c5 smallint, c6 tinyint, c7 bool, c8 binary(10), c9 nchar(10)) tags(t1 int)
...
...
tests/script/general/parser/first_last_query.sim
浏览文件 @
557064d1
...
...
@@ -56,8 +56,8 @@ endi
if $data07 != 1 then
return -1
endi
#if $data08 != null then
if $data08 != BINARY then
print expect BINARY, actual: $data08
return -1
endi
#if $data09 != null then
...
...
tests/script/general/parser/import_commit1.sim
浏览文件 @
557064d1
...
...
@@ -23,7 +23,7 @@ $stb = $stbPrefix . $i
sql drop database $db -x step1
step1:
sql create database $db cache
2048
sql create database $db cache
16
print ====== create tables
sql use $db
...
...
tests/script/general/parser/import_commit2.sim
浏览文件 @
557064d1
...
...
@@ -22,7 +22,7 @@ $stb = $stbPrefix . $i
sql drop database $db -x step1
step1:
sql create database $db cache
2048
sql create database $db cache
16
print ====== create tables
sql use $db
...
...
tests/script/general/parser/import_commit3.sim
浏览文件 @
557064d1
...
...
@@ -22,7 +22,7 @@ $stb = $stbPrefix . $i
sql drop database $db -x step1
step1:
sql create database $db cache 16
384
sql create database $db cache 16
print ====== create tables
sql use $db
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录