Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
5b6ca20f
T
TDengine
项目概览
慢慢CG
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
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看板
提交
5b6ca20f
编写于
9月 09, 2020
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[td-225] refactor codes.
上级
25b2cec2
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
91 addition
and
104 deletion
+91
-104
src/client/inc/tscUtil.h
src/client/inc/tscUtil.h
+1
-6
src/client/src/tscSubquery.c
src/client/src/tscSubquery.c
+1
-12
src/client/src/tscUtil.c
src/client/src/tscUtil.c
+2
-1
src/query/src/qExecutor.c
src/query/src/qExecutor.c
+1
-1
tests/script/general/parser/join.sim
tests/script/general/parser/join.sim
+2
-0
tests/script/general/parser/testSuite.sim
tests/script/general/parser/testSuite.sim
+84
-84
未找到文件。
src/client/inc/tscUtil.h
浏览文件 @
5b6ca20f
...
@@ -69,17 +69,12 @@ typedef struct SJoinSupporter {
...
@@ -69,17 +69,12 @@ typedef struct SJoinSupporter {
SSubqueryState
*
pState
;
SSubqueryState
*
pState
;
SSqlObj
*
pObj
;
// parent SqlObj
SSqlObj
*
pObj
;
// parent SqlObj
int32_t
subqueryIndex
;
// index of sub query
int32_t
subqueryIndex
;
// index of sub query
char
intervalTimeUnit
;
char
slidingTimeUnit
;
int64_t
intervalTime
;
// interval time
int64_t
slidingTime
;
// sliding time
SLimitVal
limit
;
// limit info
SLimitVal
limit
;
// limit info
uint64_t
uid
;
// query
meter
uid
uint64_t
uid
;
// query
table
uid
SArray
*
colList
;
// previous query information, no need to use this attribute, and the corresponding attribution
SArray
*
colList
;
// previous query information, no need to use this attribute, and the corresponding attribution
SArray
*
exprList
;
SArray
*
exprList
;
SFieldInfo
fieldsInfo
;
SFieldInfo
fieldsInfo
;
STagCond
tagCond
;
STagCond
tagCond
;
SSqlGroupbyExpr
groupbyExpr
;
struct
STSBuf
*
pTSBuf
;
// the TSBuf struct that holds the compressed timestamp array
struct
STSBuf
*
pTSBuf
;
// the TSBuf struct that holds the compressed timestamp array
FILE
*
f
;
// temporary file in order to create TSBuf
FILE
*
f
;
// temporary file in order to create TSBuf
char
path
[
PATH_MAX
];
// temporary file path, todo dynamic allocate memory
char
path
[
PATH_MAX
];
// temporary file path, todo dynamic allocate memory
...
...
src/client/src/tscSubquery.c
浏览文件 @
5b6ca20f
...
@@ -178,10 +178,6 @@ SJoinSupporter* tscCreateJoinSupporter(SSqlObj* pSql, SSubqueryState* pState, in
...
@@ -178,10 +178,6 @@ SJoinSupporter* tscCreateJoinSupporter(SSqlObj* pSql, SSubqueryState* pState, in
pSupporter
->
subqueryIndex
=
index
;
pSupporter
->
subqueryIndex
=
index
;
SQueryInfo
*
pQueryInfo
=
tscGetQueryInfoDetail
(
&
pSql
->
cmd
,
pSql
->
cmd
.
clauseIndex
);
SQueryInfo
*
pQueryInfo
=
tscGetQueryInfoDetail
(
&
pSql
->
cmd
,
pSql
->
cmd
.
clauseIndex
);
pSupporter
->
intervalTimeUnit
=
pQueryInfo
->
intervalTimeUnit
;
pSupporter
->
slidingTime
=
pQueryInfo
->
slidingTimeUnit
;
pSupporter
->
intervalTime
=
pQueryInfo
->
intervalTime
;
pSupporter
->
slidingTime
=
pQueryInfo
->
slidingTime
;
pSupporter
->
limit
=
pQueryInfo
->
limit
;
pSupporter
->
limit
=
pQueryInfo
->
limit
;
STableMetaInfo
*
pTableMetaInfo
=
tscGetTableMetaInfoFromCmd
(
&
pSql
->
cmd
,
pSql
->
cmd
.
clauseIndex
,
index
);
STableMetaInfo
*
pTableMetaInfo
=
tscGetTableMetaInfoFromCmd
(
&
pSql
->
cmd
,
pSql
->
cmd
.
clauseIndex
,
index
);
...
@@ -311,18 +307,12 @@ static int32_t tscLaunchRealSubqueries(SSqlObj* pSql) {
...
@@ -311,18 +307,12 @@ static int32_t tscLaunchRealSubqueries(SSqlObj* pSql) {
// set the second stage sub query for join process
// set the second stage sub query for join process
TSDB_QUERY_SET_TYPE
(
pQueryInfo
->
type
,
TSDB_QUERY_TYPE_JOIN_SEC_STAGE
);
TSDB_QUERY_SET_TYPE
(
pQueryInfo
->
type
,
TSDB_QUERY_TYPE_JOIN_SEC_STAGE
);
pQueryInfo
->
intervalTimeUnit
=
pSupporter
->
intervalTimeUnit
;
pQueryInfo
->
slidingTimeUnit
=
pSupporter
->
slidingTimeUnit
;
pQueryInfo
->
intervalTime
=
pSupporter
->
intervalTime
;
pQueryInfo
->
slidingTime
=
pSupporter
->
slidingTime
;
pQueryInfo
->
groupbyExpr
=
pSupporter
->
groupbyExpr
;
tscTagCondCopy
(
&
pQueryInfo
->
tagCond
,
&
pSupporter
->
tagCond
);
tscTagCondCopy
(
&
pQueryInfo
->
tagCond
,
&
pSupporter
->
tagCond
);
pQueryInfo
->
colList
=
pSupporter
->
colList
;
pQueryInfo
->
colList
=
pSupporter
->
colList
;
pQueryInfo
->
exprList
=
pSupporter
->
exprList
;
pQueryInfo
->
exprList
=
pSupporter
->
exprList
;
pQueryInfo
->
fieldsInfo
=
pSupporter
->
fieldsInfo
;
pQueryInfo
->
fieldsInfo
=
pSupporter
->
fieldsInfo
;
pSupporter
->
exprList
=
NULL
;
pSupporter
->
exprList
=
NULL
;
pSupporter
->
colList
=
NULL
;
pSupporter
->
colList
=
NULL
;
memset
(
&
pSupporter
->
fieldsInfo
,
0
,
sizeof
(
SFieldInfo
));
memset
(
&
pSupporter
->
fieldsInfo
,
0
,
sizeof
(
SFieldInfo
));
...
@@ -1221,7 +1211,6 @@ int32_t tscCreateJoinSubquery(SSqlObj *pSql, int16_t tableIndex, SJoinSupporter
...
@@ -1221,7 +1211,6 @@ int32_t tscCreateJoinSubquery(SSqlObj *pSql, int16_t tableIndex, SJoinSupporter
pNewQueryInfo
->
limit
.
offset
=
0
;
pNewQueryInfo
->
limit
.
offset
=
0
;
// backup the data and clear it in the sqlcmd object
// backup the data and clear it in the sqlcmd object
pSupporter
->
groupbyExpr
=
pNewQueryInfo
->
groupbyExpr
;
memset
(
&
pNewQueryInfo
->
groupbyExpr
,
0
,
sizeof
(
SSqlGroupbyExpr
));
memset
(
&
pNewQueryInfo
->
groupbyExpr
,
0
,
sizeof
(
SSqlGroupbyExpr
));
tscInitQueryInfo
(
pNewQueryInfo
);
tscInitQueryInfo
(
pNewQueryInfo
);
...
...
src/client/src/tscUtil.c
浏览文件 @
5b6ca20f
...
@@ -1534,7 +1534,6 @@ void tscInitQueryInfo(SQueryInfo* pQueryInfo) {
...
@@ -1534,7 +1534,6 @@ void tscInitQueryInfo(SQueryInfo* pQueryInfo) {
pQueryInfo
->
exprList
=
taosArrayInit
(
4
,
POINTER_BYTES
);
pQueryInfo
->
exprList
=
taosArrayInit
(
4
,
POINTER_BYTES
);
pQueryInfo
->
colList
=
taosArrayInit
(
4
,
POINTER_BYTES
);
pQueryInfo
->
colList
=
taosArrayInit
(
4
,
POINTER_BYTES
);
pQueryInfo
->
udColumnId
=
TSDB_UD_COLUMN_INDEX
;
pQueryInfo
->
udColumnId
=
TSDB_UD_COLUMN_INDEX
;
pQueryInfo
->
window
=
TSWINDOW_INITIALIZER
;
}
}
int32_t
tscAddSubqueryInfo
(
SSqlCmd
*
pCmd
)
{
int32_t
tscAddSubqueryInfo
(
SSqlCmd
*
pCmd
)
{
...
@@ -1555,6 +1554,8 @@ int32_t tscAddSubqueryInfo(SSqlCmd* pCmd) {
...
@@ -1555,6 +1554,8 @@ int32_t tscAddSubqueryInfo(SSqlCmd* pCmd) {
}
}
tscInitQueryInfo
(
pQueryInfo
);
tscInitQueryInfo
(
pQueryInfo
);
pQueryInfo
->
window
=
TSWINDOW_INITIALIZER
;
pQueryInfo
->
msg
=
pCmd
->
payload
;
// pointer to the parent error message buffer
pQueryInfo
->
msg
=
pCmd
->
payload
;
// pointer to the parent error message buffer
pCmd
->
pQueryInfo
[
pCmd
->
numOfClause
++
]
=
pQueryInfo
;
pCmd
->
pQueryInfo
[
pCmd
->
numOfClause
++
]
=
pQueryInfo
;
...
...
src/query/src/qExecutor.c
浏览文件 @
5b6ca20f
...
@@ -1177,7 +1177,7 @@ static int32_t doTSJoinFilter(SQueryRuntimeEnv *pRuntimeEnv, int32_t offset) {
...
@@ -1177,7 +1177,7 @@ static int32_t doTSJoinFilter(SQueryRuntimeEnv *pRuntimeEnv, int32_t offset) {
#if defined(_DEBUG_VIEW)
#if defined(_DEBUG_VIEW)
printf
(
"elem in comp ts file:%"
PRId64
", key:%"
PRId64
", tag:%"
PRIu64
", query order:%d, ts order:%d, traverse:%d, index:%d
\n
"
,
printf
(
"elem in comp ts file:%"
PRId64
", key:%"
PRId64
", tag:%"
PRIu64
", query order:%d, ts order:%d, traverse:%d, index:%d
\n
"
,
elem
.
ts
,
key
,
elem
.
tag
,
pQuery
->
order
.
order
,
pRuntimeEnv
->
pTSBuf
->
tsOrder
,
elem
.
ts
,
key
,
elem
.
tag
.
i64Key
,
pQuery
->
order
.
order
,
pRuntimeEnv
->
pTSBuf
->
tsOrder
,
pRuntimeEnv
->
pTSBuf
->
cur
.
order
,
pRuntimeEnv
->
pTSBuf
->
cur
.
tsIndex
);
pRuntimeEnv
->
pTSBuf
->
cur
.
order
,
pRuntimeEnv
->
pTSBuf
->
cur
.
tsIndex
);
#endif
#endif
...
...
tests/script/general/parser/join.sim
浏览文件 @
5b6ca20f
...
@@ -205,10 +205,12 @@ if $rows != 9 then
...
@@ -205,10 +205,12 @@ if $rows != 9 then
endi
endi
if $data00 != @70-01-01 08:01:40.100@ then
if $data00 != @70-01-01 08:01:40.100@ then
print $data00
return -1
return -1
endi
endi
if $data10 != @70-01-01 08:01:40.200@ then
if $data10 != @70-01-01 08:01:40.200@ then
print $data10
return -1
return -1
endi
endi
...
...
tests/script/general/parser/testSuite.sim
浏览文件 @
5b6ca20f
sleep 2000
#
sleep 2000
run general/parser/alter.sim
#
run general/parser/alter.sim
sleep 2000
#
sleep 2000
run general/parser/alter1.sim
#
run general/parser/alter1.sim
sleep 2000
#
sleep 2000
run general/parser/alter_stable.sim
#
run general/parser/alter_stable.sim
sleep 2000
#
sleep 2000
run general/parser/auto_create_tb.sim
#
run general/parser/auto_create_tb.sim
sleep 2000
#
sleep 2000
run general/parser/auto_create_tb_drop_tb.sim
#
run general/parser/auto_create_tb_drop_tb.sim
sleep 2000
#
sleep 2000
run general/parser/col_arithmetic_operation.sim
#
run general/parser/col_arithmetic_operation.sim
sleep 2000
#
sleep 2000
run general/parser/columnValue.sim
#
run general/parser/columnValue.sim
sleep 2000
#
sleep 2000
run general/parser/commit.sim
#
run general/parser/commit.sim
sleep 2000
#
sleep 2000
run general/parser/create_db.sim
#
run general/parser/create_db.sim
sleep 2000
#
sleep 2000
run general/parser/create_mt.sim
#
run general/parser/create_mt.sim
sleep 2000
#
sleep 2000
run general/parser/create_tb.sim
#
run general/parser/create_tb.sim
sleep 2000
#
sleep 2000
run general/parser/dbtbnameValidate.sim
#
run general/parser/dbtbnameValidate.sim
sleep 2000
#
sleep 2000
run general/parser/fill.sim
#
run general/parser/fill.sim
sleep 2000
#
sleep 2000
run general/parser/fill_stb.sim
#
run general/parser/fill_stb.sim
sleep 2000
#
sleep 2000
#run general/parser/fill_us.sim #
#
#
run general/parser/fill_us.sim #
sleep 2000
#
sleep 2000
run general/parser/first_last.sim
#
run general/parser/first_last.sim
sleep 2000
#
sleep 2000
run general/parser/import_commit1.sim
#
run general/parser/import_commit1.sim
sleep 2000
#
sleep 2000
run general/parser/import_commit2.sim
#
run general/parser/import_commit2.sim
sleep 2000
#
sleep 2000
run general/parser/import_commit3.sim
#
run general/parser/import_commit3.sim
sleep 2000
#
sleep 2000
#run general/parser/import_file.sim
#
#
run general/parser/import_file.sim
sleep 2000
#
sleep 2000
run general/parser/insert_tb.sim
#
run general/parser/insert_tb.sim
sleep 2000
#
sleep 2000
run general/parser/tags_dynamically_specifiy.sim
#
run general/parser/tags_dynamically_specifiy.sim
sleep 2000
#
sleep 2000
run general/parser/interp.sim
#
run general/parser/interp.sim
sleep 2000
#
sleep 2000
run general/parser/lastrow.sim
#
run general/parser/lastrow.sim
sleep 2000
#
sleep 2000
run general/parser/limit.sim
#
run general/parser/limit.sim
sleep 2000
#
sleep 2000
run general/parser/limit1.sim
#
run general/parser/limit1.sim
sleep 2000
#
sleep 2000
run general/parser/limit1_tblocks100.sim
#
run general/parser/limit1_tblocks100.sim
sleep 2000
#
sleep 2000
run general/parser/limit2.sim
#
run general/parser/limit2.sim
sleep 2000
#
sleep 2000
run general/parser/mixed_blocks.sim
#
run general/parser/mixed_blocks.sim
sleep 2000
#
sleep 2000
run general/parser/nchar.sim
#
run general/parser/nchar.sim
sleep 2000
#
sleep 2000
run general/parser/null_char.sim
#
run general/parser/null_char.sim
sleep 2000
#
sleep 2000
run general/parser/selectResNum.sim
#
run general/parser/selectResNum.sim
sleep 2000
#
sleep 2000
run general/parser/select_across_vnodes.sim
#
run general/parser/select_across_vnodes.sim
sleep 2000
#
sleep 2000
run general/parser/select_from_cache_disk.sim
#
run general/parser/select_from_cache_disk.sim
sleep 2000
#
sleep 2000
run general/parser/set_tag_vals.sim
#
run general/parser/set_tag_vals.sim
sleep 2000
#
sleep 2000
run general/parser/single_row_in_tb.sim
#
run general/parser/single_row_in_tb.sim
sleep 2000
#
sleep 2000
run general/parser/slimit.sim
#
run general/parser/slimit.sim
sleep 2000
#
sleep 2000
run general/parser/slimit1.sim
#
run general/parser/slimit1.sim
sleep 2000
#
sleep 2000
run general/parser/slimit_alter_tags.sim
#
run general/parser/slimit_alter_tags.sim
sleep 2000
#
sleep 2000
run general/parser/tbnameIn.sim
#
run general/parser/tbnameIn.sim
sleep 2000
#
sleep 2000
run general/parser/slimit_alter_tags.sim # persistent failed
#
run general/parser/slimit_alter_tags.sim # persistent failed
sleep 2000
#
sleep 2000
run general/parser/join.sim
#
run general/parser/join.sim
sleep 2000
sleep 2000
run general/parser/join_multivnode.sim
run general/parser/join_multivnode.sim
sleep 2000
sleep 2000
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录