Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
6948d648
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看板
提交
6948d648
编写于
6月 14, 2022
作者:
X
Xiaoyu Wang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: super table join
上级
32fbb8aa
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
21 addition
and
13 deletion
+21
-13
source/common/src/systable.c
source/common/src/systable.c
+6
-6
source/dnode/mnode/impl/src/mndDb.c
source/dnode/mnode/impl/src/mndDb.c
+7
-7
source/libs/planner/test/planIntervalTest.cpp
source/libs/planner/test/planIntervalTest.cpp
+2
-0
source/libs/planner/test/planJoinTest.cpp
source/libs/planner/test/planJoinTest.cpp
+6
-0
未找到文件。
source/common/src/systable.c
浏览文件 @
6948d648
...
@@ -91,8 +91,8 @@ static const SSysDbTableSchema userDBSchema[] = {
...
@@ -91,8 +91,8 @@ static const SSysDbTableSchema userDBSchema[] = {
{.
name
=
"precision"
,
.
bytes
=
2
+
VARSTR_HEADER_SIZE
,
.
type
=
TSDB_DATA_TYPE_VARCHAR
},
{.
name
=
"precision"
,
.
bytes
=
2
+
VARSTR_HEADER_SIZE
,
.
type
=
TSDB_DATA_TYPE_VARCHAR
},
{.
name
=
"single_stable_model"
,
.
bytes
=
1
,
.
type
=
TSDB_DATA_TYPE_BOOL
},
{.
name
=
"single_stable_model"
,
.
bytes
=
1
,
.
type
=
TSDB_DATA_TYPE_BOOL
},
{.
name
=
"status"
,
.
bytes
=
10
+
VARSTR_HEADER_SIZE
,
.
type
=
TSDB_DATA_TYPE_VARCHAR
},
{.
name
=
"status"
,
.
bytes
=
10
+
VARSTR_HEADER_SIZE
,
.
type
=
TSDB_DATA_TYPE_VARCHAR
},
// {.name = "schemaless", .bytes = 1, .type = TSDB_DATA_TYPE_BOOL},
// {.name = "schemaless", .bytes = 1, .type = TSDB_DATA_TYPE_BOOL},
{.
name
=
"reten
s
ion"
,
.
bytes
=
60
+
VARSTR_HEADER_SIZE
,
.
type
=
TSDB_DATA_TYPE_VARCHAR
},
{.
name
=
"reten
t
ion"
,
.
bytes
=
60
+
VARSTR_HEADER_SIZE
,
.
type
=
TSDB_DATA_TYPE_VARCHAR
},
// {.name = "update", .bytes = 1, .type = TSDB_DATA_TYPE_TINYINT}, // disable update
// {.name = "update", .bytes = 1, .type = TSDB_DATA_TYPE_TINYINT}, // disable update
};
};
...
@@ -137,7 +137,7 @@ static const SSysDbTableSchema streamSchema[] = {
...
@@ -137,7 +137,7 @@ static const SSysDbTableSchema streamSchema[] = {
{.
name
=
"target_table"
,
.
bytes
=
SYSTABLE_SCH_TABLE_NAME_LEN
,
.
type
=
TSDB_DATA_TYPE_VARCHAR
},
{.
name
=
"target_table"
,
.
bytes
=
SYSTABLE_SCH_TABLE_NAME_LEN
,
.
type
=
TSDB_DATA_TYPE_VARCHAR
},
{.
name
=
"watermark"
,
.
bytes
=
8
,
.
type
=
TSDB_DATA_TYPE_BIGINT
},
{.
name
=
"watermark"
,
.
bytes
=
8
,
.
type
=
TSDB_DATA_TYPE_BIGINT
},
{.
name
=
"trigger"
,
.
bytes
=
4
,
.
type
=
TSDB_DATA_TYPE_INT
},
{.
name
=
"trigger"
,
.
bytes
=
4
,
.
type
=
TSDB_DATA_TYPE_INT
},
};
};
static
const
SSysDbTableSchema
userTblsSchema
[]
=
{
static
const
SSysDbTableSchema
userTblsSchema
[]
=
{
{.
name
=
"table_name"
,
.
bytes
=
SYSTABLE_SCH_TABLE_NAME_LEN
,
.
type
=
TSDB_DATA_TYPE_VARCHAR
},
{.
name
=
"table_name"
,
.
bytes
=
SYSTABLE_SCH_TABLE_NAME_LEN
,
.
type
=
TSDB_DATA_TYPE_VARCHAR
},
...
@@ -221,7 +221,9 @@ static const SSysDbTableSchema transSchema[] = {
...
@@ -221,7 +221,9 @@ static const SSysDbTableSchema transSchema[] = {
{.
name
=
"db"
,
.
bytes
=
SYSTABLE_SCH_DB_NAME_LEN
,
.
type
=
TSDB_DATA_TYPE_VARCHAR
},
{.
name
=
"db"
,
.
bytes
=
SYSTABLE_SCH_DB_NAME_LEN
,
.
type
=
TSDB_DATA_TYPE_VARCHAR
},
{.
name
=
"failed_times"
,
.
bytes
=
4
,
.
type
=
TSDB_DATA_TYPE_INT
},
{.
name
=
"failed_times"
,
.
bytes
=
4
,
.
type
=
TSDB_DATA_TYPE_INT
},
{.
name
=
"last_exec_time"
,
.
bytes
=
8
,
.
type
=
TSDB_DATA_TYPE_TIMESTAMP
},
{.
name
=
"last_exec_time"
,
.
bytes
=
8
,
.
type
=
TSDB_DATA_TYPE_TIMESTAMP
},
{.
name
=
"last_action_info"
,
.
bytes
=
(
TSDB_TRANS_ERROR_LEN
-
1
)
+
VARSTR_HEADER_SIZE
,
.
type
=
TSDB_DATA_TYPE_VARCHAR
},
{.
name
=
"last_action_info"
,
.
bytes
=
(
TSDB_TRANS_ERROR_LEN
-
1
)
+
VARSTR_HEADER_SIZE
,
.
type
=
TSDB_DATA_TYPE_VARCHAR
},
};
};
static
const
SSysDbTableSchema
configSchema
[]
=
{
static
const
SSysDbTableSchema
configSchema
[]
=
{
...
@@ -314,8 +316,6 @@ static const SSysDbTableSchema querySchema[] = {
...
@@ -314,8 +316,6 @@ static const SSysDbTableSchema querySchema[] = {
{.
name
=
"sql"
,
.
bytes
=
TSDB_SHOW_SQL_LEN
+
VARSTR_HEADER_SIZE
,
.
type
=
TSDB_DATA_TYPE_VARCHAR
},
{.
name
=
"sql"
,
.
bytes
=
TSDB_SHOW_SQL_LEN
+
VARSTR_HEADER_SIZE
,
.
type
=
TSDB_DATA_TYPE_VARCHAR
},
};
};
static
const
SSysTableMeta
perfsMeta
[]
=
{
static
const
SSysTableMeta
perfsMeta
[]
=
{
{
TSDB_PERFS_TABLE_CONNECTIONS
,
connectionsSchema
,
tListLen
(
connectionsSchema
)},
{
TSDB_PERFS_TABLE_CONNECTIONS
,
connectionsSchema
,
tListLen
(
connectionsSchema
)},
{
TSDB_PERFS_TABLE_QUERIES
,
querySchema
,
tListLen
(
querySchema
)},
{
TSDB_PERFS_TABLE_QUERIES
,
querySchema
,
tListLen
(
querySchema
)},
...
...
source/dnode/mnode/impl/src/mndDb.c
浏览文件 @
6948d648
...
@@ -183,12 +183,12 @@ static SSdbRow *mndDbActionDecode(SSdbRaw *pRaw) {
...
@@ -183,12 +183,12 @@ static SSdbRow *mndDbActionDecode(SSdbRaw *pRaw) {
pDb
->
cfg
.
pRetensions
=
taosArrayInit
(
pDb
->
cfg
.
numOfRetensions
,
sizeof
(
SRetention
));
pDb
->
cfg
.
pRetensions
=
taosArrayInit
(
pDb
->
cfg
.
numOfRetensions
,
sizeof
(
SRetention
));
if
(
pDb
->
cfg
.
pRetensions
==
NULL
)
goto
_OVER
;
if
(
pDb
->
cfg
.
pRetensions
==
NULL
)
goto
_OVER
;
for
(
int32_t
i
=
0
;
i
<
pDb
->
cfg
.
numOfRetensions
;
++
i
)
{
for
(
int32_t
i
=
0
;
i
<
pDb
->
cfg
.
numOfRetensions
;
++
i
)
{
SRetention
reten
s
ion
=
{
0
};
SRetention
reten
t
ion
=
{
0
};
SDB_GET_INT64
(
pRaw
,
dataPos
,
&
reten
s
ion
.
freq
,
_OVER
)
SDB_GET_INT64
(
pRaw
,
dataPos
,
&
reten
t
ion
.
freq
,
_OVER
)
SDB_GET_INT64
(
pRaw
,
dataPos
,
&
reten
s
ion
.
keep
,
_OVER
)
SDB_GET_INT64
(
pRaw
,
dataPos
,
&
reten
t
ion
.
keep
,
_OVER
)
SDB_GET_INT8
(
pRaw
,
dataPos
,
&
reten
s
ion
.
freqUnit
,
_OVER
)
SDB_GET_INT8
(
pRaw
,
dataPos
,
&
reten
t
ion
.
freqUnit
,
_OVER
)
SDB_GET_INT8
(
pRaw
,
dataPos
,
&
reten
s
ion
.
keepUnit
,
_OVER
)
SDB_GET_INT8
(
pRaw
,
dataPos
,
&
reten
t
ion
.
keepUnit
,
_OVER
)
if
(
taosArrayPush
(
pDb
->
cfg
.
pRetensions
,
&
reten
s
ion
)
==
NULL
)
{
if
(
taosArrayPush
(
pDb
->
cfg
.
pRetensions
,
&
reten
t
ion
)
==
NULL
)
{
goto
_OVER
;
goto
_OVER
;
}
}
}
}
...
@@ -1381,7 +1381,7 @@ static void dumpDbInfoData(SSDataBlock *pBlock, SDbObj *pDb, SShowObj *pShow, in
...
@@ -1381,7 +1381,7 @@ static void dumpDbInfoData(SSDataBlock *pBlock, SDbObj *pDb, SShowObj *pShow, in
char
*
status
=
"ready"
;
char
*
status
=
"ready"
;
if
(
objStatus
==
SDB_STATUS_CREATING
)
status
=
"creating"
;
if
(
objStatus
==
SDB_STATUS_CREATING
)
status
=
"creating"
;
if
(
objStatus
==
SDB_STATUS_DROPPING
)
status
=
"dropping"
;
if
(
objStatus
==
SDB_STATUS_DROPPING
)
status
=
"dropping"
;
char
statusB
[
24
]
=
{
0
};
char
statusB
[
24
]
=
{
0
};
STR_WITH_SIZE_TO_VARSTR
(
statusB
,
status
,
strlen
(
status
));
STR_WITH_SIZE_TO_VARSTR
(
statusB
,
status
,
strlen
(
status
));
if
(
sysDb
)
{
if
(
sysDb
)
{
...
...
source/libs/planner/test/planIntervalTest.cpp
浏览文件 @
6948d648
...
@@ -60,4 +60,6 @@ TEST_F(PlanIntervalTest, stable) {
...
@@ -60,4 +60,6 @@ TEST_F(PlanIntervalTest, stable) {
run
(
"SELECT COUNT(*) FROM st1 INTERVAL(10s)"
);
run
(
"SELECT COUNT(*) FROM st1 INTERVAL(10s)"
);
run
(
"SELECT _WSTARTTS, COUNT(*) FROM st1 INTERVAL(10s)"
);
run
(
"SELECT _WSTARTTS, COUNT(*) FROM st1 INTERVAL(10s)"
);
run
(
"SELECT _WSTARTTS, COUNT(*) FROM st1 PARTITION BY TBNAME INTERVAL(10s)"
);
}
}
source/libs/planner/test/planJoinTest.cpp
浏览文件 @
6948d648
...
@@ -50,3 +50,9 @@ TEST_F(PlanJoinTest, multiJoin) {
...
@@ -50,3 +50,9 @@ TEST_F(PlanJoinTest, multiJoin) {
run
(
"SELECT t1.c1, t2.c1 FROM st1s1 t1 JOIN st1s2 t2 ON t1.ts = t2.ts JOIN st1s3 t3 ON t1.ts = t3.ts"
);
run
(
"SELECT t1.c1, t2.c1 FROM st1s1 t1 JOIN st1s2 t2 ON t1.ts = t2.ts JOIN st1s3 t3 ON t1.ts = t3.ts"
);
}
}
TEST_F
(
PlanJoinTest
,
stable
)
{
useDb
(
"root"
,
"test"
);
run
(
"SELECT t1.c1, t2.c1 FROM st1 t1 JOIN st2 t2 ON t1.ts = t2.ts "
);
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录