Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
qq_50753323
TDengine
提交
50f432c6
T
TDengine
项目概览
qq_50753323
/
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
50f432c6
编写于
5月 09, 2020
作者:
weixin_48148422
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix typo
上级
89147604
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
40 addition
and
49 deletion
+40
-49
src/client/inc/tscUtil.h
src/client/inc/tscUtil.h
+3
-3
src/client/src/tscAsync.c
src/client/src/tscAsync.c
+1
-1
src/client/src/tscLocal.c
src/client/src/tscLocal.c
+2
-2
src/client/src/tscParseInsert.c
src/client/src/tscParseInsert.c
+2
-2
src/client/src/tscSQLParser.c
src/client/src/tscSQLParser.c
+18
-18
src/client/src/tscServer.c
src/client/src/tscServer.c
+5
-5
src/client/src/tscStream.c
src/client/src/tscStream.c
+1
-1
src/client/src/tscSubquery.c
src/client/src/tscSubquery.c
+2
-2
src/client/src/tscUtil.c
src/client/src/tscUtil.c
+6
-6
src/query/src/queryExecutor.c
src/query/src/queryExecutor.c
+0
-9
未找到文件。
src/client/inc/tscUtil.h
浏览文件 @
50f432c6
...
...
@@ -31,13 +31,13 @@ extern "C" {
#include "tscSecondaryMerge.h"
#include "tsclient.h"
#define UTIL_TABLE_IS_SUPERTABLE(metaInfo) \
#define UTIL_TABLE_IS_SUPER
_
TABLE(metaInfo) \
(((metaInfo)->pTableMeta != NULL) && ((metaInfo)->pTableMeta->tableType == TSDB_SUPER_TABLE))
#define UTIL_TABLE_IS_CHILD_TABLE(metaInfo) \
(((metaInfo)->pTableMeta != NULL) && ((metaInfo)->pTableMeta->tableType == TSDB_CHILD_TABLE))
#define UTIL_TABLE_IS_NO
MR
AL_TABLE(metaInfo)\
(!(UTIL_TABLE_IS_SUPERTABLE(metaInfo) || UTIL_TABLE_IS_CHILD_TABLE(metaInfo)))
#define UTIL_TABLE_IS_NO
RM
AL_TABLE(metaInfo)\
(!(UTIL_TABLE_IS_SUPER
_
TABLE(metaInfo) || UTIL_TABLE_IS_CHILD_TABLE(metaInfo)))
#define TSDB_COL_IS_TAG(f) (((f)&TSDB_COL_TAG) != 0)
...
...
src/client/src/tscAsync.c
浏览文件 @
50f432c6
...
...
@@ -471,7 +471,7 @@ void tscTableMetaCallBack(void *param, TAOS_RES *res, int code) {
if
(
code
==
TSDB_CODE_ACTION_IN_PROGRESS
)
return
;
if
(
code
==
TSDB_CODE_SUCCESS
&&
UTIL_TABLE_IS_SUPERTABLE
(
pTableMetaInfo
))
{
if
(
code
==
TSDB_CODE_SUCCESS
&&
UTIL_TABLE_IS_SUPER
_
TABLE
(
pTableMetaInfo
))
{
code
=
tscGetSTableVgroupInfo
(
pSql
,
pCmd
->
clauseIndex
);
pRes
->
code
=
code
;
...
...
src/client/src/tscLocal.c
浏览文件 @
50f432c6
...
...
@@ -122,7 +122,7 @@ static int32_t tscSetValueToResObj(SSqlObj *pSql, int32_t rowLen) {
int32_t
numOfRows
=
tscGetNumOfColumns
(
pMeta
);
int32_t
totalNumOfRows
=
numOfRows
+
tscGetNumOfTags
(
pMeta
);
if
(
UTIL_TABLE_IS_SUPERTABLE
(
pTableMetaInfo
))
{
if
(
UTIL_TABLE_IS_SUPER
_
TABLE
(
pTableMetaInfo
))
{
numOfRows
=
numOfRows
+
tscGetNumOfTags
(
pMeta
);
}
...
...
@@ -161,7 +161,7 @@ static int32_t tscSetValueToResObj(SSqlObj *pSql, int32_t rowLen) {
}
}
if
(
UTIL_TABLE_IS_SUPERTABLE
(
pTableMetaInfo
))
{
if
(
UTIL_TABLE_IS_SUPER
_
TABLE
(
pTableMetaInfo
))
{
return
0
;
}
...
...
src/client/src/tscParseInsert.c
浏览文件 @
50f432c6
...
...
@@ -796,7 +796,7 @@ static int32_t tscCheckIfCreateTable(char **sqlstr, SSqlObj *pSql) {
return
code
;
}
if
(
!
UTIL_TABLE_IS_SUPERTABLE
(
pSTableMeterMetaInfo
))
{
if
(
!
UTIL_TABLE_IS_SUPER
_
TABLE
(
pSTableMeterMetaInfo
))
{
return
tscInvalidSQLErrMsg
(
pCmd
->
payload
,
"create table only from super table is allowed"
,
sToken
.
z
);
}
...
...
@@ -1097,7 +1097,7 @@ int doParseInsertSql(SSqlObj *pSql, char *str) {
goto
_error_clean
;
// TODO: should _clean or _error_clean to async flow ????
}
if
(
UTIL_TABLE_IS_SUPERTABLE
(
pTableMetaInfo
))
{
if
(
UTIL_TABLE_IS_SUPER
_
TABLE
(
pTableMetaInfo
))
{
code
=
tscInvalidSQLErrMsg
(
pCmd
->
payload
,
"insert data into super table is not supported"
,
NULL
);
goto
_error_clean
;
}
...
...
src/client/src/tscSQLParser.c
浏览文件 @
50f432c6
...
...
@@ -1352,7 +1352,7 @@ static int32_t doAddProjectionExprAndResultFields(SQueryInfo* pQueryInfo, SColum
STableComInfo
tinfo
=
tscGetTableInfo
(
pTableMeta
);
if
(
UTIL_TABLE_IS_SUPERTABLE
(
pTableMetaInfo
))
{
if
(
UTIL_TABLE_IS_SUPER
_
TABLE
(
pTableMetaInfo
))
{
numOfTotalColumns
=
tinfo
.
numOfColumns
+
tinfo
.
numOfTags
;
}
else
{
numOfTotalColumns
=
tinfo
.
numOfColumns
;
...
...
@@ -1412,7 +1412,7 @@ int32_t addProjectionExprAndResultField(SQueryInfo* pQueryInfo, tSQLExprItem* pI
STableMetaInfo
*
pTableMetaInfo
=
tscGetMetaInfo
(
pQueryInfo
,
index
.
tableIndex
);
STableMeta
*
pTableMeta
=
pTableMetaInfo
->
pTableMeta
;
if
(
index
.
columnIndex
>=
tscGetNumOfColumns
(
pTableMeta
)
&&
UTIL_TABLE_IS_NO
MR
AL_TABLE
(
pTableMetaInfo
))
{
if
(
index
.
columnIndex
>=
tscGetNumOfColumns
(
pTableMeta
)
&&
UTIL_TABLE_IS_NO
RM
AL_TABLE
(
pTableMetaInfo
))
{
return
invalidSqlErrMsg
(
pQueryInfo
->
msg
,
msg1
);
}
...
...
@@ -1866,7 +1866,7 @@ int32_t addExprAndResultField(SQueryInfo* pQueryInfo, int32_t colIndex, tSQLExpr
case
TK_TBID
:
{
pTableMetaInfo
=
tscGetMetaInfo
(
pQueryInfo
,
0
);
if
(
UTIL_TABLE_IS_NO
MR
AL_TABLE
(
pTableMetaInfo
))
{
if
(
UTIL_TABLE_IS_NO
RM
AL_TABLE
(
pTableMetaInfo
))
{
return
invalidSqlErrMsg
(
pQueryInfo
->
msg
,
msg7
);
}
...
...
@@ -2283,7 +2283,7 @@ bool validateIpAddress(const char* ip, size_t size) {
int32_t
tscTansformSQLFuncForSTableQuery
(
SQueryInfo
*
pQueryInfo
)
{
STableMetaInfo
*
pTableMetaInfo
=
tscGetMetaInfo
(
pQueryInfo
,
0
);
if
(
pTableMetaInfo
->
pTableMeta
==
NULL
||
!
UTIL_TABLE_IS_SUPERTABLE
(
pTableMetaInfo
))
{
if
(
pTableMetaInfo
->
pTableMeta
==
NULL
||
!
UTIL_TABLE_IS_SUPER
_
TABLE
(
pTableMetaInfo
))
{
return
TSDB_CODE_INVALID_SQL
;
}
...
...
@@ -2322,7 +2322,7 @@ int32_t tscTansformSQLFuncForSTableQuery(SQueryInfo* pQueryInfo) {
/* transfer the field-info back to original input format */
void
tscRestoreSQLFuncForSTableQuery
(
SQueryInfo
*
pQueryInfo
)
{
STableMetaInfo
*
pTableMetaInfo
=
tscGetMetaInfo
(
pQueryInfo
,
0
);
if
(
!
UTIL_TABLE_IS_SUPERTABLE
(
pTableMetaInfo
))
{
if
(
!
UTIL_TABLE_IS_SUPER
_
TABLE
(
pTableMetaInfo
))
{
return
;
}
...
...
@@ -2546,7 +2546,7 @@ int32_t parseGroupbyClause(SQueryInfo* pQueryInfo, tVariantList* pList, SSqlCmd*
}
if
(
groupTag
)
{
if
(
!
UTIL_TABLE_IS_SUPERTABLE
(
pTableMetaInfo
))
{
if
(
!
UTIL_TABLE_IS_SUPER
_
TABLE
(
pTableMetaInfo
))
{
return
invalidSqlErrMsg
(
pQueryInfo
->
msg
,
msg9
);
}
...
...
@@ -3258,7 +3258,7 @@ static bool validateJoinExprNode(SQueryInfo* pQueryInfo, tSQLExpr* pExpr, SColum
}
// table to table/ super table to super table are allowed
if
(
UTIL_TABLE_IS_SUPER
TABLE
(
pLeftMeterMeta
)
!=
UTIL_TABLE_IS_SUPER
TABLE
(
pRightMeterMeta
))
{
if
(
UTIL_TABLE_IS_SUPER
_TABLE
(
pLeftMeterMeta
)
!=
UTIL_TABLE_IS_SUPER_
TABLE
(
pRightMeterMeta
))
{
invalidSqlErrMsg
(
pQueryInfo
->
msg
,
msg5
);
return
false
;
}
...
...
@@ -3341,7 +3341,7 @@ static int32_t handleExprInQueryCond(SQueryInfo* pQueryInfo, tSQLExpr** pExpr, S
}
else
if
(
index
.
columnIndex
>=
tscGetNumOfColumns
(
pTableMeta
)
||
index
.
columnIndex
==
TSDB_TBNAME_COLUMN_INDEX
)
{
// query on tags
// check for tag query condition
if
(
UTIL_TABLE_IS_NO
MR
AL_TABLE
(
pTableMetaInfo
))
{
if
(
UTIL_TABLE_IS_NO
RM
AL_TABLE
(
pTableMetaInfo
))
{
return
invalidSqlErrMsg
(
pQueryInfo
->
msg
,
msg1
);
}
...
...
@@ -3701,7 +3701,7 @@ static int32_t validateJoinExpr(SQueryInfo* pQueryInfo, SCondExpr* pCondExpr) {
}
STableMetaInfo
*
pTableMetaInfo
=
tscGetMetaInfo
(
pQueryInfo
,
0
);
if
(
UTIL_TABLE_IS_SUPERTABLE
(
pTableMetaInfo
))
{
// for stable join, tag columns
if
(
UTIL_TABLE_IS_SUPER
_
TABLE
(
pTableMetaInfo
))
{
// for stable join, tag columns
// must be present for join
if
(
pCondExpr
->
pJoinExpr
==
NULL
)
{
return
invalidSqlErrMsg
(
pQueryInfo
->
msg
,
msg1
);
...
...
@@ -3739,7 +3739,7 @@ static void cleanQueryExpr(SCondExpr* pCondExpr) {
static
void
doAddJoinTagsColumnsIntoTagList
(
SQueryInfo
*
pQueryInfo
,
SCondExpr
*
pCondExpr
)
{
STableMetaInfo
*
pTableMetaInfo
=
tscGetMetaInfo
(
pQueryInfo
,
0
);
if
(
QUERY_IS_JOIN_QUERY
(
pQueryInfo
->
type
)
&&
UTIL_TABLE_IS_SUPERTABLE
(
pTableMetaInfo
))
{
if
(
QUERY_IS_JOIN_QUERY
(
pQueryInfo
->
type
)
&&
UTIL_TABLE_IS_SUPER
_
TABLE
(
pTableMetaInfo
))
{
SColumnIndex
index
=
{
0
};
getColumnIndexByName
(
&
pCondExpr
->
pJoinExpr
->
pLeft
->
colInfo
,
pQueryInfo
,
&
index
);
...
...
@@ -4104,7 +4104,7 @@ static void setDefaultOrderInfo(SQueryInfo* pQueryInfo) {
}
/* for super table query, set default ascending order for group output */
if
(
UTIL_TABLE_IS_SUPERTABLE
(
pTableMetaInfo
))
{
if
(
UTIL_TABLE_IS_SUPER
_
TABLE
(
pTableMetaInfo
))
{
pQueryInfo
->
groupbyExpr
.
orderType
=
TSDB_ORDER_ASC
;
}
}
...
...
@@ -4130,7 +4130,7 @@ int32_t parseOrderbyClause(SQueryInfo* pQueryInfo, SQuerySQL* pQuerySql, SSchema
*
* for super table query, the order option must be less than 3.
*/
if
(
UTIL_TABLE_IS_NO
MR
AL_TABLE
(
pTableMetaInfo
))
{
if
(
UTIL_TABLE_IS_NO
RM
AL_TABLE
(
pTableMetaInfo
))
{
if
(
pSortorder
->
nExpr
>
1
)
{
return
invalidSqlErrMsg
(
pQueryInfo
->
msg
,
msg0
);
}
...
...
@@ -4151,7 +4151,7 @@ int32_t parseOrderbyClause(SQueryInfo* pQueryInfo, SQuerySQL* pQuerySql, SSchema
SSQLToken
columnName
=
{
pVar
->
nLen
,
pVar
->
nType
,
pVar
->
pz
};
SColumnIndex
index
=
{
0
};
if
(
UTIL_TABLE_IS_SUPERTABLE
(
pTableMetaInfo
))
{
// super table query
if
(
UTIL_TABLE_IS_SUPER
_
TABLE
(
pTableMetaInfo
))
{
// super table query
if
(
getColumnIndexByName
(
&
columnName
,
pQueryInfo
,
&
index
)
!=
TSDB_CODE_SUCCESS
)
{
return
invalidSqlErrMsg
(
pQueryInfo
->
msg
,
msg1
);
}
...
...
@@ -4304,10 +4304,10 @@ int32_t setAlterTableInfo(SSqlObj* pSql, struct SSqlInfo* pInfo) {
if
(
pAlterSQL
->
type
==
TSDB_ALTER_TABLE_ADD_TAG_COLUMN
||
pAlterSQL
->
type
==
TSDB_ALTER_TABLE_DROP_TAG_COLUMN
||
pAlterSQL
->
type
==
TSDB_ALTER_TABLE_CHANGE_TAG_COLUMN
)
{
if
(
UTIL_TABLE_IS_NO
MR
AL_TABLE
(
pTableMetaInfo
))
{
if
(
UTIL_TABLE_IS_NO
RM
AL_TABLE
(
pTableMetaInfo
))
{
return
invalidSqlErrMsg
(
pQueryInfo
->
msg
,
msg3
);
}
}
else
if
((
pAlterSQL
->
type
==
TSDB_ALTER_TABLE_UPDATE_TAG_VAL
)
&&
(
UTIL_TABLE_IS_SUPERTABLE
(
pTableMetaInfo
)))
{
}
else
if
((
pAlterSQL
->
type
==
TSDB_ALTER_TABLE_UPDATE_TAG_VAL
)
&&
(
UTIL_TABLE_IS_SUPER
_
TABLE
(
pTableMetaInfo
)))
{
return
invalidSqlErrMsg
(
pQueryInfo
->
msg
,
msg4
);
}
else
if
((
pAlterSQL
->
type
==
TSDB_ALTER_TABLE_ADD_COLUMN
||
pAlterSQL
->
type
==
TSDB_ALTER_TABLE_DROP_COLUMN
)
&&
UTIL_TABLE_IS_CHILD_TABLE
(
pTableMetaInfo
))
{
...
...
@@ -4693,7 +4693,7 @@ int32_t parseLimitClause(SQueryInfo* pQueryInfo, int32_t clauseIndex, SQuerySQL*
}
// todo refactor
if
(
UTIL_TABLE_IS_SUPERTABLE
(
pTableMetaInfo
))
{
if
(
UTIL_TABLE_IS_SUPER
_
TABLE
(
pTableMetaInfo
))
{
if
(
!
tscQueryTags
(
pQueryInfo
))
{
// local handle the super table tag query
if
(
tscIsProjectionQueryOnSTable
(
pQueryInfo
,
0
))
{
if
(
pQueryInfo
->
slimit
.
limit
>
0
||
pQueryInfo
->
slimit
.
offset
>
0
)
{
...
...
@@ -5629,7 +5629,7 @@ int32_t doCheckForStream(SSqlObj* pSql, SSqlInfo* pInfo) {
return
code
;
}
bool
isSTable
=
UTIL_TABLE_IS_SUPERTABLE
(
pTableMetaInfo
);
bool
isSTable
=
UTIL_TABLE_IS_SUPER
_
TABLE
(
pTableMetaInfo
);
if
(
parseSelectClause
(
&
pSql
->
cmd
,
0
,
pQuerySql
->
pSelection
,
isSTable
)
!=
TSDB_CODE_SUCCESS
)
{
return
TSDB_CODE_INVALID_SQL
;
}
...
...
@@ -5773,7 +5773,7 @@ int32_t doCheckForQuery(SSqlObj* pSql, SQuerySQL* pQuerySql, int32_t index) {
assert
(
pQueryInfo
->
numOfTables
==
pQuerySql
->
from
->
nExpr
);
bool
isSTable
=
false
;
if
(
UTIL_TABLE_IS_SUPERTABLE
(
pTableMetaInfo
))
{
if
(
UTIL_TABLE_IS_SUPER
_
TABLE
(
pTableMetaInfo
))
{
isSTable
=
true
;
code
=
tscGetSTableVgroupInfo
(
pSql
,
index
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
...
...
src/client/src/tscServer.c
浏览文件 @
50f432c6
...
...
@@ -500,7 +500,7 @@ int tscBuildFetchMsg(SSqlObj *pSql, SSqlInfo *pInfo) {
// todo valid the vgroupId at the client side
STableMetaInfo
*
pTableMetaInfo
=
tscGetMetaInfo
(
pQueryInfo
,
0
);
if
(
UTIL_TABLE_IS_SUPERTABLE
(
pTableMetaInfo
))
{
if
(
UTIL_TABLE_IS_SUPER
_
TABLE
(
pTableMetaInfo
))
{
int32_t
vgIndex
=
pTableMetaInfo
->
vgroupIndex
;
SVgroupsInfo
*
pVgroupInfo
=
pTableMetaInfo
->
vgroupList
;
...
...
@@ -565,7 +565,7 @@ static int32_t tscEstimateQueryMsgSize(SSqlCmd *pCmd, int32_t clauseIndex) {
//STableMetaInfo *pTableMetaInfo = tscGetMetaInfo(pQueryInfo, 0);
// table query without tags values
//if (!UTIL_TABLE_IS_SUPERTABLE(pTableMetaInfo)) {
//if (!UTIL_TABLE_IS_SUPER
_
TABLE(pTableMetaInfo)) {
return
MIN_QUERY_MSG_PKT_SIZE
+
minMsgSize
()
+
sizeof
(
SQueryTableMsg
)
+
srcColListSize
+
exprSize
+
4096
;
//}
...
...
@@ -577,10 +577,10 @@ static char *doSerializeTableInfo(SQueryTableMsg* pQueryMsg, SSqlObj *pSql, char
STableMetaInfo
*
pTableMetaInfo
=
tscGetTableMetaInfoFromCmd
(
&
pSql
->
cmd
,
pSql
->
cmd
.
clauseIndex
,
0
);
STableMeta
*
pTableMeta
=
pTableMetaInfo
->
pTableMeta
;
if
(
UTIL_TABLE_IS_NO
MR
AL_TABLE
(
pTableMetaInfo
)
||
pTableMetaInfo
->
pVgroupTables
==
NULL
)
{
if
(
UTIL_TABLE_IS_NO
RM
AL_TABLE
(
pTableMetaInfo
)
||
pTableMetaInfo
->
pVgroupTables
==
NULL
)
{
SCMVgroupInfo
*
pVgroupInfo
=
NULL
;
if
(
UTIL_TABLE_IS_SUPERTABLE
(
pTableMetaInfo
))
{
if
(
UTIL_TABLE_IS_SUPER
_
TABLE
(
pTableMetaInfo
))
{
int32_t
index
=
pTableMetaInfo
->
vgroupIndex
;
assert
(
index
>=
0
);
...
...
@@ -2292,7 +2292,7 @@ int tscProcessAlterTableMsgRsp(SSqlObj *pSql) {
taosCacheRelease
(
tscCacheHandle
,
(
void
**
)
&
pTableMeta
,
true
);
if
(
pTableMetaInfo
->
pTableMeta
)
{
bool
isSuperTable
=
UTIL_TABLE_IS_SUPERTABLE
(
pTableMetaInfo
);
bool
isSuperTable
=
UTIL_TABLE_IS_SUPER
_
TABLE
(
pTableMetaInfo
);
taosCacheRelease
(
tscCacheHandle
,
(
void
**
)
&
(
pTableMetaInfo
->
pTableMeta
),
true
);
// taosCacheRelease(tscCacheHandle, (void **)&(pTableMetaInfo->pMetricMeta), true);
...
...
src/client/src/tscStream.c
浏览文件 @
50f432c6
...
...
@@ -79,7 +79,7 @@ static void tscProcessStreamLaunchQuery(SSchedMsg *pMsg) {
if
(
code
==
TSDB_CODE_ACTION_IN_PROGRESS
)
return
;
if
(
code
==
0
&&
UTIL_TABLE_IS_SUPERTABLE
(
pTableMetaInfo
))
{
if
(
code
==
0
&&
UTIL_TABLE_IS_SUPER
_
TABLE
(
pTableMetaInfo
))
{
code
=
tscGetSTableVgroupInfo
(
pSql
,
0
);
pSql
->
res
.
code
=
code
;
...
...
src/client/src/tscSubquery.c
浏览文件 @
50f432c6
...
...
@@ -330,7 +330,7 @@ int32_t tscLaunchSecondPhaseSubqueries(SSqlObj* pSql) {
pNewQueryInfo
->
limit
=
pSupporter
->
limit
;
// fetch the join tag column
if
(
UTIL_TABLE_IS_SUPERTABLE
(
pTableMetaInfo
))
{
if
(
UTIL_TABLE_IS_SUPER
_
TABLE
(
pTableMetaInfo
))
{
SSqlExpr
*
pExpr
=
tscSqlExprGet
(
pNewQueryInfo
,
0
);
assert
(
pQueryInfo
->
tagCond
.
joinInfo
.
hasJoin
);
...
...
@@ -1096,7 +1096,7 @@ int32_t tscLaunchJoinSubquery(SSqlObj *pSql, int16_t tableIndex, SJoinSupporter
tscInitQueryInfo
(
pNewQueryInfo
);
STableMetaInfo
*
pTableMetaInfo
=
tscGetMetaInfo
(
pNewQueryInfo
,
0
);
if
(
UTIL_TABLE_IS_SUPERTABLE
(
pTableMetaInfo
))
{
// return the tableId & tag
if
(
UTIL_TABLE_IS_SUPER
_
TABLE
(
pTableMetaInfo
))
{
// return the tableId & tag
SSchema
s
=
{
0
};
SColumnIndex
index
=
{
0
};
...
...
src/client/src/tscUtil.c
浏览文件 @
50f432c6
...
...
@@ -157,7 +157,7 @@ bool tscIsTwoStageSTableQuery(SQueryInfo* pQueryInfo, int32_t tableIndex) {
}
// for select query super table, the super table vgroup list can not be null in any cases.
if
(
pQueryInfo
->
command
==
TSDB_SQL_SELECT
&&
UTIL_TABLE_IS_SUPERTABLE
(
pTableMetaInfo
))
{
if
(
pQueryInfo
->
command
==
TSDB_SQL_SELECT
&&
UTIL_TABLE_IS_SUPER
_
TABLE
(
pTableMetaInfo
))
{
assert
(
pTableMetaInfo
->
vgroupList
!=
NULL
);
}
...
...
@@ -172,7 +172,7 @@ bool tscIsTwoStageSTableQuery(SQueryInfo* pQueryInfo, int32_t tableIndex) {
if
(((
pQueryInfo
->
type
&
TSDB_QUERY_TYPE_STABLE_SUBQUERY
)
!=
TSDB_QUERY_TYPE_STABLE_SUBQUERY
)
&&
pQueryInfo
->
command
==
TSDB_SQL_SELECT
)
{
return
UTIL_TABLE_IS_SUPERTABLE
(
pTableMetaInfo
);
return
UTIL_TABLE_IS_SUPER
_
TABLE
(
pTableMetaInfo
);
}
return
false
;
...
...
@@ -187,7 +187,7 @@ bool tscIsProjectionQueryOnSTable(SQueryInfo* pQueryInfo, int32_t tableIndex) {
* 4. show queries, instead of a select query
*/
size_t
numOfExprs
=
tscSqlExprNumOfExprs
(
pQueryInfo
);
if
(
pTableMetaInfo
==
NULL
||
!
UTIL_TABLE_IS_SUPERTABLE
(
pTableMetaInfo
)
||
if
(
pTableMetaInfo
==
NULL
||
!
UTIL_TABLE_IS_SUPER
_
TABLE
(
pTableMetaInfo
)
||
pQueryInfo
->
command
==
TSDB_SQL_RETRIEVE_EMPTY_RESULT
||
numOfExprs
==
0
)
{
return
false
;
}
...
...
@@ -1348,7 +1348,7 @@ bool tscValidateColumnId(STableMetaInfo* pTableMetaInfo, int32_t colId) {
return
false
;
}
if
(
colId
==
-
1
&&
UTIL_TABLE_IS_SUPERTABLE
(
pTableMetaInfo
))
{
if
(
colId
==
-
1
&&
UTIL_TABLE_IS_SUPER
_
TABLE
(
pTableMetaInfo
))
{
return
true
;
}
...
...
@@ -1861,7 +1861,7 @@ SSqlObj* createSubqueryObj(SSqlObj* pSql, int16_t tableIndex, void (*fp)(), void
}
assert
(
pFinalInfo
->
pTableMeta
!=
NULL
&&
pNewQueryInfo
->
numOfTables
==
1
);
if
(
UTIL_TABLE_IS_SUPERTABLE
(
pTableMetaInfo
))
{
if
(
UTIL_TABLE_IS_SUPER
_
TABLE
(
pTableMetaInfo
))
{
assert
(
pFinalInfo
->
vgroupList
!=
NULL
);
}
...
...
@@ -1996,7 +1996,7 @@ bool hasMoreVnodesToTry(SSqlObj* pSql) {
// SQueryInfo* pQueryInfo = tscGetQueryInfoDetail(pCmd, pCmd->clauseIndex);
// STableMetaInfo* pTableMetaInfo = tscGetMetaInfo(pQueryInfo, 0);
// if (!UTIL_TABLE_IS_SUPERTABLE(pTableMetaInfo) || (pTableMetaInfo->pMetricMeta == NULL)) {
// if (!UTIL_TABLE_IS_SUPER
_
TABLE(pTableMetaInfo) || (pTableMetaInfo->pMetricMeta == NULL)) {
return
false
;
// }
...
...
src/query/src/queryExecutor.c
浏览文件 @
50f432c6
...
...
@@ -4685,15 +4685,6 @@ static void sequentialTableProcess(SQInfo *pQInfo) {
pQuery
->
limit
.
offset
);
}
static
void
prepareQueryInfoForReverseScan
(
SQInfo
*
pQInfo
)
{
// SQuery *pQuery = pQInfo->runtimeEnv.pQuery;
// for (int32_t i = 0; i < pQInfo->groupInfo.numOfTables; ++i) {
// STableQueryInfo *pTableQueryInfo = pQInfo->pTableQueryInfo[i].pTableQInfo;
// changeMeterQueryInfoForSuppleQuery(pQuery, pTableQueryInfo);
// }
}
static
void
doSaveContext
(
SQInfo
*
pQInfo
)
{
SQueryRuntimeEnv
*
pRuntimeEnv
=
&
pQInfo
->
runtimeEnv
;
SQuery
*
pQuery
=
pRuntimeEnv
->
pQuery
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录