Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
b445afb5
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
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看板
提交
b445afb5
编写于
5月 31, 2022
作者:
X
Xiaoyu Wang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: stable interval split
上级
0b99a1b3
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
101 addition
and
65 deletion
+101
-65
source/libs/parser/test/mockCatalog.cpp
source/libs/parser/test/mockCatalog.cpp
+2
-2
source/libs/parser/test/mockCatalogService.cpp
source/libs/parser/test/mockCatalogService.cpp
+27
-2
source/libs/parser/test/mockCatalogService.h
source/libs/parser/test/mockCatalogService.h
+1
-0
source/libs/planner/src/planSpliter.c
source/libs/planner/src/planSpliter.c
+64
-60
source/libs/planner/test/planIntervalTest.cpp
source/libs/planner/test/planIntervalTest.cpp
+7
-1
未找到文件。
source/libs/parser/test/mockCatalog.cpp
浏览文件 @
b445afb5
...
...
@@ -188,8 +188,8 @@ int32_t __catalogGetDBVgVersion(SCatalog* pCtg, const char* dbFName, int32_t* ve
}
int32_t
__catalogGetDBVgInfo
(
SCatalog
*
pCtg
,
void
*
pRpc
,
const
SEpSet
*
pMgmtEps
,
const
char
*
dbFName
,
SArray
**
vgroup
List
)
{
return
0
;
SArray
**
pVg
List
)
{
return
g_mockCatalogService
->
catalogGetDBVgInfo
(
dbFName
,
pVgList
)
;
}
int32_t
__catalogGetDBCfg
(
SCatalog
*
pCtg
,
void
*
pRpc
,
const
SEpSet
*
pMgmtEps
,
const
char
*
dbFName
,
SDbCfgInfo
*
pDbCfg
)
{
...
...
source/libs/parser/test/mockCatalogService.cpp
浏览文件 @
b445afb5
...
...
@@ -18,6 +18,7 @@
#include <iomanip>
#include <iostream>
#include <map>
#include <set>
#include "tdatablock.h"
#include "tname.h"
...
...
@@ -120,6 +121,25 @@ class MockCatalogServiceImpl {
return
copyTableVgroup
(
db
,
tNameGetTableName
(
pTableName
),
vgList
);
}
int32_t
catalogGetDBVgInfo
(
const
char
*
pDbFName
,
SArray
**
pVgList
)
const
{
std
::
string
dbFName
(
pDbFName
);
DbMetaCache
::
const_iterator
it
=
meta_
.
find
(
dbFName
.
substr
(
std
::
string
(
pDbFName
).
find_last_of
(
'.'
)
+
1
));
if
(
meta_
.
end
()
==
it
)
{
return
TSDB_CODE_FAILED
;
}
std
::
set
<
int32_t
>
vgSet
;
*
pVgList
=
taosArrayInit
(
it
->
second
.
size
(),
sizeof
(
SVgroupInfo
));
for
(
const
auto
&
vgs
:
it
->
second
)
{
for
(
const
auto
&
vg
:
vgs
.
second
->
vgs
)
{
if
(
0
==
vgSet
.
count
(
vg
.
vgId
))
{
taosArrayPush
(
*
pVgList
,
&
vg
);
vgSet
.
insert
(
vg
.
vgId
);
}
}
}
return
TSDB_CODE_SUCCESS
;
}
int32_t
catalogGetUdfInfo
(
const
std
::
string
&
funcName
,
SFuncInfo
*
pInfo
)
const
{
auto
it
=
udf_
.
find
(
funcName
);
if
(
udf_
.
end
()
==
it
)
{
...
...
@@ -187,8 +207,9 @@ class MockCatalogServiceImpl {
// number of backward fills
#define NOB(n) ((n) % 2 ? (n) / 2 + 1 : (n) / 2)
// center aligned
#define CA(n, s) std::setw(NOF((n) - int((s).length()))) << "" << (s) \
<< std::setw(NOB((n) - int((s).length()))) << "" << "|"
#define CA(n, s) \
std::setw(NOF((n) - int((s).length()))) << "" << (s) << std::setw(NOB((n) - int((s).length()))) << "" \
<< "|"
// string field length
#define SFL 20
// string field header
...
...
@@ -490,6 +511,10 @@ int32_t MockCatalogService::catalogGetTableDistVgInfo(const SName* pTableName, S
return
impl_
->
catalogGetTableDistVgInfo
(
pTableName
,
pVgList
);
}
int32_t
MockCatalogService
::
catalogGetDBVgInfo
(
const
char
*
pDbFName
,
SArray
**
pVgList
)
const
{
return
impl_
->
catalogGetDBVgInfo
(
pDbFName
,
pVgList
);
}
int32_t
MockCatalogService
::
catalogGetUdfInfo
(
const
std
::
string
&
funcName
,
SFuncInfo
*
pInfo
)
const
{
return
impl_
->
catalogGetUdfInfo
(
funcName
,
pInfo
);
}
...
...
source/libs/parser/test/mockCatalogService.h
浏览文件 @
b445afb5
...
...
@@ -61,6 +61,7 @@ class MockCatalogService {
int32_t
catalogGetTableMeta
(
const
SName
*
pTableName
,
STableMeta
**
pTableMeta
)
const
;
int32_t
catalogGetTableHashVgroup
(
const
SName
*
pTableName
,
SVgroupInfo
*
vgInfo
)
const
;
int32_t
catalogGetTableDistVgInfo
(
const
SName
*
pTableName
,
SArray
**
pVgList
)
const
;
int32_t
catalogGetDBVgInfo
(
const
char
*
pDbFName
,
SArray
**
pVgList
)
const
;
int32_t
catalogGetUdfInfo
(
const
std
::
string
&
funcName
,
SFuncInfo
*
pInfo
)
const
;
int32_t
catalogGetAllMeta
(
const
SCatalogReq
*
pCatalogReq
,
SMetaData
*
pMetaData
)
const
;
...
...
source/libs/planner/src/planSpliter.c
浏览文件 @
b445afb5
...
...
@@ -17,7 +17,7 @@
#define SPLIT_FLAG_MASK(n) (1 << n)
#define SPLIT_FLAG_ST
S
SPLIT_FLAG_MASK(0)
#define SPLIT_FLAG_ST
ABLE_SPLIT
SPLIT_FLAG_MASK(0)
#define SPLIT_FLAG_SET_MASK(val, mask) (val) |= (mask)
#define SPLIT_FLAG_TEST_MASK(val, mask) (((val) & (mask)) != 0)
...
...
@@ -35,27 +35,6 @@ typedef struct SSplitRule {
FSplit
splitFunc
;
}
SSplitRule
;
typedef
struct
SStsInfo
{
SScanLogicNode
*
pScan
;
SLogicSubplan
*
pSubplan
;
}
SStsInfo
;
typedef
struct
SCtjInfo
{
SJoinLogicNode
*
pJoin
;
SLogicNode
*
pSplitNode
;
SLogicSubplan
*
pSubplan
;
}
SCtjInfo
;
typedef
struct
SUaInfo
{
SProjectLogicNode
*
pProject
;
SLogicSubplan
*
pSubplan
;
}
SUaInfo
;
typedef
struct
SUnInfo
{
SAggLogicNode
*
pAgg
;
SLogicSubplan
*
pSubplan
;
}
SUnInfo
;
typedef
bool
(
*
FSplFindSplitNode
)(
SLogicSubplan
*
pSubplan
,
void
*
pInfo
);
static
SLogicSubplan
*
splCreateSubplan
(
SSplitContext
*
pCxt
,
SLogicNode
*
pNode
,
int32_t
flag
)
{
...
...
@@ -121,14 +100,19 @@ static bool splMatch(SSplitContext* pCxt, SLogicSubplan* pSubplan, int32_t flag,
return
false
;
}
static
SLogicNode
*
stsMatchByNode
(
SLogicNode
*
pNode
)
{
typedef
struct
SStableSplitInfo
{
SScanLogicNode
*
pScan
;
SLogicSubplan
*
pSubplan
;
}
SStableSplitInfo
;
static
SLogicNode
*
stbSplMatchByNode
(
SLogicNode
*
pNode
)
{
if
(
QUERY_NODE_LOGIC_PLAN_SCAN
==
nodeType
(
pNode
)
&&
NULL
!=
((
SScanLogicNode
*
)
pNode
)
->
pVgroupList
&&
((
SScanLogicNode
*
)
pNode
)
->
pVgroupList
->
numOfVgroups
>
1
)
{
return
pNode
;
}
SNode
*
pChild
;
FOREACH
(
pChild
,
pNode
->
pChildren
)
{
SLogicNode
*
pSplitNode
=
st
s
MatchByNode
((
SLogicNode
*
)
pChild
);
SLogicNode
*
pSplitNode
=
st
bSpl
MatchByNode
((
SLogicNode
*
)
pChild
);
if
(
NULL
!=
pSplitNode
)
{
return
pSplitNode
;
}
...
...
@@ -136,8 +120,8 @@ static SLogicNode* stsMatchByNode(SLogicNode* pNode) {
return
NULL
;
}
static
bool
st
sFindSplitNode
(
SLogicSubplan
*
pSubplan
,
SSts
Info
*
pInfo
)
{
SLogicNode
*
pSplitNode
=
st
s
MatchByNode
(
pSubplan
->
pNode
);
static
bool
st
bSplFindSplitNode
(
SLogicSubplan
*
pSubplan
,
SStableSplit
Info
*
pInfo
)
{
SLogicNode
*
pSplitNode
=
st
bSpl
MatchByNode
(
pSubplan
->
pNode
);
if
(
NULL
!=
pSplitNode
)
{
pInfo
->
pScan
=
(
SScanLogicNode
*
)
pSplitNode
;
pInfo
->
pSubplan
=
pSubplan
;
...
...
@@ -145,13 +129,13 @@ static bool stsFindSplitNode(SLogicSubplan* pSubplan, SStsInfo* pInfo) {
return
NULL
!=
pSplitNode
;
}
static
int32_t
st
s
Split
(
SSplitContext
*
pCxt
,
SLogicSubplan
*
pSubplan
)
{
SSt
s
Info
info
=
{
0
};
if
(
!
splMatch
(
pCxt
,
pSubplan
,
SPLIT_FLAG_ST
S
,
(
FSplFindSplitNode
)
sts
FindSplitNode
,
&
info
))
{
static
int32_t
st
able
Split
(
SSplitContext
*
pCxt
,
SLogicSubplan
*
pSubplan
)
{
SSt
ableSplit
Info
info
=
{
0
};
if
(
!
splMatch
(
pCxt
,
pSubplan
,
SPLIT_FLAG_ST
ABLE_SPLIT
,
(
FSplFindSplitNode
)
stbSpl
FindSplitNode
,
&
info
))
{
return
TSDB_CODE_SUCCESS
;
}
int32_t
code
=
nodesListMakeStrictAppend
(
&
info
.
pSubplan
->
pChildren
,
splCreateSubplan
(
pCxt
,
(
SLogicNode
*
)
info
.
pScan
,
SPLIT_FLAG_ST
S
));
splCreateSubplan
(
pCxt
,
(
SLogicNode
*
)
info
.
pScan
,
SPLIT_FLAG_ST
ABLE_SPLIT
));
if
(
TSDB_CODE_SUCCESS
==
code
)
{
code
=
splCreateExchangeNode
(
pCxt
,
info
.
pSubplan
,
(
SLogicNode
*
)
info
.
pScan
,
SUBPLAN_TYPE_MERGE
);
}
...
...
@@ -160,7 +144,13 @@ static int32_t stsSplit(SSplitContext* pCxt, SLogicSubplan* pSubplan) {
return
code
;
}
static
bool
needSplit
(
SJoinLogicNode
*
pJoin
)
{
typedef
struct
SSigTbJoinSplitInfo
{
SJoinLogicNode
*
pJoin
;
SLogicNode
*
pSplitNode
;
SLogicSubplan
*
pSubplan
;
}
SSigTbJoinSplitInfo
;
static
bool
sigTbJoinSplNeedSplit
(
SJoinLogicNode
*
pJoin
)
{
if
(
!
pJoin
->
isSingleTableJoin
)
{
return
false
;
}
...
...
@@ -168,13 +158,13 @@ static bool needSplit(SJoinLogicNode* pJoin) {
QUERY_NODE_LOGIC_PLAN_EXCHANGE
!=
nodeType
(
nodesListGetNode
(
pJoin
->
node
.
pChildren
,
1
));
}
static
SJoinLogicNode
*
ctj
MatchByNode
(
SLogicNode
*
pNode
)
{
if
(
QUERY_NODE_LOGIC_PLAN_JOIN
==
nodeType
(
pNode
)
&&
n
eedSplit
((
SJoinLogicNode
*
)
pNode
))
{
static
SJoinLogicNode
*
sigTbJoinSpl
MatchByNode
(
SLogicNode
*
pNode
)
{
if
(
QUERY_NODE_LOGIC_PLAN_JOIN
==
nodeType
(
pNode
)
&&
sigTbJoinSplN
eedSplit
((
SJoinLogicNode
*
)
pNode
))
{
return
(
SJoinLogicNode
*
)
pNode
;
}
SNode
*
pChild
;
FOREACH
(
pChild
,
pNode
->
pChildren
)
{
SJoinLogicNode
*
pSplitNode
=
ctj
MatchByNode
((
SLogicNode
*
)
pChild
);
SJoinLogicNode
*
pSplitNode
=
sigTbJoinSpl
MatchByNode
((
SLogicNode
*
)
pChild
);
if
(
NULL
!=
pSplitNode
)
{
return
pSplitNode
;
}
...
...
@@ -182,8 +172,8 @@ static SJoinLogicNode* ctjMatchByNode(SLogicNode* pNode) {
return
NULL
;
}
static
bool
ctjFindSplitNode
(
SLogicSubplan
*
pSubplan
,
SCtj
Info
*
pInfo
)
{
SJoinLogicNode
*
pJoin
=
ctj
MatchByNode
(
pSubplan
->
pNode
);
static
bool
sigTbJoinSplFindSplitNode
(
SLogicSubplan
*
pSubplan
,
SSigTbJoinSplit
Info
*
pInfo
)
{
SJoinLogicNode
*
pJoin
=
sigTbJoinSpl
MatchByNode
(
pSubplan
->
pNode
);
if
(
NULL
!=
pJoin
)
{
pInfo
->
pJoin
=
pJoin
;
pInfo
->
pSplitNode
=
nodesListGetNode
(
pJoin
->
node
.
pChildren
,
1
);
...
...
@@ -192,9 +182,9 @@ static bool ctjFindSplitNode(SLogicSubplan* pSubplan, SCtjInfo* pInfo) {
return
NULL
!=
pJoin
;
}
static
int32_t
ctj
Split
(
SSplitContext
*
pCxt
,
SLogicSubplan
*
pSubplan
)
{
S
Ctj
Info
info
=
{
0
};
if
(
!
splMatch
(
pCxt
,
pSubplan
,
0
,
(
FSplFindSplitNode
)
ctj
FindSplitNode
,
&
info
))
{
static
int32_t
singleTableJoin
Split
(
SSplitContext
*
pCxt
,
SLogicSubplan
*
pSubplan
)
{
S
SigTbJoinSplit
Info
info
=
{
0
};
if
(
!
splMatch
(
pCxt
,
pSubplan
,
0
,
(
FSplFindSplitNode
)
sigTbJoinSpl
FindSplitNode
,
&
info
))
{
return
TSDB_CODE_SUCCESS
;
}
int32_t
code
=
nodesListMakeStrictAppend
(
&
info
.
pSubplan
->
pChildren
,
splCreateSubplan
(
pCxt
,
info
.
pSplitNode
,
0
));
...
...
@@ -277,13 +267,18 @@ static int32_t unionSplitSubplan(SSplitContext* pCxt, SLogicSubplan* pUnionSubpl
return
code
;
}
static
SLogicNode
*
uaMatchByNode
(
SLogicNode
*
pNode
)
{
typedef
struct
SUnionAllSplitInfo
{
SProjectLogicNode
*
pProject
;
SLogicSubplan
*
pSubplan
;
}
SUnionAllSplitInfo
;
static
SLogicNode
*
unionAllMatchByNode
(
SLogicNode
*
pNode
)
{
if
(
QUERY_NODE_LOGIC_PLAN_PROJECT
==
nodeType
(
pNode
)
&&
LIST_LENGTH
(
pNode
->
pChildren
)
>
1
)
{
return
pNode
;
}
SNode
*
pChild
;
FOREACH
(
pChild
,
pNode
->
pChildren
)
{
SLogicNode
*
pSplitNode
=
u
a
MatchByNode
((
SLogicNode
*
)
pChild
);
SLogicNode
*
pSplitNode
=
u
nionAll
MatchByNode
((
SLogicNode
*
)
pChild
);
if
(
NULL
!=
pSplitNode
)
{
return
pSplitNode
;
}
...
...
@@ -291,8 +286,8 @@ static SLogicNode* uaMatchByNode(SLogicNode* pNode) {
return
NULL
;
}
static
bool
u
aFindSplitNode
(
SLogicSubplan
*
pSubplan
,
SUa
Info
*
pInfo
)
{
SLogicNode
*
pSplitNode
=
u
a
MatchByNode
(
pSubplan
->
pNode
);
static
bool
u
nionAllFindSplitNode
(
SLogicSubplan
*
pSubplan
,
SUnionAllSplit
Info
*
pInfo
)
{
SLogicNode
*
pSplitNode
=
u
nionAll
MatchByNode
(
pSubplan
->
pNode
);
if
(
NULL
!=
pSplitNode
)
{
pInfo
->
pProject
=
(
SProjectLogicNode
*
)
pSplitNode
;
pInfo
->
pSubplan
=
pSubplan
;
...
...
@@ -300,13 +295,13 @@ static bool uaFindSplitNode(SLogicSubplan* pSubplan, SUaInfo* pInfo) {
return
NULL
!=
pSplitNode
;
}
static
int32_t
u
a
CreateExchangeNode
(
SSplitContext
*
pCxt
,
SLogicSubplan
*
pSubplan
,
SProjectLogicNode
*
pProject
)
{
static
int32_t
u
nionAll
CreateExchangeNode
(
SSplitContext
*
pCxt
,
SLogicSubplan
*
pSubplan
,
SProjectLogicNode
*
pProject
)
{
SExchangeLogicNode
*
pExchange
=
nodesMakeNode
(
QUERY_NODE_LOGIC_PLAN_EXCHANGE
);
if
(
NULL
==
pExchange
)
{
return
TSDB_CODE_OUT_OF_MEMORY
;
}
pExchange
->
srcGroupId
=
pCxt
->
groupId
;
// pExchange->precision = pScan->pMeta->tableInfo
.precision;
pExchange
->
precision
=
pProject
->
node
.
precision
;
pExchange
->
node
.
pTargets
=
nodesCloneList
(
pProject
->
node
.
pTargets
);
if
(
NULL
==
pExchange
->
node
.
pTargets
)
{
return
TSDB_CODE_OUT_OF_MEMORY
;
...
...
@@ -332,28 +327,33 @@ static int32_t uaCreateExchangeNode(SSplitContext* pCxt, SLogicSubplan* pSubplan
return
TSDB_CODE_FAILED
;
}
static
int32_t
u
a
Split
(
SSplitContext
*
pCxt
,
SLogicSubplan
*
pSubplan
)
{
SU
a
Info
info
=
{
0
};
if
(
!
splMatch
(
pCxt
,
pSubplan
,
0
,
(
FSplFindSplitNode
)
u
a
FindSplitNode
,
&
info
))
{
static
int32_t
u
nionAll
Split
(
SSplitContext
*
pCxt
,
SLogicSubplan
*
pSubplan
)
{
SU
nionAllSplit
Info
info
=
{
0
};
if
(
!
splMatch
(
pCxt
,
pSubplan
,
0
,
(
FSplFindSplitNode
)
u
nionAll
FindSplitNode
,
&
info
))
{
return
TSDB_CODE_SUCCESS
;
}
int32_t
code
=
unionSplitSubplan
(
pCxt
,
info
.
pSubplan
,
(
SLogicNode
*
)
info
.
pProject
);
if
(
TSDB_CODE_SUCCESS
==
code
)
{
code
=
u
a
CreateExchangeNode
(
pCxt
,
info
.
pSubplan
,
info
.
pProject
);
code
=
u
nionAll
CreateExchangeNode
(
pCxt
,
info
.
pSubplan
,
info
.
pProject
);
}
++
(
pCxt
->
groupId
);
pCxt
->
split
=
true
;
return
code
;
}
static
SLogicNode
*
unMatchByNode
(
SLogicNode
*
pNode
)
{
typedef
struct
SUnionDistinctSplitInfo
{
SAggLogicNode
*
pAgg
;
SLogicSubplan
*
pSubplan
;
}
SUnionDistinctSplitInfo
;
static
SLogicNode
*
unionDistinctMatchByNode
(
SLogicNode
*
pNode
)
{
if
(
QUERY_NODE_LOGIC_PLAN_AGG
==
nodeType
(
pNode
)
&&
LIST_LENGTH
(
pNode
->
pChildren
)
>
1
)
{
return
pNode
;
}
SNode
*
pChild
;
FOREACH
(
pChild
,
pNode
->
pChildren
)
{
SLogicNode
*
pSplitNode
=
unMatchByNode
((
SLogicNode
*
)
pChild
);
SLogicNode
*
pSplitNode
=
un
ionDistinct
MatchByNode
((
SLogicNode
*
)
pChild
);
if
(
NULL
!=
pSplitNode
)
{
return
pSplitNode
;
}
...
...
@@ -378,8 +378,8 @@ static int32_t unCreateExchangeNode(SSplitContext* pCxt, SLogicSubplan* pSubplan
return
nodesListMakeAppend
(
&
pAgg
->
node
.
pChildren
,
pExchange
);
}
static
bool
un
FindSplitNode
(
SLogicSubplan
*
pSubplan
,
SUn
Info
*
pInfo
)
{
SLogicNode
*
pSplitNode
=
unMatchByNode
(
pSubplan
->
pNode
);
static
bool
un
ionDistinctFindSplitNode
(
SLogicSubplan
*
pSubplan
,
SUnionDistinctSplit
Info
*
pInfo
)
{
SLogicNode
*
pSplitNode
=
un
ionDistinct
MatchByNode
(
pSubplan
->
pNode
);
if
(
NULL
!=
pSplitNode
)
{
pInfo
->
pAgg
=
(
SAggLogicNode
*
)
pSplitNode
;
pInfo
->
pSubplan
=
pSubplan
;
...
...
@@ -387,9 +387,9 @@ static bool unFindSplitNode(SLogicSubplan* pSubplan, SUnInfo* pInfo) {
return
NULL
!=
pSplitNode
;
}
static
int32_t
unSplit
(
SSplitContext
*
pCxt
,
SLogicSubplan
*
pSubplan
)
{
SUnInfo
info
=
{
0
};
if
(
!
splMatch
(
pCxt
,
pSubplan
,
0
,
(
FSplFindSplitNode
)
unFindSplitNode
,
&
info
))
{
static
int32_t
un
ionDistinct
Split
(
SSplitContext
*
pCxt
,
SLogicSubplan
*
pSubplan
)
{
SUn
ionDistinctSplit
Info
info
=
{
0
};
if
(
!
splMatch
(
pCxt
,
pSubplan
,
0
,
(
FSplFindSplitNode
)
un
ionDistinct
FindSplitNode
,
&
info
))
{
return
TSDB_CODE_SUCCESS
;
}
...
...
@@ -402,10 +402,14 @@ static int32_t unSplit(SSplitContext* pCxt, SLogicSubplan* pSubplan) {
return
code
;
}
static
const
SSplitRule
splitRuleSet
[]
=
{{.
pName
=
"SuperTableScan"
,
.
splitFunc
=
stsSplit
},
{.
pName
=
"ChildTableJoin"
,
.
splitFunc
=
ctjSplit
},
{.
pName
=
"UnionAll"
,
.
splitFunc
=
uaSplit
},
{.
pName
=
"Union"
,
.
splitFunc
=
unSplit
}};
// clang-format off
static
const
SSplitRule
splitRuleSet
[]
=
{
{.
pName
=
"SuperTableSplit"
,
.
splitFunc
=
stableSplit
},
{.
pName
=
"SingleTableJoinSplit"
,
.
splitFunc
=
singleTableJoinSplit
},
{.
pName
=
"UnionAllSplit"
,
.
splitFunc
=
unionAllSplit
},
{.
pName
=
"UnionDistinctSplit"
,
.
splitFunc
=
unionDistinctSplit
}
};
// clang-format on
static
const
int32_t
splitRuleNum
=
(
sizeof
(
splitRuleSet
)
/
sizeof
(
SSplitRule
));
...
...
source/libs/planner/test/planIntervalTest.cpp
浏览文件 @
b445afb5
...
...
@@ -50,4 +50,10 @@ TEST_F(PlanIntervalTest, selectFunc) {
run
(
"SELECT MAX(c1), MIN(c1) FROM t1 INTERVAL(10s)"
);
// select function along with the columns of select row, and with INTERVAL clause
run
(
"SELECT MAX(c1), c2 FROM t1 INTERVAL(10s)"
);
}
\ No newline at end of file
}
TEST_F
(
PlanIntervalTest
,
stable
)
{
useDb
(
"root"
,
"test"
);
run
(
"SELECT COUNT(*) FROM st1 INTERVAL(10s)"
);
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录