Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lzh_me
TDengine
提交
cdd7eed7
TDengine
项目概览
lzh_me
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
cdd7eed7
编写于
3月 30, 2021
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[td-2819] refactor codes.
上级
60010d2e
变更
16
展开全部
隐藏空白更改
内联
并排
Showing
16 changed file
with
829 addition
and
809 deletion
+829
-809
src/client/inc/tscUtil.h
src/client/inc/tscUtil.h
+1
-1
src/client/inc/tsclient.h
src/client/inc/tsclient.h
+1
-1
src/client/src/tscServer.c
src/client/src/tscServer.c
+4
-4
src/client/src/tscSubquery.c
src/client/src/tscSubquery.c
+11
-12
src/client/src/tscUtil.c
src/client/src/tscUtil.c
+61
-61
src/os/tests/test.cpp
src/os/tests/test.cpp
+1
-1
src/query/inc/qExecutor.h
src/query/inc/qExecutor.h
+6
-6
src/query/inc/qPlan.h
src/query/inc/qPlan.h
+23
-0
src/query/inc/qUtil.h
src/query/inc/qUtil.h
+4
-4
src/query/src/qAggMain.c
src/query/src/qAggMain.c
+0
-2
src/query/src/qExecutor.c
src/query/src/qExecutor.c
+633
-633
src/query/src/qPlan.c
src/query/src/qPlan.c
+20
-20
src/query/src/qUtil.c
src/query/src/qUtil.c
+13
-13
src/query/src/queryMain.c
src/query/src/queryMain.c
+5
-5
src/tsdb/src/tsdbRead.c
src/tsdb/src/tsdbRead.c
+1
-1
tests/script/general/parser/testSuite.sim
tests/script/general/parser/testSuite.sim
+45
-45
未找到文件。
src/client/inc/tscUtil.h
浏览文件 @
cdd7eed7
...
...
@@ -300,7 +300,7 @@ CChildTableMeta* tscCreateChildMeta(STableMeta* pTableMeta);
uint32_t
tscGetTableMetaMaxSize
();
int32_t
tscCreateTableMetaFromCChildMeta
(
STableMeta
*
pChild
,
const
char
*
name
);
STableMeta
*
tscTableMetaDup
(
STableMeta
*
pTableMeta
);
int32_t
tscCreateQueryFromQueryInfo
(
SQueryInfo
*
pQueryInfo
,
SQuery
*
pQuery
,
void
*
addr
);
int32_t
tscCreateQueryFromQueryInfo
(
SQueryInfo
*
pQueryInfo
,
SQuery
Attr
*
pQueryAttr
,
void
*
addr
);
void
tsCreateSQLFunctionCtx
(
SQueryInfo
*
pQueryInfo
,
SQLFunctionCtx
*
pCtx
,
SSchemaEx
*
pSchema
);
void
*
createQueryInfoFromQueryNode
(
SQueryInfo
*
pQueryInfo
,
SExprInfo
*
pExprs
,
STableGroupInfo
*
pTableGroupInfo
,
...
...
src/client/inc/tsclient.h
浏览文件 @
cdd7eed7
...
...
@@ -216,7 +216,7 @@ typedef struct SQueryInfo {
SArray
*
pDSOperator
;
// data source operator
SArray
*
pPhyOperator
;
// physical query execution plan
SQuery
*
pQuery
;
// query object
SQuery
Attr
*
pQueryAttr
;
// query object
struct
SQueryInfo
*
sibling
;
// sibling
SArray
*
pUpstream
;
// SArray<struct SQueryInfo>
...
...
src/client/src/tscServer.c
浏览文件 @
cdd7eed7
...
...
@@ -703,7 +703,7 @@ int tscBuildQueryMsg(SSqlObj *pSql, SSqlInfo *pInfo) {
}
SQueryInfo
*
pQueryInfo
=
tscGetActiveQueryInfo
(
pCmd
);
SQuery
query
=
{
0
};
SQuery
Attr
query
=
{
0
};
tscCreateQueryFromQueryInfo
(
pQueryInfo
,
&
query
,
pSql
);
SArray
*
tableScanOperator
=
createTableScanPlan
(
&
query
);
SArray
*
queryOperator
=
createExecOperatorPlan
(
&
query
);
...
...
@@ -2584,10 +2584,10 @@ int tscProcessShowCreateRsp(SSqlObj *pSql) {
int
tscProcessQueryRsp
(
SSqlObj
*
pSql
)
{
SSqlRes
*
pRes
=
&
pSql
->
res
;
SQueryTableRsp
*
pQuery
=
(
SQueryTableRsp
*
)
pRes
->
pRsp
;
pQuery
->
qid
=
htobe64
(
pQuery
->
qid
);
SQueryTableRsp
*
pQuery
Attr
=
(
SQueryTableRsp
*
)
pRes
->
pRsp
;
pQuery
Attr
->
qid
=
htobe64
(
pQueryAttr
->
qid
);
pRes
->
qid
=
pQuery
->
qid
;
pRes
->
qid
=
pQuery
Attr
->
qid
;
pRes
->
data
=
NULL
;
tscResetForNextRetrieve
(
pRes
);
...
...
src/client/src/tscSubquery.c
浏览文件 @
cdd7eed7
...
...
@@ -2018,7 +2018,6 @@ void tscFirstRoundRetrieveCallback(void* param, TAOS_RES* tres, int numOfRows) {
}
pQueryInfo1
->
round
=
1
;
// tscDoQuery(pParent);
executeQuery
(
pParent
,
pQueryInfo1
);
}
...
...
@@ -3228,23 +3227,23 @@ void* createQueryInfoFromQueryNode(SQueryInfo* pQueryInfo, SExprInfo* pExprs, ST
// to make sure third party won't overwrite this structure
pQInfo
->
signature
=
pQInfo
;
SQuery
*
pQuery
=
&
pQInfo
->
query
;
pQInfo
->
runtimeEnv
.
pQuery
=
pQuery
;
tscCreateQueryFromQueryInfo
(
pQueryInfo
,
pQuery
,
addr
);
SQuery
Attr
*
pQueryAttr
=
&
pQInfo
->
query
;
pQInfo
->
runtimeEnv
.
pQuery
Attr
=
pQueryAttr
;
tscCreateQueryFromQueryInfo
(
pQueryInfo
,
pQuery
Attr
,
addr
);
// calculate the result row size
for
(
int16_t
col
=
0
;
col
<
numOfOutput
;
++
col
)
{
assert
(
pExprs
[
col
].
base
.
resBytes
>
0
);
pQuery
->
resultRowSize
+=
pExprs
[
col
].
base
.
resBytes
;
pQuery
Attr
->
resultRowSize
+=
pExprs
[
col
].
base
.
resBytes
;
// keep the tag length
if
(
TSDB_COL_IS_TAG
(
pExprs
[
col
].
base
.
colInfo
.
flag
))
{
pQuery
->
tagLen
+=
pExprs
[
col
].
base
.
resBytes
;
pQuery
Attr
->
tagLen
+=
pExprs
[
col
].
base
.
resBytes
;
}
}
// doUpdateExprColumnIndex(pQuery);
// int32_t ret = createFilterInfo(pQInfo, pQuery);
// doUpdateExprColumnIndex(pQuery
Attr
);
// int32_t ret = createFilterInfo(pQInfo, pQuery
Attr
);
// if (ret != TSDB_CODE_SUCCESS) {
// goto _cleanup;
// }
...
...
@@ -3275,11 +3274,11 @@ void* createQueryInfoFromQueryNode(SQueryInfo* pQueryInfo, SExprInfo* pExprs, ST
SQueryRuntimeEnv
*
pRuntimeEnv
=
&
pQInfo
->
runtimeEnv
;
STimeWindow
window
=
pQuery
->
window
;
STimeWindow
window
=
pQuery
Attr
->
window
;
int32_t
index
=
0
;
for
(
int32_t
i
=
0
;
i
<
numOfGroups
;
++
i
)
{
SArray
*
pa
=
taosArrayGetP
(
pQuery
->
tableGroupInfo
.
pGroupList
,
i
);
SArray
*
pa
=
taosArrayGetP
(
pQuery
Attr
->
tableGroupInfo
.
pGroupList
,
i
);
size_t
s
=
taosArrayGetSize
(
pa
);
SArray
*
p1
=
taosArrayInit
(
s
,
POINTER_BYTES
);
...
...
@@ -3294,7 +3293,7 @@ void* createQueryInfoFromQueryNode(SQueryInfo* pQueryInfo, SExprInfo* pExprs, ST
window
.
skey
=
info
->
lastKey
;
void
*
buf
=
(
char
*
)
pQInfo
->
pBuf
+
index
*
sizeof
(
STableQueryInfo
);
STableQueryInfo
*
item
=
createTableQueryInfo
(
pQuery
,
info
->
pTable
,
pQuery
->
groupbyColumn
,
window
,
buf
);
STableQueryInfo
*
item
=
createTableQueryInfo
(
pQuery
Attr
,
info
->
pTable
,
pQueryAttr
->
groupbyColumn
,
window
,
buf
);
if
(
item
==
NULL
)
{
goto
_cleanup
;
}
...
...
@@ -3308,7 +3307,7 @@ void* createQueryInfoFromQueryNode(SQueryInfo* pQueryInfo, SExprInfo* pExprs, ST
}
}
// colIdCheck(pQuery, pQInfo);
// colIdCheck(pQuery
Attr
, pQInfo);
pQInfo
->
qId
=
0
;
if
(
qId
!=
NULL
)
{
...
...
src/client/src/tscUtil.c
浏览文件 @
cdd7eed7
...
...
@@ -3072,22 +3072,22 @@ STableMeta* tscTableMetaDup(STableMeta* pTableMeta) {
return
p
;
}
static
int32_t
createSecondaryExpr
(
SQuery
*
pQuery
,
SQueryInfo
*
pQueryInfo
,
STableMetaInfo
*
pTableMetaInfo
)
{
static
int32_t
createSecondaryExpr
(
SQuery
Attr
*
pQueryAttr
,
SQueryInfo
*
pQueryInfo
,
STableMetaInfo
*
pTableMetaInfo
)
{
if
(
!
tscIsSecondStageQuery
(
pQueryInfo
))
{
return
TSDB_CODE_SUCCESS
;
}
pQuery
->
numOfExpr2
=
tscNumOfFields
(
pQueryInfo
);
pQuery
->
pExpr2
=
calloc
(
pQuery
->
numOfExpr2
,
sizeof
(
SExprInfo
));
if
(
pQuery
->
pExpr2
==
NULL
)
{
pQuery
Attr
->
numOfExpr2
=
tscNumOfFields
(
pQueryInfo
);
pQuery
Attr
->
pExpr2
=
calloc
(
pQueryAttr
->
numOfExpr2
,
sizeof
(
SExprInfo
));
if
(
pQuery
Attr
->
pExpr2
==
NULL
)
{
return
TSDB_CODE_TSC_OUT_OF_MEMORY
;
}
for
(
int32_t
i
=
0
;
i
<
pQuery
->
numOfExpr2
;
++
i
)
{
for
(
int32_t
i
=
0
;
i
<
pQuery
Attr
->
numOfExpr2
;
++
i
)
{
SInternalField
*
pField
=
tscFieldInfoGetInternalField
(
&
pQueryInfo
->
fieldsInfo
,
i
);
SExprInfo
*
pExpr
=
pField
->
pExpr
;
SSqlExpr
*
pse
=
&
pQuery
->
pExpr2
[
i
].
base
;
SSqlExpr
*
pse
=
&
pQuery
Attr
->
pExpr2
[
i
].
base
;
pse
->
uid
=
pTableMetaInfo
->
pTableMeta
->
id
.
uid
;
pse
->
resColId
=
pExpr
->
base
.
resColId
;
...
...
@@ -3096,8 +3096,8 @@ static int32_t createSecondaryExpr(SQuery* pQuery, SQueryInfo* pQueryInfo, STabl
pse
->
functionId
=
TSDB_FUNC_PRJ
;
pse
->
colInfo
.
colId
=
pExpr
->
base
.
resColId
;
for
(
int32_t
j
=
0
;
j
<
pQuery
->
numOfOutput
;
++
j
)
{
if
(
pQuery
->
pExpr1
[
j
].
base
.
resColId
==
pse
->
colInfo
.
colId
)
{
for
(
int32_t
j
=
0
;
j
<
pQuery
Attr
->
numOfOutput
;
++
j
)
{
if
(
pQuery
Attr
->
pExpr1
[
j
].
base
.
resColId
==
pse
->
colInfo
.
colId
)
{
pse
->
colInfo
.
colIndex
=
j
;
}
}
...
...
@@ -3126,9 +3126,9 @@ static int32_t createSecondaryExpr(SQuery* pQuery, SQueryInfo* pQueryInfo, STabl
return
TSDB_CODE_SUCCESS
;
}
static
int32_t
createTagColumnInfo
(
SQuery
*
pQuery
,
SQueryInfo
*
pQueryInfo
,
STableMetaInfo
*
pTableMetaInfo
)
{
pQuery
->
numOfTags
=
(
int32_t
)
taosArrayGetSize
(
pTableMetaInfo
->
tagColList
);
if
(
pQuery
->
numOfTags
==
0
)
{
static
int32_t
createTagColumnInfo
(
SQuery
Attr
*
pQueryAttr
,
SQueryInfo
*
pQueryInfo
,
STableMetaInfo
*
pTableMetaInfo
)
{
pQuery
Attr
->
numOfTags
=
(
int32_t
)
taosArrayGetSize
(
pTableMetaInfo
->
tagColList
);
if
(
pQuery
Attr
->
numOfTags
==
0
)
{
return
TSDB_CODE_SUCCESS
;
}
...
...
@@ -3136,13 +3136,13 @@ static int32_t createTagColumnInfo(SQuery* pQuery, SQueryInfo* pQueryInfo, STabl
int32_t
numOfTagColumns
=
tscGetNumOfTags
(
pTableMeta
);
pQuery
->
tagColList
=
calloc
(
pQuery
->
numOfTags
,
sizeof
(
SColumnInfo
));
if
(
pQuery
->
tagColList
==
NULL
)
{
pQuery
Attr
->
tagColList
=
calloc
(
pQueryAttr
->
numOfTags
,
sizeof
(
SColumnInfo
));
if
(
pQuery
Attr
->
tagColList
==
NULL
)
{
return
TSDB_CODE_TSC_OUT_OF_MEMORY
;
}
SSchema
*
pSchema
=
tscGetTableTagSchema
(
pTableMeta
);
for
(
int32_t
i
=
0
;
i
<
pQuery
->
numOfTags
;
++
i
)
{
for
(
int32_t
i
=
0
;
i
<
pQuery
Attr
->
numOfTags
;
++
i
)
{
SColumn
*
pCol
=
taosArrayGetP
(
pTableMetaInfo
->
tagColList
,
i
);
SSchema
*
pColSchema
=
&
pSchema
[
pCol
->
colIndex
.
columnIndex
];
...
...
@@ -3151,7 +3151,7 @@ static int32_t createTagColumnInfo(SQuery* pQuery, SQueryInfo* pQueryInfo, STabl
return
TSDB_CODE_TSC_INVALID_SQL
;
}
SColumnInfo
*
pTagCol
=
&
pQuery
->
tagColList
[
i
];
SColumnInfo
*
pTagCol
=
&
pQuery
Attr
->
tagColList
[
i
];
pTagCol
->
colId
=
pColSchema
->
colId
;
pTagCol
->
bytes
=
pColSchema
->
bytes
;
...
...
@@ -3162,98 +3162,98 @@ static int32_t createTagColumnInfo(SQuery* pQuery, SQueryInfo* pQueryInfo, STabl
return
TSDB_CODE_SUCCESS
;
}
int32_t
tscCreateQueryFromQueryInfo
(
SQueryInfo
*
pQueryInfo
,
SQuery
*
pQuery
,
void
*
addr
)
{
memset
(
pQuery
,
0
,
sizeof
(
SQuery
));
int32_t
tscCreateQueryFromQueryInfo
(
SQueryInfo
*
pQueryInfo
,
SQuery
Attr
*
pQueryAttr
,
void
*
addr
)
{
memset
(
pQuery
Attr
,
0
,
sizeof
(
SQueryAttr
));
int16_t
numOfCols
=
taosArrayGetSize
(
pQueryInfo
->
colList
);
int16_t
numOfOutput
=
tscSqlExprNumOfExprs
(
pQueryInfo
);
pQuery
->
topBotQuery
=
tscIsTopBotQuery
(
pQueryInfo
);
pQuery
->
hasTagResults
=
hasTagValOutput
(
pQueryInfo
);
pQuery
->
stabledev
=
isStabledev
(
pQueryInfo
);
pQuery
->
tsCompQuery
=
isTsCompQuery
(
pQueryInfo
);
pQuery
->
simpleAgg
=
isSimpleAggregate
(
pQueryInfo
);
pQuery
->
needReverseScan
=
tscNeedReverseScan
(
pQueryInfo
);
pQuery
->
stableQuery
=
QUERY_IS_STABLE_QUERY
(
pQueryInfo
->
type
);
pQuery
->
groupbyColumn
=
tscGroupbyColumn
(
pQueryInfo
);
pQuery
->
queryBlockDist
=
isBlockDistQuery
(
pQueryInfo
);
pQuery
->
pointInterpQuery
=
tscIsPointInterpQuery
(
pQueryInfo
);
pQuery
->
timeWindowInterpo
=
timeWindowInterpoRequired
(
pQueryInfo
);
pQuery
->
numOfCols
=
numOfCols
;
pQuery
->
numOfOutput
=
numOfOutput
;
pQuery
->
limit
=
pQueryInfo
->
limit
;
pQuery
->
order
=
pQueryInfo
->
order
;
pQuery
->
fillType
=
pQueryInfo
->
fillType
;
pQuery
->
groupbyColumn
=
tscGroupbyColumn
(
pQueryInfo
);
pQuery
->
window
=
pQueryInfo
->
window
;
memcpy
(
&
pQuery
->
interval
,
&
pQueryInfo
->
interval
,
sizeof
(
pQuery
->
interval
));
pQuery
Attr
->
topBotQuery
=
tscIsTopBotQuery
(
pQueryInfo
);
pQuery
Attr
->
hasTagResults
=
hasTagValOutput
(
pQueryInfo
);
pQuery
Attr
->
stabledev
=
isStabledev
(
pQueryInfo
);
pQuery
Attr
->
tsCompQuery
=
isTsCompQuery
(
pQueryInfo
);
pQuery
Attr
->
simpleAgg
=
isSimpleAggregate
(
pQueryInfo
);
pQuery
Attr
->
needReverseScan
=
tscNeedReverseScan
(
pQueryInfo
);
pQuery
Attr
->
stableQuery
=
QUERY_IS_STABLE_QUERY
(
pQueryInfo
->
type
);
pQuery
Attr
->
groupbyColumn
=
tscGroupbyColumn
(
pQueryInfo
);
pQuery
Attr
->
queryBlockDist
=
isBlockDistQuery
(
pQueryInfo
);
pQuery
Attr
->
pointInterpQuery
=
tscIsPointInterpQuery
(
pQueryInfo
);
pQuery
Attr
->
timeWindowInterpo
=
timeWindowInterpoRequired
(
pQueryInfo
);
pQuery
Attr
->
numOfCols
=
numOfCols
;
pQuery
Attr
->
numOfOutput
=
numOfOutput
;
pQuery
Attr
->
limit
=
pQueryInfo
->
limit
;
pQuery
Attr
->
order
=
pQueryInfo
->
order
;
pQuery
Attr
->
fillType
=
pQueryInfo
->
fillType
;
pQuery
Attr
->
groupbyColumn
=
tscGroupbyColumn
(
pQueryInfo
);
pQuery
Attr
->
window
=
pQueryInfo
->
window
;
memcpy
(
&
pQuery
Attr
->
interval
,
&
pQueryInfo
->
interval
,
sizeof
(
pQueryAttr
->
interval
));
STableMetaInfo
*
pTableMetaInfo
=
pQueryInfo
->
pTableMetaInfo
[
0
];
pQuery
->
pGroupbyExpr
=
calloc
(
1
,
sizeof
(
SSqlGroupbyExpr
));
*
(
pQuery
->
pGroupbyExpr
)
=
pQueryInfo
->
groupbyExpr
;
pQuery
Attr
->
pGroupbyExpr
=
calloc
(
1
,
sizeof
(
SSqlGroupbyExpr
));
*
(
pQuery
Attr
->
pGroupbyExpr
)
=
pQueryInfo
->
groupbyExpr
;
pQuery
->
pExpr1
=
calloc
(
pQuery
->
numOfOutput
,
sizeof
(
SExprInfo
));
for
(
int32_t
i
=
0
;
i
<
pQuery
->
numOfOutput
;
++
i
)
{
pQuery
Attr
->
pExpr1
=
calloc
(
pQueryAttr
->
numOfOutput
,
sizeof
(
SExprInfo
));
for
(
int32_t
i
=
0
;
i
<
pQuery
Attr
->
numOfOutput
;
++
i
)
{
SExprInfo
*
pExpr
=
tscSqlExprGet
(
pQueryInfo
,
i
);
tscSqlExprAssign
(
&
pQuery
->
pExpr1
[
i
],
pExpr
);
tscSqlExprAssign
(
&
pQuery
Attr
->
pExpr1
[
i
],
pExpr
);
}
pQuery
->
colList
=
calloc
(
numOfCols
,
sizeof
(
SColumnInfo
));
pQuery
Attr
->
colList
=
calloc
(
numOfCols
,
sizeof
(
SColumnInfo
));
for
(
int32_t
i
=
0
;
i
<
numOfCols
;
++
i
)
{
SColumn
*
pCol
=
taosArrayGetP
(
pQueryInfo
->
colList
,
i
);
if
(
!
isValidDataType
(
pCol
->
info
.
type
)
||
pCol
->
info
.
type
==
TSDB_DATA_TYPE_NULL
)
{
assert
(
0
);
}
pQuery
->
colList
[
i
]
=
pCol
->
info
;
pQuery
->
colList
[
i
].
filterInfo
=
tFilterInfoDup
(
pCol
->
info
.
filterInfo
,
pQuery
->
colList
[
i
].
numOfFilters
);
pQuery
Attr
->
colList
[
i
]
=
pCol
->
info
;
pQuery
Attr
->
colList
[
i
].
filterInfo
=
tFilterInfoDup
(
pCol
->
info
.
filterInfo
,
pQueryAttr
->
colList
[
i
].
numOfFilters
);
}
// for simple table, not for super table
int32_t
code
=
createSecondaryExpr
(
pQuery
,
pQueryInfo
,
pTableMetaInfo
);
int32_t
code
=
createSecondaryExpr
(
pQuery
Attr
,
pQueryInfo
,
pTableMetaInfo
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
return
code
;
}
// tag column info
code
=
createTagColumnInfo
(
pQuery
,
pQueryInfo
,
pTableMetaInfo
);
code
=
createTagColumnInfo
(
pQuery
Attr
,
pQueryInfo
,
pTableMetaInfo
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
return
code
;
}
if
(
pQuery
->
fillType
!=
TSDB_FILL_NONE
)
{
pQuery
->
fillVal
=
calloc
(
pQuery
->
numOfOutput
,
sizeof
(
int64_t
));
memcpy
(
pQuery
->
fillVal
,
pQueryInfo
->
fillVal
,
pQuery
->
numOfOutput
*
sizeof
(
int64_t
));
if
(
pQuery
Attr
->
fillType
!=
TSDB_FILL_NONE
)
{
pQuery
Attr
->
fillVal
=
calloc
(
pQueryAttr
->
numOfOutput
,
sizeof
(
int64_t
));
memcpy
(
pQuery
Attr
->
fillVal
,
pQueryInfo
->
fillVal
,
pQueryAttr
->
numOfOutput
*
sizeof
(
int64_t
));
}
pQuery
->
srcRowSize
=
0
;
pQuery
->
maxTableColumnWidth
=
0
;
pQuery
Attr
->
srcRowSize
=
0
;
pQuery
Attr
->
maxTableColumnWidth
=
0
;
for
(
int16_t
i
=
0
;
i
<
numOfCols
;
++
i
)
{
pQuery
->
srcRowSize
+=
pQuery
->
colList
[
i
].
bytes
;
if
(
pQuery
->
maxTableColumnWidth
<
pQuery
->
colList
[
i
].
bytes
)
{
pQuery
->
maxTableColumnWidth
=
pQuery
->
colList
[
i
].
bytes
;
pQuery
Attr
->
srcRowSize
+=
pQueryAttr
->
colList
[
i
].
bytes
;
if
(
pQuery
Attr
->
maxTableColumnWidth
<
pQueryAttr
->
colList
[
i
].
bytes
)
{
pQuery
Attr
->
maxTableColumnWidth
=
pQueryAttr
->
colList
[
i
].
bytes
;
}
}
pQuery
->
interBufSize
=
getOutputInterResultBufSize
(
pQuery
);
pQuery
Attr
->
interBufSize
=
getOutputInterResultBufSize
(
pQueryAttr
);
if
(
pQuery
->
numOfCols
<=
0
&&
!
tscQueryTags
(
pQueryInfo
)
&&
!
pQuery
->
queryBlockDist
)
{
if
(
pQuery
Attr
->
numOfCols
<=
0
&&
!
tscQueryTags
(
pQueryInfo
)
&&
!
pQueryAttr
->
queryBlockDist
)
{
tscError
(
"%p illegal value of numOfCols in query msg: %"
PRIu64
", table cols:%d"
,
addr
,
(
uint64_t
)
pQuery
->
numOfCols
,
numOfCols
);
(
uint64_t
)
pQuery
Attr
->
numOfCols
,
numOfCols
);
return
TSDB_CODE_TSC_INVALID_SQL
;
}
if
(
pQuery
->
interval
.
interval
<
0
)
{
if
(
pQuery
Attr
->
interval
.
interval
<
0
)
{
tscError
(
"%p illegal value of aggregation time interval in query msg: %"
PRId64
,
addr
,
(
int64_t
)
pQueryInfo
->
interval
.
interval
);
return
TSDB_CODE_TSC_INVALID_SQL
;
}
if
(
pQuery
->
pGroupbyExpr
->
numOfGroupCols
<
0
)
{
if
(
pQuery
Attr
->
pGroupbyExpr
->
numOfGroupCols
<
0
)
{
tscError
(
"%p illegal value of numOfGroupCols in query msg: %d"
,
addr
,
pQueryInfo
->
groupbyExpr
.
numOfGroupCols
);
return
TSDB_CODE_TSC_INVALID_SQL
;
}
...
...
src/os/tests/test.cpp
浏览文件 @
cdd7eed7
...
...
@@ -18,7 +18,7 @@ TEST(testCase, parse_time) {
deltaToUtcInitOnce
();
// window: 1500000001000, 1500002000000
// pQuery->interval: interval: 86400000, sliding:3600000
// pQuery
Attr
->interval: interval: 86400000, sliding:3600000
int64_t
key
=
1500000001000
;
SInterval
interval
=
{
0
};
interval
.
interval
=
86400000
;
...
...
src/query/inc/qExecutor.h
浏览文件 @
cdd7eed7
...
...
@@ -179,7 +179,7 @@ typedef struct SSDataBlock {
// The basic query information extracted from the SQueryInfo tree to support the
// execution of query in a data node.
typedef
struct
SQuery
{
typedef
struct
SQuery
Attr
{
SLimitVal
limit
;
bool
stableQuery
;
// super table query or not
...
...
@@ -226,7 +226,7 @@ typedef struct SQuery {
SMemRef
memRef
;
STableGroupInfo
tableGroupInfo
;
// table <tid, last_key> list SArray<STableKeyInfo>
int32_t
vgId
;
}
SQuery
;
}
SQuery
Attr
;
typedef
SSDataBlock
*
(
*
__operator_fn_t
)(
void
*
param
);
typedef
void
(
*
__optr_cleanup_fn_t
)(
void
*
param
,
int32_t
num
);
...
...
@@ -235,7 +235,7 @@ struct SOperatorInfo;
typedef
struct
SQueryRuntimeEnv
{
jmp_buf
env
;
SQuery
*
pQuery
;
SQuery
Attr
*
pQueryAttr
;
uint32_t
status
;
// query status
void
*
qinfo
;
uint8_t
scanFlag
;
// denotes reversed scan of data or not
...
...
@@ -324,7 +324,7 @@ typedef struct SQInfo {
int64_t
owner
;
// if it is in execution
SQueryRuntimeEnv
runtimeEnv
;
SQuery
query
;
SQuery
Attr
query
;
void
*
pBuf
;
// allocated buffer for STableQueryInfo, sizeof(STableQueryInfo)*numOfTables;
pthread_mutex_t
lock
;
// used to synchronize the rsp/query threads
...
...
@@ -451,14 +451,14 @@ int32_t initQInfo(STsBufInfo* pTsBufInfo, void* tsdb, SQInfo* pQInfo, SQueryPara
void
freeColumnFilterInfo
(
SColumnFilterInfo
*
pFilter
,
int32_t
numOfFilters
);
STableQueryInfo
*
createTableQueryInfo
(
SQuery
*
pQuery
,
void
*
pTable
,
bool
groupbyColumn
,
STimeWindow
win
,
void
*
buf
);
STableQueryInfo
*
createTableQueryInfo
(
SQuery
Attr
*
pQueryAttr
,
void
*
pTable
,
bool
groupbyColumn
,
STimeWindow
win
,
void
*
buf
);
bool
isQueryKilled
(
SQInfo
*
pQInfo
);
int32_t
checkForQueryBuf
(
size_t
numOfTables
);
bool
doBuildResCheck
(
SQInfo
*
pQInfo
);
void
setQueryStatus
(
SQueryRuntimeEnv
*
pRuntimeEnv
,
int8_t
status
);
bool
onlyQueryTags
(
SQuery
*
pQuery
);
bool
onlyQueryTags
(
SQuery
Attr
*
pQueryAttr
);
bool
isValidQInfo
(
void
*
param
);
int32_t
doDumpQueryResult
(
SQInfo
*
pQInfo
,
char
*
data
);
...
...
src/query/inc/qPlan.h
0 → 100644
浏览文件 @
cdd7eed7
/*
* Copyright (c) 2019 TAOS Data, Inc. <jhtao@taosdata.com>
*
* This program is free software: you can use, redistribute, and/or modify
* it under the terms of the GNU Affero General Public License, version 3
* or later ("AGPL"), as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef TDENGINE_QPLAN_H
#define TDENGINE_QPLAN_H
//TODO refactor
SArray
*
createTableScanPlan
(
SQueryAttr
*
pQueryAttr
);
SArray
*
createExecOperatorPlan
(
SQueryAttr
*
pQueryAttr
);
#endif // TDENGINE_QPLAN_H
src/query/inc/qUtil.h
浏览文件 @
cdd7eed7
...
...
@@ -29,7 +29,7 @@
#define curTimeWindowIndex(_winres) ((_winres)->curIndex)
#define GET_ROW_PARAM_FOR_MULTIOUTPUT(_q, tbq, sq) (((tbq) && (!(sq)))? (_q)->pExpr1[1].base.param[0].i64:1)
int32_t
getOutputInterResultBufSize
(
SQuery
*
pQuery
);
int32_t
getOutputInterResultBufSize
(
SQuery
Attr
*
pQueryAttr
);
size_t
getResultRowSize
(
SQueryRuntimeEnv
*
pRuntimeEnv
);
int32_t
initResultRowInfo
(
SResultRowInfo
*
pResultRowInfo
,
int32_t
size
,
int16_t
type
);
...
...
@@ -51,10 +51,10 @@ static FORCE_INLINE SResultRow *getResultRow(SResultRowInfo *pResultRowInfo, int
return
pResultRowInfo
->
pResult
[
slot
];
}
static
FORCE_INLINE
char
*
getPosInResultPage
(
SQuery
*
pQuery
,
tFilePage
*
page
,
int32_t
rowOffset
,
int16_t
offset
)
{
assert
(
rowOffset
>=
0
&&
pQuery
!=
NULL
);
static
FORCE_INLINE
char
*
getPosInResultPage
(
SQuery
Attr
*
pQueryAttr
,
tFilePage
*
page
,
int32_t
rowOffset
,
int16_t
offset
)
{
assert
(
rowOffset
>=
0
&&
pQuery
Attr
!=
NULL
);
int32_t
numOfRows
=
(
int32_t
)
GET_ROW_PARAM_FOR_MULTIOUTPUT
(
pQuery
,
pQuery
->
topBotQuery
,
pQuery
->
stableQuery
);
int32_t
numOfRows
=
(
int32_t
)
GET_ROW_PARAM_FOR_MULTIOUTPUT
(
pQuery
Attr
,
pQueryAttr
->
topBotQuery
,
pQueryAttr
->
stableQuery
);
return
((
char
*
)
page
->
data
)
+
rowOffset
+
offset
*
numOfRows
;
}
...
...
src/query/src/qAggMain.c
浏览文件 @
cdd7eed7
...
...
@@ -3318,8 +3318,6 @@ static void col_project_function_f(SQLFunctionCtx *pCtx, int32_t index) {
INC_INIT_VAL
(
pCtx
,
1
);
char
*
pData
=
GET_INPUT_DATA
(
pCtx
,
index
);
memcpy
(
pCtx
->
pOutput
,
pData
,
pCtx
->
inputBytes
);
pCtx
->
pOutput
+=
pCtx
->
inputBytes
;
}
/**
...
...
src/query/src/qExecutor.c
浏览文件 @
cdd7eed7
此差异已折叠。
点击以展开。
src/query/src/qPlan.c
浏览文件 @
cdd7eed7
...
...
@@ -36,17 +36,17 @@ SQueryNode* queryPlanFromString() {
return
NULL
;
}
SArray
*
createTableScanPlan
(
SQuery
*
pQuery
)
{
SArray
*
createTableScanPlan
(
SQuery
Attr
*
pQueryAttr
)
{
SArray
*
plan
=
taosArrayInit
(
4
,
sizeof
(
int32_t
));
int32_t
op
=
0
;
if
(
onlyQueryTags
(
pQuery
))
{
if
(
onlyQueryTags
(
pQuery
Attr
))
{
// op = OP_TagScan;
}
else
if
(
pQuery
->
queryBlockDist
)
{
}
else
if
(
pQuery
Attr
->
queryBlockDist
)
{
op
=
OP_TableBlockInfoScan
;
}
else
if
(
pQuery
->
tsCompQuery
||
pQuery
->
pointInterpQuery
)
{
}
else
if
(
pQuery
Attr
->
tsCompQuery
||
pQueryAttr
->
pointInterpQuery
)
{
op
=
OP_TableSeqScan
;
}
else
if
(
pQuery
->
needReverseScan
)
{
}
else
if
(
pQuery
Attr
->
needReverseScan
)
{
op
=
OP_DataBlocksOptScan
;
}
else
{
op
=
OP_TableScan
;
...
...
@@ -56,50 +56,50 @@ SArray* createTableScanPlan(SQuery* pQuery) {
return
plan
;
}
SArray
*
createExecOperatorPlan
(
SQuery
*
pQuery
)
{
SArray
*
createExecOperatorPlan
(
SQuery
Attr
*
pQueryAttr
)
{
SArray
*
plan
=
taosArrayInit
(
4
,
sizeof
(
int32_t
));
int32_t
op
=
0
;
if
(
onlyQueryTags
(
pQuery
))
{
// do nothing for tags query
if
(
onlyQueryTags
(
pQuery
Attr
))
{
// do nothing for tags query
op
=
OP_TagScan
;
taosArrayPush
(
plan
,
&
op
);
}
else
if
(
pQuery
->
interval
.
interval
>
0
)
{
if
(
pQuery
->
stableQuery
)
{
}
else
if
(
pQuery
Attr
->
interval
.
interval
>
0
)
{
if
(
pQuery
Attr
->
stableQuery
)
{
op
=
OP_MultiTableTimeInterval
;
taosArrayPush
(
plan
,
&
op
);
}
else
{
op
=
OP_TimeWindow
;
taosArrayPush
(
plan
,
&
op
);
if
(
pQuery
->
pExpr2
!=
NULL
)
{
if
(
pQuery
Attr
->
pExpr2
!=
NULL
)
{
op
=
OP_Arithmetic
;
taosArrayPush
(
plan
,
&
op
);
}
if
(
pQuery
->
fillType
!=
TSDB_FILL_NONE
&&
(
!
pQuery
->
pointInterpQuery
))
{
if
(
pQuery
Attr
->
fillType
!=
TSDB_FILL_NONE
&&
(
!
pQueryAttr
->
pointInterpQuery
))
{
op
=
OP_Fill
;
taosArrayPush
(
plan
,
&
op
);
}
}
}
else
if
(
pQuery
->
groupbyColumn
)
{
}
else
if
(
pQuery
Attr
->
groupbyColumn
)
{
op
=
OP_Groupby
;
taosArrayPush
(
plan
,
&
op
);
if
(
pQuery
->
pExpr2
!=
NULL
)
{
if
(
pQuery
Attr
->
pExpr2
!=
NULL
)
{
op
=
OP_Arithmetic
;
taosArrayPush
(
plan
,
&
op
);
}
}
else
if
(
pQuery
->
sw
.
gap
>
0
)
{
}
else
if
(
pQuery
Attr
->
sw
.
gap
>
0
)
{
op
=
OP_SessionWindow
;
taosArrayPush
(
plan
,
&
op
);
if
(
pQuery
->
pExpr2
!=
NULL
)
{
if
(
pQuery
Attr
->
pExpr2
!=
NULL
)
{
op
=
OP_Arithmetic
;
taosArrayPush
(
plan
,
&
op
);
}
}
else
if
(
pQuery
->
simpleAgg
)
{
if
(
pQuery
->
stableQuery
&&
!
pQuery
->
tsCompQuery
)
{
}
else
if
(
pQuery
Attr
->
simpleAgg
)
{
if
(
pQuery
Attr
->
stableQuery
&&
!
pQueryAttr
->
tsCompQuery
)
{
op
=
OP_MultiTableAggregate
;
}
else
{
op
=
OP_Aggregate
;
...
...
@@ -107,7 +107,7 @@ SArray* createExecOperatorPlan(SQuery* pQuery) {
taosArrayPush
(
plan
,
&
op
);
if
(
pQuery
->
pExpr2
!=
NULL
&&
!
pQuery
->
stableQuery
)
{
if
(
pQuery
Attr
->
pExpr2
!=
NULL
&&
!
pQueryAttr
->
stableQuery
)
{
op
=
OP_Arithmetic
;
taosArrayPush
(
plan
,
&
op
);
}
...
...
@@ -116,12 +116,12 @@ SArray* createExecOperatorPlan(SQuery* pQuery) {
taosArrayPush
(
plan
,
&
op
);
}
if
(
pQuery
->
limit
.
offset
>
0
)
{
if
(
pQuery
Attr
->
limit
.
offset
>
0
)
{
op
=
OP_Offset
;
taosArrayPush
(
plan
,
&
op
);
}
if
(
pQuery
->
limit
.
limit
>
0
)
{
if
(
pQuery
Attr
->
limit
.
limit
>
0
)
{
op
=
OP_Limit
;
taosArrayPush
(
plan
,
&
op
);
}
...
...
src/query/src/qUtil.c
浏览文件 @
cdd7eed7
...
...
@@ -30,11 +30,11 @@ typedef struct SCompSupporter {
int32_t
order
;
}
SCompSupporter
;
int32_t
getOutputInterResultBufSize
(
SQuery
*
pQuery
)
{
int32_t
getOutputInterResultBufSize
(
SQuery
Attr
*
pQueryAttr
)
{
int32_t
size
=
0
;
for
(
int32_t
i
=
0
;
i
<
pQuery
->
numOfOutput
;
++
i
)
{
size
+=
pQuery
->
pExpr1
[
i
].
base
.
interBytes
;
for
(
int32_t
i
=
0
;
i
<
pQuery
Attr
->
numOfOutput
;
++
i
)
{
size
+=
pQuery
Attr
->
pExpr1
[
i
].
base
.
interBytes
;
}
assert
(
size
>=
0
);
...
...
@@ -136,11 +136,11 @@ void clearResultRow(SQueryRuntimeEnv *pRuntimeEnv, SResultRow *pResultRow, int16
tFilePage
*
page
=
getResBufPage
(
pRuntimeEnv
->
pResultBuf
,
pResultRow
->
pageId
);
int16_t
offset
=
0
;
for
(
int32_t
i
=
0
;
i
<
pRuntimeEnv
->
pQuery
->
numOfOutput
;
++
i
)
{
for
(
int32_t
i
=
0
;
i
<
pRuntimeEnv
->
pQuery
Attr
->
numOfOutput
;
++
i
)
{
SResultRowCellInfo
*
pResultInfo
=
&
pResultRow
->
pCellInfo
[
i
];
int16_t
size
=
pRuntimeEnv
->
pQuery
->
pExpr1
[
i
].
base
.
resType
;
char
*
s
=
getPosInResultPage
(
pRuntimeEnv
->
pQuery
,
page
,
pResultRow
->
offset
,
offset
);
int16_t
size
=
pRuntimeEnv
->
pQuery
Attr
->
pExpr1
[
i
].
base
.
resType
;
char
*
s
=
getPosInResultPage
(
pRuntimeEnv
->
pQuery
Attr
,
page
,
pResultRow
->
offset
,
offset
);
memset
(
s
,
0
,
size
);
offset
+=
size
;
...
...
@@ -167,8 +167,8 @@ SResultRowCellInfo* getResultCell(const SResultRow* pRow, int32_t index, int32_t
}
size_t
getResultRowSize
(
SQueryRuntimeEnv
*
pRuntimeEnv
)
{
SQuery
*
pQuery
=
pRuntimeEnv
->
pQuery
;
return
(
pQuery
->
numOfOutput
*
sizeof
(
SResultRowCellInfo
))
+
pQuery
->
interBufSize
+
sizeof
(
SResultRow
);
SQuery
Attr
*
pQueryAttr
=
pRuntimeEnv
->
pQueryAttr
;
return
(
pQuery
Attr
->
numOfOutput
*
sizeof
(
SResultRowCellInfo
))
+
pQueryAttr
->
interBufSize
+
sizeof
(
SResultRow
);
}
SResultRowPool
*
initResultRowPool
(
size_t
size
)
{
...
...
@@ -385,10 +385,10 @@ int32_t getNumOfTotalRes(SGroupResInfo* pGroupResInfo) {
}
static
int64_t
getNumOfResultWindowRes
(
SQueryRuntimeEnv
*
pRuntimeEnv
,
SResultRow
*
pResultRow
,
int32_t
*
rowCellInfoOffset
)
{
SQuery
*
pQuery
=
pRuntimeEnv
->
pQuery
;
SQuery
Attr
*
pQueryAttr
=
pRuntimeEnv
->
pQueryAttr
;
for
(
int32_t
j
=
0
;
j
<
pQuery
->
numOfOutput
;
++
j
)
{
int32_t
functionId
=
pQuery
->
pExpr1
[
j
].
base
.
functionId
;
for
(
int32_t
j
=
0
;
j
<
pQuery
Attr
->
numOfOutput
;
++
j
)
{
int32_t
functionId
=
pQuery
Attr
->
pExpr1
[
j
].
base
.
functionId
;
/*
* ts, tag, tagprj function can not decide the output number of current query
...
...
@@ -451,7 +451,7 @@ static int32_t tableResultComparFn(const void *pLeft, const void *pRight, void *
static
int32_t
mergeIntoGroupResultImpl
(
SQueryRuntimeEnv
*
pRuntimeEnv
,
SGroupResInfo
*
pGroupResInfo
,
SArray
*
pTableList
,
int32_t
*
rowCellInfoOffset
)
{
bool
ascQuery
=
QUERY_IS_ASC_QUERY
(
pRuntimeEnv
->
pQuery
);
bool
ascQuery
=
QUERY_IS_ASC_QUERY
(
pRuntimeEnv
->
pQuery
Attr
);
int32_t
code
=
TSDB_CODE_SUCCESS
;
...
...
@@ -487,7 +487,7 @@ static int32_t mergeIntoGroupResultImpl(SQueryRuntimeEnv *pRuntimeEnv, SGroupRes
goto
_end
;
}
SCompSupporter
cs
=
{
pTableQueryInfoList
,
posList
,
pRuntimeEnv
->
pQuery
->
order
.
order
};
SCompSupporter
cs
=
{
pTableQueryInfoList
,
posList
,
pRuntimeEnv
->
pQuery
Attr
->
order
.
order
};
int32_t
ret
=
tLoserTreeCreate
(
&
pTree
,
numOfTables
,
&
cs
,
tableResultComparFn
);
if
(
ret
!=
TSDB_CODE_SUCCESS
)
{
...
...
src/query/src/queryMain.c
浏览文件 @
cdd7eed7
...
...
@@ -273,14 +273,14 @@ int32_t qRetrieveQueryResultInfo(qinfo_t qinfo, bool* buildRes, void* pRspContex
code
=
pQInfo
->
code
;
}
else
{
SQueryRuntimeEnv
*
pRuntimeEnv
=
&
pQInfo
->
runtimeEnv
;
SQuery
*
pQuery
=
pQInfo
->
runtimeEnv
.
pQuery
;
SQuery
Attr
*
pQueryAttr
=
pQInfo
->
runtimeEnv
.
pQueryAttr
;
pthread_mutex_lock
(
&
pQInfo
->
lock
);
assert
(
pQInfo
->
rspContext
==
NULL
);
if
(
pQInfo
->
dataReady
==
QUERY_RESULT_READY
)
{
*
buildRes
=
true
;
qDebug
(
"QInfo:%p retrieve result info, rowsize:%d, rows:%d, code:%s"
,
pQInfo
,
pQuery
->
resultRowSize
,
qDebug
(
"QInfo:%p retrieve result info, rowsize:%d, rows:%d, code:%s"
,
pQInfo
,
pQuery
Attr
->
resultRowSize
,
GET_NUM_OF_RESULTS
(
pRuntimeEnv
),
tstrerror
(
pQInfo
->
code
));
}
else
{
*
buildRes
=
false
;
...
...
@@ -303,11 +303,11 @@ int32_t qDumpRetrieveResult(qinfo_t qinfo, SRetrieveTableRsp **pRsp, int32_t *co
return
TSDB_CODE_QRY_INVALID_QHANDLE
;
}
SQuery
*
pQuery
=
pQInfo
->
runtimeEnv
.
pQuery
;
SQuery
Attr
*
pQueryAttr
=
pQInfo
->
runtimeEnv
.
pQueryAttr
;
SQueryRuntimeEnv
*
pRuntimeEnv
=
&
pQInfo
->
runtimeEnv
;
int32_t
s
=
GET_NUM_OF_RESULTS
(
pRuntimeEnv
);
size_t
size
=
pQuery
->
resultRowSize
*
s
;
size_t
size
=
pQuery
Attr
->
resultRowSize
*
s
;
size
+=
sizeof
(
int32_t
);
size
+=
sizeof
(
STableIdInfo
)
*
taosHashGetSize
(
pRuntimeEnv
->
pTableRetrieveTsMap
);
...
...
@@ -329,7 +329,7 @@ int32_t qDumpRetrieveResult(qinfo_t qinfo, SRetrieveTableRsp **pRsp, int32_t *co
(
*
pRsp
)
->
useconds
=
htobe64
(
pQInfo
->
summary
.
elapsedTime
);
}
(
*
pRsp
)
->
precision
=
htons
(
pQuery
->
precision
);
(
*
pRsp
)
->
precision
=
htons
(
pQuery
Attr
->
precision
);
if
(
GET_NUM_OF_RESULTS
(
&
(
pQInfo
->
runtimeEnv
))
>
0
&&
pQInfo
->
code
==
TSDB_CODE_SUCCESS
)
{
doDumpQueryResult
(
pQInfo
,
(
*
pRsp
)
->
data
);
}
else
{
...
...
src/tsdb/src/tsdbRead.c
浏览文件 @
cdd7eed7
...
...
@@ -123,7 +123,7 @@ typedef struct STsdbQueryHandle {
SMemRef
*
pMemRef
;
SArray
*
defaultLoadColumn
;
// default load column
SDataBlockLoadInfo
dataBlockLoadInfo
;
/* record current block load information */
SLoadCompBlockInfo
compBlockLoadInfo
;
/* record current compblock information in SQuery */
SLoadCompBlockInfo
compBlockLoadInfo
;
/* record current compblock information in SQuery
Attr
*/
SArray
*
prev
;
// previous row which is before than time window
SArray
*
next
;
// next row which is after the query time window
...
...
tests/script/general/parser/testSuite.sim
浏览文件 @
cdd7eed7
run general/parser/alter.sim
run general/parser/alter1.sim
run general/parser/alter_stable.sim
run general/parser/auto_create_tb.sim
run general/parser/auto_create_tb_drop_tb.sim
run general/parser/col_arithmetic_operation.sim
run general/parser/columnValue.sim
run general/parser/commit.sim
run general/parser/create_db.sim
run general/parser/create_mt.sim
run general/parser/create_tb.sim
run general/parser/dbtbnameValidate.sim
run general/parser/fill.sim
run general/parser/fill_stb.sim
#run general/parser/fill_us.sim #
run general/parser/first_last.sim
run general/parser/import_commit1.sim
run general/parser/import_commit2.sim
run general/parser/import_commit3.sim
#run general/parser/import_file.sim
run general/parser/insert_tb.sim
run general/parser/tags_dynamically_specifiy.sim
run general/parser/interp.sim
run general/parser/lastrow.sim
run general/parser/limit.sim
run general/parser/limit1.sim
run general/parser/limit1_tblocks100.sim
run general/parser/limit2.sim
run general/parser/mixed_blocks.sim
run general/parser/nchar.sim
run general/parser/null_char.sim
run general/parser/selectResNum.sim
run general/parser/select_across_vnodes.sim
run general/parser/select_from_cache_disk.sim
run general/parser/set_tag_vals.sim
run general/parser/single_row_in_tb.sim
run general/parser/slimit.sim
run general/parser/slimit1.sim
run general/parser/slimit_alter_tags.sim
run general/parser/tbnameIn.sim
run general/parser/slimit_alter_tags.sim # persistent failed
run general/parser/join.sim
run general/parser/join_multivnode.sim
run general/parser/join_manyblocks.sim
#
run general/parser/alter.sim
#
run general/parser/alter1.sim
#
run general/parser/alter_stable.sim
#
run general/parser/auto_create_tb.sim
#
run general/parser/auto_create_tb_drop_tb.sim
#
run general/parser/col_arithmetic_operation.sim
#
run general/parser/columnValue.sim
#
run general/parser/commit.sim
#
run general/parser/create_db.sim
#
run general/parser/create_mt.sim
#
run general/parser/create_tb.sim
#
run general/parser/dbtbnameValidate.sim
#
run general/parser/fill.sim
#
run general/parser/fill_stb.sim
#
#
run general/parser/fill_us.sim #
#
run general/parser/first_last.sim
#
run general/parser/import_commit1.sim
#
run general/parser/import_commit2.sim
#
run general/parser/import_commit3.sim
#
#
run general/parser/import_file.sim
#
run general/parser/insert_tb.sim
#
run general/parser/tags_dynamically_specifiy.sim
#
run general/parser/interp.sim
#
run general/parser/lastrow.sim
#
run general/parser/limit.sim
#
run general/parser/limit1.sim
#
run general/parser/limit1_tblocks100.sim
#
run general/parser/limit2.sim
#
run general/parser/mixed_blocks.sim
#
run general/parser/nchar.sim
#
run general/parser/null_char.sim
#
run general/parser/selectResNum.sim
#
run general/parser/select_across_vnodes.sim
#
run general/parser/select_from_cache_disk.sim
#
run general/parser/set_tag_vals.sim
#
run general/parser/single_row_in_tb.sim
#
run general/parser/slimit.sim
#
run general/parser/slimit1.sim
#
run general/parser/slimit_alter_tags.sim
#
run general/parser/tbnameIn.sim
#
run general/parser/slimit_alter_tags.sim # persistent failed
#
run general/parser/join.sim
#
run general/parser/join_multivnode.sim
#
run general/parser/join_manyblocks.sim
run general/parser/projection_limit_offset.sim
run general/parser/select_with_tags.sim
run general/parser/groupby.sim
#
run general/parser/groupby.sim
run general/parser/tags_filter.sim
run general/parser/topbot.sim
run general/parser/union.sim
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录