Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
97f334c9
T
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1184
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
97f334c9
编写于
12月 28, 2021
作者:
L
Liu Jicong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
send create topic req
上级
3c0a7e63
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
41 addition
and
4 deletion
+41
-4
include/client/taos.h
include/client/taos.h
+3
-0
include/dnode/vnode/tq/tq.h
include/dnode/vnode/tq/tq.h
+2
-0
source/client/src/clientImpl.c
source/client/src/clientImpl.c
+0
-3
source/client/test/clientTests.cpp
source/client/test/clientTests.cpp
+35
-0
source/libs/parser/src/parser.c
source/libs/parser/src/parser.c
+1
-1
未找到文件。
include/client/taos.h
浏览文件 @
97f334c9
...
...
@@ -193,6 +193,9 @@ DLL_EXPORT void taos_close_stream(TAOS_STREAM *tstr);
DLL_EXPORT
int
taos_load_table_info
(
TAOS
*
taos
,
const
char
*
tableNameList
);
DLL_EXPORT
TAOS_RES
*
taos_schemaless_insert
(
TAOS
*
taos
,
char
*
lines
[],
int
numLines
,
int
protocol
,
int
precision
);
DLL_EXPORT
TAOS_RES
*
tmq_create_topic
(
TAOS
*
taos
,
const
char
*
name
,
const
char
*
sql
,
int
sqlLen
);
#ifdef __cplusplus
}
#endif
...
...
include/dnode/vnode/tq/tq.h
浏览文件 @
97f334c9
...
...
@@ -251,6 +251,8 @@ typedef struct STqMetaStore {
STqMetaList
*
bucket
[
TQ_BUCKET_SIZE
];
// a table head
STqMetaList
*
unpersistHead
;
// topics that are not connectted
STqMetaList
*
unconnectTopic
;
// TODO:temporaral use, to be replaced by unified tfile
int
fileFd
;
...
...
source/client/src/clientImpl.c
浏览文件 @
97f334c9
...
...
@@ -237,9 +237,6 @@ TAOS_RES *tmq_create_topic(TAOS* taos, const char* name, const char* sql, int sq
SQueryDag
*
pDag
=
NULL
;
char
*
dagStr
=
NULL
;
//parse sql to logical plan and physical plan
//send topic name and plans to mnode
terrno
=
TSDB_CODE_SUCCESS
;
CHECK_CODE_GOTO
(
buildRequest
(
pTscObj
,
sql
,
sqlLen
,
&
pRequest
),
_return
);
...
...
source/client/test/clientTests.cpp
浏览文件 @
97f334c9
...
...
@@ -399,6 +399,41 @@ TEST(testCase, drop_stable_Test) {
taos_close
(
pConn
);
}
TEST
(
testCase
,
create_topic_Test
)
{
TAOS
*
pConn
=
taos_connect
(
"localhost"
,
"root"
,
"taosdata"
,
NULL
,
0
);
assert
(
pConn
!=
NULL
);
TAOS_RES
*
pRes
=
taos_query
(
pConn
,
"create database abc1"
);
if
(
taos_errno
(
pRes
)
!=
0
)
{
printf
(
"error in create db, reason:%s
\n
"
,
taos_errstr
(
pRes
));
}
taos_free_result
(
pRes
);
pRes
=
taos_query
(
pConn
,
"use abc1"
);
if
(
taos_errno
(
pRes
)
!=
0
)
{
printf
(
"error in use db, reason:%s
\n
"
,
taos_errstr
(
pRes
));
}
taos_free_result
(
pRes
);
pRes
=
taos_query
(
pConn
,
"create stable st1(ts timestamp, k int) tags(a int)"
);
if
(
taos_errno
(
pRes
)
!=
0
)
{
printf
(
"error in create stable, reason:%s
\n
"
,
taos_errstr
(
pRes
));
}
TAOS_FIELD
*
pFields
=
taos_fetch_fields
(
pRes
);
ASSERT_TRUE
(
pFields
==
NULL
);
int32_t
numOfFields
=
taos_num_fields
(
pRes
);
ASSERT_EQ
(
numOfFields
,
0
);
taos_free_result
(
pRes
);
char
*
sql
=
"select * from st1"
;
tmq_create_topic
(
pConn
,
"test_topic_1"
,
sql
,
strlen
(
sql
));
taos_close
(
pConn
);
}
//TEST(testCase, show_table_Test) {
// TAOS* pConn = taos_connect("localhost", "root", "taosdata", NULL, 0);
// assert(pConn != NULL);
...
...
source/libs/parser/src/parser.c
浏览文件 @
97f334c9
...
...
@@ -229,6 +229,6 @@ void qParserClearupMetaRequestInfo(SCatalogReq* pMetaReq) {
taosArrayDestroy
(
pMetaReq
->
pUdf
);
}
void
qDest
or
yQuery
(
SQueryNode
*
pQuery
)
{
void
qDest
ro
yQuery
(
SQueryNode
*
pQuery
)
{
// todo
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录