Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
CSDN产品汪
TDengine
提交
a2f05401
T
TDengine
项目概览
CSDN产品汪
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
5
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,发现更多精彩内容 >>
提交
a2f05401
编写于
4月 24, 2020
作者:
H
hjxilinx
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[td-171] fix bugs in select * for super table.
上级
2ea4875d
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
38 addition
and
6 deletion
+38
-6
cmake/platform.inc
cmake/platform.inc
+1
-1
src/inc/tsdb.h
src/inc/tsdb.h
+1
-0
src/query/src/queryExecutor.c
src/query/src/queryExecutor.c
+24
-5
src/tsdb/src/tsdbMeta.c
src/tsdb/src/tsdbMeta.c
+12
-0
未找到文件。
cmake/platform.inc
浏览文件 @
a2f05401
...
...
@@ -62,7 +62,7 @@ IF (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
IF
(
$
{
CMAKE_SIZEOF_VOID_P
}
MATCHES
8
)
SET
(
TD_LINUX_64
TRUE
)
SET
(
TD_OS_DIR
$
{
TD_COMMUNITY_DIR
}
/
src
/
os
/
linux
)
ADD_DEFINITIONS
(
-
D_M_X64
)
ADD_DEFINITIONS
(
-
D_M_X64
-
D_DEBUG_VIEW
)
MESSAGE
(
STATUS
"The current platform is Linux 64-bit"
)
ELSEIF
(
$
{
CMAKE_SIZEOF_VOID_P
}
MATCHES
4
)
IF
(
TD_ARM
)
...
...
src/inc/tsdb.h
浏览文件 @
a2f05401
...
...
@@ -98,6 +98,7 @@ int tsdbTableSetSName(STableCfg *config, char *sname, bool dup);
void
tsdbClearTableCfg
(
STableCfg
*
config
);
int32_t
tsdbGetTableTagVal
(
TsdbRepoT
*
repo
,
STableId
id
,
int32_t
col
,
int16_t
*
type
,
int16_t
*
bytes
,
char
**
val
);
int32_t
tsdbTableGetName
(
TsdbRepoT
*
repo
,
STableId
id
,
char
**
name
);
int
tsdbCreateTable
(
TsdbRepoT
*
repo
,
STableCfg
*
pCfg
);
int
tsdbDropTable
(
TsdbRepoT
*
pRepo
,
STableId
tableId
);
...
...
src/query/src/queryExecutor.c
浏览文件 @
a2f05401
...
...
@@ -1383,8 +1383,13 @@ static int32_t setupQueryRuntimeEnv(SQueryRuntimeEnv *pRuntimeEnv, int16_t order
int32_t
index
=
pSqlFuncMsg
->
colInfo
.
colIndex
;
if
(
TSDB_COL_IS_TAG
(
pIndex
->
flag
))
{
pCtx
->
inputBytes
=
pQuery
->
tagColList
[
index
].
bytes
;
pCtx
->
inputType
=
pQuery
->
tagColList
[
index
].
type
;
if
(
pIndex
->
colId
==
TSDB_TBNAME_COLUMN_INDEX
)
{
pCtx
->
inputBytes
=
TSDB_TABLE_NAME_LEN
;
pCtx
->
inputType
=
TSDB_DATA_TYPE_BINARY
;
}
else
{
pCtx
->
inputBytes
=
pQuery
->
tagColList
[
index
].
bytes
;
pCtx
->
inputType
=
pQuery
->
tagColList
[
index
].
type
;
}
}
else
{
pCtx
->
inputBytes
=
pQuery
->
colList
[
index
].
bytes
;
pCtx
->
inputType
=
pQuery
->
colList
[
index
].
type
;
...
...
@@ -2503,8 +2508,19 @@ static void doSetTagValueInParam(void *tsdb, STableId id, int32_t tagColId, tVar
int16_t
bytes
=
0
;
int16_t
type
=
0
;
tsdbGetTableTagVal
(
tsdb
,
id
,
tagColId
,
&
type
,
&
bytes
,
&
val
);
if
(
tagColId
==
TSDB_TBNAME_COLUMN_INDEX
)
{
tsdbTableGetName
(
tsdb
,
id
,
&
val
);
bytes
=
TSDB_TABLE_NAME_LEN
;
type
=
TSDB_DATA_TYPE_BINARY
;
}
else
{
tsdbGetTableTagVal
(
tsdb
,
id
,
tagColId
,
&
type
,
&
bytes
,
&
val
);
}
tVariantCreateFromBinary
(
param
,
val
,
bytes
,
type
);
if
(
tagColId
==
TSDB_TBNAME_COLUMN_INDEX
)
{
tfree
(
val
);
}
}
void
setTagVal
(
SQueryRuntimeEnv
*
pRuntimeEnv
,
STableId
id
,
void
*
tsdb
)
{
...
...
@@ -5515,9 +5531,12 @@ static int32_t createSqlFunctionExprFromMsg(SQueryTableMsg *pQueryMsg, SArithExp
return
code
;
}
type
=
TSDB_DATA_TYPE_DOUBLE
;
type
=
TSDB_DATA_TYPE_DOUBLE
;
bytes
=
tDataTypeDesc
[
type
].
nSize
;
}
else
{
// parse the normal column
}
else
if
(
pExprs
[
i
].
pBase
.
colInfo
.
colId
==
TSDB_TBNAME_COLUMN_INDEX
)
{
// parse the normal column
type
=
TSDB_DATA_TYPE_BINARY
;
bytes
=
TSDB_TABLE_NAME_LEN
;
}
else
{
int32_t
j
=
getColumnIndexInSource
(
pQueryMsg
,
&
pExprs
[
i
].
pBase
,
pTagCols
);
assert
(
j
<
pQueryMsg
->
numOfCols
);
...
...
src/tsdb/src/tsdbMeta.c
浏览文件 @
a2f05401
...
...
@@ -251,6 +251,18 @@ int32_t tsdbGetTableTagVal(TsdbRepoT* repo, STableId id, int32_t colId, int16_t*
return
0
;
}
int32_t
tsdbTableGetName
(
TsdbRepoT
*
repo
,
STableId
id
,
char
**
name
)
{
STsdbMeta
*
pMeta
=
tsdbGetMeta
(
repo
);
STable
*
pTable
=
tsdbGetTableByUid
(
pMeta
,
id
.
uid
);
*
name
=
strndup
(
pTable
->
name
,
TSDB_TABLE_NAME_LEN
);
if
(
*
name
==
NULL
)
{
return
-
1
;
}
else
{
return
0
;
}
}
int32_t
tsdbCreateTableImpl
(
STsdbMeta
*
pMeta
,
STableCfg
*
pCfg
)
{
if
(
tsdbCheckTableCfg
(
pCfg
)
<
0
)
return
-
1
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录