Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
56f38425
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1187
Star
22018
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看板
提交
56f38425
编写于
3月 10, 2022
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[td-13039] fix bug.
上级
8196b6ee
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
23 addition
and
21 deletion
+23
-21
source/client/test/clientTests.cpp
source/client/test/clientTests.cpp
+2
-8
source/libs/executor/src/executorimpl.c
source/libs/executor/src/executorimpl.c
+15
-11
source/libs/parser/src/parTranslater.c
source/libs/parser/src/parTranslater.c
+6
-2
未找到文件。
source/client/test/clientTests.cpp
浏览文件 @
56f38425
...
...
@@ -53,7 +53,6 @@ TEST(testCase, driverInit_Test) {
// taos_init();
}
#if 0
TEST
(
testCase
,
connect_Test
)
{
// taos_options(TSDB_OPTION_CONFIGDIR, "/home/ubuntu/first/cfg");
...
...
@@ -564,8 +563,6 @@ TEST(testCase, insert_test) {
taos_free_result
(
pRes
);
taos_close
(
pConn
);
}
#endif
TEST
(
testCase
,
projection_query_tables
)
{
TAOS
*
pConn
=
taos_connect
(
"localhost"
,
"root"
,
"taosdata"
,
NULL
,
0
);
...
...
@@ -579,7 +576,7 @@ TEST(testCase, projection_query_tables) {
TAOS_RES
*
pRes
=
taos_query
(
pConn
,
"use abc1"
);
taos_free_result
(
pRes
);
#if 0
pRes
=
taos_query
(
pConn
,
"create stable st1 (ts timestamp, k int) tags(a int)"
);
if
(
taos_errno
(
pRes
)
!=
0
)
{
printf
(
"failed to create table tu, reason:%s
\n
"
,
taos_errstr
(
pRes
));
...
...
@@ -602,9 +599,8 @@ TEST(testCase, projection_query_tables) {
taos_free_result
(
p
);
}
#endif
pRes
=
taos_query
(
pConn
,
"select
count(ts)
from tu"
);
pRes
=
taos_query
(
pConn
,
"select
*
from tu"
);
if
(
taos_errno
(
pRes
)
!=
0
)
{
printf
(
"failed to select from table, reason:%s
\n
"
,
taos_errstr
(
pRes
));
taos_free_result
(
pRes
);
...
...
@@ -625,7 +621,6 @@ TEST(testCase, projection_query_tables) {
taos_close
(
pConn
);
}
#if 0
TEST
(
testCase
,
projection_query_stables
)
{
TAOS
*
pConn
=
taos_connect
(
"localhost"
,
"root"
,
"taosdata"
,
NULL
,
0
);
ASSERT_NE
(
pConn
,
nullptr
);
...
...
@@ -687,6 +682,5 @@ TEST(testCase, agg_query_tables) {
taos_free_result
(
pRes
);
taos_close
(
pConn
);
}
#endif
#pragma GCC diagnostic pop
source/libs/executor/src/executorimpl.c
浏览文件 @
56f38425
...
...
@@ -8140,11 +8140,9 @@ SOperatorInfo* doCreateOperatorTreeNode(SPhysiNode* pPhyNode, SExecTaskInfo* pTa
idList
=
taosArrayInit
(
4
,
sizeof
(
uint64_t
));
}
// SOperatorInfo* pOperator = createStreamScanOperatorInfo(pHandle->reader, pScanPhyNode->pScanCols, idList, pTaskInfo);
// taosArrayDestroy(idList);
// //TODO destroy groupInfo
// return pOperator;
// SOperatorInfo* pOperator = createStreamScanOperatorInfo(pHandle->reader, pScanPhyNode->pScanCols, idList, pTaskInfo);
taosArrayDestroy
(
idList
);
// return pOperator;
}
}
...
...
@@ -8175,9 +8173,9 @@ SOperatorInfo* doCreateOperatorTreeNode(SPhysiNode* pPhyNode, SExecTaskInfo* pTa
static
tsdbReaderT
createDataReaderImpl
(
STableScanPhysiNode
*
pTableScanNode
,
STableGroupInfo
*
pGroupInfo
,
void
*
readHandle
,
uint64_t
queryId
,
uint64_t
taskId
)
{
STsdbQueryCond
cond
=
{.
loadExternalRows
=
false
};
cond
.
order
=
pTableScanNode
->
scan
.
order
;
cond
.
order
=
pTableScanNode
->
scan
.
order
;
cond
.
numOfCols
=
LIST_LENGTH
(
pTableScanNode
->
scan
.
pScanCols
);
cond
.
colList
=
calloc
(
cond
.
numOfCols
,
sizeof
(
SColumnInfo
));
cond
.
colList
=
calloc
(
cond
.
numOfCols
,
sizeof
(
SColumnInfo
));
if
(
cond
.
colList
==
NULL
)
{
terrno
=
TSDB_CODE_QRY_OUT_OF_MEMORY
;
return
NULL
;
...
...
@@ -8187,15 +8185,21 @@ static tsdbReaderT createDataReaderImpl(STableScanPhysiNode* pTableScanNode, STa
cond
.
type
=
BLOCK_LOAD_OFFSET_SEQ_ORDER
;
// cond.type = pTableScanNode->scanFlag;
int32_t
j
=
0
;
for
(
int32_t
i
=
0
;
i
<
cond
.
numOfCols
;
++
i
)
{
STargetNode
*
pNode
=
(
STargetNode
*
)
nodesListGetNode
(
pTableScanNode
->
scan
.
pScanCols
,
i
);
SColumnNode
*
pColNode
=
(
SColumnNode
*
)
pNode
->
pExpr
;
cond
.
colList
[
i
].
type
=
pColNode
->
node
.
resType
.
type
;
cond
.
colList
[
i
].
bytes
=
pColNode
->
node
.
resType
.
bytes
;
cond
.
colList
[
i
].
colId
=
pColNode
->
colId
;
if
(
pColNode
->
colType
==
COLUMN_TYPE_TAG
)
{
continue
;
}
cond
.
colList
[
j
].
type
=
pColNode
->
node
.
resType
.
type
;
cond
.
colList
[
j
].
bytes
=
pColNode
->
node
.
resType
.
bytes
;
cond
.
colList
[
j
].
colId
=
pColNode
->
colId
;
j
+=
1
;
}
cond
.
numOfCols
=
j
;
return
tsdbQueryTables
(
readHandle
,
&
cond
,
pGroupInfo
,
queryId
,
taskId
);
}
...
...
source/libs/parser/src/parTranslater.c
浏览文件 @
56f38425
...
...
@@ -131,7 +131,7 @@ static int32_t createColumnNodeByTable(STranslateContext* pCxt, const STableNode
if
(
NULL
==
pCol
)
{
return
generateSyntaxErrMsg
(
&
pCxt
->
msgBuf
,
TSDB_CODE_OUT_OF_MEMORY
);
}
setColumnInfoBySchema
((
SRealTableNode
*
)
pTable
,
pMeta
->
schema
+
i
,
(
i
<
pMeta
->
tableInfo
.
numOfTag
s
),
pCol
);
setColumnInfoBySchema
((
SRealTableNode
*
)
pTable
,
pMeta
->
schema
+
i
,
(
i
>=
pMeta
->
tableInfo
.
numOfColumn
s
),
pCol
);
nodesListAppend
(
pList
,
(
SNode
*
)
pCol
);
}
}
else
{
...
...
@@ -156,7 +156,7 @@ static bool findAndSetColumn(SColumnNode* pCol, const STableNode* pTable) {
int32_t
nums
=
pMeta
->
tableInfo
.
numOfTags
+
pMeta
->
tableInfo
.
numOfColumns
;
for
(
int32_t
i
=
0
;
i
<
nums
;
++
i
)
{
if
(
0
==
strcmp
(
pCol
->
colName
,
pMeta
->
schema
[
i
].
name
))
{
setColumnInfoBySchema
((
SRealTableNode
*
)
pTable
,
pMeta
->
schema
+
i
,
(
i
<
pMeta
->
tableInfo
.
numOfTag
s
),
pCol
);
setColumnInfoBySchema
((
SRealTableNode
*
)
pTable
,
pMeta
->
schema
+
i
,
(
i
>=
pMeta
->
tableInfo
.
numOfColumn
s
),
pCol
);
found
=
true
;
break
;
}
...
...
@@ -1090,6 +1090,10 @@ static int32_t translateShow(STranslateContext* pCxt, SShowStmt* pStmt) {
static
int32_t
translateShowTables
(
STranslateContext
*
pCxt
)
{
SName
name
=
{
0
};
SVShowTablesReq
*
pShowReq
=
calloc
(
1
,
sizeof
(
SVShowTablesReq
));
if
(
pCxt
->
pParseCxt
->
db
==
NULL
||
strlen
(
pCxt
->
pParseCxt
->
db
)
==
0
)
{
return
generateSyntaxErrMsg
(
&
pCxt
->
msgBuf
,
TSDB_CODE_TSC_INVALID_OPERATION
,
"db not specified"
);
}
tNameSetDbName
(
&
name
,
pCxt
->
pParseCxt
->
acctId
,
pCxt
->
pParseCxt
->
db
,
strlen
(
pCxt
->
pParseCxt
->
db
));
char
dbFname
[
TSDB_DB_FNAME_LEN
]
=
{
0
};
tNameGetFullDbName
(
&
name
,
dbFname
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录